blob: fae0791e6e48abaa4a60362ca77ab4aecb4edd39 [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
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700683LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
697RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000698USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200715PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200717ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MAINCC
719CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700720SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200721GREP
722CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730EXPORT_MACOSX_DEPLOYMENT_TARGET
731CONFIGURE_MACOSX_DEPLOYMENT_TARGET
732SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000734MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000735FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800737FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000738FRAMEWORKALTINSTALLLAST
739FRAMEWORKALTINSTALLFIRST
740FRAMEWORKINSTALLLAST
741FRAMEWORKINSTALLFIRST
742PYTHONFRAMEWORKINSTALLDIR
743PYTHONFRAMEWORKPREFIX
744PYTHONFRAMEWORKDIR
745PYTHONFRAMEWORKIDENTIFIER
746PYTHONFRAMEWORK
747LIPO_32BIT_FLAGS
748ARCH_RUN_32BIT
749UNIVERSALSDK
750CONFIG_ARGS
751SOVERSION
752VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000753GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200754PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200755PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100756host_os
757host_vendor
758host_cpu
759host
760build_os
761build_vendor
762build_cpu
763build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500764HAS_HG
765HGBRANCH
766HGTAG
767HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400768BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000769target_alias
770host_alias
771build_alias
772LIBS
773ECHO_T
774ECHO_N
775ECHO_C
776DEFS
777mandir
778localedir
779libdir
780psdir
781pdfdir
782dvidir
783htmldir
784infodir
785docdir
786oldincludedir
787includedir
788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
814with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600815with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
Brett Cannon63d98bc2016-09-06 17:12:40 -0700821with_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_threads
834with_thread
835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_fpectl
841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100856CPP
857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001199 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ;;
1248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 export $ac_envvar ;;
1258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001264 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ;;
1266
1267 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268done
1269
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273fi
1274
Matthias Kloseb9621712010-04-24 17:59:49 +00001275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280 esac
1281fi
1282
1283# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Łukasz Langaa785c872016-09-09 17:37:37 -07001287 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001297 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001302done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 elif test "x$build_alias" != "x$host_alias"; then
1316 cross_compiling=yes
1317 fi
1318fi
1319
1320ac_tool_prefix=
1321test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323test "$silent" = yes && exec 6>/dev/null
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327ac_ls_di=`ls -di .` &&
1328ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334# Find the source files, if location was not specified.
1335if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 ac_confdir=`$as_dirname -- "$as_myself" ||
1339$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340 X"$as_myself" : 'X\(//\)[^/]' \| \
1341 X"$as_myself" : 'X\(//\)$' \| \
1342 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)[^/].*/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\).*/{
1357 s//\1/
1358 q
1359 }
1360 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001361 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363 srcdir=..
1364 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365else
1366 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368if test ! -r "$srcdir/$ac_unique_file"; then
1369 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001370 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 pwd)`
1376# When building in place, set srcdir=.
1377if test "$ac_abs_confdir" = "$ac_pwd"; then
1378 srcdir=.
1379fi
1380# Remove unnecessary trailing slashes from srcdir.
1381# Double slashes in file names in object file debugging info
1382# mess up M-x gdb in Emacs.
1383case $srcdir in
1384*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385esac
1386for ac_var in $ac_precious_vars; do
1387 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_env_${ac_var}_value=\$${ac_var}
1389 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393#
1394# Report the --help message.
1395#
1396if test "$ac_init_help" = "long"; then
1397 # Omit some internal or obsolete options to make the list less imposing.
1398 # This message is too long to be a string in the A/UX 3.1 sh.
1399 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001400\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405VAR=VALUE. See below for descriptions of some of the useful variables.
1406
1407Defaults for the options are specified in brackets.
1408
1409Configuration:
1410 -h, --help display this help and exit
1411 --help=short display options specific to this package
1412 --help=recursive display the short help of all the included packages
1413 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001414 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --cache-file=FILE cache test results in FILE [disabled]
1416 -C, --config-cache alias for \`--cache-file=config.cache'
1417 -n, --no-create do not create output files
1418 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1419
Martin v. Löwis11437992002-04-12 09:54:03 +00001420Installation directories:
1421 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426By default, \`make install' will install all the files in
1427\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1428an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429for instance \`--prefix=\$HOME'.
1430
1431For better control, use the options below.
1432
1433Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 --bindir=DIR user executables [EPREFIX/bin]
1435 --sbindir=DIR system admin executables [EPREFIX/sbin]
1436 --libexecdir=DIR program executables [EPREFIX/libexec]
1437 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1438 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1439 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1440 --libdir=DIR object code libraries [EPREFIX/lib]
1441 --includedir=DIR C header files [PREFIX/include]
1442 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1443 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1444 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1445 --infodir=DIR info documentation [DATAROOTDIR/info]
1446 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1447 --mandir=DIR man documentation [DATAROOTDIR/man]
1448 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1449 --htmldir=DIR html documentation [DOCDIR]
1450 --dvidir=DIR dvi documentation [DOCDIR]
1451 --pdfdir=DIR pdf documentation [DOCDIR]
1452 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001453_ACEOF
1454
1455 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001456
1457System types:
1458 --build=BUILD configure for building on BUILD [guessed]
1459 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001460 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
1462fi
1463
1464if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001465 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001466 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 cat <<\_ACEOF
1469
1470Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001471 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1473 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001474 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001475 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --enable-framework[=INSTALLDIR]
1477 Build (MacOSX|Darwin) framework
1478 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001479 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001480 --enable-loadable-sqlite-extensions
1481 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-ipv6 Enable ipv6 (with ipv4) support
1483 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001484 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001485 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487Optional Packages:
1488 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1489 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001490 --with-universal-archs=ARCH
1491 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001492 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001493 --with-framework-name=FRAMEWORK
1494 specify an alternate name of the framework built
1495 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001497 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00001503 --with-optimizations Enable expensive optimizations (PGO, maybe LTO,
Brett Cannon63d98bc2016-09-06 17:12:40 -07001504 etc). Disabled by default.
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001505 --with-lto Enable Link Time Optimization in PGO builds.
1506 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001507 --with-hash-algorithm=[fnv|siphash24]
1508 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001509 --with-address-sanitizer
1510 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001512 --with-system-expat build pyexpat module using an installed expat
1513 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001514 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001515 --with-system-libmpdec build _decimal module using an installed libmpdec
1516 library
Ned Deilyd819b932013-09-06 01:07:05 -07001517 --with-tcltk-includes='-I...'
1518 override search for Tcl and Tk include files
1519 --with-tcltk-libs='-L...'
1520 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001521 --with-dbmliborder=db1:db2:...
1522 order to check db backends for dbm. Valid value is a
1523 colon separated string with the backend names
1524 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-threads[=DIRECTORY]
1526 disable/enable thread support
1527 --with(out)-thread[=DIRECTORY]
1528 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
1530 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001531 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001532 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-fpectl enable SIGFPE catching
1534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001624python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
Matthias Kloseb9621712010-04-24 17:59:49 +00001977# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1978# --------------------------------------------
1979# Tries to find the compile-time value of EXPR in a program that includes
1980# INCLUDES, setting VAR accordingly. Returns whether the value could be
1981# computed
1982ac_fn_c_compute_int ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 if test "$cross_compiling" = yes; then
1986 # Depending upon the size, compute the lo and hi bounds.
1987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990int
1991main ()
1992{
1993static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001994test_array [0] = 0;
1995return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 ac_lo=0 ac_mid=0
2003 while :; do
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 ac_hi=$ac_mid; break
2020else
2021 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2022 if test $ac_lo -le $ac_mid; then
2023 ac_lo= ac_hi=
2024 break
2025 fi
2026 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2027fi
2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 done
2030else
2031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032/* end confdefs.h. */
2033$4
2034int
2035main ()
2036{
2037static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002038test_array [0] = 0;
2039return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=-1 ac_mid=-1
2047 while :; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_lo=$ac_mid; break
2064else
2065 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2066 if test $ac_mid -le $ac_hi; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 ac_lo= ac_hi=
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080# Binary search between lo and hi bounds.
2081while test "x$ac_lo" != "x$ac_hi"; do
2082 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=$ac_mid
2099else
2100 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103done
2104case $ac_lo in #((
2105?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2106'') ac_retval=1 ;;
2107esac
2108 else
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112static long int longval () { return $2; }
2113static unsigned long int ulongval () { return $2; }
2114#include <stdio.h>
2115#include <stdlib.h>
2116int
2117main ()
2118{
2119
2120 FILE *f = fopen ("conftest.val", "w");
2121 if (! f)
2122 return 1;
2123 if (($2) < 0)
2124 {
2125 long int i = longval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%ld", i);
2129 }
2130 else
2131 {
2132 unsigned long int i = ulongval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%lu", i);
2136 }
2137 /* Do not output a trailing newline, as this causes \r\n confusion
2138 on some platforms. */
2139 return ferror (f) || fclose (f) != 0;
2140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_run "$LINENO"; then :
2146 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2147else
2148 ac_retval=1
2149fi
2150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2151 conftest.$ac_objext conftest.beam conftest.$ac_ext
2152rm -f conftest.val
2153
2154 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002155 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_compute_int
2159
2160# ac_fn_c_check_func LINENO FUNC VAR
2161# ----------------------------------
2162# Tests whether FUNC exists, setting the cache variable VAR accordingly
2163ac_fn_c_check_func ()
2164{
2165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2167$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002168if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002169 $as_echo_n "(cached) " >&6
2170else
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2174 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2175#define $2 innocuous_$2
2176
2177/* System header to define __stub macros and hopefully few prototypes,
2178 which can conflict with char $2 (); below.
2179 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2180 <limits.h> exists even on freestanding compilers. */
2181
2182#ifdef __STDC__
2183# include <limits.h>
2184#else
2185# include <assert.h>
2186#endif
2187
2188#undef $2
2189
2190/* Override any GCC internal prototype to avoid an error.
2191 Use char because int might match the return type of a GCC
2192 builtin and then its argument prototype would still apply. */
2193#ifdef __cplusplus
2194extern "C"
2195#endif
2196char $2 ();
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined __stub_$2 || defined __stub___$2
2201choke me
2202#endif
2203
2204int
2205main ()
2206{
2207return $2 ();
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_link "$LINENO"; then :
2213 eval "$3=yes"
2214else
2215 eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext \
2218 conftest$ac_exeext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225} # ac_fn_c_check_func
2226
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002227# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2228# ---------------------------------------------
2229# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2230# accordingly.
2231ac_fn_c_check_decl ()
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 as_decl_name=`echo $2|sed 's/ *(.*//'`
2235 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2237$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2238if eval \${$3+:} false; then :
2239 $as_echo_n "(cached) " >&6
2240else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244int
2245main ()
2246{
2247#ifndef $as_decl_name
2248#ifdef __cplusplus
2249 (void) $as_decl_use;
2250#else
2251 (void) $as_decl_name;
2252#endif
2253#endif
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265fi
2266eval ac_res=\$$3
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2268$as_echo "$ac_res" >&6; }
2269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270
2271} # ac_fn_c_check_decl
2272
Matthias Kloseb9621712010-04-24 17:59:49 +00002273# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2274# ----------------------------------------------------
2275# Tries to find if the field MEMBER exists in type AGGR, after including
2276# INCLUDES, setting cache variable VAR accordingly.
2277ac_fn_c_check_member ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2281$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002282if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$5
2288int
2289main ()
2290{
2291static $2 ac_aggr;
2292if (ac_aggr.$3)
2293return 0;
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$4=yes"
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$5
2304int
2305main ()
2306{
2307static $2 ac_aggr;
2308if (sizeof ac_aggr.$3)
2309return 0;
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$4=yes"
2316else
2317 eval "$4=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323eval ac_res=\$$4
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002326 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002327
2328} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002330This file contains any messages produced by compilers while
2331running configure, to aid debugging if configure makes a mistake.
2332
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002333It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002334generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
2336 $ $0 $@
2337
2338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002340{
2341cat <<_ASUNAME
2342## --------- ##
2343## Platform. ##
2344## --------- ##
2345
2346hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2347uname -m = `(uname -m) 2>/dev/null || echo unknown`
2348uname -r = `(uname -r) 2>/dev/null || echo unknown`
2349uname -s = `(uname -s) 2>/dev/null || echo unknown`
2350uname -v = `(uname -v) 2>/dev/null || echo unknown`
2351
2352/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2353/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2354
2355/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2356/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2357/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002359/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2360/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2361/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2362
2363_ASUNAME
2364
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002370 $as_echo "PATH: $as_dir"
2371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374} >&5
2375
2376cat >&5 <<_ACEOF
2377
2378
2379## ----------- ##
2380## Core tests. ##
2381## ----------- ##
2382
2383_ACEOF
2384
2385
2386# Keep a trace of the command line.
2387# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002390# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002391ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_configure_args0=
2393ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002394ac_must_keep_next=false
2395for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002396do
Skip Montanaro6dead952003-09-25 14:50:04 +00002397 for ac_arg
2398 do
2399 case $ac_arg in
2400 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2402 | -silent | --silent | --silen | --sile | --sil)
2403 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 esac
2407 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002414 case $ac_arg in
2415 *=* | --config-cache | -C | -disable-* | --disable-* \
2416 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2417 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2418 | -with-* | --with-* | -without-* | --without-* | --x)
2419 case "$ac_configure_args0 " in
2420 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2421 esac
2422 ;;
2423 -* ) ac_must_keep_next=true ;;
2424 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 ;;
2428 esac
2429 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002430done
Matthias Kloseb9621712010-04-24 17:59:49 +00002431{ ac_configure_args0=; unset ac_configure_args0;}
2432{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434# When interrupted or exit'd, cleanup temporary files, and complete
2435# config.log. We remove comments because anyway the quotes in there
2436# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437# WARNING: Use '\'' to represent an apostrophe within the trap.
2438# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002439trap 'exit_status=$?
2440 # Save into config.log some information that might help in debugging.
2441 {
2442 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002443
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002444 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002446## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002481## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 echo
2484 for ac_var in $ac_subst_vars
2485 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 eval ac_val=\$$ac_var
2487 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 done | sort
2492 echo
2493
2494 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_files
2500 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508 fi
2509
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 echo
2517 fi
2518 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$as_me: caught signal $ac_signal"
2520 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 rm -f core *.core core.conftest.* &&
2523 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002526for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529ac_signal=0
2530
2531# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
Matthias Kloseb9621712010-04-24 17:59:49 +00002534$as_echo "/* confdefs.h */" > confdefs.h
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536# Predefined preprocessor variables.
2537
2538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_NAME "$PACKAGE_NAME"
2540_ACEOF
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2544_ACEOF
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_VERSION "$PACKAGE_VERSION"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_STRING "$PACKAGE_STRING"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2556_ACEOF
2557
Matthias Kloseb9621712010-04-24 17:59:49 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_URL "$PACKAGE_URL"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002564# Prefer an explicitly selected file to automatically selected ones.
2565ac_site_file1=NONE
2566ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568 # We do not want a PATH search for config.site.
2569 case $CONFIG_SITE in #((
2570 -*) ac_site_file1=./$CONFIG_SITE;;
2571 */*) ac_site_file1=$CONFIG_SITE;;
2572 *) ac_site_file1=./$CONFIG_SITE;;
2573 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 . "$ac_site_file" \
2589 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2591as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002592See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593 fi
2594done
2595
2596if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 # Some versions of bash will fail to source /dev/null (special files
2598 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2599 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 esac
2606 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607else
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 >$cache_file
2611fi
2612
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $ac_old_set,$ac_new_set in
2622 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_cache_corrupted=: ;;
2626 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002668 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Trent Nelson4d4ec652012-10-16 08:51:24 -04002682
Trent Nelson5595ab52012-10-17 04:47:31 -04002683if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002684 # If we're building out-of-tree, we need to make sure the following
2685 # resources get picked up before their $srcdir counterparts.
2686 # Objects/ -> typeslots.inc
2687 # Include/ -> Python-ast.h, graminit.h
2688 # Python/ -> importlib.h
2689 # (A side effect of this is that these resources will automatically be
2690 # regenerated when building out-of-tree, regardless of whether or not
2691 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2692 # off.)
2693 BASECPPFLAGS="-IObjects -IInclude -IPython"
2694else
2695 BASECPPFLAGS=""
2696fi
2697
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002698
2699
2700
2701
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002702if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703then
2704# Extract the first word of "hg", so it can be a program name with args.
2705set dummy hg; ac_word=$2
2706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2707$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002708if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709 $as_echo_n "(cached) " >&6
2710else
2711 if test -n "$HAS_HG"; then
2712 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2713else
2714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2715for as_dir in $PATH
2716do
2717 IFS=$as_save_IFS
2718 test -z "$as_dir" && as_dir=.
2719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 ac_cv_prog_HAS_HG="found"
2722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2723 break 2
2724 fi
2725done
2726 done
2727IFS=$as_save_IFS
2728
2729 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2730fi
2731fi
2732HAS_HG=$ac_cv_prog_HAS_HG
2733if test -n "$HAS_HG"; then
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2735$as_echo "$HAS_HG" >&6; }
2736else
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2738$as_echo "no" >&6; }
2739fi
2740
2741
2742else
2743HAS_HG=no-repository
2744fi
2745if test $HAS_HG = found
2746then
2747 HGVERSION="hg id -i \$(srcdir)"
2748 HGTAG="hg id -t \$(srcdir)"
2749 HGBRANCH="hg id -b \$(srcdir)"
2750else
2751 HGVERSION=""
2752 HGTAG=""
2753 HGBRANCH=""
2754fi
2755
2756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002757ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002758
2759
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002760ac_aux_dir=
2761for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2762 if test -f "$ac_dir/install-sh"; then
2763 ac_aux_dir=$ac_dir
2764 ac_install_sh="$ac_aux_dir/install-sh -c"
2765 break
2766 elif test -f "$ac_dir/install.sh"; then
2767 ac_aux_dir=$ac_dir
2768 ac_install_sh="$ac_aux_dir/install.sh -c"
2769 break
2770 elif test -f "$ac_dir/shtool"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/shtool install -c"
2773 break
2774 fi
2775done
2776if test -z "$ac_aux_dir"; then
2777 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2778fi
2779
2780# These three variables are undocumented and unsupported,
2781# and are intended to be withdrawn in a future Autoconf release.
2782# They can cause serious problems if a builder's source tree is in a directory
2783# whose full name contains unusual characters.
2784ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2785ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2786ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2787
2788
2789# Make sure we can run config.sub.
2790$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2791 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2792
2793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2794$as_echo_n "checking build system type... " >&6; }
2795if ${ac_cv_build+:} false; then :
2796 $as_echo_n "(cached) " >&6
2797else
2798 ac_build_alias=$build_alias
2799test "x$ac_build_alias" = x &&
2800 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2801test "x$ac_build_alias" = x &&
2802 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2803ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2804 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2805
2806fi
2807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2808$as_echo "$ac_cv_build" >&6; }
2809case $ac_cv_build in
2810*-*-*) ;;
2811*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2812esac
2813build=$ac_cv_build
2814ac_save_IFS=$IFS; IFS='-'
2815set x $ac_cv_build
2816shift
2817build_cpu=$1
2818build_vendor=$2
2819shift; shift
2820# Remember, the first character of IFS is used to create $*,
2821# except with old shells:
2822build_os=$*
2823IFS=$ac_save_IFS
2824case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2825
2826
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2828$as_echo_n "checking host system type... " >&6; }
2829if ${ac_cv_host+:} false; then :
2830 $as_echo_n "(cached) " >&6
2831else
2832 if test "x$host_alias" = x; then
2833 ac_cv_host=$ac_cv_build
2834else
2835 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2836 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2837fi
2838
2839fi
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2841$as_echo "$ac_cv_host" >&6; }
2842case $ac_cv_host in
2843*-*-*) ;;
2844*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2845esac
2846host=$ac_cv_host
2847ac_save_IFS=$IFS; IFS='-'
2848set x $ac_cv_host
2849shift
2850host_cpu=$1
2851host_vendor=$2
2852shift; shift
2853# Remember, the first character of IFS is used to create $*,
2854# except with old shells:
2855host_os=$*
2856IFS=$ac_save_IFS
2857case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2858
2859
2860
doko@python.orga10e4a92013-01-25 18:45:12 +01002861
2862
Ned Deilyfcbc2462014-08-22 13:32:49 -07002863# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2864rm -f pybuilddir.txt
2865
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002866for ac_prog in python$PACKAGE_VERSION python3 python
2867do
2868 # Extract the first word of "$ac_prog", so it can be a program name with args.
2869set dummy $ac_prog; ac_word=$2
2870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2871$as_echo_n "checking for $ac_word... " >&6; }
2872if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2873 $as_echo_n "(cached) " >&6
2874else
2875 if test -n "$PYTHON_FOR_GEN"; then
2876 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2877else
2878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2879for as_dir in $PATH
2880do
2881 IFS=$as_save_IFS
2882 test -z "$as_dir" && as_dir=.
2883 for ac_exec_ext in '' $ac_executable_extensions; do
2884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2885 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2887 break 2
2888 fi
2889done
2890 done
2891IFS=$as_save_IFS
2892
2893fi
2894fi
2895PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2896if test -n "$PYTHON_FOR_GEN"; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2898$as_echo "$PYTHON_FOR_GEN" >&6; }
2899else
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2901$as_echo "no" >&6; }
2902fi
2903
2904
2905 test -n "$PYTHON_FOR_GEN" && break
2906done
2907test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2908
2909if test "$PYTHON_FOR_GEN" = not-found; then
2910 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2911 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2912 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2913fi
2914
2915
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002916if test "$cross_compiling" = yes; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2918$as_echo_n "checking for python interpreter for cross build... " >&6; }
2919 if test -z "$PYTHON_FOR_BUILD"; then
2920 for interp in python$PACKAGE_VERSION python3 python; do
2921 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002922 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 +02002923 break
2924 fi
2925 interp=
2926 done
2927 if test x$interp = x; then
2928 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2929 fi
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2931$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002932 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 +02002933 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002934 # Used to comment out stuff for rebuilding generated files
2935 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002936elif test "$cross_compiling" = maybe; then
2937 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938else
2939 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002940 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Martin Pantereac67be2016-07-28 01:28:27 +00002945
Benjamin Petersond23f8222009-04-05 19:13:16 +00002946if test "$prefix" != "/"; then
2947 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
2952
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002953# We don't use PACKAGE_ variables, and they cause conflicts
2954# with other autoconf-based packages that include Python.h
2955grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2956rm confdefs.h
2957mv confdefs.h.new confdefs.h
2958
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002959
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002960VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002961
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002962# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002963
2964SOVERSION=1.0
2965
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966# The later defininition of _XOPEN_SOURCE disables certain features
2967# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970
2971
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977
2978
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984
2985
Martin v. Löwisd6320502004-08-12 13:45:08 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002990
2991
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2993# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2994# them.
2995
Matthias Kloseb9621712010-04-24 17:59:49 +00002996$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997
2998
2999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003000define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003001
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003002# Arguments passed to configure.
3003
3004CONFIG_ARGS="$ac_configure_args"
3005
Matthias Kloseb9621712010-04-24 17:59:49 +00003006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3007$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003008# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003009if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003010 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003011 case $enableval in
3012 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003013 # Locate the best usable SDK, see Mac/README.txt for more
3014 # information
3015 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003016 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003017 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003018 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3019 if test ! -d "${enableval}"
3020 then
3021 enableval=/
3022 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 ;;
3025 esac
3026 case $enableval in
3027 no)
3028 UNIVERSALSDK=
3029 enable_universalsdk=
3030 ;;
3031 *)
3032 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 if test ! -d "${UNIVERSALSDK}"
3034 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003035 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037 ;;
3038 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003039
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041else
3042
3043 UNIVERSALSDK=
3044 enable_universalsdk=
3045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048if test -n "${UNIVERSALSDK}"
3049then
Matthias Kloseb9621712010-04-24 17:59:49 +00003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3051$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052else
Matthias Kloseb9621712010-04-24 17:59:49 +00003053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3054$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003058
Ned Deily87adb6e2013-10-18 21:09:56 -07003059ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003060
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061# For backward compatibility reasons we prefer to select '32-bit' if available,
3062# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064if test "`uname -s`" = "Darwin"
3065then
3066 if test -n "${UNIVERSALSDK}"
3067 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003068 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069 then
3070 UNIVERSAL_ARCHS="intel"
3071 fi
3072 fi
3073fi
3074
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3077$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078
3079# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003080if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082 UNIVERSAL_ARCHS="$withval"
3083
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084fi
3085
Ned Deily87adb6e2013-10-18 21:09:56 -07003086if test -n "${UNIVERSALSDK}"
3087then
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3089$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3090else
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3092$as_echo "no" >&6; }
3093fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003095
3096# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003097if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003098 withval=$with_framework_name;
3099 PYTHONFRAMEWORK=${withval}
3100 PYTHONFRAMEWORKDIR=${withval}.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3102
3103else
3104
3105 PYTHONFRAMEWORK=Python
3106 PYTHONFRAMEWORKDIR=Python.framework
3107 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3108
3109fi
3110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003112if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003114 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003115 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003116 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 esac
3118 case $enableval in
3119 no)
3120 PYTHONFRAMEWORK=
3121 PYTHONFRAMEWORKDIR=no-framework
3122 PYTHONFRAMEWORKPREFIX=
3123 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003124 FRAMEWORKINSTALLFIRST=
3125 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003126 FRAMEWORKALTINSTALLFIRST=
3127 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003128 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003129 if test "x${prefix}" = "xNONE"; then
3130 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3131 else
3132 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3133 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003134 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003135 ;;
3136 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003137 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003139 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003140 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003141 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3142 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003143 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003145
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003146 if test "x${prefix}" = "xNONE" ; then
3147 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003149 else
3150 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3151 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152
3153 case "${enableval}" in
3154 /System*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 if test "${prefix}" = "NONE" ; then
3157 # See below
3158 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3159 fi
3160 ;;
3161
3162 /Library*)
3163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3164 ;;
3165
3166 */Library/Frameworks)
3167 MDIR="`dirname "${enableval}"`"
3168 MDIR="`dirname "${MDIR}"`"
3169 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3170
3171 if test "${prefix}" = "NONE"; then
3172 # User hasn't specified the
3173 # --prefix option, but wants to install
3174 # the framework in a non-default location,
3175 # ensure that the compatibility links get
3176 # installed relative to that prefix as well
3177 # instead of in /usr/local.
3178 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3179 fi
3180 ;;
3181
3182 *)
3183 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3184 ;;
3185 esac
3186
Jack Jansen127e56e2001-09-11 14:41:54 +00003187 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003195 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3196
3197 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3198
Jack Jansene578a632001-08-15 01:27:14 +00003199 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Guido van Rossum563e7081996-09-10 18:20:48 +00003201else
Martin v. Löwis11437992002-04-12 09:54:03 +00003202
Jack Jansene578a632001-08-15 01:27:14 +00003203 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003204 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003205 PYTHONFRAMEWORKPREFIX=
3206 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003207 FRAMEWORKINSTALLFIRST=
3208 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 FRAMEWORKALTINSTALLFIRST=
3210 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003211 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003212 if test "x${prefix}" = "xNONE" ; then
3213 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3214 else
3215 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3216 fi
Jack Jansene578a632001-08-15 01:27:14 +00003217 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003218
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220fi
3221
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222
3223
Michael W. Hudson54241132001-12-07 15:38:26 +00003224
3225
3226
3227
Jack Jansene578a632001-08-15 01:27:14 +00003228
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003229
3230
3231
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003232
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003233
Ned Deilyb8f944f2013-11-21 22:42:25 -08003234
Jack Jansene578a632001-08-15 01:27:14 +00003235##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003236## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003237## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003238##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239# Set name for machine-dependent library files
3240
Matthias Kloseb9621712010-04-24 17:59:49 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3242$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243if test -z "$MACHDEP"
3244then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003245 # avoid using uname for cross builds
3246 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003247 # ac_sys_system and ac_sys_release are used for setting
3248 # a lot of different things including 'define_xopen_source'
3249 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 case "$host" in
3251 *-*-linux*)
3252 ac_sys_system=Linux
3253 ;;
3254 *-*-cygwin*)
3255 ac_sys_system=Cygwin
3256 ;;
3257 *)
3258 # for now, limit cross builds to known configurations
3259 MACHDEP="unknown"
3260 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3261 esac
3262 ac_sys_release=
3263 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003264 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003265 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003266 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003267 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003271 fi
3272 ac_md_system=`echo $ac_sys_system |
3273 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3274 ac_md_release=`echo $ac_sys_release |
3275 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3276 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003277
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003279 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003280 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003281 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003282 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003283 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285fi
Guido van Rossum91922671997-10-09 20:24:13 +00003286
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003287
3288if test "$cross_compiling" = yes; then
3289 case "$host" in
3290 *-*-linux*)
3291 case "$host_cpu" in
3292 arm*)
3293 _host_cpu=arm
3294 ;;
3295 *)
3296 _host_cpu=$host_cpu
3297 esac
3298 ;;
3299 *-*-cygwin*)
3300 _host_cpu=
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3308fi
3309
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3311# disable features if it is defined, without any means to access these
3312# features as extensions. For these systems, we skip the definition of
3313# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3314# some feature, make sure there is no alternative way to access this
3315# feature. Also, when using wildcards, make sure you have verified the
3316# need for not defining _XOPEN_SOURCE on all systems matching the
3317# wildcard, and that the wildcard does not include future systems
3318# (which may remove their limitations).
3319case $ac_sys_system/$ac_sys_release in
3320 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3321 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003322 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003323 # In addition, Stefan Krah confirms that issue #1244610 exists through
3324 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003325 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326 define_xopen_source=no
3327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Kloseb9621712010-04-24 17:59:49 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332
3333 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340
3341 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003342 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3343 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3344 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003345 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 +00003346 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003347 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3348 # request to enable features supported by the standard as a request
3349 # to disable features not supported by the standard. The best way
3350 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3351 # entirely and define __EXTENSIONS__ instead.
3352 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003353 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3355 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003356 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003357 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 define_xopen_source=no;;
3359 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003363 # On FreeBSD 4, the math functions C89 does not cover are never defined
3364 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3365 FreeBSD/4.*)
3366 define_xopen_source=no;;
3367 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3368 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3369 # identifies itself as Darwin/7.*
3370 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3371 # disables platform specific features beyond repair.
3372 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # has no effect, don't bother defining them
3374 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003375 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003376 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003377 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003378 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3379 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3380 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003381 AIX/4)
3382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 AIX/5)
3384 if test `uname -r` -eq 1; then
3385 define_xopen_source=no
3386 fi
3387 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003388 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3389 # defining NI_NUMERICHOST.
3390 QNX/6.3.2)
3391 define_xopen_source=no
3392 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003394esac
3395
3396if test $define_xopen_source = yes
3397then
Victor Stinner14d098d2011-09-07 22:29:43 +02003398 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
Victor Stinner14d098d2011-09-07 22:29:43 +02003400$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
3403 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3404 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3405 # several APIs are not declared. Since this is also needed in some
3406 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Matthias Kloseb9621712010-04-24 17:59:49 +00003408$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
3410
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003411
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003412$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414fi
3415
Christian Heimes647cd872013-12-07 23:39:33 +01003416# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3417case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003418 hp*|HP*)
3419 define_stdc_a1=yes;;
3420 *)
3421 define_stdc_a1=no;;
3422esac
3423
3424if test $define_stdc_a1 = yes
3425then
Christian Heimes647cd872013-12-07 23:39:33 +01003426
3427$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3428
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429fi
Christian Heimes647cd872013-12-07 23:39:33 +01003430
Guido van Rossum91922671997-10-09 20:24:13 +00003431#
3432# SGI compilers allow the specification of the both the ABI and the
3433# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003434# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003435#
3436# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3437# thus supply support for various ABI/ISA combinations. The MACHDEP
3438# variable is also adjusted.
3439#
3440
3441if test ! -z "$SGI_ABI"
3442then
3443 CC="cc $SGI_ABI"
3444 LDFLAGS="$SGI_ABI $LDFLAGS"
3445 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3448$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3451# it may influence the way we can build extensions, so distutils
3452# needs to check it
3453
Thomas Wouters477c8d52006-05-27 19:21:47 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003457
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003459
3460# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3461# for debug/optimization stuff. BASECFLAGS is for flags that are required
3462# just to get things to compile and link. Users are free to override OPT
3463# when running configure or make. The build should not break if they do.
3464# BASECFLAGS should generally not be messed with, however.
3465
3466# XXX shouldn't some/most/all of this code be merged with the stuff later
3467# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3469$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003472if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003474 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003475 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003476 without_gcc=yes;;
3477 yes) CC=gcc
3478 without_gcc=no;;
3479 *) CC=$withval
3480 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003481 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003484 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003485 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003486 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003487 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003488 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489fi
3490
Matthias Kloseb9621712010-04-24 17:59:49 +00003491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3492$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003493
Zachary Ware5af85642015-12-21 12:09:17 -06003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3495$as_echo_n "checking for --with-icc... " >&6; }
3496
3497# Check whether --with-icc was given.
3498if test "${with_icc+set}" = set; then :
3499 withval=$with_icc;
3500 case $withval in
3501 no) CC=${CC:-cc}
3502 with_icc=no;;
3503 yes) CC=icc
3504 CXX=icpc
3505 with_icc=yes;;
3506 *) CC=$withval
3507 with_icc=$withval;;
3508 esac
3509else
3510
3511 with_icc=no
3512fi
3513
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3515$as_echo "$with_icc" >&6; }
3516
Guido van Rossum8b131c51995-03-09 14:10:13 +00003517# If the user switches compilers, we can't believe the cache
3518if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3519then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003520 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003521(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003522fi
3523
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003524# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3525# when the compiler supports them, but we don't always want -O2, and
3526# we set -g later.
3527if test -z "$CFLAGS"; then
3528 CFLAGS=
3529fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530
3531if test "$ac_sys_system" = "Darwin"
3532then
3533 # Compiler selection on MacOSX is more complicated than
3534 # AC_PROG_CC can handle, see Mac/README.txt for more
3535 # information
3536 if test -z "${CC}"
3537 then
3538 found_gcc=
3539 found_clang=
3540 as_save_IFS=$IFS; IFS=:
3541 for as_dir in $PATH
3542 do
3543 IFS=$as_save_IFS
3544 if test -x $as_dir/gcc; then
3545 if test -z "${found_gcc}"; then
3546 found_gcc=$as_dir/gcc
3547 fi
3548 fi
3549 if test -x $as_dir/clang; then
3550 if test -z "${found_clang}"; then
3551 found_clang=$as_dir/clang
3552 fi
3553 fi
3554 done
3555 IFS=$as_save_IFS
3556
3557 if test -n "$found_gcc" -a -n "$found_clang"
3558 then
3559 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3560 then
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3562$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3563 CC="$found_clang"
3564 CXX="$found_clang++"
3565 fi
3566
3567
3568 elif test -z "$found_gcc" -a -n "$found_clang"
3569 then
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3571$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3572 CC="$found_clang"
3573 CXX="$found_clang++"
3574
3575 elif test -z "$found_gcc" -a -z "$found_clang"
3576 then
3577 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3578 if test -n "${found_clang}"
3579 then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3581$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3582 CC="${found_clang}"
3583 CXX="`/usr/bin/xcrun -find clang++`"
3584
3585 # else: use default behaviour
3586 fi
3587 fi
3588 fi
3589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003590ac_ext=c
3591ac_cpp='$CPP $CPPFLAGS'
3592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594ac_compiler_gnu=$ac_cv_c_compiler_gnu
3595if test -n "$ac_tool_prefix"; then
3596 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3597set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3599$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003600if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003602else
3603 if test -n "$CC"; then
3604 ac_cv_prog_CC="$CC" # Let the user override the test.
3605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3607for as_dir in $PATH
3608do
3609 IFS=$as_save_IFS
3610 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $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 +00003615 break 2
3616 fi
3617done
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003620
Jack Jansendd19cf82001-12-06 22:36:17 +00003621fi
3622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003623CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003624if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3626$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003627else
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3629$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003630fi
3631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632
Martin v. Löwis11437992002-04-12 09:54:03 +00003633fi
3634if test -z "$ac_cv_prog_CC"; then
3635 ac_ct_CC=$CC
3636 # Extract the first word of "gcc", so it can be a program name with args.
3637set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3639$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003640if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else
3643 if test -n "$ac_ct_CC"; then
3644 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3645else
3646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3647for as_dir in $PATH
3648do
3649 IFS=$as_save_IFS
3650 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $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 +00003655 break 2
3656 fi
3657done
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003660
3661fi
3662fi
3663ac_ct_CC=$ac_cv_prog_ac_ct_CC
3664if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3666$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3669$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003670fi
3671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 if test "x$ac_ct_CC" = x; then
3673 CC=""
3674 else
3675 case $cross_compiling:$ac_tool_warned in
3676yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679ac_tool_warned=yes ;;
3680esac
3681 CC=$ac_ct_CC
3682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683else
3684 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003685fi
3686
Jack Jansendd19cf82001-12-06 22:36:17 +00003687if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 if test -n "$ac_tool_prefix"; then
3689 # 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 +00003690set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3692$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003693if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003695else
3696 if test -n "$CC"; then
3697 ac_cv_prog_CC="$CC" # Let the user override the test.
3698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3700for as_dir in $PATH
3701do
3702 IFS=$as_save_IFS
3703 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $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 +00003708 break 2
3709 fi
3710done
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003713
3714fi
3715fi
3716CC=$ac_cv_prog_CC
3717if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3719$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003720else
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3722$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003723fi
3724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003727fi
3728if test -z "$CC"; then
3729 # Extract the first word of "cc", so it can be a program name with args.
3730set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3732$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003733if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003735else
3736 if test -n "$CC"; then
3737 ac_cv_prog_CC="$CC" # Let the user override the test.
3738else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3741for as_dir in $PATH
3742do
3743 IFS=$as_save_IFS
3744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3748 ac_prog_rejected=yes
3749 continue
3750 fi
3751 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 $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 +00003753 break 2
3754 fi
3755done
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003758
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759if test $ac_prog_rejected = yes; then
3760 # We found a bogon in the path, so make sure we never use it.
3761 set dummy $ac_cv_prog_CC
3762 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764 # We chose a different compiler from the bogus one.
3765 # However, it has the same basename, so the bogon will be chosen
3766 # first if we set CC to just the basename; use the full file name.
3767 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003768 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769 fi
3770fi
3771fi
3772fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003773CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3776$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777else
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3779$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780fi
3781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
3784if test -z "$CC"; then
3785 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 do
3788 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003792if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003794else
3795 if test -n "$CC"; then
3796 ac_cv_prog_CC="$CC" # Let the user override the test.
3797else
Martin v. Löwis11437992002-04-12 09:54:03 +00003798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $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 +00003807 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809done
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
3813fi
3814fi
3815CC=$ac_cv_prog_CC
3816if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3818$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003822fi
3823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 test -n "$CC" && break
3826 done
3827fi
3828if test -z "$CC"; then
3829 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003831do
3832 # Extract the first word of "$ac_prog", so it can be a program name with args.
3833set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3835$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003836if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003838else
3839 if test -n "$ac_ct_CC"; then
3840 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3841else
3842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3843for as_dir in $PATH
3844do
3845 IFS=$as_save_IFS
3846 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $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 +00003851 break 2
3852 fi
3853done
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858fi
3859ac_ct_CC=$ac_cv_prog_ac_ct_CC
3860if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3862$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863else
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 test -n "$ac_ct_CC" && break
3870done
Michael W. Hudson54241132001-12-07 15:38:26 +00003871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872 if test "x$ac_ct_CC" = x; then
3873 CC=""
3874 else
3875 case $cross_compiling:$ac_tool_warned in
3876yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879ac_tool_warned=yes ;;
3880esac
3881 CC=$ac_ct_CC
3882 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003883fi
3884
3885fi
3886
3887
Matthias Kloseb9621712010-04-24 17:59:49 +00003888test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003890as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003891See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003892
3893# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3895set X $ac_compile
3896ac_compiler=$2
3897for ac_option in --version -v -V -qversion; do
3898 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899case "(($ac_try" in
3900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3901 *) ac_try_echo=$ac_try;;
3902esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3904$as_echo "$ac_try_echo"; } >&5
3905 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003906 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003907 if test -s conftest.err; then
3908 sed '10a\
3909... rest of stderr output deleted ...
3910 10q' conftest.err >conftest.er1
3911 cat conftest.er1 >&5
3912 fi
3913 rm -f conftest.er1 conftest.err
3914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3915 test $ac_status = 0; }
3916done
Martin v. Löwis11437992002-04-12 09:54:03 +00003917
Matthias Kloseb9621712010-04-24 17:59:49 +00003918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003919/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003920
Martin v. Löwis11437992002-04-12 09:54:03 +00003921int
3922main ()
3923{
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
3929ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003930ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003931# Try to create an executable without -o first, disregard a.out.
3932# It will help us diagnose broken compilers, and finding out an intuition
3933# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3935$as_echo_n "checking whether the C compiler works... " >&6; }
3936ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3937
3938# The possible output files:
3939ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941ac_rmfiles=
3942for ac_file in $ac_files
3943do
3944 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3947 esac
3948done
3949rm -f $ac_rmfiles
3950
Matthias Kloseb9621712010-04-24 17:59:49 +00003951if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952case "(($ac_try" in
3953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3954 *) ac_try_echo=$ac_try;;
3955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3957$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003959 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3961 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3963# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3964# in a Makefile. We should not override ac_cv_exeext if it was cached,
3965# so that the user can short-circuit this test for compilers unknown to
3966# Autoconf.
3967for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003968do
3969 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972 ;;
3973 [ab].out )
3974 # We found the default executable, but exeext='' is most
3975 # certainly right.
3976 break;;
3977 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 then :; else
3980 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3981 fi
3982 # We set ac_cv_exeext here because the later test for it is not
3983 # safe: cross compilers may not add the suffix if given an `-o'
3984 # argument, so we may need to know it at that point already.
3985 # Even if this section looks crufty: it has the advantage of
3986 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987 break;;
3988 * )
3989 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 esac
3991done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992test "$ac_cv_exeext" = no && ac_cv_exeext=
3993
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003994else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 ac_file=''
3996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003997if test -z "$ac_file"; then :
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3999$as_echo "no" >&6; }
4000$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004001sed 's/^/| /' conftest.$ac_ext >&5
4002
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004005as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004006See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004007else
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4009$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4012$as_echo_n "checking for C compiler default output file name... " >&6; }
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4014$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4020$as_echo_n "checking for suffix of executables... " >&6; }
4021if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4027$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4031 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4033# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4034# work properly (i.e., refer to `conftest.exe'), while it won't with
4035# `rm'.
4036for ac_file in conftest.exe conftest conftest.*; do
4037 test -f "$ac_file" || continue
4038 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004040 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4041 break;;
4042 * ) break;;
4043 esac
4044done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004045else
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004048as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004049See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004051rm -f conftest conftest$ac_cv_exeext
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4053$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054
4055rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004056EXEEXT=$ac_cv_exeext
4057ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4059/* end confdefs.h. */
4060#include <stdio.h>
4061int
4062main ()
4063{
4064FILE *f = fopen ("conftest.out", "w");
4065 return ferror (f) || fclose (f) != 0;
4066
4067 ;
4068 return 0;
4069}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004071ac_clean_files="$ac_clean_files conftest.out"
4072# Check that the compiler produces executables we can run. If not, either
4073# the compiler is broken, or we cross compile.
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4075$as_echo_n "checking whether we are cross compiling... " >&6; }
4076if test "$cross_compiling" != yes; then
4077 { { ac_try="$ac_link"
4078case "(($ac_try" in
4079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4080 *) ac_try_echo=$ac_try;;
4081esac
4082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4083$as_echo "$ac_try_echo"; } >&5
4084 (eval "$ac_link") 2>&5
4085 ac_status=$?
4086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4087 test $ac_status = 0; }
4088 if { ac_try='./conftest$ac_cv_exeext'
4089 { { case "(($ac_try" in
4090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4091 *) ac_try_echo=$ac_try;;
4092esac
4093eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4094$as_echo "$ac_try_echo"; } >&5
4095 (eval "$ac_try") 2>&5
4096 ac_status=$?
4097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4098 test $ac_status = 0; }; }; then
4099 cross_compiling=no
4100 else
4101 if test "$cross_compiling" = maybe; then
4102 cross_compiling=yes
4103 else
4104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004106as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004107If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004108See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 fi
4110 fi
4111fi
4112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4113$as_echo "$cross_compiling" >&6; }
4114
4115rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4116ac_clean_files=$ac_clean_files_save
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4118$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004119if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo_n "(cached) " >&6
4121else
4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004123/* end confdefs.h. */
4124
4125int
4126main ()
4127{
4128
4129 ;
4130 return 0;
4131}
4132_ACEOF
4133rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004134if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135case "(($ac_try" in
4136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4137 *) ac_try_echo=$ac_try;;
4138esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4140$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4144 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145 for ac_file in conftest.o conftest.obj conftest.*; do
4146 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4150 break;;
4151 esac
4152done
4153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004155sed 's/^/| /' conftest.$ac_ext >&5
4156
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004159as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004160See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004161fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4165$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004166OBJEXT=$ac_cv_objext
4167ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4169$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004170if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004175
Martin v. Löwis11437992002-04-12 09:54:03 +00004176int
4177main ()
4178{
4179#ifndef __GNUC__
4180 choke me
4181#endif
4182
4183 ;
4184 return 0;
4185}
4186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 ac_compiler_gnu=yes
4189else
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004193ac_cv_c_compiler_gnu=$ac_compiler_gnu
4194
4195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4197$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4198if test $ac_compiler_gnu = yes; then
4199 GCC=yes
4200else
4201 GCC=
4202fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_test_CFLAGS=${CFLAGS+set}
4204ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4206$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004207if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004209else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 ac_save_c_werror_flag=$ac_c_werror_flag
4211 ac_c_werror_flag=yes
4212 ac_cv_prog_cc_g=no
4213 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
Martin v. Löwis11437992002-04-12 09:54:03 +00004217int
4218main ()
4219{
4220
4221 ;
4222 return 0;
4223}
4224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004225if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004226 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227else
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 CFLAGS=""
4229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230/* end confdefs.h. */
4231
4232int
4233main ()
4234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241
Matthias Kloseb9621712010-04-24 17:59:49 +00004242else
4243 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246/* end confdefs.h. */
4247
4248int
4249main ()
4250{
4251
4252 ;
4253 return 0;
4254}
4255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4264 ac_c_werror_flag=$ac_save_c_werror_flag
4265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4267$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004268if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270elif test $ac_cv_prog_cc_g = yes; then
4271 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004272 CFLAGS="-g -O2"
4273 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004274 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275 fi
4276else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004277 if test "$GCC" = yes; then
4278 CFLAGS="-O2"
4279 else
4280 CFLAGS=
4281 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4284$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004285if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004287else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004289ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004291/* end confdefs.h. */
4292#include <stdarg.h>
4293#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004294struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004295/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4296struct buf { int x; };
4297FILE * (*rcsopen) (struct buf *, struct stat *, int);
4298static char *e (p, i)
4299 char **p;
4300 int i;
4301{
4302 return p[i];
4303}
4304static char *f (char * (*g) (char **, int), char **p, ...)
4305{
4306 char *s;
4307 va_list v;
4308 va_start (v,p);
4309 s = g (p, va_arg (v,int));
4310 va_end (v);
4311 return s;
4312}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313
4314/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4315 function prototypes and stuff, but not '\xHH' hex character constants.
4316 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4319 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4324 inside strings and character constants. */
4325#define FOO(x) 'x'
4326int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4327
Skip Montanaro6dead952003-09-25 14:50:04 +00004328int test (int i, double x);
4329struct s1 {int (*f) (int a);};
4330struct s2 {int (*f) (double a);};
4331int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4332int argc;
4333char **argv;
4334int
4335main ()
4336{
4337return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4338 ;
4339 return 0;
4340}
4341_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4343 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004344do
4345 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349rm -f core conftest.err conftest.$ac_objext
4350 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004351done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004353CC=$ac_save_CC
4354
4355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356# AC_CACHE_VAL
4357case "x$ac_cv_prog_cc_c89" in
4358 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4360$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4363$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004364 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4367$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004368esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004369if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004370
Matthias Kloseb9621712010-04-24 17:59:49 +00004371fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004372
Martin v. Löwis11437992002-04-12 09:54:03 +00004373ac_ext=c
4374ac_cpp='$CPP $CPPFLAGS'
4375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4377ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004378
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004379ac_ext=c
4380ac_cpp='$CPP $CPPFLAGS'
4381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4383ac_compiler_gnu=$ac_cv_c_compiler_gnu
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4385$as_echo_n "checking how to run the C preprocessor... " >&6; }
4386# On Suns, sometimes $CPP names a directory.
4387if test -n "$CPP" && test -d "$CPP"; then
4388 CPP=
4389fi
4390if test -z "$CPP"; then
4391 if ${ac_cv_prog_CPP+:} false; then :
4392 $as_echo_n "(cached) " >&6
4393else
4394 # Double quotes because CPP needs to be expanded
4395 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4396 do
4397 ac_preproc_ok=false
4398for ac_c_preproc_warn_flag in '' yes
4399do
4400 # Use a header file that comes with gcc, so configuring glibc
4401 # with a fresh cross-compiler works.
4402 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4403 # <limits.h> exists even on freestanding compilers.
4404 # On the NeXT, cc -E runs the code through the compiler's parser,
4405 # not just through cpp. "Syntax error" is here to catch this case.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#ifdef __STDC__
4409# include <limits.h>
4410#else
4411# include <assert.h>
4412#endif
4413 Syntax error
4414_ACEOF
4415if ac_fn_c_try_cpp "$LINENO"; then :
4416
4417else
4418 # Broken: fails on valid input.
4419continue
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423 # OK, works on sane cases. Now check whether nonexistent headers
4424 # can be detected and how.
4425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4426/* end confdefs.h. */
4427#include <ac_nonexistent.h>
4428_ACEOF
4429if ac_fn_c_try_cpp "$LINENO"; then :
4430 # Broken: success on invalid input.
4431continue
4432else
4433 # Passes both tests.
4434ac_preproc_ok=:
4435break
4436fi
4437rm -f conftest.err conftest.i conftest.$ac_ext
4438
4439done
4440# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4441rm -f conftest.i conftest.err conftest.$ac_ext
4442if $ac_preproc_ok; then :
4443 break
4444fi
4445
4446 done
4447 ac_cv_prog_CPP=$CPP
4448
4449fi
4450 CPP=$ac_cv_prog_CPP
4451else
4452 ac_cv_prog_CPP=$CPP
4453fi
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4455$as_echo "$CPP" >&6; }
4456ac_preproc_ok=false
4457for ac_c_preproc_warn_flag in '' yes
4458do
4459 # Use a header file that comes with gcc, so configuring glibc
4460 # with a fresh cross-compiler works.
4461 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4462 # <limits.h> exists even on freestanding compilers.
4463 # On the NeXT, cc -E runs the code through the compiler's parser,
4464 # not just through cpp. "Syntax error" is here to catch this case.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#ifdef __STDC__
4468# include <limits.h>
4469#else
4470# include <assert.h>
4471#endif
4472 Syntax error
4473_ACEOF
4474if ac_fn_c_try_cpp "$LINENO"; then :
4475
4476else
4477 # Broken: fails on valid input.
4478continue
4479fi
4480rm -f conftest.err conftest.i conftest.$ac_ext
4481
4482 # OK, works on sane cases. Now check whether nonexistent headers
4483 # can be detected and how.
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#include <ac_nonexistent.h>
4487_ACEOF
4488if ac_fn_c_try_cpp "$LINENO"; then :
4489 # Broken: success on invalid input.
4490continue
4491else
4492 # Passes both tests.
4493ac_preproc_ok=:
4494break
4495fi
4496rm -f conftest.err conftest.i conftest.$ac_ext
4497
4498done
4499# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4500rm -f conftest.i conftest.err conftest.$ac_ext
4501if $ac_preproc_ok; then :
4502
4503else
4504 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4505$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4506as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4507See \`config.log' for more details" "$LINENO" 5; }
4508fi
4509
4510ac_ext=c
4511ac_cpp='$CPP $CPPFLAGS'
4512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4514ac_compiler_gnu=$ac_cv_c_compiler_gnu
4515
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4517$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4518if ${ac_cv_path_GREP+:} false; then :
4519 $as_echo_n "(cached) " >&6
4520else
4521 if test -z "$GREP"; then
4522 ac_path_GREP_found=false
4523 # Loop through the user's path and test for each of PROGNAME-LIST
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4526do
4527 IFS=$as_save_IFS
4528 test -z "$as_dir" && as_dir=.
4529 for ac_prog in grep ggrep; do
4530 for ac_exec_ext in '' $ac_executable_extensions; do
4531 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4532 as_fn_executable_p "$ac_path_GREP" || continue
4533# Check for GNU ac_path_GREP and select it if it is found.
4534 # Check for GNU $ac_path_GREP
4535case `"$ac_path_GREP" --version 2>&1` in
4536*GNU*)
4537 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4538*)
4539 ac_count=0
4540 $as_echo_n 0123456789 >"conftest.in"
4541 while :
4542 do
4543 cat "conftest.in" "conftest.in" >"conftest.tmp"
4544 mv "conftest.tmp" "conftest.in"
4545 cp "conftest.in" "conftest.nl"
4546 $as_echo 'GREP' >> "conftest.nl"
4547 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4548 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4549 as_fn_arith $ac_count + 1 && ac_count=$as_val
4550 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4551 # Best one so far, save it but keep looking for a better one
4552 ac_cv_path_GREP="$ac_path_GREP"
4553 ac_path_GREP_max=$ac_count
4554 fi
4555 # 10*(2^10) chars as input seems more than enough
4556 test $ac_count -gt 10 && break
4557 done
4558 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4559esac
4560
4561 $ac_path_GREP_found && break 3
4562 done
4563 done
4564 done
4565IFS=$as_save_IFS
4566 if test -z "$ac_cv_path_GREP"; then
4567 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4568 fi
4569else
4570 ac_cv_path_GREP=$GREP
4571fi
4572
4573fi
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4575$as_echo "$ac_cv_path_GREP" >&6; }
4576 GREP="$ac_cv_path_GREP"
4577
4578
Łukasz Langaa785c872016-09-09 17:37:37 -07004579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4580$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4581if ${ac_cv_path_SED+:} false; then :
4582 $as_echo_n "(cached) " >&6
4583else
4584 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4585 for ac_i in 1 2 3 4 5 6 7; do
4586 ac_script="$ac_script$as_nl$ac_script"
4587 done
4588 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4589 { ac_script=; unset ac_script;}
4590 if test -z "$SED"; then
4591 ac_path_SED_found=false
4592 # Loop through the user's path and test for each of PROGNAME-LIST
4593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594for as_dir in $PATH
4595do
4596 IFS=$as_save_IFS
4597 test -z "$as_dir" && as_dir=.
4598 for ac_prog in sed gsed; do
4599 for ac_exec_ext in '' $ac_executable_extensions; do
4600 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4601 as_fn_executable_p "$ac_path_SED" || continue
4602# Check for GNU ac_path_SED and select it if it is found.
4603 # Check for GNU $ac_path_SED
4604case `"$ac_path_SED" --version 2>&1` in
4605*GNU*)
4606 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4607*)
4608 ac_count=0
4609 $as_echo_n 0123456789 >"conftest.in"
4610 while :
4611 do
4612 cat "conftest.in" "conftest.in" >"conftest.tmp"
4613 mv "conftest.tmp" "conftest.in"
4614 cp "conftest.in" "conftest.nl"
4615 $as_echo '' >> "conftest.nl"
4616 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4617 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4618 as_fn_arith $ac_count + 1 && ac_count=$as_val
4619 if test $ac_count -gt ${ac_path_SED_max-0}; then
4620 # Best one so far, save it but keep looking for a better one
4621 ac_cv_path_SED="$ac_path_SED"
4622 ac_path_SED_max=$ac_count
4623 fi
4624 # 10*(2^10) chars as input seems more than enough
4625 test $ac_count -gt 10 && break
4626 done
4627 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4628esac
4629
4630 $ac_path_SED_found && break 3
4631 done
4632 done
4633 done
4634IFS=$as_save_IFS
4635 if test -z "$ac_cv_path_SED"; then
4636 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4637 fi
4638else
4639 ac_cv_path_SED=$SED
4640fi
4641
4642fi
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4644$as_echo "$ac_cv_path_SED" >&6; }
4645 SED="$ac_cv_path_SED"
4646 rm -f conftest.sed
4647
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004648
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004649
4650
Matthias Kloseb9621712010-04-24 17:59:49 +00004651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4652$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004654# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004655if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004657
4658 case $withval in
4659 no) with_cxx_main=no
4660 MAINCC='$(CC)';;
4661 yes) with_cxx_main=yes
4662 MAINCC='$(CXX)';;
4663 *) with_cxx_main=yes
4664 MAINCC=$withval
4665 if test -z "$CXX"
4666 then
4667 CXX=$withval
4668 fi;;
4669 esac
4670else
4671
4672 with_cxx_main=no
4673 MAINCC='$(CC)'
4674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004675fi
4676
Matthias Kloseb9621712010-04-24 17:59:49 +00004677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4678$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004679
4680preset_cxx="$CXX"
4681if test -z "$CXX"
4682then
4683 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004684 gcc) if test -n "$ac_tool_prefix"; then
4685 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4686set dummy ${ac_tool_prefix}g++; ac_word=$2
4687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4688$as_echo_n "checking for $ac_word... " >&6; }
4689if ${ac_cv_path_CXX+:} false; then :
4690 $as_echo_n "(cached) " >&6
4691else
4692 case $CXX in
4693 [\\/]* | ?:[\\/]*)
4694 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4695 ;;
4696 *)
4697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698for as_dir in notfound
4699do
4700 IFS=$as_save_IFS
4701 test -z "$as_dir" && as_dir=.
4702 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004704 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4706 break 2
4707 fi
4708done
4709 done
4710IFS=$as_save_IFS
4711
4712 ;;
4713esac
4714fi
4715CXX=$ac_cv_path_CXX
4716if test -n "$CXX"; then
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4718$as_echo "$CXX" >&6; }
4719else
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4721$as_echo "no" >&6; }
4722fi
4723
4724
4725fi
4726if test -z "$ac_cv_path_CXX"; then
4727 ac_pt_CXX=$CXX
4728 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004729set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004732if ${ac_cv_path_ac_pt_CXX+:} false; then :
4733 $as_echo_n "(cached) " >&6
4734else
4735 case $ac_pt_CXX in
4736 [\\/]* | ?:[\\/]*)
4737 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4738 ;;
4739 *)
4740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in notfound
4742do
4743 IFS=$as_save_IFS
4744 test -z "$as_dir" && as_dir=.
4745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004747 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4749 break 2
4750 fi
4751done
4752 done
4753IFS=$as_save_IFS
4754
4755 ;;
4756esac
4757fi
4758ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4759if test -n "$ac_pt_CXX"; then
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4761$as_echo "$ac_pt_CXX" >&6; }
4762else
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
4765fi
4766
4767 if test "x$ac_pt_CXX" = x; then
4768 CXX="g++"
4769 else
4770 case $cross_compiling:$ac_tool_warned in
4771yes:)
4772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4774ac_tool_warned=yes ;;
4775esac
4776 CXX=$ac_pt_CXX
4777 fi
4778else
4779 CXX="$ac_cv_path_CXX"
4780fi
4781 ;;
4782 cc) if test -n "$ac_tool_prefix"; then
4783 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4784set dummy ${ac_tool_prefix}c++; ac_word=$2
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4786$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004787if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789else
4790 case $CXX in
4791 [\\/]* | ?:[\\/]*)
4792 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4793 ;;
4794 *)
4795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4796for as_dir in notfound
4797do
4798 IFS=$as_save_IFS
4799 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 break 2
4805 fi
4806done
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004808IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810 ;;
4811esac
4812fi
4813CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004814if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4816$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004817else
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4819$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004821
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822
4823fi
4824if test -z "$ac_cv_path_CXX"; then
4825 ac_pt_CXX=$CXX
4826 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004827set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4829$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004830if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004832else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004833 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835 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 +00004836 ;;
4837 *)
4838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4839for as_dir in notfound
4840do
4841 IFS=$as_save_IFS
4842 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004843 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 break 2
4848 fi
4849done
Matthias Kloseb9621712010-04-24 17:59:49 +00004850 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004851IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004853 ;;
4854esac
4855fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4857if test -n "$ac_pt_CXX"; then
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4859$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004860else
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004864
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004865 if test "x$ac_pt_CXX" = x; then
4866 CXX="c++"
4867 else
4868 case $cross_compiling:$ac_tool_warned in
4869yes:)
4870{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4872ac_tool_warned=yes ;;
4873esac
4874 CXX=$ac_pt_CXX
4875 fi
4876else
4877 CXX="$ac_cv_path_CXX"
4878fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004879 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004880 clang|*/clang) if test -n "$ac_tool_prefix"; then
4881 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4882set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884$as_echo_n "checking for $ac_word... " >&6; }
4885if ${ac_cv_path_CXX+:} false; then :
4886 $as_echo_n "(cached) " >&6
4887else
4888 case $CXX in
4889 [\\/]* | ?:[\\/]*)
4890 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4891 ;;
4892 *)
4893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in notfound
4895do
4896 IFS=$as_save_IFS
4897 test -z "$as_dir" && as_dir=.
4898 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004899 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004900 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902 break 2
4903 fi
4904done
4905 done
4906IFS=$as_save_IFS
4907
Ned Deilycbfb9a52012-06-23 16:02:19 -07004908 ;;
4909esac
4910fi
4911CXX=$ac_cv_path_CXX
4912if test -n "$CXX"; then
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4914$as_echo "$CXX" >&6; }
4915else
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917$as_echo "no" >&6; }
4918fi
4919
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004920
4921fi
4922if test -z "$ac_cv_path_CXX"; then
4923 ac_pt_CXX=$CXX
4924 # Extract the first word of "clang++", so it can be a program name with args.
4925set dummy clang++; ac_word=$2
4926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4927$as_echo_n "checking for $ac_word... " >&6; }
4928if ${ac_cv_path_ac_pt_CXX+:} false; then :
4929 $as_echo_n "(cached) " >&6
4930else
4931 case $ac_pt_CXX in
4932 [\\/]* | ?:[\\/]*)
4933 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4934 ;;
4935 *)
4936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4937for as_dir in notfound
4938do
4939 IFS=$as_save_IFS
4940 test -z "$as_dir" && as_dir=.
4941 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004942 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004943 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4945 break 2
4946 fi
4947done
4948 done
4949IFS=$as_save_IFS
4950
4951 ;;
4952esac
4953fi
4954ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4955if test -n "$ac_pt_CXX"; then
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4957$as_echo "$ac_pt_CXX" >&6; }
4958else
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4960$as_echo "no" >&6; }
4961fi
4962
4963 if test "x$ac_pt_CXX" = x; then
4964 CXX="clang++"
4965 else
4966 case $cross_compiling:$ac_tool_warned in
4967yes:)
4968{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4969$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4970ac_tool_warned=yes ;;
4971esac
4972 CXX=$ac_pt_CXX
4973 fi
4974else
4975 CXX="$ac_cv_path_CXX"
4976fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004977 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004978 icc|*/icc) if test -n "$ac_tool_prefix"; then
4979 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4980set dummy ${ac_tool_prefix}icpc; ac_word=$2
4981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4982$as_echo_n "checking for $ac_word... " >&6; }
4983if ${ac_cv_path_CXX+:} false; then :
4984 $as_echo_n "(cached) " >&6
4985else
4986 case $CXX in
4987 [\\/]* | ?:[\\/]*)
4988 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4989 ;;
4990 *)
4991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4992for as_dir in notfound
4993do
4994 IFS=$as_save_IFS
4995 test -z "$as_dir" && as_dir=.
4996 for ac_exec_ext in '' $ac_executable_extensions; do
4997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4998 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5000 break 2
5001 fi
5002done
5003 done
5004IFS=$as_save_IFS
5005
5006 ;;
5007esac
5008fi
5009CXX=$ac_cv_path_CXX
5010if test -n "$CXX"; then
5011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5012$as_echo "$CXX" >&6; }
5013else
5014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5015$as_echo "no" >&6; }
5016fi
5017
5018
5019fi
5020if test -z "$ac_cv_path_CXX"; then
5021 ac_pt_CXX=$CXX
5022 # Extract the first word of "icpc", so it can be a program name with args.
5023set dummy icpc; ac_word=$2
5024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5025$as_echo_n "checking for $ac_word... " >&6; }
5026if ${ac_cv_path_ac_pt_CXX+:} false; then :
5027 $as_echo_n "(cached) " >&6
5028else
5029 case $ac_pt_CXX in
5030 [\\/]* | ?:[\\/]*)
5031 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5032 ;;
5033 *)
5034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5035for as_dir in notfound
5036do
5037 IFS=$as_save_IFS
5038 test -z "$as_dir" && as_dir=.
5039 for ac_exec_ext in '' $ac_executable_extensions; do
5040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5041 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5043 break 2
5044 fi
5045done
5046 done
5047IFS=$as_save_IFS
5048
5049 ;;
5050esac
5051fi
5052ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5053if test -n "$ac_pt_CXX"; then
5054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5055$as_echo "$ac_pt_CXX" >&6; }
5056else
5057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5058$as_echo "no" >&6; }
5059fi
5060
5061 if test "x$ac_pt_CXX" = x; then
5062 CXX="icpc"
5063 else
5064 case $cross_compiling:$ac_tool_warned in
5065yes:)
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5067$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5068ac_tool_warned=yes ;;
5069esac
5070 CXX=$ac_pt_CXX
5071 fi
5072else
5073 CXX="$ac_cv_path_CXX"
5074fi
5075 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005076 esac
5077 if test "$CXX" = "notfound"
5078 then
5079 CXX=""
5080 fi
5081fi
5082if test -z "$CXX"
5083then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 if test -n "$ac_tool_prefix"; then
5085 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5086 do
5087 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5088set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005091if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005093else
5094 if test -n "$CXX"; then
5095 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5096else
5097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100 IFS=$as_save_IFS
5101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106 break 2
5107 fi
5108done
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005110IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005111
5112fi
5113fi
5114CXX=$ac_cv_prog_CXX
5115if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5117$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005118else
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121fi
5122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005123
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005124 test -n "$CXX" && break
5125 done
5126fi
5127if test -z "$CXX"; then
5128 ac_ct_CXX=$CXX
5129 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5130do
5131 # Extract the first word of "$ac_prog", so it can be a program name with args.
5132set dummy $ac_prog; ac_word=$2
5133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5134$as_echo_n "checking for $ac_word... " >&6; }
5135if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5136 $as_echo_n "(cached) " >&6
5137else
5138 if test -n "$ac_ct_CXX"; then
5139 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5140else
5141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5142for as_dir in $PATH
5143do
5144 IFS=$as_save_IFS
5145 test -z "$as_dir" && as_dir=.
5146 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005148 ac_cv_prog_ac_ct_CXX="$ac_prog"
5149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5150 break 2
5151 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005152done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005153 done
5154IFS=$as_save_IFS
5155
5156fi
5157fi
5158ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5159if test -n "$ac_ct_CXX"; then
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5161$as_echo "$ac_ct_CXX" >&6; }
5162else
5163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164$as_echo "no" >&6; }
5165fi
5166
5167
5168 test -n "$ac_ct_CXX" && break
5169done
5170
5171 if test "x$ac_ct_CXX" = x; then
5172 CXX="notfound"
5173 else
5174 case $cross_compiling:$ac_tool_warned in
5175yes:)
5176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5178ac_tool_warned=yes ;;
5179esac
5180 CXX=$ac_ct_CXX
5181 fi
5182fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005183
5184 if test "$CXX" = "notfound"
5185 then
5186 CXX=""
5187 fi
5188fi
5189if test "$preset_cxx" != "$CXX"
5190then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005191 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005192
5193 By default, distutils will build C++ extension modules with \"$CXX\".
5194 If this is not intended, then set CXX on the configure command line.
5195 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005196$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005197
5198 By default, distutils will build C++ extension modules with \"$CXX\".
5199 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005200 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005201fi
5202
5203
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5205
5206
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5208$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5209cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005210#undef bfin
5211#undef cris
5212#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005213#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005214#undef hppa
5215#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005216#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005217#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005218#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005219#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005220#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005221#if defined(__ANDROID__)
5222# if defined(__x86_64__) && defined(__LP64__)
5223 x86_64-linux-android
5224# elif defined(__i386__)
5225 i686-linux-android
5226# elif defined(__aarch64__) && defined(__AARCH64EL__)
5227# if defined(__ILP32__)
5228 aarch64_ilp32-linux-android
5229# else
5230 aarch64-linux-android
5231# endif
5232# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5233 arm-linux-androideabi
5234# elif defined(__mips_hard_float) && defined(_MIPSEL)
5235# if _MIPS_SIM == _ABIO32
5236 mipsel-linux-android
5237# elif _MIPS_SIM == _ABI64
5238 mips64el-linux-android
5239# else
5240# error unknown platform triplet
5241# endif
5242# else
5243# error unknown platform triplet
5244# endif
5245#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005246# if defined(__x86_64__) && defined(__LP64__)
5247 x86_64-linux-gnu
5248# elif defined(__x86_64__) && defined(__ILP32__)
5249 x86_64-linux-gnux32
5250# elif defined(__i386__)
5251 i386-linux-gnu
5252# elif defined(__aarch64__) && defined(__AARCH64EL__)
5253# if defined(__ILP32__)
5254 aarch64_ilp32-linux-gnu
5255# else
5256 aarch64-linux-gnu
5257# endif
5258# elif defined(__aarch64__) && defined(__AARCH64EB__)
5259# if defined(__ILP32__)
5260 aarch64_be_ilp32-linux-gnu
5261# else
5262 aarch64_be-linux-gnu
5263# endif
5264# elif defined(__alpha__)
5265 alpha-linux-gnu
5266# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5267# if defined(__ARMEL__)
5268 arm-linux-gnueabihf
5269# else
5270 armeb-linux-gnueabihf
5271# endif
5272# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5273# if defined(__ARMEL__)
5274 arm-linux-gnueabi
5275# else
5276 armeb-linux-gnueabi
5277# endif
5278# elif defined(__hppa__)
5279 hppa-linux-gnu
5280# elif defined(__ia64__)
5281 ia64-linux-gnu
5282# elif defined(__m68k__) && !defined(__mcoldfire__)
5283 m68k-linux-gnu
5284# elif defined(__mips_hard_float) && defined(_MIPSEL)
5285# if _MIPS_SIM == _ABIO32
5286 mipsel-linux-gnu
5287# elif _MIPS_SIM == _ABIN32
5288 mips64el-linux-gnuabin32
5289# elif _MIPS_SIM == _ABI64
5290 mips64el-linux-gnuabi64
5291# else
5292# error unknown platform triplet
5293# endif
5294# elif defined(__mips_hard_float)
5295# if _MIPS_SIM == _ABIO32
5296 mips-linux-gnu
5297# elif _MIPS_SIM == _ABIN32
5298 mips64-linux-gnuabin32
5299# elif _MIPS_SIM == _ABI64
5300 mips64-linux-gnuabi64
5301# else
5302# error unknown platform triplet
5303# endif
5304# elif defined(__or1k__)
5305 or1k-linux-gnu
5306# elif defined(__powerpc__) && defined(__SPE__)
5307 powerpc-linux-gnuspe
5308# elif defined(__powerpc64__)
5309# if defined(__LITTLE_ENDIAN__)
5310 powerpc64le-linux-gnu
5311# else
5312 powerpc64-linux-gnu
5313# endif
5314# elif defined(__powerpc__)
5315 powerpc-linux-gnu
5316# elif defined(__s390x__)
5317 s390x-linux-gnu
5318# elif defined(__s390__)
5319 s390-linux-gnu
5320# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5321 sh4-linux-gnu
5322# elif defined(__sparc__) && defined(__arch64__)
5323 sparc64-linux-gnu
5324# elif defined(__sparc__)
5325 sparc-linux-gnu
5326# else
5327# error unknown platform triplet
5328# endif
5329#elif defined(__FreeBSD_kernel__)
5330# if defined(__LP64__)
5331 x86_64-kfreebsd-gnu
5332# elif defined(__i386__)
5333 i386-kfreebsd-gnu
5334# else
5335# error unknown platform triplet
5336# endif
5337#elif defined(__gnu_hurd__)
5338 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005339#elif defined(__APPLE__)
5340 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005341#else
5342# error unknown platform triplet
5343#endif
5344
5345EOF
5346
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005347if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005348 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5350$as_echo "$PLATFORM_TRIPLET" >&6; }
5351else
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5353$as_echo "none" >&6; }
5354fi
5355rm -f conftest.c conftest.out
5356
5357if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5358 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5359 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5360 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005361elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5362 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005363fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005364if test x$PLATFORM_TRIPLET = x; then
5365 PLATDIR=plat-$MACHDEP
5366else
5367 PLATDIR=plat-$PLATFORM_TRIPLET
5368fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005369
5370
doko@ubuntu.com55532312016-06-14 08:55:19 +02005371if test x$MULTIARCH != x; then
5372 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5373fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005374
5375
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5377$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5378save_LDFLAGS="$LDFLAGS"
5379LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005380
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5382/* end confdefs.h. */
5383
5384int
5385main ()
5386{
5387
5388 ;
5389 return 0;
5390}
5391_ACEOF
5392if ac_fn_c_try_link "$LINENO"; then :
5393 NO_AS_NEEDED="-Wl,--no-as-needed"
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5395$as_echo "yes" >&6; }
5396else
5397 NO_AS_NEEDED=""
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399$as_echo "no" >&6; }
5400fi
5401rm -f core conftest.err conftest.$ac_objext \
5402 conftest$ac_exeext conftest.$ac_ext
5403LDFLAGS="$save_LDFLAGS"
5404
5405
5406
5407# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408
Matthias Kloseb9621712010-04-24 17:59:49 +00005409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5410$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005411if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413else
5414 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5415 then ac_cv_path_EGREP="$GREP -E"
5416 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 # Loop through the user's path and test for each of PROGNAME-LIST
5420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5422do
5423 IFS=$as_save_IFS
5424 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 for ac_prog in egrep; do
5426 for ac_exec_ext in '' $ac_executable_extensions; do
5427 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005428 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005429# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005430 # Check for GNU $ac_path_EGREP
5431case `"$ac_path_EGREP" --version 2>&1` in
5432*GNU*)
5433 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5434*)
5435 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437 while :
5438 do
5439 cat "conftest.in" "conftest.in" >"conftest.tmp"
5440 mv "conftest.tmp" "conftest.in"
5441 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5444 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005446 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5447 # Best one so far, save it but keep looking for a better one
5448 ac_cv_path_EGREP="$ac_path_EGREP"
5449 ac_path_EGREP_max=$ac_count
5450 fi
5451 # 10*(2^10) chars as input seems more than enough
5452 test $ac_count -gt 10 && break
5453 done
5454 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5455esac
5456
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 $ac_path_EGREP_found && break 3
5458 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005461IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005463 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 +00005464 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005465else
5466 ac_cv_path_EGREP=$EGREP
5467fi
5468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005469 fi
5470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5472$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005473 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005474
5475
Matthias Kloseb9621712010-04-24 17:59:49 +00005476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5477$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005478if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005479 $as_echo_n "(cached) " >&6
5480else
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005482/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005483#include <stdlib.h>
5484#include <stdarg.h>
5485#include <string.h>
5486#include <float.h>
5487
5488int
5489main ()
5490{
5491
5492 ;
5493 return 0;
5494}
5495_ACEOF
5496if ac_fn_c_try_compile "$LINENO"; then :
5497 ac_cv_header_stdc=yes
5498else
5499 ac_cv_header_stdc=no
5500fi
5501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5502
5503if test $ac_cv_header_stdc = yes; then
5504 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5506/* end confdefs.h. */
5507#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005508
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005509_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005511 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005513else
Matthias Kloseb9621712010-04-24 17:59:49 +00005514 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005515fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005516rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
Matthias Kloseb9621712010-04-24 17:59:49 +00005518fi
5519
5520if test $ac_cv_header_stdc = yes; then
5521 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5523/* end confdefs.h. */
5524#include <stdlib.h>
5525
5526_ACEOF
5527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5528 $EGREP "free" >/dev/null 2>&1; then :
5529
5530else
5531 ac_cv_header_stdc=no
5532fi
5533rm -f conftest*
5534
5535fi
5536
5537if test $ac_cv_header_stdc = yes; then
5538 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5539 if test "$cross_compiling" = yes; then :
5540 :
5541else
5542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5543/* end confdefs.h. */
5544#include <ctype.h>
5545#include <stdlib.h>
5546#if ((' ' & 0x0FF) == 0x020)
5547# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5548# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5549#else
5550# define ISLOWER(c) \
5551 (('a' <= (c) && (c) <= 'i') \
5552 || ('j' <= (c) && (c) <= 'r') \
5553 || ('s' <= (c) && (c) <= 'z'))
5554# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5555#endif
5556
5557#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5558int
5559main ()
5560{
5561 int i;
5562 for (i = 0; i < 256; i++)
5563 if (XOR (islower (i), ISLOWER (i))
5564 || toupper (i) != TOUPPER (i))
5565 return 2;
5566 return 0;
5567}
5568_ACEOF
5569if ac_fn_c_try_run "$LINENO"; then :
5570
5571else
5572 ac_cv_header_stdc=no
5573fi
5574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5575 conftest.$ac_objext conftest.beam conftest.$ac_ext
5576fi
5577
5578fi
5579fi
5580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5581$as_echo "$ac_cv_header_stdc" >&6; }
5582if test $ac_cv_header_stdc = yes; then
5583
5584$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5585
5586fi
5587
5588# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5589for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5590 inttypes.h stdint.h unistd.h
5591do :
5592 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5593ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5594"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005595if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005596 cat >>confdefs.h <<_ACEOF
5597#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5598_ACEOF
5599
5600fi
5601
5602done
5603
5604
5605
5606 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 +02005607if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005608 MINIX=yes
5609else
5610 MINIX=
5611fi
5612
5613
5614 if test "$MINIX" = yes; then
5615
5616$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5617
5618
5619$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5620
5621
5622$as_echo "#define _MINIX 1" >>confdefs.h
5623
5624 fi
5625
5626
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5628$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005629if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005630 $as_echo_n "(cached) " >&6
5631else
5632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5633/* end confdefs.h. */
5634
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005635# define __EXTENSIONS__ 1
5636 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005637int
5638main ()
5639{
5640
5641 ;
5642 return 0;
5643}
5644_ACEOF
5645if ac_fn_c_try_compile "$LINENO"; then :
5646 ac_cv_safe_to_define___extensions__=yes
5647else
5648 ac_cv_safe_to_define___extensions__=no
5649fi
5650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5651fi
5652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5653$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5654 test $ac_cv_safe_to_define___extensions__ = yes &&
5655 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5656
5657 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5658
5659 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5660
5661 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5662
5663 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5664
5665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666
Xavier de Gaye95750b12016-07-09 11:05:42 +02005667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5668$as_echo_n "checking for the Android API level... " >&6; }
5669cat >> conftest.c <<EOF
5670#ifdef __ANDROID__
5671#include <android/api-level.h>
5672__ANDROID_API__
5673#else
5674#error not Android
5675#endif
5676EOF
5677
5678if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5679 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5681$as_echo "$ANDROID_API_LEVEL" >&6; }
5682
5683cat >>confdefs.h <<_ACEOF
5684#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5685_ACEOF
5686
5687else
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5689$as_echo "not Android" >&6; }
5690fi
5691rm -f conftest.c conftest.out
5692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693# Check for unsupported systems
5694case $ac_sys_system/$ac_sys_release in
5695atheos*|Linux*/1*)
5696 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5697 echo See README for details.
5698 exit 1;;
5699esac
5700
5701
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5703$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
5705# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005706if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 withval=$with_suffix;
5708 case $withval in
5709 no) EXEEXT=;;
5710 yes) EXEEXT=.exe;;
5711 *) EXEEXT=$withval;;
5712 esac
5713fi
5714
Matthias Kloseb9621712010-04-24 17:59:49 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5716$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
5718# Test whether we're running on a non-case-sensitive system, in which
5719# case we give a warning if no ext is given
5720
Matthias Kloseb9621712010-04-24 17:59:49 +00005721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5722$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723if test ! -d CaseSensitiveTestDir; then
5724mkdir CaseSensitiveTestDir
5725fi
5726
5727if test -d casesensitivetestdir
5728then
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5730$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 BUILDEXEEXT=.exe
5732else
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735 BUILDEXEEXT=$EXEEXT
5736fi
5737rmdir CaseSensitiveTestDir
5738
5739case $MACHDEP in
5740bsdos*)
5741 case $CC in
5742 gcc) CC="$CC -D_HAVE_BSDI";;
5743 esac;;
5744esac
5745
5746case $ac_sys_system in
5747hp*|HP*)
5748 case $CC in
5749 cc|*/cc) CC="$CC -Ae";;
5750 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751esac
5752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5755$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756if test -z "$LIBRARY"
5757then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005758 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5761$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762
5763# LDLIBRARY is the name of the library to link against (as opposed to the
5764# name of the library into which to insert object files). BLDLIBRARY is also
5765# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5766# is blank as the main program is not linked directly against LDLIBRARY.
5767# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5768# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5769# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5770# DLLLIBRARY is the shared (i.e., DLL) library.
5771#
5772# RUNSHARED is used to run shared python without installed libraries
5773#
5774# INSTSONAME is the name of the shared library that will be use to install
5775# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005776#
5777# LDVERSION is the shared library version number, normally the Python version
5778# with the ABI build flags appended.
5779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
5781
5782
5783
5784
5785
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005786
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787LDLIBRARY="$LIBRARY"
5788BLDLIBRARY='$(LDLIBRARY)'
5789INSTSONAME='$(LDLIBRARY)'
5790DLLLIBRARY=''
5791LDLIBRARYDIR=''
5792RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005793LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794
5795# LINKCC is the command that links the python executable -- default is $(CC).
5796# If CXX is set, and if it is needed to link a main function that was
5797# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5798# python might then depend on the C++ runtime
5799# This is altered for AIX in order to build the export list before
5800# linking.
5801
Matthias Kloseb9621712010-04-24 17:59:49 +00005802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5803$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804if test -z "$LINKCC"
5805then
5806 LINKCC='$(PURIFY) $(MAINCC)'
5807 case $ac_sys_system in
5808 AIX*)
5809 exp_extra="\"\""
5810 if test $ac_sys_release -ge 5 -o \
5811 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5812 exp_extra="."
5813 fi
5814 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815 QNX*)
5816 # qcc must be used because the other compilers do not
5817 # support -N.
5818 LINKCC=qcc;;
5819 esac
5820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5822$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823
5824# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5825# make sure we default having it set to "no": this is used by
5826# distutils.unixccompiler to know if it should add --enable-new-dtags
5827# to linker command lines, and failing to detect GNU ld simply results
5828# in the same bahaviour as before.
5829
Matthias Kloseb9621712010-04-24 17:59:49 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5831$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832ac_prog=ld
5833if test "$GCC" = yes; then
5834 ac_prog=`$CC -print-prog-name=ld`
5835fi
5836case `"$ac_prog" -V 2>&1 < /dev/null` in
5837 *GNU*)
5838 GNULD=yes;;
5839 *)
5840 GNULD=no;;
5841esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5843$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5846$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005847if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005848 $as_echo_n "(cached) " >&6
5849else
5850 ac_cv_c_inline=no
5851for ac_kw in inline __inline__ __inline; do
5852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5853/* end confdefs.h. */
5854#ifndef __cplusplus
5855typedef int foo_t;
5856static $ac_kw foo_t static_foo () {return 0; }
5857$ac_kw foo_t foo () {return 0; }
5858#endif
5859
5860_ACEOF
5861if ac_fn_c_try_compile "$LINENO"; then :
5862 ac_cv_c_inline=$ac_kw
5863fi
5864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5865 test "$ac_cv_c_inline" != no && break
5866done
5867
5868fi
5869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5870$as_echo "$ac_cv_c_inline" >&6; }
5871
5872case $ac_cv_c_inline in
5873 inline | yes) ;;
5874 *)
5875 case $ac_cv_c_inline in
5876 no) ac_val=;;
5877 *) ac_val=$ac_cv_c_inline;;
5878 esac
5879 cat >>confdefs.h <<_ACEOF
5880#ifndef __cplusplus
5881#define inline $ac_val
5882#endif
5883_ACEOF
5884 ;;
5885esac
5886
5887if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005888
5889$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005890
5891
5892fi
5893
5894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5896$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005898if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 enableval=$enable_shared;
5900fi
5901
5902
5903if test -z "$enable_shared"
5904then
5905 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005906 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 enable_shared="yes";;
5908 *)
5909 enable_shared="no";;
5910 esac
5911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5913$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914
Matthias Kloseb9621712010-04-24 17:59:49 +00005915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5916$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005918if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005919 enableval=$enable_profiling;
5920fi
5921
5922if test "x$enable_profiling" = xyes; then
5923 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005924 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926/* end confdefs.h. */
5927int main() { return 0; }
5928_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005929if ac_fn_c_try_link "$LINENO"; then :
5930
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005932 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005934rm -f core conftest.err conftest.$ac_objext \
5935 conftest$ac_exeext conftest.$ac_ext
5936 CC="$ac_save_cc"
5937else
5938 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5941$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942
doko@ubuntu.comba015832012-06-30 16:52:05 +02005943if test "x$enable_profiling" = xyes; then
5944 BASECFLAGS="-pg $BASECFLAGS"
5945 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946fi
5947
Matthias Kloseb9621712010-04-24 17:59:49 +00005948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5949$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950
5951# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5952# library that we build, but we do not want to link against it (we
5953# will find it with a -framework option). For this reason there is an
5954# extra variable BLDLIBRARY against which Python and the extension
5955# modules are linked, BLDLIBRARY. This is normally the same as
5956# LDLIBRARY, but empty for MacOSX framework builds.
5957if test "$enable_framework"
5958then
5959 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005960 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 BLDLIBRARY=''
5962else
5963 BLDLIBRARY='$(LDLIBRARY)'
5964fi
5965
5966# Other platforms follow
5967if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005968 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969
Matthias Kloseb9621712010-04-24 17:59:49 +00005970$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971
5972 case $ac_sys_system in
5973 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005974 LDLIBRARY='libpython$(LDVERSION).dll.a'
5975 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 ;;
5977 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005978 LDLIBRARY='libpython$(LDVERSION).so'
5979 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005980 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005982 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005983 then
5984 PY3LIBRARY=libpython3.so
5985 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005987 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005988 LDLIBRARY='libpython$(LDVERSION).so'
5989 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005990 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005992 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005993 then
5994 PY3LIBRARY=libpython3.so
5995 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996 ;;
5997 hp*|HP*)
5998 case `uname -m` in
5999 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006000 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ;;
6002 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006003 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004 ;;
6005 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006006 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006007 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006010 LDLIBRARY='libpython$(LDVERSION).dylib'
6011 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006012 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006014 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006015 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006016 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006017 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018
6019 esac
6020else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006021 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022 case $ac_sys_system in
6023 CYGWIN*)
6024 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006025 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026 ;;
6027 esac
6028fi
6029
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006030if test "$cross_compiling" = yes; then
6031 RUNSHARED=
6032fi
6033
Matthias Kloseb9621712010-04-24 17:59:49 +00006034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6035$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036
6037if test -n "$ac_tool_prefix"; then
6038 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6039set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006042if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044else
6045 if test -n "$RANLIB"; then
6046 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6047else
6048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6049for as_dir in $PATH
6050do
6051 IFS=$as_save_IFS
6052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057 break 2
6058 fi
6059done
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061IFS=$as_save_IFS
6062
6063fi
6064fi
6065RANLIB=$ac_cv_prog_RANLIB
6066if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6068$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069else
Matthias Kloseb9621712010-04-24 17:59:49 +00006070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6071$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072fi
6073
6074
6075fi
6076if test -z "$ac_cv_prog_RANLIB"; then
6077 ac_ct_RANLIB=$RANLIB
6078 # Extract the first word of "ranlib", so it can be a program name with args.
6079set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6081$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006082if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084else
6085 if test -n "$ac_ct_RANLIB"; then
6086 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6087else
6088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6089for as_dir in $PATH
6090do
6091 IFS=$as_save_IFS
6092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097 break 2
6098 fi
6099done
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101IFS=$as_save_IFS
6102
6103fi
6104fi
6105ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6106if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6108$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109else
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6111$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006112fi
6113
6114 if test "x$ac_ct_RANLIB" = x; then
6115 RANLIB=":"
6116 else
6117 case $cross_compiling:$ac_tool_warned in
6118yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006121ac_tool_warned=yes ;;
6122esac
6123 RANLIB=$ac_ct_RANLIB
6124 fi
6125else
6126 RANLIB="$ac_cv_prog_RANLIB"
6127fi
6128
6129
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006130if test -n "$ac_tool_prefix"; then
6131 for ac_prog in ar aal
6132 do
6133 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6134set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6136$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006137if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006138 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139else
6140 if test -n "$AR"; then
6141 ac_cv_prog_AR="$AR" # Let the user override the test.
6142else
6143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6144for as_dir in $PATH
6145do
6146 IFS=$as_save_IFS
6147 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006148 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006150 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152 break 2
6153 fi
6154done
Matthias Kloseb9621712010-04-24 17:59:49 +00006155 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156IFS=$as_save_IFS
6157
6158fi
6159fi
6160AR=$ac_cv_prog_AR
6161if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6163$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164else
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6166$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167fi
6168
6169
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006170 test -n "$AR" && break
6171 done
6172fi
6173if test -z "$AR"; then
6174 ac_ct_AR=$AR
6175 for ac_prog in ar aal
6176do
6177 # Extract the first word of "$ac_prog", so it can be a program name with args.
6178set dummy $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_ac_ct_AR+:} false; then :
6182 $as_echo_n "(cached) " >&6
6183else
6184 if test -n "$ac_ct_AR"; then
6185 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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 Lagerwall646eb1e2012-10-29 17:35:57 +00006193 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006194 ac_cv_prog_ac_ct_AR="$ac_prog"
6195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6196 break 2
6197 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006199 done
6200IFS=$as_save_IFS
6201
6202fi
6203fi
6204ac_ct_AR=$ac_cv_prog_ac_ct_AR
6205if test -n "$ac_ct_AR"; then
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6207$as_echo "$ac_ct_AR" >&6; }
6208else
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6210$as_echo "no" >&6; }
6211fi
6212
6213
6214 test -n "$ac_ct_AR" && break
6215done
6216
6217 if test "x$ac_ct_AR" = x; then
6218 AR="ar"
6219 else
6220 case $cross_compiling:$ac_tool_warned in
6221yes:)
6222{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6223$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6224ac_tool_warned=yes ;;
6225esac
6226 AR=$ac_ct_AR
6227 fi
6228fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229
6230
6231# tweak ARFLAGS only if the user didn't set it on the command line
6232
6233if test -z "$ARFLAGS"
6234then
6235 ARFLAGS="rc"
6236fi
6237
doko@ubuntu.com58844492012-06-30 18:25:32 +02006238if test -n "$ac_tool_prefix"; then
6239 for ac_prog in readelf
6240 do
6241 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6242set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6244$as_echo_n "checking for $ac_word... " >&6; }
6245if ${ac_cv_prog_READELF+:} false; then :
6246 $as_echo_n "(cached) " >&6
6247else
6248 if test -n "$READELF"; then
6249 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6250else
6251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254 IFS=$as_save_IFS
6255 test -z "$as_dir" && as_dir=.
6256 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006257 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006258 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6259 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260 break 2
6261 fi
6262done
6263 done
6264IFS=$as_save_IFS
6265
6266fi
6267fi
6268READELF=$ac_cv_prog_READELF
6269if test -n "$READELF"; then
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6271$as_echo "$READELF" >&6; }
6272else
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6274$as_echo "no" >&6; }
6275fi
6276
6277
6278 test -n "$READELF" && break
6279 done
6280fi
6281if test -z "$READELF"; then
6282 ac_ct_READELF=$READELF
6283 for ac_prog in readelf
6284do
6285 # Extract the first word of "$ac_prog", so it can be a program name with args.
6286set dummy $ac_prog; ac_word=$2
6287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6288$as_echo_n "checking for $ac_word... " >&6; }
6289if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6290 $as_echo_n "(cached) " >&6
6291else
6292 if test -n "$ac_ct_READELF"; then
6293 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6294else
6295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6296for as_dir in $PATH
6297do
6298 IFS=$as_save_IFS
6299 test -z "$as_dir" && as_dir=.
6300 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006301 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006302 ac_cv_prog_ac_ct_READELF="$ac_prog"
6303 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6304 break 2
6305 fi
6306done
6307 done
6308IFS=$as_save_IFS
6309
6310fi
6311fi
6312ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6313if test -n "$ac_ct_READELF"; then
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6315$as_echo "$ac_ct_READELF" >&6; }
6316else
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318$as_echo "no" >&6; }
6319fi
6320
6321
6322 test -n "$ac_ct_READELF" && break
6323done
6324
6325 if test "x$ac_ct_READELF" = x; then
6326 READELF=":"
6327 else
6328 case $cross_compiling:$ac_tool_warned in
6329yes:)
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6331$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6332ac_tool_warned=yes ;;
6333esac
6334 READELF=$ac_ct_READELF
6335 fi
6336fi
6337
6338if test "$cross_compiling" = yes; then
6339 case "$READELF" in
6340 readelf|:)
6341 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6342 ;;
6343 esac
6344fi
6345
6346
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006347
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348case $MACHDEP in
6349bsdos*|hp*|HP*)
6350 # install -d does not work on BSDI or HP-UX
6351 if test -z "$INSTALL"
6352 then
6353 INSTALL="${srcdir}/install-sh -c"
6354 fi
6355esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006356# Find a good install program. We prefer a C program (faster),
6357# so one script is as good as another. But avoid the broken or
6358# incompatible versions:
6359# SysV /etc/install, /usr/sbin/install
6360# SunOS /usr/etc/install
6361# IRIX /sbin/install
6362# AIX /bin/install
6363# AmigaOS /C/install, which installs bootblocks on floppy discs
6364# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6365# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6366# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6367# OS/2's system install, which has a completely different semantic
6368# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006369# Reject install programs that cannot install multiple files.
6370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6371$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006373if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375else
6376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377for as_dir in $PATH
6378do
6379 IFS=$as_save_IFS
6380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006381 # Account for people who put trailing slashes in PATH elements.
6382case $as_dir/ in #((
6383 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006385 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386 /usr/ucb/* ) ;;
6387 *)
6388 # OSF1 and SCO ODT 3.0 have their own names for install.
6389 # Don't use installbsd from OSF since it installs stuff as root
6390 # by default.
6391 for ac_prog in ginstall scoinst install; do
6392 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006393 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006394 if test $ac_prog = install &&
6395 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6396 # AIX install. It has an incompatible calling convention.
6397 :
6398 elif test $ac_prog = install &&
6399 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6400 # program-specific install script used by HP pwplus--don't use.
6401 :
6402 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006403 rm -rf conftest.one conftest.two conftest.dir
6404 echo one > conftest.one
6405 echo two > conftest.two
6406 mkdir conftest.dir
6407 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6408 test -s conftest.one && test -s conftest.two &&
6409 test -s conftest.dir/conftest.one &&
6410 test -s conftest.dir/conftest.two
6411 then
6412 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6413 break 3
6414 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415 fi
6416 fi
6417 done
6418 done
6419 ;;
6420esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006421
6422 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423IFS=$as_save_IFS
6424
Matthias Kloseb9621712010-04-24 17:59:49 +00006425rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426
6427fi
6428 if test "${ac_cv_path_install+set}" = set; then
6429 INSTALL=$ac_cv_path_install
6430 else
6431 # As a last resort, use the slow shell script. Don't cache a
6432 # value for INSTALL within a source directory, because that will
6433 # break other packages using the cache if that directory is
6434 # removed, or if the value is a relative name.
6435 INSTALL=$ac_install_sh
6436 fi
6437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6439$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006440
6441# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6442# It thinks the first close brace ends the variable substitution.
6443test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6444
6445test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6446
6447test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6448
Matthias Klose93a0ef12012-03-15 18:08:34 +01006449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6450$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6451if test -z "$MKDIR_P"; then
6452 if ${ac_cv_path_mkdir+:} false; then :
6453 $as_echo_n "(cached) " >&6
6454else
6455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6456for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6457do
6458 IFS=$as_save_IFS
6459 test -z "$as_dir" && as_dir=.
6460 for ac_prog in mkdir gmkdir; do
6461 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006462 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006463 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6464 'mkdir (GNU coreutils) '* | \
6465 'mkdir (coreutils) '* | \
6466 'mkdir (fileutils) '4.1*)
6467 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6468 break 3;;
6469 esac
6470 done
6471 done
6472 done
6473IFS=$as_save_IFS
6474
6475fi
6476
6477 test -d ./--version && rmdir ./--version
6478 if test "${ac_cv_path_mkdir+set}" = set; then
6479 MKDIR_P="$ac_cv_path_mkdir -p"
6480 else
6481 # As a last resort, use the slow shell script. Don't cache a
6482 # value for MKDIR_P within a source directory, because that will
6483 # break other packages using the cache if that directory is
6484 # removed, or if the value is a relative name.
6485 MKDIR_P="$ac_install_sh -d"
6486 fi
6487fi
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6489$as_echo "$MKDIR_P" >&6; }
6490
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006491
6492# Not every filesystem supports hard links
6493
6494if test -z "$LN" ; then
6495 case $ac_sys_system in
6496 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006497 *) LN=ln;;
6498 esac
6499fi
6500
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006501# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006502
6503ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006504
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6507$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508
6509# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006510if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511 withval=$with_pydebug;
6512if test "$withval" != no
6513then
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516
Matthias Kloseb9621712010-04-24 17:59:49 +00006517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6518$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006519 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006520 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006521else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006523fi
6524else
Matthias Kloseb9621712010-04-24 17:59:49 +00006525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006527fi
6528
6529
Brett Cannon63d98bc2016-09-06 17:12:40 -07006530# Enable optimization flags
6531
6532
6533Py_OPT='false'
6534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6535$as_echo_n "checking for --with-optimizations... " >&6; }
6536
6537# Check whether --with-optimizations was given.
6538if test "${with_optimizations+set}" = set; then :
6539 withval=$with_optimizations;
6540if test "$withval" != no
6541then
6542 Py_OPT='true'
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6544$as_echo "yes" >&6; };
6545else
6546 Py_OPT='false'
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548$as_echo "no" >&6; };
6549fi
6550else
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6552$as_echo "no" >&6; }
6553fi
6554
6555if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006556 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6557 # compile working code using it and both test_distutils and test_gdb are
6558 # broken when you do managed to get a toolchain that works with it. People
6559 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006560 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006561 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006562 DEF_MAKE_RULE="build_all"
6563else
6564 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006565 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006566 DEF_MAKE_RULE="all"
6567fi
6568
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006569# Enable LTO flags
6570
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6572$as_echo_n "checking for --with-lto... " >&6; }
6573
6574# Check whether --with-lto was given.
6575if test "${with_lto+set}" = set; then :
6576 withval=$with_lto;
6577if test "$withval" != no
6578then
6579 Py_LTO='true'
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6581$as_echo "yes" >&6; };
6582else
6583 Py_LTO='false'
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; };
6586fi
6587else
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
6590fi
6591
6592if test "$Py_LTO" = 'true' ; then
6593 case $CC in
6594 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006595 case $ac_sys_system in
6596 Darwin*)
6597 # Any changes made here should be reflected in the GCC+Darwin case below
6598 LTOFLAGS="-flto -Wl,-export_dynamic"
6599 ;;
6600 *)
6601 LTOFLAGS="-flto"
6602 ;;
6603 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006604 ;;
6605 *gcc*)
6606 case $ac_sys_system in
6607 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006608 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006609 ;;
6610 *)
6611 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6612 ;;
6613 esac
6614 ;;
6615 esac
6616fi
6617
Brett Cannon7188a3e2015-09-18 15:13:44 -07006618# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006619
6620
6621
6622
6623
Gregory P. Smith799520c2016-09-07 16:10:00 -07006624# Make this work on systems where llvm tools are not installed with their
6625# normal names in the default $PATH (ie: Ubuntu). They exist under the
6626# non-suffixed name in their versioned llvm directory.
6627llvm_bin_dir=''
6628llvm_path="${PATH}"
6629if test "${CC}" = "clang"
6630then
6631 clang_bin=`which clang`
6632 # Some systems install clang elsewhere as a symlink to the real path
6633 # which is where the related llvm tools are located.
6634 if test -L "${clang_bin}"
6635 then
6636 clang_dir=`dirname "${clang_bin}"`
6637 clang_bin=`readlink "${clang_bin}"`
6638 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6639 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6640 fi
6641fi
Zachary Ware5af85642015-12-21 12:09:17 -06006642
Gregory P. Smith799520c2016-09-07 16:10:00 -07006643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6644$as_echo_n "checking target system type... " >&6; }
6645if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006646 $as_echo_n "(cached) " >&6
6647else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006648 if test "x$target_alias" = x; then
6649 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006650else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006651 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6652 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6653fi
6654
6655fi
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6657$as_echo "$ac_cv_target" >&6; }
6658case $ac_cv_target in
6659*-*-*) ;;
6660*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6661esac
6662target=$ac_cv_target
6663ac_save_IFS=$IFS; IFS='-'
6664set x $ac_cv_target
6665shift
6666target_cpu=$1
6667target_vendor=$2
6668shift; shift
6669# Remember, the first character of IFS is used to create $*,
6670# except with old shells:
6671target_os=$*
6672IFS=$ac_save_IFS
6673case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6674
6675
6676# The aliases save the names the user supplied, while $host etc.
6677# will get canonicalized.
6678test -n "$target_alias" &&
6679 test "$program_prefix$program_suffix$program_transform_name" = \
6680 NONENONEs,x,x, &&
6681 program_prefix=${target_alias}-
6682# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6683set dummy $target_alias-llvm-profdata; ac_word=$2
6684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6685$as_echo_n "checking for $ac_word... " >&6; }
6686if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6687 $as_echo_n "(cached) " >&6
6688else
6689 case $LLVM_PROFDATA in
6690 [\\/]* | ?:[\\/]*)
6691 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6692 ;;
6693 *)
6694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6695for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006696do
6697 IFS=$as_save_IFS
6698 test -z "$as_dir" && as_dir=.
6699 for ac_exec_ext in '' $ac_executable_extensions; do
6700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006701 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6703 break 2
6704 fi
6705done
6706 done
6707IFS=$as_save_IFS
6708
Gregory P. Smith799520c2016-09-07 16:10:00 -07006709 ;;
6710esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006711fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6713if test -n "$LLVM_PROFDATA"; then
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6715$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006716else
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6718$as_echo "no" >&6; }
6719fi
6720
6721
Gregory P. Smith799520c2016-09-07 16:10:00 -07006722if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6723 if test "$build" = "$target"; then
6724 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6725 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6726set dummy llvm-profdata; ac_word=$2
6727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6728$as_echo_n "checking for $ac_word... " >&6; }
6729if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6730 $as_echo_n "(cached) " >&6
6731else
6732 case $ac_pt_LLVM_PROFDATA in
6733 [\\/]* | ?:[\\/]*)
6734 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6735 ;;
6736 *)
6737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6738for as_dir in ${llvm_path}
6739do
6740 IFS=$as_save_IFS
6741 test -z "$as_dir" && as_dir=.
6742 for ac_exec_ext in '' $ac_executable_extensions; do
6743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6744 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6746 break 2
6747 fi
6748done
6749 done
6750IFS=$as_save_IFS
6751
6752 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6753 ;;
6754esac
6755fi
6756ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6757if test -n "$ac_pt_LLVM_PROFDATA"; then
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6759$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6760else
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6762$as_echo "no" >&6; }
6763fi
6764
6765 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6766 else
6767 LLVM_PROFDATA="''"
6768 fi
6769else
6770 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6771fi
6772
6773
6774if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6775then
6776 LLVM_PROF_FOUND="found"
6777else
6778 LLVM_PROF_FOUND="not-found"
6779fi
6780if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6781then
6782 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6783 if test -n "${found_llvm_profdata}"
6784 then
6785 # llvm-profdata isn't directly in $PATH in some cases.
6786 # https://apple.stackexchange.com/questions/197053/
6787 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6788 LLVM_PROF_FOUND=found
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6790$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6791 fi
6792fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006793LLVM_PROF_ERR=no
6794case $CC in
6795 *clang*)
6796 # Any changes made here should be reflected in the GCC+Darwin case below
6797 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6798 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006799 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006800 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6801 if test $LLVM_PROF_FOUND = not-found
6802 then
6803 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 if test "${REQUIRE_PGO}" = "yes"
6805 then
6806 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6807 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006808 fi
6809 ;;
6810 *gcc*)
6811 case $ac_sys_system in
6812 Darwin*)
6813 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6814 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006815 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006816 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006817 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006818 then
6819 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006820 if test "${REQUIRE_PGO}" = "yes"
6821 then
6822 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6823 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006824 fi
6825 ;;
6826 *)
6827 PGO_PROF_GEN_FLAG="-fprofile-generate"
6828 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6829 LLVM_PROF_MERGER="true"
6830 LLVM_PROF_FILE=""
6831 ;;
6832 esac
6833 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006834 *icc*)
6835 PGO_PROF_GEN_FLAG="-prof-gen"
6836 PGO_PROF_USE_FLAG="-prof-use"
6837 LLVM_PROF_MERGER="true"
6838 LLVM_PROF_FILE=""
6839 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006840esac
6841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6843# merged with this chunk of code?
6844
6845# Optimizer/debugger flags
6846# ------------------------
6847# (The following bit of code is complicated enough - please keep things
6848# indented properly. Just pretend you're editing Python code. ;-)
6849
6850# There are two parallel sets of case statements below, one that checks to
6851# see if OPT was set and one that does BASECFLAGS setting based upon
6852# compiler and platform. BASECFLAGS tweaks need to be made even if the
6853# user set OPT.
6854
6855# tweak OPT based on compiler and platform, only if the user didn't set
6856# it on the command line
6857
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006858if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859then
6860 case $GCC in
6861 yes)
6862 if test "$CC" != 'g++' ; then
6863 STRICT_PROTO="-Wstrict-prototypes"
6864 fi
6865 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6866 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6867 WRAP="-fwrapv"
6868 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006869
6870 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006871 case $CC in
6872 *clang*) WRAP="-fwrapv"
6873 ;;
6874 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876 case $ac_cv_prog_cc_g in
6877 yes)
6878 if test "$Py_DEBUG" = 'true' ; then
6879 # Optimization messes up debuggers, so turn it off for
6880 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006881 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6882 OPT="-g -Og -Wall $STRICT_PROTO"
6883 else
6884 OPT="-g -O0 -Wall $STRICT_PROTO"
6885 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886 else
6887 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6888 fi
6889 ;;
6890 *)
6891 OPT="-O3 -Wall $STRICT_PROTO"
6892 ;;
6893 esac
6894 case $ac_sys_system in
6895 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6896 ;;
6897 esac
6898 ;;
6899
6900 *)
6901 OPT="-O"
6902 ;;
6903 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904fi
6905
6906
6907
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006908
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909# The -arch flags for universal builds on OSX
6910UNIVERSAL_ARCH_FLAGS=
6911
6912
6913# tweak BASECFLAGS based on compiler and platform
6914case $GCC in
6915yes)
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07006916 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006917
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006918 # Python doesn't violate C99 aliasing rules, but older versions of
6919 # GCC produce warnings for legal Python code. Enable
6920 # -fno-strict-aliasing on versions of GCC that support but produce
6921 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6923$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924 ac_save_cc="$CC"
6925 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006926 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006927 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006929else
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006931/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006932
Matthias Kloseb159a552010-04-25 21:00:44 +00006933
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006934int
6935main ()
6936{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006937
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006938 ;
6939 return 0;
6940}
Matthias Kloseb159a552010-04-25 21:00:44 +00006941
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006943if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006944
6945 CC="$ac_save_cc -fstrict-aliasing"
6946 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006948/* end confdefs.h. */
6949
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006950 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006951int
6952main ()
6953{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006954double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006955 ;
6956 return 0;
6957}
Matthias Kloseb159a552010-04-25 21:00:44 +00006958
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006960if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006961
6962 ac_cv_no_strict_aliasing=no
6963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964else
Matthias Kloseb159a552010-04-25 21:00:44 +00006965
6966 ac_cv_no_strict_aliasing=yes
6967
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006970
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006971else
Matthias Kloseb159a552010-04-25 21:00:44 +00006972
6973 ac_cv_no_strict_aliasing=no
6974
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006977fi
6978
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006979 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6982$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006983 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 then
6985 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6986 fi
6987
Zachary Ware5af85642015-12-21 12:09:17 -06006988 # ICC doesn't recognize the option, but only emits a warning
6989 ## XXX does it emit an unused result warning and can it be disabled?
6990 case "$CC" in
6991 *icc*)
6992 ac_cv_disable_unused_result_warning=no
6993 ;;
6994 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6996$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6997 ac_save_cc="$CC"
6998 CC="$CC -Wunused-result -Werror"
6999 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007000 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007001 $as_echo_n "(cached) " >&6
7002else
7003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7004/* end confdefs.h. */
7005
7006
7007int
7008main ()
7009{
7010
7011 ;
7012 return 0;
7013}
7014
7015_ACEOF
7016if ac_fn_c_try_compile "$LINENO"; then :
7017
7018 ac_cv_disable_unused_result_warning=yes
7019
7020else
7021
7022 ac_cv_disable_unused_result_warning=no
7023
7024fi
7025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7026fi
7027
7028 CFLAGS="$save_CFLAGS"
7029 CC="$ac_save_cc"
7030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7031$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007032 ;;
7033 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007034
7035 if test $ac_cv_disable_unused_result_warning = yes
7036 then
7037 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
7038 fi
7039
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7041$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7042 ac_save_cc="$CC"
7043 CC="$CC -Wsign-compare"
7044 save_CFLAGS="$CFLAGS"
7045 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7046 $as_echo_n "(cached) " >&6
7047else
7048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7049/* end confdefs.h. */
7050
7051
7052int
7053main ()
7054{
7055
7056 ;
7057 return 0;
7058}
7059
7060_ACEOF
7061if ac_fn_c_try_compile "$LINENO"; then :
7062
7063 ac_cv_enable_sign_compare_warning=yes
7064
7065else
7066
7067 ac_cv_enable_sign_compare_warning=no
7068
7069fi
7070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7071fi
7072
7073 CFLAGS="$save_CFLAGS"
7074 CC="$ac_save_cc"
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7076$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7077
7078 if test $ac_cv_enable_sign_compare_warning = yes
7079 then
7080 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7081 fi
7082
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7084$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7085 ac_save_cc="$CC"
7086 CC="$CC -Wunreachable-code"
7087 save_CFLAGS="$CFLAGS"
7088 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7089 $as_echo_n "(cached) " >&6
7090else
7091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7092/* end confdefs.h. */
7093
7094
7095int
7096main ()
7097{
7098
7099 ;
7100 return 0;
7101}
7102
7103_ACEOF
7104if ac_fn_c_try_compile "$LINENO"; then :
7105
7106 ac_cv_enable_unreachable_code_warning=yes
7107
7108else
7109
7110 ac_cv_enable_unreachable_code_warning=no
7111
7112fi
7113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7114fi
7115
7116 CFLAGS="$save_CFLAGS"
7117 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007118
7119 # Don't enable unreachable code warning in debug mode, since it usually
7120 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007121 # Issue #24324: Unfortunately, the unreachable code warning does not work
7122 # correctly on gcc and has been silently removed from the compiler.
7123 # It is supported on clang but on OS X systems gcc may be an alias
7124 # for clang. Try to determine if the compiler is not really gcc and,
7125 # if so, only then enable the warning.
7126 if test $ac_cv_enable_unreachable_code_warning = yes && \
7127 test "$Py_DEBUG" != "true" && \
7128 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007129 then
7130 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007131 else
7132 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007133 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7135$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007136
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007137 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7138 # support. Without this, treatment of subnormals doesn't follow
7139 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007140 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007141 alpha*)
7142 BASECFLAGS="$BASECFLAGS -mieee"
7143 ;;
7144 esac
7145
7146 case $ac_sys_system in
7147 SCO_SV*)
7148 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7149 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007150
7151 # is there any other compiler on Darwin besides gcc?
7152 Darwin*)
7153 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7154 # used to be here, but non-Apple gcc doesn't accept them.
7155 if test "${CC}" = gcc
7156 then
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007158$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007159 case "${UNIVERSALSDK}" in
7160 */MacOSX10.4u.sdk)
7161 # Build using 10.4 SDK, force usage of gcc when the
7162 # compiler is gcc, otherwise the user will get very
7163 # confusing error messages when building on OSX 10.6
7164 CC=gcc-4.0
7165 CPP=cpp-4.0
7166 ;;
7167 esac
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007169$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007170 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007171
Ned Deily87adb6e2013-10-18 21:09:56 -07007172 if test "${enable_universalsdk}"
7173 then
7174 case "$UNIVERSAL_ARCHS" in
7175 32-bit)
7176 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7177 LIPO_32BIT_FLAGS=""
7178 ARCH_RUN_32BIT=""
7179 ;;
7180 64-bit)
7181 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7182 LIPO_32BIT_FLAGS=""
7183 ARCH_RUN_32BIT="true"
7184 ;;
7185 all)
7186 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7187 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7188 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7189 ;;
7190 intel)
7191 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7192 LIPO_32BIT_FLAGS="-extract i386"
7193 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7194 ;;
7195 intel-32)
7196 UNIVERSAL_ARCH_FLAGS="-arch i386"
7197 LIPO_32BIT_FLAGS=""
7198 ARCH_RUN_32BIT=""
7199 ;;
7200 3-way)
7201 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7202 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7203 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7204 ;;
7205 *)
7206 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7207 ;;
7208 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007209
Ned Deily87adb6e2013-10-18 21:09:56 -07007210 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7211 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7212 if test "${UNIVERSALSDK}" != "/"
7213 then
7214 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7215 fi
7216 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007217
Ned Deily87adb6e2013-10-18 21:09:56 -07007218 # Calculate an appropriate deployment target for this build:
7219 # The deployment target value is used explicitly to enable certain
7220 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007221 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007222 # component of the string returned by distutils.get_platform().
7223 #
7224 # Use the value from:
7225 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7226 # 2. the operating system version of the build machine if >= 10.6
7227 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7228 # below to pick either 10.3, 10.4, or 10.5 as the target.
7229 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007230
Ned Deily87adb6e2013-10-18 21:09:56 -07007231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7232$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007233 cur_target_major=`sw_vers -productVersion | \
7234 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7235 cur_target_minor=`sw_vers -productVersion | \
7236 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7237 cur_target="${cur_target_major}.${cur_target_minor}"
7238 if test ${cur_target_major} -eq 10 && \
7239 test ${cur_target_minor} -ge 3 && \
7240 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007241 then
Ned Deily36820b62014-06-25 13:44:22 -07007242 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007243 cur_target=10.3
7244 if test ${enable_universalsdk}
7245 then
7246 case "$UNIVERSAL_ARCHS" in
7247 all|3-way|intel|64-bit)
7248 # These configurations were first supported in 10.5
7249 cur_target='10.5'
7250 ;;
7251 esac
7252 else
7253 if test `/usr/bin/arch` = "i386"
7254 then
7255 # 10.4 was the first release to support Intel archs
7256 cur_target="10.4"
7257 fi
7258 fi
7259 fi
7260 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007261
Ned Deily87adb6e2013-10-18 21:09:56 -07007262 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7263 # environment with a value that is the same as what we'll use
7264 # in the Makefile to ensure that we'll get the same compiler
7265 # environment during configure and build time.
7266 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7267 export MACOSX_DEPLOYMENT_TARGET
7268 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7270$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007271
Ned Deily87adb6e2013-10-18 21:09:56 -07007272 # end of Darwin* tests
7273 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274 esac
7275 ;;
7276
7277*)
7278 case $ac_sys_system in
7279 OpenUNIX*|UnixWare*)
7280 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7281 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007282 SCO_SV*)
7283 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7284 ;;
7285 esac
7286 ;;
7287esac
7288
Zachary Ware5af85642015-12-21 12:09:17 -06007289# ICC needs -fp-model strict or floats behave badly
7290case "$CC" in
7291*icc*)
7292 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7293 ;;
7294esac
7295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296if test "$Py_DEBUG" = 'true'; then
7297 :
7298else
7299 OPT="-DNDEBUG $OPT"
7300fi
7301
7302if test "$ac_arch_flags"
7303then
7304 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7305fi
7306
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007307# On some compilers, pthreads are available without further options
7308# (e.g. MacOS X). On some of these systems, the compiler will not
7309# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7310# So we have to see first whether pthreads are available without
7311# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7313$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007314if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318 ac_cv_pthread_is_default=no
7319else
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007321/* end confdefs.h. */
7322
Stefan Krah7dba5942012-11-22 22:49:11 +01007323#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007324#include <pthread.h>
7325
7326void* routine(void* p){return NULL;}
7327
7328int main(){
7329 pthread_t p;
7330 if(pthread_create(&p,NULL,routine,NULL)!=0)
7331 return 1;
7332 (void)pthread_detach(p);
7333 return 0;
7334}
7335
7336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007337if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338
7339 ac_cv_pthread_is_default=yes
7340 ac_cv_kthread=no
7341 ac_cv_pthread=no
7342
7343else
Matthias Kloseb9621712010-04-24 17:59:49 +00007344 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7347 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348fi
7349
7350
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351fi
7352
Matthias Kloseb9621712010-04-24 17:59:49 +00007353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7354$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355
7356
7357if test $ac_cv_pthread_is_default = yes
7358then
7359 ac_cv_kpthread=no
7360else
7361# -Kpthread, if available, provides the right #defines
7362# and linker options to make pthread_create available
7363# Some compilers won't report that they do not support -Kpthread,
7364# so we need to run a program to see whether it really made the
7365# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7367$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007368if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007369 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370else
7371 ac_save_cc="$CC"
7372CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007373if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374 ac_cv_kpthread=no
7375else
Matthias Kloseb9621712010-04-24 17:59:49 +00007376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377/* end confdefs.h. */
7378
Stefan Krah7dba5942012-11-22 22:49:11 +01007379#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380#include <pthread.h>
7381
7382void* routine(void* p){return NULL;}
7383
7384int main(){
7385 pthread_t p;
7386 if(pthread_create(&p,NULL,routine,NULL)!=0)
7387 return 1;
7388 (void)pthread_detach(p);
7389 return 0;
7390}
7391
7392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007393if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394 ac_cv_kpthread=yes
7395else
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7399 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400fi
7401
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007402CC="$ac_save_cc"
7403fi
7404
Matthias Kloseb9621712010-04-24 17:59:49 +00007405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7406$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407fi
7408
7409if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7410then
7411# -Kthread, if available, provides the right #defines
7412# and linker options to make pthread_create available
7413# Some compilers won't report that they do not support -Kthread,
7414# so we need to run a program to see whether it really made the
7415# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7417$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007418if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007419 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420else
7421 ac_save_cc="$CC"
7422CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007423if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424 ac_cv_kthread=no
7425else
Matthias Kloseb9621712010-04-24 17:59:49 +00007426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427/* end confdefs.h. */
7428
Stefan Krah7dba5942012-11-22 22:49:11 +01007429#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430#include <pthread.h>
7431
7432void* routine(void* p){return NULL;}
7433
7434int main(){
7435 pthread_t p;
7436 if(pthread_create(&p,NULL,routine,NULL)!=0)
7437 return 1;
7438 (void)pthread_detach(p);
7439 return 0;
7440}
7441
7442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007443if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444 ac_cv_kthread=yes
7445else
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450fi
7451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452CC="$ac_save_cc"
7453fi
7454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7456$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457fi
7458
7459if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7460then
7461# -pthread, if available, provides the right #defines
7462# and linker options to make pthread_create available
7463# Some compilers won't report that they do not support -pthread,
7464# so we need to run a program to see whether it really made the
7465# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7467$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007468if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007469 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470else
7471 ac_save_cc="$CC"
7472CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007473if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474 ac_cv_pthread=no
7475else
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477/* end confdefs.h. */
7478
Stefan Krah7dba5942012-11-22 22:49:11 +01007479#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480#include <pthread.h>
7481
7482void* routine(void* p){return NULL;}
7483
7484int main(){
7485 pthread_t p;
7486 if(pthread_create(&p,NULL,routine,NULL)!=0)
7487 return 1;
7488 (void)pthread_detach(p);
7489 return 0;
7490}
7491
7492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007493if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494 ac_cv_pthread=yes
7495else
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500fi
7501
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502CC="$ac_save_cc"
7503fi
7504
Matthias Kloseb9621712010-04-24 17:59:49 +00007505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7506$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507fi
7508
7509# If we have set a CC compiler flag for thread support then
7510# check if it works for CXX, too.
7511ac_cv_cxx_thread=no
7512if test ! -z "$CXX"
7513then
Matthias Kloseb9621712010-04-24 17:59:49 +00007514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7515$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516ac_save_cxx="$CXX"
7517
7518if test "$ac_cv_kpthread" = "yes"
7519then
7520 CXX="$CXX -Kpthread"
7521 ac_cv_cxx_thread=yes
7522elif test "$ac_cv_kthread" = "yes"
7523then
7524 CXX="$CXX -Kthread"
7525 ac_cv_cxx_thread=yes
7526elif test "$ac_cv_pthread" = "yes"
7527then
7528 CXX="$CXX -pthread"
7529 ac_cv_cxx_thread=yes
7530fi
7531
7532if test $ac_cv_cxx_thread = yes
7533then
7534 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7535 $CXX -c conftest.$ac_ext 2>&5
7536 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7537 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7538 then
7539 ac_cv_cxx_thread=yes
7540 else
7541 ac_cv_cxx_thread=no
7542 fi
7543 rm -fr conftest*
7544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7546$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007547fi
7548CXX="$ac_save_cxx"
7549
7550
7551# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7553$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007554if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558/* end confdefs.h. */
7559#include <stdlib.h>
7560#include <stdarg.h>
7561#include <string.h>
7562#include <float.h>
7563
7564int
7565main ()
7566{
7567
7568 ;
7569 return 0;
7570}
7571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007572if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573 ac_cv_header_stdc=yes
7574else
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7578
7579if test $ac_cv_header_stdc = yes; then
7580 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582/* end confdefs.h. */
7583#include <string.h>
7584
7585_ACEOF
7586if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 $EGREP "memchr" >/dev/null 2>&1; then :
7588
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589else
7590 ac_cv_header_stdc=no
7591fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007592rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593
7594fi
7595
7596if test $ac_cv_header_stdc = yes; then
7597 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599/* end confdefs.h. */
7600#include <stdlib.h>
7601
7602_ACEOF
7603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 $EGREP "free" >/dev/null 2>&1; then :
7605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606else
7607 ac_cv_header_stdc=no
7608fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007609rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610
7611fi
7612
7613if test $ac_cv_header_stdc = yes; then
7614 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616 :
7617else
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619/* end confdefs.h. */
7620#include <ctype.h>
7621#include <stdlib.h>
7622#if ((' ' & 0x0FF) == 0x020)
7623# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7624# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7625#else
7626# define ISLOWER(c) \
7627 (('a' <= (c) && (c) <= 'i') \
7628 || ('j' <= (c) && (c) <= 'r') \
7629 || ('s' <= (c) && (c) <= 'z'))
7630# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7631#endif
7632
7633#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7634int
7635main ()
7636{
7637 int i;
7638 for (i = 0; i < 256; i++)
7639 if (XOR (islower (i), ISLOWER (i))
7640 || toupper (i) != TOUPPER (i))
7641 return 2;
7642 return 0;
7643}
7644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007645if ac_fn_c_try_run "$LINENO"; then :
7646
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647else
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652fi
7653
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654fi
7655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7657$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658if test $ac_cv_header_stdc = yes; then
7659
Matthias Kloseb9621712010-04-24 17:59:49 +00007660$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661
7662fi
7663
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007664for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007665fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007666ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007667sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007668unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007669poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007670sys/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 +01007671sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007672sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007673sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007674sys/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 -07007675libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007676linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007677sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007678do :
7679 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7680ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007681if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007682 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007683#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007684_ACEOF
7685
7686fi
7687
Guido van Rossum627b2d71993-12-24 10:39:16 +00007688done
7689
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007690ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007691for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7694$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007695if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007699/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007700#include <sys/types.h>
7701#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007702
Martin v. Löwis11437992002-04-12 09:54:03 +00007703int
7704main ()
7705{
7706if ((DIR *) 0)
7707return 0;
7708 ;
7709 return 0;
7710}
7711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007712if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007714else
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719eval ac_res=\$$as_ac_Header
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7721$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007722if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007723 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007724#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007725_ACEOF
7726
7727ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007730done
7731# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7732if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7734$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007735if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007737else
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742/* Override any GCC internal prototype to avoid an error.
7743 Use char because int might match the return type of a GCC
7744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007745#ifdef __cplusplus
7746extern "C"
7747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007748char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007749int
7750main ()
7751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 ;
7754 return 0;
7755}
7756_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757for ac_lib in '' dir; do
7758 if test -z "$ac_lib"; then
7759 ac_res="none required"
7760 else
7761 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007762 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767rm -f core conftest.err conftest.$ac_objext \
7768 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007769 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007770 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772done
Victor Stinnere0be4232011-10-25 13:06:09 +02007773if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007775else
7776 ac_cv_search_opendir=no
7777fi
7778rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007779LIBS=$ac_func_search_save_LIBS
7780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7782$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007783ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007784if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007786
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007788
Michael W. Hudson54241132001-12-07 15:38:26 +00007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7791$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007792if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007794else
7795 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799/* Override any GCC internal prototype to avoid an error.
7800 Use char because int might match the return type of a GCC
7801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007802#ifdef __cplusplus
7803extern "C"
7804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007805char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007806int
7807main ()
7808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 ;
7811 return 0;
7812}
7813_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814for ac_lib in '' x; do
7815 if test -z "$ac_lib"; then
7816 ac_res="none required"
7817 else
7818 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007824rm -f core conftest.err conftest.$ac_objext \
7825 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007826 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829done
Victor Stinnere0be4232011-10-25 13:06:09 +02007830if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832else
7833 ac_cv_search_opendir=no
7834fi
7835rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007836LIBS=$ac_func_search_save_LIBS
7837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7839$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007841if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007844fi
7845
7846fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007847
Matthias Kloseb9621712010-04-24 17:59:49 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7849$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007850if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007854/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007855#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007856int
7857main ()
7858{
7859return makedev(0, 0);
7860 ;
7861 return 0;
7862}
7863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007864if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007865 ac_cv_header_sys_types_h_makedev=yes
7866else
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869rm -f core conftest.err conftest.$ac_objext \
7870 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007871
7872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7874$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007875
7876if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007877ac_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 +02007878if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007879
Matthias Kloseb9621712010-04-24 17:59:49 +00007880$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007881
7882fi
7883
7884
7885
7886 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 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 +02007888if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007889
Matthias Kloseb9621712010-04-24 17:59:49 +00007890$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007891
7892fi
7893
7894
7895 fi
7896fi
7897
Michael W. Hudson54241132001-12-07 15:38:26 +00007898
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007899# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7900# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7901SAVE_CFLAGS=$CFLAGS
7902CFLAGS="-std=c99 $CFLAGS"
7903for ac_header in bluetooth/bluetooth.h
7904do :
7905 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7906if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7907 cat >>confdefs.h <<_ACEOF
7908#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7909_ACEOF
7910
7911fi
7912
7913done
7914
7915CFLAGS=$SAVE_CFLAGS
7916
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007917# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7918for ac_header in net/if.h
7919do :
7920 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7921#ifdef STDC_HEADERS
7922# include <stdlib.h>
7923# include <stddef.h>
7924#else
7925# ifdef HAVE_STDLIB_H
7926# include <stdlib.h>
7927# endif
7928#endif
7929#ifdef HAVE_SYS_SOCKET_H
7930# include <sys/socket.h>
7931#endif
7932
7933"
Victor Stinnere0be4232011-10-25 13:06:09 +02007934if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007935 cat >>confdefs.h <<_ACEOF
7936#define HAVE_NET_IF_H 1
7937_ACEOF
7938
7939fi
7940
7941done
7942
7943
Martin v. Löwis11017b12006-01-14 18:12:57 +00007944# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007945for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007946do :
7947 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 +00007948#ifdef HAVE_ASM_TYPES_H
7949#include <asm/types.h>
7950#endif
7951#ifdef HAVE_SYS_SOCKET_H
7952#include <sys/socket.h>
7953#endif
7954
Matthias Kloseb9621712010-04-24 17:59:49 +00007955"
Victor Stinnere0be4232011-10-25 13:06:09 +02007956if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007957 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007958#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007959_ACEOF
7960
7961fi
7962
7963done
7964
7965
Charles-François Natali47413c12011-10-06 19:47:44 +02007966# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007967for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007968do :
7969 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7970ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7971#ifdef HAVE_SYS_SOCKET_H
7972#include <sys/socket.h>
7973#endif
7974
7975"
7976if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7977 cat >>confdefs.h <<_ACEOF
7978#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7979_ACEOF
7980
7981fi
7982
7983done
7984
7985
Guido van Rossum627b2d71993-12-24 10:39:16 +00007986# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007987was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7989$as_echo_n "checking for clock_t in time.h... " >&6; }
7990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007992#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007993
7994_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007997 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007998else
Martin v. Löwis11437992002-04-12 09:54:03 +00007999
8000
Matthias Kloseb9621712010-04-24 17:59:49 +00008001$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008002
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008003
Guido van Rossum627b2d71993-12-24 10:39:16 +00008004fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008005rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008006
Matthias Kloseb9621712010-04-24 17:59:49 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8008$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008009
Matthias Kloseb9621712010-04-24 17:59:49 +00008010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8011$as_echo_n "checking for makedev... " >&6; }
8012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008014
Jesus Cea740f53a2010-04-28 11:35:30 +00008015#if defined(MAJOR_IN_MKDEV)
8016#include <sys/mkdev.h>
8017#elif defined(MAJOR_IN_SYSMACROS)
8018#include <sys/sysmacros.h>
8019#else
8020#include <sys/types.h>
8021#endif
8022
Neal Norwitz11690112002-07-30 01:08:28 +00008023int
8024main ()
8025{
Jesus Cea740f53a2010-04-28 11:35:30 +00008026
8027 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008028 ;
8029 return 0;
8030}
Matthias Kloseb159a552010-04-25 21:00:44 +00008031
Neal Norwitz11690112002-07-30 01:08:28 +00008032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008033if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008034 ac_cv_has_makedev=yes
8035else
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008038rm -f core conftest.err conftest.$ac_objext \
8039 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8041$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008042if test "$ac_cv_has_makedev" = "yes"; then
8043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008045
8046fi
8047
Christian Heimes985ecdc2013-11-20 11:46:18 +01008048# byte swapping
8049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8050$as_echo_n "checking for le64toh... " >&6; }
8051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8052/* end confdefs.h. */
8053
8054#ifdef HAVE_ENDIAN_H
8055#include <endian.h>
8056#elif defined(HAVE_SYS_ENDIAN_H)
8057#include <sys/endian.h>
8058#endif
8059
8060int
8061main ()
8062{
8063
8064 le64toh(1)
8065 ;
8066 return 0;
8067}
8068
8069_ACEOF
8070if ac_fn_c_try_link "$LINENO"; then :
8071 ac_cv_has_le64toh=yes
8072else
8073 ac_cv_has_le64toh=no
8074fi
8075rm -f core conftest.err conftest.$ac_objext \
8076 conftest$ac_exeext conftest.$ac_ext
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8078$as_echo "$ac_cv_has_le64toh" >&6; }
8079if test "$ac_cv_has_le64toh" = "yes"; then
8080
8081$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8082
8083fi
8084
Martin v. Löwis399a6892002-10-04 10:22:02 +00008085# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8086# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8087# defined, but the compiler does not support pragma redefine_extname,
8088# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8089# structures (such as rlimit64) without declaring them. As a
8090# work-around, disable LFS on such configurations
8091
8092use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8094$as_echo_n "checking Solaris LFS bug... " >&6; }
8095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008096/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008097
8098#define _LARGEFILE_SOURCE 1
8099#define _FILE_OFFSET_BITS 64
8100#include <sys/resource.h>
8101
Martin v. Löwis399a6892002-10-04 10:22:02 +00008102int
8103main ()
8104{
8105struct rlimit foo;
8106 ;
8107 return 0;
8108}
8109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008110if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008111 sol_lfs_bug=no
8112else
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8117$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008118if test "$sol_lfs_bug" = "yes"; then
8119 use_lfs=no
8120fi
8121
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008122# Don't use largefile support for GNU/Hurd
8123case $ac_sys_system in GNU*)
8124 use_lfs=no
8125esac
8126
Martin v. Löwis399a6892002-10-04 10:22:02 +00008127if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008128# Two defines needed to enable largefile support on various platforms
8129# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008130case $ac_sys_system/$ac_sys_release in
8131AIX*)
8132
8133$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8134
8135 ;;
8136esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008139
8140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008142
Martin v. Löwis399a6892002-10-04 10:22:02 +00008143fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008144
Guido van Rossum84e7b241996-08-19 21:59:00 +00008145# Add some code to confdefs.h so that the test for off_t works on SCO
8146cat >> confdefs.h <<\EOF
8147#if defined(SCO_DS)
8148#undef _OFF_T
8149#endif
8150EOF
8151
Guido van Rossumef2255b2000-03-10 22:30:29 +00008152# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008153ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008154if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156else
Martin v. Löwis11437992002-04-12 09:54:03 +00008157
8158cat >>confdefs.h <<_ACEOF
8159#define mode_t int
8160_ACEOF
8161
8162fi
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008167else
Martin v. Löwis11437992002-04-12 09:54:03 +00008168
8169cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008170#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008171_ACEOF
8172
8173fi
8174
Matthias Kloseb9621712010-04-24 17:59:49 +00008175ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008176if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008178else
Martin v. Löwis11437992002-04-12 09:54:03 +00008179
8180cat >>confdefs.h <<_ACEOF
8181#define pid_t int
8182_ACEOF
8183
8184fi
8185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008188#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008189_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008190
Matthias Kloseb9621712010-04-24 17:59:49 +00008191ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008192if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008194else
Martin v. Löwis11437992002-04-12 09:54:03 +00008195
8196cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008198_ACEOF
8199
8200fi
8201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8203$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008204if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008205 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008206else
Matthias Kloseb9621712010-04-24 17:59:49 +00008207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008208/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008209#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008210
8211_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008213 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008214 ac_cv_type_uid_t=yes
8215else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008216 ac_cv_type_uid_t=no
8217fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008218rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8222$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008223if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008226
8227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008229
8230fi
8231
Mark Dickinson983bc162012-12-02 12:11:38 +00008232
Matthias Kloseb9621712010-04-24 17:59:49 +00008233ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008234if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008237
8238fi
8239
Stefan Krah1919b7e2012-03-21 18:25:23 +01008240ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8241if test "x$ac_cv_type___uint128_t" = xyes; then :
8242
8243$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8244
8245fi
8246
Jack Jansendd19cf82001-12-06 22:36:17 +00008247
Michael W. Hudson54241132001-12-07 15:38:26 +00008248# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008249# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250# The cast to long int works around a bug in the HP C Compiler
8251# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8252# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8253# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8255$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008256if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008257 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008258else
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 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 +00008260
Martin v. Löwis11437992002-04-12 09:54:03 +00008261else
Matthias Kloseb9621712010-04-24 17:59:49 +00008262 if test "$ac_cv_type_int" = yes; then
8263 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008265as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008266See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008267 else
8268 ac_cv_sizeof_int=0
8269 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8274$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008275
8276
8277
Martin v. Löwis11437992002-04-12 09:54:03 +00008278cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008279#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008280_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008281
8282
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283# The cast to long int works around a bug in the HP C Compiler
8284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8286# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8288$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008289if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008291else
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 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 +00008293
Martin v. Löwis11437992002-04-12 09:54:03 +00008294else
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 if test "$ac_cv_type_long" = yes; then
8296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008298as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008299See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008300 else
8301 ac_cv_sizeof_long=0
8302 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008304
Martin v. Löwis11437992002-04-12 09:54:03 +00008305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8307$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308
8309
8310
Martin v. Löwis11437992002-04-12 09:54:03 +00008311cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008312#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008313_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008314
8315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316# The cast to long int works around a bug in the HP C Compiler
8317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8319# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8321$as_echo_n "checking size of long long... " >&6; }
8322if ${ac_cv_sizeof_long_long+:} false; then :
8323 $as_echo_n "(cached) " >&6
8324else
8325 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8326
8327else
8328 if test "$ac_cv_type_long_long" = yes; then
8329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8331as_fn_error 77 "cannot compute sizeof (long long)
8332See \`config.log' for more details" "$LINENO" 5; }
8333 else
8334 ac_cv_sizeof_long_long=0
8335 fi
8336fi
8337
8338fi
8339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8340$as_echo "$ac_cv_sizeof_long_long" >&6; }
8341
8342
8343
8344cat >>confdefs.h <<_ACEOF
8345#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8346_ACEOF
8347
8348
8349# The cast to long int works around a bug in the HP C Compiler
8350# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8351# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8352# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8354$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008355if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008357else
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 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 +00008359
Martin v. Löwis11437992002-04-12 09:54:03 +00008360else
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 if test "$ac_cv_type_void_p" = yes; then
8362 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8363$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008364as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008365See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366 else
8367 ac_cv_sizeof_void_p=0
8368 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008370
Martin v. Löwis11437992002-04-12 09:54:03 +00008371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8373$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374
8375
8376
Martin v. Löwis11437992002-04-12 09:54:03 +00008377cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008378#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008379_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008380
8381
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382# The cast to long int works around a bug in the HP C Compiler
8383# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8384# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8385# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8387$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008388if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008390else
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 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 +00008392
Martin v. Löwis11437992002-04-12 09:54:03 +00008393else
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 if test "$ac_cv_type_short" = yes; then
8395 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008397as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008398See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399 else
8400 ac_cv_sizeof_short=0
8401 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8406$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407
8408
8409
Martin v. Löwis11437992002-04-12 09:54:03 +00008410cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008411#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008412_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008413
8414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415# The cast to long int works around a bug in the HP C Compiler
8416# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8417# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8418# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8420$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008421if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008423else
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 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 +00008425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426else
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 if test "$ac_cv_type_float" = yes; then
8428 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8429$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008430as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008431See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008432 else
8433 ac_cv_sizeof_float=0
8434 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008436
Martin v. Löwis11437992002-04-12 09:54:03 +00008437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8439$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008440
8441
8442
Martin v. Löwis11437992002-04-12 09:54:03 +00008443cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008444#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008445_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008446
8447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008448# The cast to long int works around a bug in the HP C Compiler
8449# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8450# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8451# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8453$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008454if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008456else
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 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 +00008458
Martin v. Löwis11437992002-04-12 09:54:03 +00008459else
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 if test "$ac_cv_type_double" = yes; then
8461 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008463as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008464See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465 else
8466 ac_cv_sizeof_double=0
8467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008469
Martin v. Löwis11437992002-04-12 09:54:03 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8472$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473
8474
8475
Martin v. Löwis11437992002-04-12 09:54:03 +00008476cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008477#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008478_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008479
8480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481# The cast to long int works around a bug in the HP C Compiler
8482# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8483# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8484# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8486$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008487if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008489else
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 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 +00008491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492else
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 if test "$ac_cv_type_fpos_t" = yes; then
8494 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008496as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008497See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498 else
8499 ac_cv_sizeof_fpos_t=0
8500 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008502
Martin v. Löwis11437992002-04-12 09:54:03 +00008503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8505$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506
8507
8508
Martin v. Löwis11437992002-04-12 09:54:03 +00008509cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008510#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008511_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008512
Michael W. Hudson54241132001-12-07 15:38:26 +00008513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514# The cast to long int works around a bug in the HP C Compiler
8515# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8516# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8517# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8519$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008520if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 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 +00008524
Martin v. Löwis18e16552006-02-15 17:27:45 +00008525else
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 if test "$ac_cv_type_size_t" = yes; then
8527 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8528$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008529as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008530See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531 else
8532 ac_cv_sizeof_size_t=0
8533 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008535
Martin v. Löwis18e16552006-02-15 17:27:45 +00008536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8538$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539
8540
8541
Martin v. Löwis18e16552006-02-15 17:27:45 +00008542cat >>confdefs.h <<_ACEOF
8543#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8544_ACEOF
8545
8546
Christian Heimes400adb02008-02-01 08:12:03 +00008547# The cast to long int works around a bug in the HP C Compiler
8548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8550# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8552$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008553if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 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 +00008557
Christian Heimes400adb02008-02-01 08:12:03 +00008558else
Matthias Kloseb9621712010-04-24 17:59:49 +00008559 if test "$ac_cv_type_pid_t" = yes; then
8560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008562as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008563See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008564 else
8565 ac_cv_sizeof_pid_t=0
8566 fi
8567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008568
Christian Heimes400adb02008-02-01 08:12:03 +00008569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8571$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008572
8573
8574
8575cat >>confdefs.h <<_ACEOF
8576#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8577_ACEOF
8578
8579
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008580# The cast to long int works around a bug in the HP C Compiler
8581# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8582# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8583# This bug is HP SR number 8606223364.
8584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8585$as_echo_n "checking size of uintptr_t... " >&6; }
8586if ${ac_cv_sizeof_uintptr_t+:} false; then :
8587 $as_echo_n "(cached) " >&6
8588else
8589 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8590
8591else
8592 if test "$ac_cv_type_uintptr_t" = yes; then
8593 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8594$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8595as_fn_error 77 "cannot compute sizeof (uintptr_t)
8596See \`config.log' for more details" "$LINENO" 5; }
8597 else
8598 ac_cv_sizeof_uintptr_t=0
8599 fi
8600fi
8601
8602fi
8603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8604$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8605
8606
8607
8608cat >>confdefs.h <<_ACEOF
8609#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8610_ACEOF
8611
8612
Michael W. Hudson54241132001-12-07 15:38:26 +00008613
Matthias Kloseb9621712010-04-24 17:59:49 +00008614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8615$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008616have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008618/* end confdefs.h. */
8619
8620int
8621main ()
8622{
8623long double x; x = (long double)0;
8624 ;
8625 return 0;
8626}
8627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008628if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008629
8630
Matthias Kloseb9621712010-04-24 17:59:49 +00008631$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008632
8633 have_long_double=yes
8634
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008635fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8638$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008639if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008640# The cast to long int works around a bug in the HP C Compiler
8641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8643# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8645$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008646if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008648else
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 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 +00008650
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 if test "$ac_cv_type_long_double" = yes; then
8653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008655as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008656See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008657 else
8658 ac_cv_sizeof_long_double=0
8659 fi
8660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008661
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8664$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008665
8666
8667
8668cat >>confdefs.h <<_ACEOF
8669#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8670_ACEOF
8671
8672
8673fi
8674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675# The cast to long int works around a bug in the HP C Compiler
8676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8680$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008681if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008683else
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 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 +00008685
Thomas Woutersb2137042007-02-01 18:02:27 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 if test "$ac_cv_type__Bool" = yes; then
8688 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008690as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008691See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692 else
8693 ac_cv_sizeof__Bool=0
8694 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696
Thomas Woutersb2137042007-02-01 18:02:27 +00008697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8699$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700
8701
8702
Thomas Woutersb2137042007-02-01 18:02:27 +00008703cat >>confdefs.h <<_ACEOF
8704#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8705_ACEOF
8706
8707
Thomas Woutersb2137042007-02-01 18:02:27 +00008708
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008709# The cast to long int works around a bug in the HP C Compiler
8710# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8711# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8712# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8714$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008715if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008719#ifdef HAVE_SYS_TYPES_H
8720#include <sys/types.h>
8721#endif
8722
Matthias Kloseb9621712010-04-24 17:59:49 +00008723"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008724
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008725else
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 if test "$ac_cv_type_off_t" = yes; then
8727 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008729as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008730See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008731 else
8732 ac_cv_sizeof_off_t=0
8733 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008735
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8738$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008739
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008740
8741
Martin v. Löwis11437992002-04-12 09:54:03 +00008742cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008743#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008744_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008745
Michael W. Hudson54241132001-12-07 15:38:26 +00008746
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008747
Matthias Kloseb9621712010-04-24 17:59:49 +00008748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8749$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008750if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008751 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008752
Matthias Kloseb9621712010-04-24 17:59:49 +00008753$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008754
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8756$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8759$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008760fi
8761
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008762# The cast to long int works around a bug in the HP C Compiler
8763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8765# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8767$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008768if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008770else
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008772#ifdef HAVE_SYS_TYPES_H
8773#include <sys/types.h>
8774#endif
8775#ifdef HAVE_TIME_H
8776#include <time.h>
8777#endif
8778
Matthias Kloseb9621712010-04-24 17:59:49 +00008779"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008780
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008781else
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 if test "$ac_cv_type_time_t" = yes; then
8783 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008785as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008786See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008787 else
8788 ac_cv_sizeof_time_t=0
8789 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8794$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008796
8797
Martin v. Löwis11437992002-04-12 09:54:03 +00008798cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008799#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008800_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008801
Michael W. Hudson54241132001-12-07 15:38:26 +00008802
8803
Trent Mick635f6fb2000-08-23 21:33:05 +00008804# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008805ac_save_cc="$CC"
8806if test "$ac_cv_kpthread" = "yes"
8807then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008808elif test "$ac_cv_kthread" = "yes"
8809then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810elif test "$ac_cv_pthread" = "yes"
8811then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008812fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008813
Matthias Kloseb9621712010-04-24 17:59:49 +00008814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8815$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008816have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008818/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008819
8820 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008821int
8822main ()
8823{
Guido van Rossum12580492000-09-24 16:47:19 +00008824pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008825 ;
8826 return 0;
8827}
Matthias Kloseb159a552010-04-25 21:00:44 +00008828
Martin v. Löwis11437992002-04-12 09:54:03 +00008829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008830if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008831 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8835$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008836if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008838# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8839# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8840# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8842$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008843if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845else
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008847#ifdef HAVE_PTHREAD_H
8848#include <pthread.h>
8849#endif
8850
Matthias Kloseb9621712010-04-24 17:59:49 +00008851"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008853else
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 if test "$ac_cv_type_pthread_t" = yes; then
8855 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008857as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008858See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859 else
8860 ac_cv_sizeof_pthread_t=0
8861 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008863
Trent Mick635f6fb2000-08-23 21:33:05 +00008864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8866$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008867
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008868
8869
Martin v. Löwis11437992002-04-12 09:54:03 +00008870cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008871#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008872_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008873
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008874
Trent Mick635f6fb2000-08-23 21:33:05 +00008875fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008876CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008877
Michael W. Hudson54241132001-12-07 15:38:26 +00008878
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008879case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008880 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008881 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8882 ;;
8883 Darwin/*)
8884 OTHER_LIBTOOL_OPT=""
8885 ;;
8886esac
8887
8888
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008889
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008890case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008891 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008892 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8893 if test "${enable_universalsdk}"; then
8894 :
8895 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008896 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008897 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008898 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008899 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008900 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008901 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008902 if test ${gcc_version} '<' 4.0
8903 then
8904 LIBTOOL_CRUFT="-lcc_dynamic"
8905 else
8906 LIBTOOL_CRUFT=""
8907 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008909 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008912/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008913
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008914 #include <unistd.h>
8915 int main(int argc, char*argv[])
8916 {
8917 if (sizeof(long) == 4) {
8918 return 0;
8919 } else {
8920 return 1;
8921 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008922 }
8923
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008925if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008926 ac_osx_32bit=yes
8927else
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8931 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008932fi
8933
8934
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008935 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008936 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008937 i386)
8938 MACOSX_DEFAULT_ARCH="i386"
8939 ;;
8940 ppc)
8941 MACOSX_DEFAULT_ARCH="ppc"
8942 ;;
8943 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008944 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008945 ;;
8946 esac
8947 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008948 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008949 i386)
8950 MACOSX_DEFAULT_ARCH="x86_64"
8951 ;;
8952 ppc)
8953 MACOSX_DEFAULT_ARCH="ppc64"
8954 ;;
8955 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008956 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008957 ;;
8958 esac
8959
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008960 fi
8961
8962 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008963 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008964 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008965esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8967$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008968if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008969then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008970 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008972 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008973
Matthias Kloseb9621712010-04-24 17:59:49 +00008974$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8977$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008978 if test $enable_shared = "yes"
8979 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008980 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 +00008981 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008982else
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8984$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008985fi
8986
Matthias Kloseb9621712010-04-24 17:59:49 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8988$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008989case $ac_sys_system/$ac_sys_release in
8990 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008991
Matthias Kloseb9621712010-04-24 17:59:49 +00008992$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008993
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8995$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008996 ;;
8997 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009000 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009001esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009002
Guido van Rossum0a516c91994-09-12 10:58:40 +00009003# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009004
Michael W. Hudson54241132001-12-07 15:38:26 +00009005
9006
9007
9008
Benjamin Peterson99f03762010-04-11 22:15:28 +00009009
Thomas Wouters477c8d52006-05-27 19:21:47 +00009010
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009011# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9012# -- usually .so, .sl on HP-UX, .dll on Cygwin
9013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9014$as_echo_n "checking the extension of shared libraries... " >&6; }
9015if test -z "$SHLIB_SUFFIX"; then
9016 case $ac_sys_system in
9017 hp*|HP*)
9018 case `uname -m` in
9019 ia64) SHLIB_SUFFIX=.so;;
9020 *) SHLIB_SUFFIX=.sl;;
9021 esac
9022 ;;
9023 CYGWIN*) SHLIB_SUFFIX=.dll;;
9024 *) SHLIB_SUFFIX=.so;;
9025 esac
9026fi
9027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9028$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009029
Guido van Rossum0a516c91994-09-12 10:58:40 +00009030# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009031# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009032# (Shared libraries in this instance are shared modules to be loaded into
9033# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9035$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009036if test -z "$LDSHARED"
9037then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009038 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009039 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009040 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009041 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009042 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009043 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009044 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009045 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009046 if test "$GCC" = "yes" ; then
9047 LDSHARED='$(CC) -shared'
9048 LDCXXSHARED='$(CXX) -shared'
9049 else
9050 LDSHARED='$(CC) -G'
9051 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009052 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009053 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009054 if test "$GCC" = "yes" ; then
9055 LDSHARED='$(CC) -shared'
9056 LDCXXSHARED='$(CXX) -shared'
9057 else
9058 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009059 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009060 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009061 LDSHARED='$(CC) -bundle'
9062 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009063 if test "$enable_framework" ; then
9064 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009065 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9066 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009067 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009068 else
9069 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009070 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009071 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009072 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009073 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009074 LDSHARED='$(CC) -bundle'
9075 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009076 if test "$enable_framework" ; then
9077 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009078 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9079 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009080 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009081 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009082 # No framework, use the Python app as bundle-loader
9083 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009084 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009085 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009086 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009087 Darwin/*)
9088 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9089 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009090
Ned Deily36820b62014-06-25 13:44:22 -07009091 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9092 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9093 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9094 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9095 if test ${dep_target_major} -eq 10 && \
9096 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009097 then
Ned Deily36820b62014-06-25 13:44:22 -07009098 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009099 LDSHARED='$(CC) -bundle'
9100 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009101 if test "$enable_framework" ; then
9102 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009103 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9104 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009105 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009106 else
9107 # No framework, use the Python app as bundle-loader
9108 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9109 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009110 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009111 fi
Ned Deily36820b62014-06-25 13:44:22 -07009112 else
9113 # building for OS X 10.3 and later
9114 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9115 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9116 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009117 fi
9118 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009119 Linux*|GNU*|QNX*)
9120 LDSHARED='$(CC) -shared'
9121 LDCXXSHARED='$(CXX) -shared';;
9122 BSD/OS*/4*)
9123 LDSHARED="gcc -shared"
9124 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009125 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009126 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009127 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009128 LDSHARED='$(CC) -shared'
9129 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009130 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009131 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009132 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009133 OpenBSD*)
9134 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9135 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009136 LDSHARED='$(CC) -shared $(CCSHARED)'
9137 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009138 else
9139 case `uname -r` in
9140 [01].* | 2.[0-7] | 2.[0-7].*)
9141 LDSHARED="ld -Bshareable ${LDFLAGS}"
9142 ;;
9143 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009144 LDSHARED='$(CC) -shared $(CCSHARED)'
9145 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009146 ;;
9147 esac
9148 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009149 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009150 LDSHARED='$(CC) -shared'
9151 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009152 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009153 if test "$GCC" = "yes" ; then
9154 LDSHARED='$(CC) -shared'
9155 LDCXXSHARED='$(CXX) -shared'
9156 else
9157 LDSHARED='$(CC) -G'
9158 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009159 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009160 SCO_SV*)
9161 LDSHARED='$(CC) -Wl,-G,-Bexport'
9162 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9163 CYGWIN*)
9164 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9165 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009166 *) LDSHARED="ld";;
9167 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9170$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009171LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009172BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009173# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009174# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9176$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009177if test -z "$CCSHARED"
9178then
Guido van Rossum07397971997-04-29 21:49:50 +00009179 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009180 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009181 then CCSHARED="-fPIC";
9182 elif test `uname -p` = sparc;
9183 then CCSHARED="-xcode=pic32";
9184 else CCSHARED="-Kpic";
9185 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009186 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009187 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009188 else CCSHARED="+z";
9189 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009190 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009191 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009192 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009193 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009194 if test "$GCC" = "yes"
9195 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009196 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009197 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009198 SCO_SV*)
9199 if test "$GCC" = "yes"
9200 then CCSHARED="-fPIC"
9201 else CCSHARED="-Kpic -belf"
9202 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009203 IRIX*/6*) case $CC in
9204 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009205 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009206 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009207 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9210$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009211# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009212# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9214$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009215if test -z "$LINKFORSHARED"
9216then
Guido van Rossum07397971997-04-29 21:49:50 +00009217 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009218 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009219 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009220 LINKFORSHARED="-Wl,-E -Wl,+s";;
9221# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009222 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009223 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009224 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009226 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009227
9228 # Issue #18075: the default maximum stack size (8MBytes) is too
9229 # small for the default recursion limit. Increase the stack size
9230 # to ensure that tests don't crash
9231 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9232
Jack Jansene578a632001-08-15 01:27:14 +00009233 if test "$enable_framework"
9234 then
Jack Jansenda49e192005-01-07 13:08:22 +00009235 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009236 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009237 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009238 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009239 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009240 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009241 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009242 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9243 then
9244 LINKFORSHARED="-Wl,--export-dynamic"
9245 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009246 SunOS/5*) case $CC in
9247 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009248 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009249 then
9250 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009251 fi;;
9252 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009253 CYGWIN*)
9254 if test $enable_shared = "no"
9255 then
9256 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9257 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009258 QNX*)
9259 # -Wl,-E causes the symbols to be added to the dynamic
9260 # symbol table so that they can be found when a module
9261 # is loaded. -N 2048K causes the stack size to be set
9262 # to 2048 kilobytes so that the stack doesn't overflow
9263 # when running test_compile.py.
9264 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009265 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9268$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009269
Michael W. Hudson54241132001-12-07 15:38:26 +00009270
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009271
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9273$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009274if test ! "$LIBRARY" = "$LDLIBRARY"
9275then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009276 case $ac_sys_system in
9277 CYGWIN*)
9278 # Cygwin needs CCSHARED when building extension DLLs
9279 # but not when building the interpreter DLL.
9280 CFLAGSFORSHARED='';;
9281 *)
9282 CFLAGSFORSHARED='$(CCSHARED)'
9283 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9286$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009287
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009288# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9289# library (with --enable-shared).
9290# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009291# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9292# if it is not required, since it creates a dependency of the shared library
9293# to LIBS. This, in turn, means that applications linking the shared libpython
9294# don't need to link LIBS explicitly. The default should be only changed
9295# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009296
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9298$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009299case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009300 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009301 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009302esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9304$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009305
9306
Guido van Rossum627b2d71993-12-24 10:39:16 +00009307# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9309$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009310if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009311 $as_echo_n "(cached) " >&6
9312else
9313 ac_check_lib_save_LIBS=$LIBS
9314LIBS="-lsendfile $LIBS"
9315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9316/* end confdefs.h. */
9317
9318/* Override any GCC internal prototype to avoid an error.
9319 Use char because int might match the return type of a GCC
9320 builtin and then its argument prototype would still apply. */
9321#ifdef __cplusplus
9322extern "C"
9323#endif
9324char sendfile ();
9325int
9326main ()
9327{
9328return sendfile ();
9329 ;
9330 return 0;
9331}
9332_ACEOF
9333if ac_fn_c_try_link "$LINENO"; then :
9334 ac_cv_lib_sendfile_sendfile=yes
9335else
9336 ac_cv_lib_sendfile_sendfile=no
9337fi
9338rm -f core conftest.err conftest.$ac_objext \
9339 conftest$ac_exeext conftest.$ac_ext
9340LIBS=$ac_check_lib_save_LIBS
9341fi
9342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9343$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009344if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009345 cat >>confdefs.h <<_ACEOF
9346#define HAVE_LIBSENDFILE 1
9347_ACEOF
9348
9349 LIBS="-lsendfile $LIBS"
9350
9351fi
9352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9354$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009355if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009356 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009357else
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009359LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009363/* Override any GCC internal prototype to avoid an error.
9364 Use char because int might match the return type of a GCC
9365 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009366#ifdef __cplusplus
9367extern "C"
9368#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009369char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009370int
9371main ()
9372{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 ;
9375 return 0;
9376}
9377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009378if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009379 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009380else
Matthias Kloseb9621712010-04-24 17:59:49 +00009381 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009383rm -f core conftest.err conftest.$ac_objext \
9384 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009385LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9388$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009389if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 cat >>confdefs.h <<_ACEOF
9391#define HAVE_LIBDL 1
9392_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009393
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009394 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009395
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009396fi
9397 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9399$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009400if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009401 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009402else
Martin v. Löwis11437992002-04-12 09:54:03 +00009403 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009404LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408/* Override any GCC internal prototype to avoid an error.
9409 Use char because int might match the return type of a GCC
9410 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009411#ifdef __cplusplus
9412extern "C"
9413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009414char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009415int
9416main ()
9417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 ;
9420 return 0;
9421}
9422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009425else
Matthias Kloseb9621712010-04-24 17:59:49 +00009426 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009428rm -f core conftest.err conftest.$ac_objext \
9429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009430LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9433$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009434if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 cat >>confdefs.h <<_ACEOF
9436#define HAVE_LIBDLD 1
9437_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009438
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009439 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009440
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009441fi
9442 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009443
Georg Brandlb1441c72009-01-03 22:33:39 +00009444# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009445if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9447$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009448if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009450else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009451 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455/* Override any GCC internal prototype to avoid an error.
9456 Use char because int might match the return type of a GCC
9457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009458#ifdef __cplusplus
9459extern "C"
9460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009461char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009462int
9463main ()
9464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 ;
9467 return 0;
9468}
9469_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470for ac_lib in '' pthread rt posix4; do
9471 if test -z "$ac_lib"; then
9472 ac_res="none required"
9473 else
9474 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009475 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009480rm -f core conftest.err conftest.$ac_objext \
9481 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009482 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485done
Victor Stinnere0be4232011-10-25 13:06:09 +02009486if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488else
9489 ac_cv_search_sem_init=no
9490fi
9491rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009492LIBS=$ac_func_search_save_LIBS
9493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9495$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009497if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009499
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009500fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009501 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009502 # posix4 on Solaris 2.6
9503 # pthread (first!) on Linux
9504fi
9505
Martin v. Löwis19d17342003-06-14 21:03:05 +00009506# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9508$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009509if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009510 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009511else
9512 ac_check_lib_save_LIBS=$LIBS
9513LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009515/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517/* Override any GCC internal prototype to avoid an error.
9518 Use char because int might match the return type of a GCC
9519 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009520#ifdef __cplusplus
9521extern "C"
9522#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009523char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009524int
9525main ()
9526{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009527return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009528 ;
9529 return 0;
9530}
9531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009532if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009533 ac_cv_lib_intl_textdomain=yes
9534else
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009537rm -f core conftest.err conftest.$ac_objext \
9538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009539LIBS=$ac_check_lib_save_LIBS
9540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9542$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009543if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009544
Matthias Kloseb9621712010-04-24 17:59:49 +00009545$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009546
Brett Cannonc6d936e2009-06-07 20:09:53 +00009547 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009548fi
9549
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009550
9551# checks for system dependent C++ extensions support
9552case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009553 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9554$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009556/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009557
Georg Brandl59e87bd2011-02-15 19:48:59 +00009558 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009559int
9560main ()
9561{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009562loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 ;
9564 return 0;
9565}
Matthias Kloseb159a552010-04-25 21:00:44 +00009566
Martin v. Löwis11437992002-04-12 09:54:03 +00009567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009568if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009569
Matthias Kloseb159a552010-04-25 21:00:44 +00009570
Matthias Kloseb9621712010-04-24 17:59:49 +00009571$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009572
Matthias Kloseb159a552010-04-25 21:00:44 +00009573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009574$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009575
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009576else
Matthias Kloseb159a552010-04-25 21:00:44 +00009577
9578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009579$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009580
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009582rm -f core conftest.err conftest.$ac_objext \
9583 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009584 *) ;;
9585esac
9586
Christian Heimes985ecdc2013-11-20 11:46:18 +01009587# check for systems that require aligned memory access
9588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9589$as_echo_n "checking aligned memory access is required... " >&6; }
9590if test "$cross_compiling" = yes; then :
9591 aligned_required=yes
9592else
9593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9594/* end confdefs.h. */
9595
9596int main()
9597{
9598 char s[16];
9599 int i, *p1, *p2;
9600 for (i=0; i < 16; i++)
9601 s[i] = i;
9602 p1 = (int*)(s+1);
9603 p2 = (int*)(s+2);
9604 if (*p1 == *p2)
9605 return 1;
9606 return 0;
9607}
9608
9609_ACEOF
9610if ac_fn_c_try_run "$LINENO"; then :
9611 aligned_required=no
9612else
9613 aligned_required=yes
9614fi
9615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9616 conftest.$ac_objext conftest.beam conftest.$ac_ext
9617fi
9618
9619
9620if test "$aligned_required" = yes ; then
9621
9622$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9623
9624fi
9625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9626$as_echo "$aligned_required" >&6; }
9627
9628
9629# str, bytes and memoryview hash algorithm
9630
9631
9632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9633$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9634
9635# Check whether --with-hash_algorithm was given.
9636if test "${with_hash_algorithm+set}" = set; then :
9637 withval=$with_hash_algorithm;
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9639$as_echo "$withval" >&6; }
9640case "$withval" in
9641 siphash24)
9642 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9643
9644 ;;
9645 fnv)
9646 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9647
9648 ;;
9649 *)
9650 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9651 ;;
9652esac
9653
9654else
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9656$as_echo "default" >&6; }
9657fi
9658
9659
Charles-François Natalid30b0222014-05-08 23:08:51 +01009660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9661$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9662
9663# Check whether --with-address_sanitizer was given.
9664if test "${with_address_sanitizer+set}" = set; then :
9665 withval=$with_address_sanitizer;
9666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9667$as_echo "$withval" >&6; }
9668BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9669LDFLAGS="-fsanitize=address $LDFLAGS"
9670
9671else
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673$as_echo "no" >&6; }
9674fi
9675
9676
Guido van Rossum70c7f481998-03-26 18:44:10 +00009677# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9679$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009680if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009681 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009682else
Martin v. Löwis11437992002-04-12 09:54:03 +00009683 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009684LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688/* Override any GCC internal prototype to avoid an error.
9689 Use char because int might match the return type of a GCC
9690 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009691#ifdef __cplusplus
9692extern "C"
9693#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009694char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009695int
9696main ()
9697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ;
9700 return 0;
9701}
9702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009705else
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009708rm -f core conftest.err conftest.$ac_objext \
9709 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009710LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9713$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009714if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009715 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009716fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009717 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9719$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009720if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009722else
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009724LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728/* Override any GCC internal prototype to avoid an error.
9729 Use char because int might match the return type of a GCC
9730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009731#ifdef __cplusplus
9732extern "C"
9733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009734char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009735int
9736main ()
9737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ;
9740 return 0;
9741}
9742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009745else
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core conftest.err conftest.$ac_objext \
9749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009750LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9753$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009754if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009755 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009756fi
9757 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009758
Matthias Kloseb9621712010-04-24 17:59:49 +00009759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9760$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009763if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9766$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009767LIBS="$withval $LIBS"
9768
9769else
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9771$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009772fi
9773
Guido van Rossum7f43da71994-08-01 12:15:30 +00009774
Victor Stinner8291b5e2015-03-20 16:03:14 +01009775
9776
9777
9778
9779
9780
9781
9782if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9783 if test -n "$ac_tool_prefix"; then
9784 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9785set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9787$as_echo_n "checking for $ac_word... " >&6; }
9788if ${ac_cv_path_PKG_CONFIG+:} false; then :
9789 $as_echo_n "(cached) " >&6
9790else
9791 case $PKG_CONFIG in
9792 [\\/]* | ?:[\\/]*)
9793 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9794 ;;
9795 *)
9796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9797for as_dir in $PATH
9798do
9799 IFS=$as_save_IFS
9800 test -z "$as_dir" && as_dir=.
9801 for ac_exec_ext in '' $ac_executable_extensions; do
9802 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9803 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9805 break 2
9806 fi
9807done
9808 done
9809IFS=$as_save_IFS
9810
9811 ;;
9812esac
9813fi
9814PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9815if test -n "$PKG_CONFIG"; then
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9817$as_echo "$PKG_CONFIG" >&6; }
9818else
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820$as_echo "no" >&6; }
9821fi
9822
9823
9824fi
9825if test -z "$ac_cv_path_PKG_CONFIG"; then
9826 ac_pt_PKG_CONFIG=$PKG_CONFIG
9827 # Extract the first word of "pkg-config", so it can be a program name with args.
9828set dummy pkg-config; ac_word=$2
9829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9830$as_echo_n "checking for $ac_word... " >&6; }
9831if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9832 $as_echo_n "(cached) " >&6
9833else
9834 case $ac_pt_PKG_CONFIG in
9835 [\\/]* | ?:[\\/]*)
9836 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9837 ;;
9838 *)
9839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9840for as_dir in $PATH
9841do
9842 IFS=$as_save_IFS
9843 test -z "$as_dir" && as_dir=.
9844 for ac_exec_ext in '' $ac_executable_extensions; do
9845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9846 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9848 break 2
9849 fi
9850done
9851 done
9852IFS=$as_save_IFS
9853
9854 ;;
9855esac
9856fi
9857ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9858if test -n "$ac_pt_PKG_CONFIG"; then
9859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9860$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9861else
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863$as_echo "no" >&6; }
9864fi
9865
9866 if test "x$ac_pt_PKG_CONFIG" = x; then
9867 PKG_CONFIG=""
9868 else
9869 case $cross_compiling:$ac_tool_warned in
9870yes:)
9871{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9872$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9873ac_tool_warned=yes ;;
9874esac
9875 PKG_CONFIG=$ac_pt_PKG_CONFIG
9876 fi
9877else
9878 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9879fi
9880
9881fi
9882if test -n "$PKG_CONFIG"; then
9883 _pkg_min_version=0.9.0
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9885$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9886 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9888$as_echo "yes" >&6; }
9889 else
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891$as_echo "no" >&6; }
9892 PKG_CONFIG=""
9893 fi
9894fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009895
9896# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9898$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009899
9900# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009901if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009902 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009903else
9904 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009905fi
9906
9907
Matthias Kloseb9621712010-04-24 17:59:49 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9909$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009910
9911# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9913$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009914
9915# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009916if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009917 withval=$with_system_ffi;
9918fi
9919
9920
Zachary Ware935043d2016-09-09 17:01:21 -07009921case "$with_system_ffi" in
9922 "")
9923 case $ac_sys_system in
9924 Darwin)
9925 with_system_ffi="no"
9926 ;;
9927 *)
9928 with_system_ffi="yes"
9929 ;;
9930 esac
9931 ;;
9932 yes|no)
9933 ;;
9934 *)
9935 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
9936 ;;
9937esac
9938
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009939if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009940 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9941else
9942 LIBFFI_INCLUDEDIR=""
9943fi
9944
9945
Matthias Kloseb9621712010-04-24 17:59:49 +00009946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9947$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009948
Stefan Krah60187b52012-03-23 19:06:27 +01009949# Check for use of the system libmpdec library
9950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9951$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9952
9953# Check whether --with-system_libmpdec was given.
9954if test "${with_system_libmpdec+set}" = set; then :
9955 withval=$with_system_libmpdec;
9956else
9957 with_system_libmpdec="no"
9958fi
9959
9960
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9962$as_echo "$with_system_libmpdec" >&6; }
9963
Benjamin Peterson076ed002010-10-31 17:11:02 +00009964# Check for support for loadable sqlite extensions
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9966$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9967# Check whether --enable-loadable-sqlite-extensions was given.
9968if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9969 enableval=$enable_loadable_sqlite_extensions;
9970else
9971 enable_loadable_sqlite_extensions="no"
9972fi
9973
9974
9975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9976$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9977
Ned Deilyd819b932013-09-06 01:07:05 -07009978# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9979
9980
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9982$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9983
9984# Check whether --with-tcltk-includes was given.
9985if test "${with_tcltk_includes+set}" = set; then :
9986 withval=$with_tcltk_includes;
9987else
9988 with_tcltk_includes="default"
9989fi
9990
9991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9992$as_echo "$with_tcltk_includes" >&6; }
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9994$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9995
9996# Check whether --with-tcltk-libs was given.
9997if test "${with_tcltk_libs+set}" = set; then :
9998 withval=$with_tcltk_libs;
9999else
10000 with_tcltk_libs="default"
10001fi
10002
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10004$as_echo "$with_tcltk_libs" >&6; }
10005if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10006then
10007 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10008 then
10009 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10010 fi
10011 TCLTK_INCLUDES=""
10012 TCLTK_LIBS=""
10013else
10014 TCLTK_INCLUDES="$with_tcltk_includes"
10015 TCLTK_LIBS="$with_tcltk_libs"
10016fi
10017
Matthias Klose55708cc2009-04-30 08:06:49 +000010018# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10020$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010021
10022# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010023if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010024 withval=$with_dbmliborder;
10025if test x$with_dbmliborder = xyes
10026then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010027as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010028else
10029 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10030 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10031 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010032 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010033 fi
10034 done
10035fi
10036fi
10037
Matthias Kloseb9621712010-04-24 17:59:49 +000010038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10039$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010040
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010041# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010042
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010043USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010045
Martin v. Löwis11437992002-04-12 09:54:03 +000010046
10047# Templates for things AC_DEFINEd more than once.
10048# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010049
10050
Martin v. Löwis11437992002-04-12 09:54:03 +000010051
Matthias Kloseb9621712010-04-24 17:59:49 +000010052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10053$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010056if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057 withval=$with_threads;
10058fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010059
10060
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010061# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010064if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065 withval=$with_thread; with_threads=$with_thread
10066fi
10067
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010068
10069if test -z "$with_threads"
10070then with_threads="yes"
10071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10073$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010074
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010075
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010076if test "$with_threads" = "no"
10077then
10078 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010079elif test "$ac_cv_pthread_is_default" = yes
10080then
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010082
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010083 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010084 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010085
10086 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010088elif test "$ac_cv_kpthread" = "yes"
10089then
10090 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010091 if test "$ac_cv_cxx_thread" = "yes"; then
10092 CXX="$CXX -Kpthread"
10093 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010095
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010096 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010097 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010098elif test "$ac_cv_kthread" = "yes"
10099then
10100 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010101 if test "$ac_cv_cxx_thread" = "yes"; then
10102 CXX="$CXX -Kthread"
10103 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010105
10106 posix_threads=yes
10107 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010108elif test "$ac_cv_pthread" = "yes"
10109then
10110 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010111 if test "$ac_cv_cxx_thread" = "yes"; then
10112 CXX="$CXX -pthread"
10113 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010115
10116 posix_threads=yes
10117 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010118else
10119 if test ! -z "$with_threads" -a -d "$with_threads"
10120 then LDFLAGS="$LDFLAGS -L$with_threads"
10121 fi
10122 if test ! -z "$withval" -a -d "$withval"
10123 then LDFLAGS="$LDFLAGS -L$withval"
10124 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010125
10126 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010127 # define _POSIX_THREADS in unistd.h. Some apparently don't
10128 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10130$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010132/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010133
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010134#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010135#ifdef _POSIX_THREADS
10136yes
10137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010138
10139_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010142 unistd_defines_pthreads=yes
10143else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010144 unistd_defines_pthreads=no
10145fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010146rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10149$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010150
Matthias Kloseb9621712010-04-24 17:59:49 +000010151 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010152
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010153 # Just looking for pthread_create in libpthread is not enough:
10154 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10155 # So we really have to include pthread.h, and then link.
10156 _libs=$LIBS
10157 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10159$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010161/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010162
10163#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010164#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010165
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010166void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010167int
10168main ()
10169{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010170
10171pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 ;
10173 return 0;
10174}
10175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010176if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010177
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10179$as_echo "yes" >&6; }
10180 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010181
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010182 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010183 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010184else
Martin v. Löwis11437992002-04-12 09:54:03 +000010185
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010186 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010188if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010190
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010191 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010192 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010193else
Guido van Rossumad678af1998-10-02 14:42:15 +000010194
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10196$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010197if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010199else
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010201LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205/* Override any GCC internal prototype to avoid an error.
10206 Use char because int might match the return type of a GCC
10207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010208#ifdef __cplusplus
10209extern "C"
10210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010211char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010212int
10213main ()
10214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ;
10217 return 0;
10218}
10219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010222else
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010225rm -f core conftest.err conftest.$ac_objext \
10226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010227LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10230$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010231if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010233
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010234 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010235 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010236 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010237else
Greg Steinadf63d62000-07-05 10:38:09 +000010238
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10240$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010241if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010243else
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010245LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249/* Override any GCC internal prototype to avoid an error.
10250 Use char because int might match the return type of a GCC
10251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252#ifdef __cplusplus
10253extern "C"
10254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010255char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010256int
10257main ()
10258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 ;
10261 return 0;
10262}
10263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010266else
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010269rm -f core conftest.err conftest.$ac_objext \
10270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010271LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10274$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010275if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010278 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010279 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010280 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010281else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010282
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10284$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010285if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010287else
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010289LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293/* Override any GCC internal prototype to avoid an error.
10294 Use char because int might match the return type of a GCC
10295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010296#ifdef __cplusplus
10297extern "C"
10298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010299char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010300int
10301main ()
10302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 ;
10305 return 0;
10306}
10307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010310else
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010313rm -f core conftest.err conftest.$ac_objext \
10314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010315LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10318$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010319if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010321
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010322 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010323 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010324 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010325else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010326
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10328$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010329if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010331else
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010333LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337/* Override any GCC internal prototype to avoid an error.
10338 Use char because int might match the return type of a GCC
10339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010340#ifdef __cplusplus
10341extern "C"
10342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010343char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010344int
10345main ()
10346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 ;
10349 return 0;
10350}
10351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010352if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010357rm -f core conftest.err conftest.$ac_objext \
10358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010359LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10362$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010363if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010367 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010368 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010369else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010370
Martin v. Löwis130fb172001-07-19 11:00:41 +000010371 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010372fi
10373
Guido van Rossum627b2d71993-12-24 10:39:16 +000010374
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010375fi
10376
Guido van Rossum0be3e491997-05-22 20:33:33 +000010377fi
10378
Guido van Rossum49545951997-12-02 19:28:29 +000010379fi
10380
Guido van Rossumb93a8621998-05-07 13:27:32 +000010381fi
10382
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010384rm -f core conftest.err conftest.$ac_objext \
10385 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10388$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010389if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010391else
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010393LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397/* Override any GCC internal prototype to avoid an error.
10398 Use char because int might match the return type of a GCC
10399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010400#ifdef __cplusplus
10401extern "C"
10402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010403char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010404int
10405main ()
10406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 ;
10409 return 0;
10410}
10411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010412if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010414else
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010417rm -f core conftest.err conftest.$ac_objext \
10418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010419LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10422$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010423if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010425
Martin v. Löwis130fb172001-07-19 11:00:41 +000010426 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010427 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010428 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010429fi
10430
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010431
Neal Norwitza978ab02002-11-02 16:58:05 +000010432 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10434$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010435if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010437else
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010439LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443/* Override any GCC internal prototype to avoid an error.
10444 Use char because int might match the return type of a GCC
10445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010446#ifdef __cplusplus
10447extern "C"
10448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010449char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010450int
10451main ()
10452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ;
10455 return 0;
10456}
10457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010460else
Matthias Kloseb9621712010-04-24 17:59:49 +000010461 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010463rm -f core conftest.err conftest.$ac_objext \
10464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010465LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10468$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010469if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010471
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010472 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010473 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010474 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010475fi
10476
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010477 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010478fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010479
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010480if test "$posix_threads" = "yes"; then
10481 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010482
Matthias Kloseb9621712010-04-24 17:59:49 +000010483$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010484
10485 fi
10486
10487 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10488 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010489 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010490$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010491
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010492 ;;
10493 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010494$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010495
10496 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010497 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010498$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010499
10500 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010501 esac
10502
Matthias Kloseb9621712010-04-24 17:59:49 +000010503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10504$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010505 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010507else
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010509 ac_cv_pthread_system_supported=no
10510else
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010512/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010513
10514 #include <stdio.h>
10515 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010516 void *foo(void *parm) {
10517 return NULL;
10518 }
10519 main() {
10520 pthread_attr_t attr;
10521 pthread_t id;
10522 if (pthread_attr_init(&attr)) exit(-1);
10523 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10524 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10525 exit(0);
10526 }
10527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010528if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010529 ac_cv_pthread_system_supported=yes
10530else
Matthias Kloseb9621712010-04-24 17:59:49 +000010531 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537
Guido van Rossum627b2d71993-12-24 10:39:16 +000010538fi
10539
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10541$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010542 if test "$ac_cv_pthread_system_supported" = "yes"; then
10543
Matthias Kloseb9621712010-04-24 17:59:49 +000010544$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010545
10546 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 for ac_func in pthread_sigmask
10548do :
10549 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010550if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010551 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010552#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010553_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010554 case $ac_sys_system in
10555 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010556
Matthias Kloseb9621712010-04-24 17:59:49 +000010557$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010558
10559 ;;
10560 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010561fi
10562done
10563
Christian Heimesf77b4b22013-08-21 13:26:05 +020010564 for ac_func in pthread_atfork
10565do :
10566 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10567if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10568 cat >>confdefs.h <<_ACEOF
10569#define HAVE_PTHREAD_ATFORK 1
10570_ACEOF
10571
10572fi
10573done
10574
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010575fi
10576
10577
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010578# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10581$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010583if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010585 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010588 ipv6=no
10589 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10591$as_echo "yes" >&6; }
10592 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010593
10594 ipv6=yes
10595 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010596 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010597else
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010600/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010601 /* AF_INET6 available check */
10602#include <sys/types.h>
10603#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010604int
10605main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010606{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010607int domain = AF_INET6;
10608 ;
10609 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010610}
Martin v. Löwis11437992002-04-12 09:54:03 +000010611_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010612if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010613
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10615$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010616 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010617
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010618else
Matthias Kloseb159a552010-04-25 21:00:44 +000010619
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10621$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010622 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010623
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010624fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010627if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10629$as_echo_n "checking if RFC2553 API is available... " >&6; }
10630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010631/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010632
10633 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010634#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010635int
10636main ()
10637{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010638struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010639 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 ;
10641 return 0;
10642}
Matthias Kloseb159a552010-04-25 21:00:44 +000010643
Martin v. Löwis11437992002-04-12 09:54:03 +000010644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010645if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010646
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010648$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010649 ipv6=yes
10650
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010651else
Matthias Kloseb159a552010-04-25 21:00:44 +000010652
10653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010655 ipv6=no
10656
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010659fi
10660
10661if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010663
10664fi
10665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666fi
10667
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010668
10669ipv6type=unknown
10670ipv6lib=none
10671ipv6trylibc=no
10672
10673if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10675$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010676 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10677 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678 case $i in
10679 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010681/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010682
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010683#include <netinet/in.h>
10684#ifdef IPV6_INRIA_VERSION
10685yes
10686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010687_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010690 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010691fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010692rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693
10694 ;;
10695 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010697/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010698
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010699#include <netinet/in.h>
10700#ifdef __KAME__
10701yes
10702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010703_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010704if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010706 ipv6type=$i;
10707 ipv6lib=inet6
10708 ipv6libdir=/usr/local/v6/lib
10709 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010711rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010712
10713 ;;
10714 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010716/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718#include <features.h>
10719#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10720yes
10721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010722_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010725 ipv6type=$i;
10726 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010728rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729
10730 ;;
10731 linux-inet6)
10732 if test -d /usr/inet6; then
10733 ipv6type=$i
10734 ipv6lib=inet6
10735 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010736 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737 fi
10738 ;;
10739 solaris)
10740 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010741 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010742 ipv6type=$i
10743 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744 fi
10745 fi
10746 ;;
10747 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010749/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010750
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751#include <sys/param.h>
10752#ifdef _TOSHIBA_INET6
10753yes
10754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010755_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 ipv6type=$i;
10759 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010760 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010762rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763
10764 ;;
10765 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010768
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769#include </usr/local/v6/include/sys/v6config.h>
10770#ifdef __V6D__
10771yes
10772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010773_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776 ipv6type=$i;
10777 ipv6lib=v6;
10778 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010779 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010781rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782
10783 ;;
10784 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010786/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010787
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788#include <sys/param.h>
10789#ifdef _ZETA_MINAMI_INET6
10790yes
10791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010792_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6type=$i;
10796 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010797 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010799rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800
10801 ;;
10802 esac
10803 if test "$ipv6type" != "unknown"; then
10804 break
10805 fi
10806 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10808$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809fi
10810
10811if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10812 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10813 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10814 echo "using lib$ipv6lib"
10815 else
10816 if test $ipv6trylibc = "yes"; then
10817 echo "using libc"
10818 else
10819 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10820 echo "You need to fetch lib$ipv6lib.a from appropriate"
10821 echo 'ipv6 kit and compile beforehand.'
10822 exit 1
10823 fi
10824 fi
10825fi
10826
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10828$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10830/* end confdefs.h. */
10831 /* CAN_RAW_FD_FRAMES available check */
10832#include <linux/can/raw.h>
10833int
10834main ()
10835{
10836int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10837 ;
10838 return 0;
10839}
10840_ACEOF
10841if ac_fn_c_try_compile "$LINENO"; then :
10842
10843
10844$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10845
10846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10847$as_echo "yes" >&6; }
10848
10849else
10850
10851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10852$as_echo "no" >&6; }
10853
10854fi
10855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10856
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010857# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10859$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010862if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010863 withval=$with_doc_strings;
10864fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010865
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010866
10867if test -z "$with_doc_strings"
10868then with_doc_strings="yes"
10869fi
10870if test "$with_doc_strings" != "no"
10871then
10872
Matthias Kloseb9621712010-04-24 17:59:49 +000010873$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010874
10875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10877$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010878
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010879# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10881$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010883# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010884if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010885 withval=$with_pymalloc;
10886fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010887
Neil Schemenauera35c6882001-02-27 04:45:05 +000010888
Neil Schemenauer16c22972002-03-22 15:34:49 +000010889if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010890then
10891 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010892fi
10893if test "$with_pymalloc" != "no"
10894then
Martin v. Löwis11437992002-04-12 09:54:03 +000010895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010897
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010898 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10901$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010902
Benjamin Peterson05159c42009-12-03 03:01:27 +000010903# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10905$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010906
10907# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010908if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010909 withval=$with_valgrind;
10910else
10911 with_valgrind=no
10912fi
10913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10915$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010916if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 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 +020010918if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010921
10922else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010923 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010924
10925fi
10926
10927
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010928 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010929fi
10930
Łukasz Langaa785c872016-09-09 17:37:37 -070010931# Check for DTrace support
10932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
10933$as_echo_n "checking for --with-dtrace... " >&6; }
10934
10935# Check whether --with-dtrace was given.
10936if test "${with_dtrace+set}" = set; then :
10937 withval=$with_dtrace;
10938else
10939 with_dtrace=no
10940fi
10941
10942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
10943$as_echo "$with_dtrace" >&6; }
10944
10945
10946
10947
10948
10949DTRACE=
10950DFLAGS=
10951DTRACE_HEADERS=
10952DTRACE_OBJS=
10953
10954if test "$with_dtrace" = "yes"
10955then
10956 # Extract the first word of "dtrace", so it can be a program name with args.
10957set dummy dtrace; ac_word=$2
10958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10959$as_echo_n "checking for $ac_word... " >&6; }
10960if ${ac_cv_path_DTRACE+:} false; then :
10961 $as_echo_n "(cached) " >&6
10962else
10963 case $DTRACE in
10964 [\\/]* | ?:[\\/]*)
10965 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
10966 ;;
10967 *)
10968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10969for as_dir in $PATH
10970do
10971 IFS=$as_save_IFS
10972 test -z "$as_dir" && as_dir=.
10973 for ac_exec_ext in '' $ac_executable_extensions; do
10974 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10975 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
10976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10977 break 2
10978 fi
10979done
10980 done
10981IFS=$as_save_IFS
10982
10983 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
10984 ;;
10985esac
10986fi
10987DTRACE=$ac_cv_path_DTRACE
10988if test -n "$DTRACE"; then
10989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
10990$as_echo "$DTRACE" >&6; }
10991else
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10993$as_echo "no" >&6; }
10994fi
10995
10996
10997 if test "$DTRACE" = "not found"; then
10998 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
10999 fi
11000
11001$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11002
11003 DTRACE_HEADERS="Include/pydtrace_probes.h"
11004
11005 # On OS X, DTrace providers do not need to be explicitly compiled and
11006 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11007 # generation flag '-G'. We check for presence of this flag, rather than
11008 # hardcoding support by OS, in the interest of robustness.
11009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11010$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11011if ${ac_cv_dtrace_link+:} false; then :
11012 $as_echo_n "(cached) " >&6
11013else
11014 ac_cv_dtrace_link=no
11015 echo 'BEGIN' > conftest.d
11016 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11017 ac_cv_dtrace_link=yes
11018
11019fi
11020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11021$as_echo "$ac_cv_dtrace_link" >&6; }
11022 if test "$ac_cv_dtrace_link" = "yes"; then
11023 DTRACE_OBJS="Python/pydtrace.o"
11024 fi
11025fi
11026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011027# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011028
Guido van Rossum98935bf2001-09-05 19:13:16 +000011029DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011030
Guido van Rossume97ee181999-12-20 21:27:22 +000011031# the dlopen() function means we might want to use dynload_shlib.o. some
11032# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011033for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011034do :
11035 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011036if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011038#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011040
Guido van Rossume97ee181999-12-20 21:27:22 +000011041fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011042done
Guido van Rossume97ee181999-12-20 21:27:22 +000011043
Michael W. Hudson54241132001-12-07 15:38:26 +000011044
Guido van Rossume97ee181999-12-20 21:27:22 +000011045# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11046# loading of modules.
11047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11049$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011050if test -z "$DYNLOADFILE"
11051then
11052 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011053 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11054 if test "$ac_cv_func_dlopen" = yes
11055 then DYNLOADFILE="dynload_shlib.o"
11056 else DYNLOADFILE="dynload_aix.o"
11057 fi
11058 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011059 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011060 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11061 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011062 *)
11063 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11064 # out any dynamic loading
11065 if test "$ac_cv_func_dlopen" = yes
11066 then DYNLOADFILE="dynload_shlib.o"
11067 else DYNLOADFILE="dynload_stub.o"
11068 fi
11069 ;;
11070 esac
11071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11073$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011074if test "$DYNLOADFILE" != "dynload_stub.o"
11075then
Martin v. Löwis11437992002-04-12 09:54:03 +000011076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011078
11079fi
11080
Neil Schemenauer4e425612001-06-19 15:44:15 +000011081# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11082
Michael W. Hudson54241132001-12-07 15:38:26 +000011083
Matthias Kloseb9621712010-04-24 17:59:49 +000011084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11085$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011086if test -z "$MACHDEP_OBJS"
11087then
Jack Jansene578a632001-08-15 01:27:14 +000011088 MACHDEP_OBJS=$extra_machdep_objs
11089else
11090 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011091fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011092if test -z "$MACHDEP_OBJS"; then
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11094$as_echo "none" >&6; }
11095else
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11097$as_echo "$MACHDEP_OBJS" >&6; }
11098fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011099
Guido van Rossum627b2d71993-12-24 10:39:16 +000011100# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011101for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011102 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011103 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011104 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011105 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011106 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011107 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011108 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11109 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011110 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011111 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011112 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011113 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011114 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011115 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011116 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11117 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011118 sigaction sigaltstack siginterrupt sigpending sigrelse \
11119 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011120 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011121 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011122 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011123do :
11124 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11125ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011126if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011128#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011129_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011130
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011131fi
11132done
11133
Michael W. Hudson54241132001-12-07 15:38:26 +000011134
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011135ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11136 #include <dirent.h>
11137"
11138if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11139
11140$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11141
11142fi
11143
11144
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011145# For some functions, having a definition is not sufficient, since
11146# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11148$as_echo_n "checking for chroot... " >&6; }
11149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011150/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011151#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011152int
11153main ()
11154{
11155void *x=chroot
11156 ;
11157 return 0;
11158}
11159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011161
Matthias Kloseb9621712010-04-24 17:59:49 +000011162$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011163
Matthias Kloseb159a552010-04-25 21:00:44 +000011164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011165$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011166else
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11168$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011169
11170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11173$as_echo_n "checking for link... " >&6; }
11174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011175/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011176#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011177int
11178main ()
11179{
11180void *x=link
11181 ;
11182 return 0;
11183}
11184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011185if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011186
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011188
Matthias Kloseb159a552010-04-25 21:00:44 +000011189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011191else
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011194
11195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11198$as_echo_n "checking for symlink... " >&6; }
11199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011200/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011201#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011202int
11203main ()
11204{
11205void *x=symlink
11206 ;
11207 return 0;
11208}
11209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011211
Matthias Kloseb9621712010-04-24 17:59:49 +000011212$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011213
Matthias Kloseb159a552010-04-25 21:00:44 +000011214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011215$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011216else
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011219
11220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11223$as_echo_n "checking for fchdir... " >&6; }
11224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011225/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011226#include <unistd.h>
11227int
11228main ()
11229{
11230void *x=fchdir
11231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011236
Matthias Kloseb9621712010-04-24 17:59:49 +000011237$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011238
Matthias Kloseb159a552010-04-25 21:00:44 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011241else
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011244
11245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11248$as_echo_n "checking for fsync... " >&6; }
11249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011250/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011251#include <unistd.h>
11252int
11253main ()
11254{
11255void *x=fsync
11256 ;
11257 return 0;
11258}
11259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011261
Matthias Kloseb9621712010-04-24 17:59:49 +000011262$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011263
Matthias Kloseb159a552010-04-25 21:00:44 +000011264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011265$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011266else
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11268$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011269
11270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11273$as_echo_n "checking for fdatasync... " >&6; }
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011276#include <unistd.h>
11277int
11278main ()
11279{
11280void *x=fdatasync
11281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011288
Matthias Kloseb159a552010-04-25 21:00:44 +000011289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011291else
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011294
11295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11298$as_echo_n "checking for epoll... " >&6; }
11299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011300/* end confdefs.h. */
11301#include <sys/epoll.h>
11302int
11303main ()
11304{
11305void *x=epoll_create
11306 ;
11307 return 0;
11308}
11309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011311
Matthias Kloseb9621712010-04-24 17:59:49 +000011312$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011313
Matthias Kloseb159a552010-04-25 21:00:44 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011315$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011316else
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011319
11320fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11323$as_echo_n "checking for epoll_create1... " >&6; }
11324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11325/* end confdefs.h. */
11326#include <sys/epoll.h>
11327int
11328main ()
11329{
11330void *x=epoll_create1
11331 ;
11332 return 0;
11333}
11334_ACEOF
11335if ac_fn_c_try_compile "$LINENO"; then :
11336
11337$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11338
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11340$as_echo "yes" >&6; }
11341else
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11343$as_echo "no" >&6; }
11344
11345fi
11346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11348$as_echo_n "checking for kqueue... " >&6; }
11349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011350/* end confdefs.h. */
11351
11352#include <sys/types.h>
11353#include <sys/event.h>
11354
11355int
11356main ()
11357{
11358int x=kqueue()
11359 ;
11360 return 0;
11361}
11362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011363if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011364
Matthias Kloseb9621712010-04-24 17:59:49 +000011365$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011366
Matthias Kloseb159a552010-04-25 21:00:44 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011368$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011369else
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11371$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011372
11373fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11376$as_echo_n "checking for prlimit... " >&6; }
11377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11378/* end confdefs.h. */
11379
11380#include <sys/time.h>
11381#include <sys/resource.h>
11382
11383int
11384main ()
11385{
11386void *x=prlimit
11387 ;
11388 return 0;
11389}
11390_ACEOF
11391if ac_fn_c_try_compile "$LINENO"; then :
11392
11393$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11394
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11396$as_echo "yes" >&6; }
11397else
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11399$as_echo "no" >&6; }
11400
11401fi
11402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11403
Martin v. Löwisd5843682002-11-21 20:41:28 +000011404# On some systems (eg. FreeBSD 5), we would find a definition of the
11405# functions ctermid_r, setgroups in the library, but no prototype
11406# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11407# address to avoid compiler warnings and potential miscompilations
11408# because of the missing prototypes.
11409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11411$as_echo_n "checking for ctermid_r... " >&6; }
11412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011414
Martin v. Löwisd5843682002-11-21 20:41:28 +000011415#include <stdio.h>
11416
Martin v. Löwisd5843682002-11-21 20:41:28 +000011417int
11418main ()
11419{
11420void* p = ctermid_r
11421 ;
11422 return 0;
11423}
11424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011428
Matthias Kloseb159a552010-04-25 21:00:44 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011430$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011431else
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11433$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011434
11435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11437
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11439$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011440if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011441 $as_echo_n "(cached) " >&6
11442else
11443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011444/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011445#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011446int
11447main ()
11448{
11449void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011450
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011451 ;
11452 return 0;
11453}
11454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011455if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011456 ac_cv_flock_decl=yes
11457else
11458 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011459
11460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011462
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011463fi
11464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11465$as_echo "$ac_cv_flock_decl" >&6; }
11466if test "x${ac_cv_flock_decl}" = xyes; then
11467 for ac_func in flock
11468do :
11469 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011470if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011471 cat >>confdefs.h <<_ACEOF
11472#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011473_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011474
Antoine Pitroua3000072010-09-07 14:52:42 +000011475else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011477$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011478if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011479 $as_echo_n "(cached) " >&6
11480else
11481 ac_check_lib_save_LIBS=$LIBS
11482LIBS="-lbsd $LIBS"
11483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11484/* end confdefs.h. */
11485
11486/* Override any GCC internal prototype to avoid an error.
11487 Use char because int might match the return type of a GCC
11488 builtin and then its argument prototype would still apply. */
11489#ifdef __cplusplus
11490extern "C"
11491#endif
11492char flock ();
11493int
11494main ()
11495{
11496return flock ();
11497 ;
11498 return 0;
11499}
11500_ACEOF
11501if ac_fn_c_try_link "$LINENO"; then :
11502 ac_cv_lib_bsd_flock=yes
11503else
11504 ac_cv_lib_bsd_flock=no
11505fi
11506rm -f core conftest.err conftest.$ac_objext \
11507 conftest$ac_exeext conftest.$ac_ext
11508LIBS=$ac_check_lib_save_LIBS
11509fi
11510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11511$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011512if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011513 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011514
11515
11516$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11517
11518
11519fi
11520
11521
11522fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011523done
11524
Antoine Pitroua3000072010-09-07 14:52:42 +000011525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11528$as_echo_n "checking for getpagesize... " >&6; }
11529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011530/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011531
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011532#include <unistd.h>
11533
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011534int
11535main ()
11536{
11537void* p = getpagesize
11538 ;
11539 return 0;
11540}
11541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011543
Matthias Kloseb9621712010-04-24 17:59:49 +000011544$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011545
Matthias Kloseb159a552010-04-25 21:00:44 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011547$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11550$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011551
11552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011554
Victor Stinner984890f2011-11-24 13:53:38 +010011555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11556$as_echo_n "checking for broken unsetenv... " >&6; }
11557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558/* end confdefs.h. */
11559
11560#include <stdlib.h>
11561
11562int
11563main ()
11564{
11565int res = unsetenv("DUMMY")
11566 ;
11567 return 0;
11568}
11569_ACEOF
11570if ac_fn_c_try_compile "$LINENO"; then :
11571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11572$as_echo "no" >&6; }
11573else
11574
11575$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11576
11577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11578$as_echo "yes" >&6; }
11579
11580fi
11581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11582
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011583for ac_prog in true
11584do
11585 # Extract the first word of "$ac_prog", so it can be a program name with args.
11586set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11588$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011589if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011591else
11592 if test -n "$TRUE"; then
11593 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11594else
11595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11596for as_dir in $PATH
11597do
11598 IFS=$as_save_IFS
11599 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011602 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 $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 +000011604 break 2
11605 fi
11606done
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011608IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011609
11610fi
11611fi
11612TRUE=$ac_cv_prog_TRUE
11613if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11615$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011616else
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11618$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011619fi
11620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011622 test -n "$TRUE" && break
11623done
11624test -n "$TRUE" || TRUE="/bin/true"
11625
11626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11628$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011629if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011631else
11632 ac_check_lib_save_LIBS=$LIBS
11633LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011635/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011637/* Override any GCC internal prototype to avoid an error.
11638 Use char because int might match the return type of a GCC
11639 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011640#ifdef __cplusplus
11641extern "C"
11642#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011643char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011644int
11645main ()
11646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011647return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011648 ;
11649 return 0;
11650}
11651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011653 ac_cv_lib_c_inet_aton=yes
11654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011657rm -f core conftest.err conftest.$ac_objext \
11658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011659LIBS=$ac_check_lib_save_LIBS
11660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11662$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011663if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011664 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11667$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011668if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011670else
11671 ac_check_lib_save_LIBS=$LIBS
11672LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011676/* Override any GCC internal prototype to avoid an error.
11677 Use char because int might match the return type of a GCC
11678 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011679#ifdef __cplusplus
11680extern "C"
11681#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011682char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011683int
11684main ()
11685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011686return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011692 ac_cv_lib_resolv_inet_aton=yes
11693else
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011696rm -f core conftest.err conftest.$ac_objext \
11697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011698LIBS=$ac_check_lib_save_LIBS
11699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11701$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011702if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011703 cat >>confdefs.h <<_ACEOF
11704#define HAVE_LIBRESOLV 1
11705_ACEOF
11706
11707 LIBS="-lresolv $LIBS"
11708
11709fi
11710
11711
11712fi
11713
11714
Christian Heimesd0764e22007-12-04 15:00:33 +000011715# On Tru64, chflags seems to be present, but calling it will
11716# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11718$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011719if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011721else
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011723 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011726/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011727
Christian Heimesd0764e22007-12-04 15:00:33 +000011728#include <sys/stat.h>
11729#include <unistd.h>
11730int main(int argc, char*argv[])
11731{
11732 if(chflags(argv[0], 0) != 0)
11733 return 1;
11734 return 0;
11735}
Ned Deily3eb67d52011-06-28 00:00:28 -070011736
Christian Heimesd0764e22007-12-04 15:00:33 +000011737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011738if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011739 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011740else
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11744 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011745fi
11746
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011747
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11750$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011751if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011753if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011754 ac_cv_have_chflags="yes"
11755else
11756 ac_cv_have_chflags="no"
11757fi
11758
11759fi
11760if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011761
Matthias Kloseb9621712010-04-24 17:59:49 +000011762$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011763
11764fi
11765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11767$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011768if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011770else
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011772 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011775/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011776
Christian Heimesd0764e22007-12-04 15:00:33 +000011777#include <sys/stat.h>
11778#include <unistd.h>
11779int main(int argc, char*argv[])
11780{
11781 if(lchflags(argv[0], 0) != 0)
11782 return 1;
11783 return 0;
11784}
Ned Deily3eb67d52011-06-28 00:00:28 -070011785
Christian Heimesd0764e22007-12-04 15:00:33 +000011786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011788 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011794fi
11795
11796
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11799$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011800if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011802if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011803 ac_cv_have_lchflags="yes"
11804else
11805 ac_cv_have_lchflags="no"
11806fi
11807
11808fi
11809if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011812
11813fi
11814
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011815case $ac_sys_system/$ac_sys_release in
11816Darwin/*)
11817 _CUR_CFLAGS="${CFLAGS}"
11818 _CUR_LDFLAGS="${LDFLAGS}"
11819 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11820 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11821 ;;
11822esac
11823
Matthias Kloseb9621712010-04-24 17:59:49 +000011824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11825$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011826if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011828else
11829 ac_check_lib_save_LIBS=$LIBS
11830LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011832/* end confdefs.h. */
11833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011834/* Override any GCC internal prototype to avoid an error.
11835 Use char because int might match the return type of a GCC
11836 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011837#ifdef __cplusplus
11838extern "C"
11839#endif
11840char inflateCopy ();
11841int
11842main ()
11843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011845 ;
11846 return 0;
11847}
11848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011850 ac_cv_lib_z_inflateCopy=yes
11851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011854rm -f core conftest.err conftest.$ac_objext \
11855 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011856LIBS=$ac_check_lib_save_LIBS
11857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11859$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011860if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011863
11864fi
11865
11866
11867case $ac_sys_system/$ac_sys_release in
11868Darwin/*)
11869 CFLAGS="${_CUR_CFLAGS}"
11870 LDFLAGS="${_CUR_LDFLAGS}"
11871 ;;
11872esac
11873
Matthias Kloseb9621712010-04-24 17:59:49 +000011874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11875$as_echo_n "checking for hstrerror... " >&6; }
11876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011877/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011878
Martin v. Löwise9416172003-05-03 10:12:45 +000011879#include <netdb.h>
11880
Martin v. Löwise9416172003-05-03 10:12:45 +000011881int
11882main ()
11883{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011884void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011885 ;
11886 return 0;
11887}
11888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011890
Matthias Kloseb9621712010-04-24 17:59:49 +000011891$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011892
Matthias Kloseb159a552010-04-25 21:00:44 +000011893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011894$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011895else
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11897$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011898
11899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011900rm -f core conftest.err conftest.$ac_objext \
11901 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011902
Matthias Kloseb9621712010-04-24 17:59:49 +000011903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11904$as_echo_n "checking for inet_aton... " >&6; }
11905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011906/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011907
Martin v. Löwis86d66262006-02-17 08:40:11 +000011908#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011909#include <sys/socket.h>
11910#include <netinet/in.h>
11911#include <arpa/inet.h>
11912
Martin v. Löwise9416172003-05-03 10:12:45 +000011913int
11914main ()
11915{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011916void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011917 ;
11918 return 0;
11919}
11920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011924
Matthias Kloseb159a552010-04-25 21:00:44 +000011925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011927else
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11929$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011930
11931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011932rm -f core conftest.err conftest.$ac_objext \
11933 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11936$as_echo_n "checking for inet_pton... " >&6; }
11937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011938/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011939
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011940#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011941#include <sys/socket.h>
11942#include <netinet/in.h>
11943#include <arpa/inet.h>
11944
Martin v. Löwise9416172003-05-03 10:12:45 +000011945int
11946main ()
11947{
11948void* p = inet_pton
11949 ;
11950 return 0;
11951}
11952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011953if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011954
Matthias Kloseb9621712010-04-24 17:59:49 +000011955$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011956
Matthias Kloseb159a552010-04-25 21:00:44 +000011957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011958$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011959else
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11961$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011962
11963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011965
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011966# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11968$as_echo_n "checking for setgroups... " >&6; }
11969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011970/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011971
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011972#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011973#ifdef HAVE_GRP_H
11974#include <grp.h>
11975#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011976
Martin v. Löwisd5843682002-11-21 20:41:28 +000011977int
11978main ()
11979{
11980void* p = setgroups
11981 ;
11982 return 0;
11983}
11984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011985if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011986
Matthias Kloseb9621712010-04-24 17:59:49 +000011987$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011988
Matthias Kloseb159a552010-04-25 21:00:44 +000011989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11993$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011994
11995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011997
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011998# check for openpty and forkpty
11999
12000for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012001do :
12002 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012003if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012004 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012005#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012006_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012007
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12010$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012011if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012013else
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012015LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012019/* Override any GCC internal prototype to avoid an error.
12020 Use char because int might match the return type of a GCC
12021 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012022#ifdef __cplusplus
12023extern "C"
12024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012025char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012026int
12027main ()
12028{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012029return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012030 ;
12031 return 0;
12032}
12033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012034if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012036else
Matthias Kloseb9621712010-04-24 17:59:49 +000012037 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012039rm -f core conftest.err conftest.$ac_objext \
12040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012041LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12044$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012045if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012047 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012048else
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12050$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012051if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012053else
12054 ac_check_lib_save_LIBS=$LIBS
12055LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012057/* end confdefs.h. */
12058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059/* Override any GCC internal prototype to avoid an error.
12060 Use char because int might match the return type of a GCC
12061 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012062#ifdef __cplusplus
12063extern "C"
12064#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012065char openpty ();
12066int
12067main ()
12068{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012070 ;
12071 return 0;
12072}
12073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012075 ac_cv_lib_bsd_openpty=yes
12076else
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012079rm -f core conftest.err conftest.$ac_objext \
12080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012081LIBS=$ac_check_lib_save_LIBS
12082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12084$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012085if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012087 LIBS="$LIBS -lbsd"
12088fi
12089
12090
12091fi
12092
Fred Drake8cef4cf2000-06-28 16:40:38 +000012093
12094fi
12095done
12096
12097for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012098do :
12099 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012100if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012102#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012103_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012104
Fred Drake8cef4cf2000-06-28 16:40:38 +000012105else
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12107$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012108if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012110else
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012112LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116/* Override any GCC internal prototype to avoid an error.
12117 Use char because int might match the return type of a GCC
12118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012119#ifdef __cplusplus
12120extern "C"
12121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012122char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012123int
12124main ()
12125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 ;
12128 return 0;
12129}
12130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012133else
Matthias Kloseb9621712010-04-24 17:59:49 +000012134 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012136rm -f core conftest.err conftest.$ac_objext \
12137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012138LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12141$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012142if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012144 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12147$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012148if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012150else
12151 ac_check_lib_save_LIBS=$LIBS
12152LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012154/* end confdefs.h. */
12155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156/* Override any GCC internal prototype to avoid an error.
12157 Use char because int might match the return type of a GCC
12158 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012159#ifdef __cplusplus
12160extern "C"
12161#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012162char forkpty ();
12163int
12164main ()
12165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012167 ;
12168 return 0;
12169}
12170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012172 ac_cv_lib_bsd_forkpty=yes
12173else
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176rm -f core conftest.err conftest.$ac_objext \
12177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012178LIBS=$ac_check_lib_save_LIBS
12179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12181$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012182if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012184 LIBS="$LIBS -lbsd"
12185fi
12186
12187
12188fi
12189
Fred Drake8cef4cf2000-06-28 16:40:38 +000012190
12191fi
12192done
12193
Jack Jansendd19cf82001-12-06 22:36:17 +000012194
Christian Heimesb186d002008-03-18 15:15:01 +000012195# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012196for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012197do :
12198 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012199if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012200 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012201#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012202_ACEOF
12203
12204fi
12205done
12206
12207
Michael W. Hudson54241132001-12-07 15:38:26 +000012208# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012209for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012210do :
12211 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12212ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012213if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012215#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012216_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012217
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012218fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012219done
12220
Michael W. Hudson54241132001-12-07 15:38:26 +000012221
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012222ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012223if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012224 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012225
Martin v. Löwis1142de32002-03-29 16:28:31 +000012226else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012228 *" dup2.$ac_objext "* ) ;;
12229 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012231esac
12232
Martin v. Löwis1142de32002-03-29 16:28:31 +000012233fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012234
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012235ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012236if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012237 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12238
12239else
12240 case " $LIBOBJS " in
12241 *" strdup.$ac_objext "* ) ;;
12242 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12243 ;;
12244esac
12245
12246fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012247
12248
12249for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012250do :
12251 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012252if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012254#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012257/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012258#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012259int
12260main ()
12261{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012262getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ;
12264 return 0;
12265}
12266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012270
Guido van Rossum627b2d71993-12-24 10:39:16 +000012271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012273
Guido van Rossum627b2d71993-12-24 10:39:16 +000012274fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012275done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012276
Jack Jansen150753c2003-03-29 22:07:47 +000012277for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012278do :
12279 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012280if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012282#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012285/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012286#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012287int
12288main ()
12289{
12290setpgrp(0,0);
12291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012298
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012301
12302fi
12303done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012304
Thomas Wouters3a584202000-08-05 23:28:51 +000012305for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012306do :
12307 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012308if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012310#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012313/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012314#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012315int
12316main ()
12317{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012318gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 ;
12320 return 0;
12321}
12322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012323if ac_fn_c_try_compile "$LINENO"; then :
12324
Guido van Rossum627b2d71993-12-24 10:39:16 +000012325else
Skip Montanaro6dead952003-09-25 14:50:04 +000012326
Matthias Kloseb9621712010-04-24 17:59:49 +000012327$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012328
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
Guido van Rossum627b2d71993-12-24 10:39:16 +000012330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012333fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012334done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012335
Michael W. Hudson54241132001-12-07 15:38:26 +000012336
Victor Stinnere0be4232011-10-25 13:06:09 +020012337for ac_func in clock_gettime
12338do :
12339 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12340if test "x$ac_cv_func_clock_gettime" = xyes; then :
12341 cat >>confdefs.h <<_ACEOF
12342#define HAVE_CLOCK_GETTIME 1
12343_ACEOF
12344
12345else
12346
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12348$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12349if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12350 $as_echo_n "(cached) " >&6
12351else
12352 ac_check_lib_save_LIBS=$LIBS
12353LIBS="-lrt $LIBS"
12354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12355/* end confdefs.h. */
12356
12357/* Override any GCC internal prototype to avoid an error.
12358 Use char because int might match the return type of a GCC
12359 builtin and then its argument prototype would still apply. */
12360#ifdef __cplusplus
12361extern "C"
12362#endif
12363char clock_gettime ();
12364int
12365main ()
12366{
12367return clock_gettime ();
12368 ;
12369 return 0;
12370}
12371_ACEOF
12372if ac_fn_c_try_link "$LINENO"; then :
12373 ac_cv_lib_rt_clock_gettime=yes
12374else
12375 ac_cv_lib_rt_clock_gettime=no
12376fi
12377rm -f core conftest.err conftest.$ac_objext \
12378 conftest$ac_exeext conftest.$ac_ext
12379LIBS=$ac_check_lib_save_LIBS
12380fi
12381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12382$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12383if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12384
Victor Stinner7efb8332014-08-29 15:41:08 +020012385 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012386 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12387
12388
12389$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12390
12391
12392fi
12393
12394
12395fi
12396done
12397
12398
12399for ac_func in clock_getres
12400do :
12401 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12402if test "x$ac_cv_func_clock_getres" = xyes; then :
12403 cat >>confdefs.h <<_ACEOF
12404#define HAVE_CLOCK_GETRES 1
12405_ACEOF
12406
12407else
12408
12409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12410$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12411if ${ac_cv_lib_rt_clock_getres+:} false; then :
12412 $as_echo_n "(cached) " >&6
12413else
12414 ac_check_lib_save_LIBS=$LIBS
12415LIBS="-lrt $LIBS"
12416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12417/* end confdefs.h. */
12418
12419/* Override any GCC internal prototype to avoid an error.
12420 Use char because int might match the return type of a GCC
12421 builtin and then its argument prototype would still apply. */
12422#ifdef __cplusplus
12423extern "C"
12424#endif
12425char clock_getres ();
12426int
12427main ()
12428{
12429return clock_getres ();
12430 ;
12431 return 0;
12432}
12433_ACEOF
12434if ac_fn_c_try_link "$LINENO"; then :
12435 ac_cv_lib_rt_clock_getres=yes
12436else
12437 ac_cv_lib_rt_clock_getres=no
12438fi
12439rm -f core conftest.err conftest.$ac_objext \
12440 conftest$ac_exeext conftest.$ac_ext
12441LIBS=$ac_check_lib_save_LIBS
12442fi
12443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12444$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12445if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12446
12447 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12448
12449
12450fi
12451
12452
12453fi
12454done
12455
12456
Matthias Kloseb9621712010-04-24 17:59:49 +000012457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12458$as_echo_n "checking for major... " >&6; }
12459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012460/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012461
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012462#if defined(MAJOR_IN_MKDEV)
12463#include <sys/mkdev.h>
12464#elif defined(MAJOR_IN_SYSMACROS)
12465#include <sys/sysmacros.h>
12466#else
12467#include <sys/types.h>
12468#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012469
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012470int
12471main ()
12472{
12473
12474 makedev(major(0),minor(0));
12475
12476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012481
12482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12486$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012487
12488else
Skip Montanaro6dead952003-09-25 14:50:04 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12491$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012492
12493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012494rm -f core conftest.err conftest.$ac_objext \
12495 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012496
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012497# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012498# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12500$as_echo_n "checking for getaddrinfo... " >&6; }
12501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012502/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012503
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012504#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012505#include <sys/socket.h>
12506#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012507#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012508
Martin v. Löwis11437992002-04-12 09:54:03 +000012509int
12510main ()
12511{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012512getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 ;
12514 return 0;
12515}
12516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012517if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012518 have_getaddrinfo=yes
12519else
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012522rm -f core conftest.err conftest.$ac_objext \
12523 conftest$ac_exeext conftest.$ac_ext
12524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12525$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012526if test $have_getaddrinfo = yes
12527then
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12529$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012530 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012532else
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012534
12535if test "${enable_ipv6+set}" = set; then
12536 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12537else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012538 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012539fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012543
Stefan Krah19c21392012-11-22 23:47:32 +010012544#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012545#include <sys/types.h>
12546#include <netdb.h>
12547#include <string.h>
12548#include <sys/socket.h>
12549#include <netinet/in.h>
12550
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012551int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012552{
12553 int passive, gaierr, inet4 = 0, inet6 = 0;
12554 struct addrinfo hints, *ai, *aitop;
12555 char straddr[INET6_ADDRSTRLEN], strport[16];
12556
12557 for (passive = 0; passive <= 1; passive++) {
12558 memset(&hints, 0, sizeof(hints));
12559 hints.ai_family = AF_UNSPEC;
12560 hints.ai_flags = passive ? AI_PASSIVE : 0;
12561 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012562 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012563 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12564 (void)gai_strerror(gaierr);
12565 goto bad;
12566 }
12567 for (ai = aitop; ai; ai = ai->ai_next) {
12568 if (ai->ai_addr == NULL ||
12569 ai->ai_addrlen == 0 ||
12570 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12571 straddr, sizeof(straddr), strport, sizeof(strport),
12572 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12573 goto bad;
12574 }
12575 switch (ai->ai_family) {
12576 case AF_INET:
12577 if (strcmp(strport, "54321") != 0) {
12578 goto bad;
12579 }
12580 if (passive) {
12581 if (strcmp(straddr, "0.0.0.0") != 0) {
12582 goto bad;
12583 }
12584 } else {
12585 if (strcmp(straddr, "127.0.0.1") != 0) {
12586 goto bad;
12587 }
12588 }
12589 inet4++;
12590 break;
12591 case AF_INET6:
12592 if (strcmp(strport, "54321") != 0) {
12593 goto bad;
12594 }
12595 if (passive) {
12596 if (strcmp(straddr, "::") != 0) {
12597 goto bad;
12598 }
12599 } else {
12600 if (strcmp(straddr, "::1") != 0) {
12601 goto bad;
12602 }
12603 }
12604 inet6++;
12605 break;
12606 case AF_UNSPEC:
12607 goto bad;
12608 break;
12609 default:
12610 /* another family support? */
12611 break;
12612 }
12613 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012614 freeaddrinfo(aitop);
12615 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012616 }
12617
12618 if (!(inet4 == 0 || inet4 == 2))
12619 goto bad;
12620 if (!(inet6 == 0 || inet6 == 2))
12621 goto bad;
12622
12623 if (aitop)
12624 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012625 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012626
12627 bad:
12628 if (aitop)
12629 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012630 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012631}
12632
Martin v. Löwis11437992002-04-12 09:54:03 +000012633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012634if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012635 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012636else
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12640 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012643fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012644
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12648$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12649
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012650if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012651then
12652 if test $ipv6 = yes
12653 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012654 echo 'Fatal: You must get working getaddrinfo() function.'
12655 echo ' or you can specify "--disable-ipv6"'.
12656 exit 1
12657 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012658else
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
Matthias Kloseb9621712010-04-24 17:59:49 +000012660$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012661
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012662fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012663
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012664for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012665do :
12666 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012667if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012669#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012670_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012671
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012672fi
12673done
12674
Michael W. Hudson54241132001-12-07 15:38:26 +000012675
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012676# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12678$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012679if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012681else
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684#include <sys/types.h>
12685#include <sys/time.h>
12686#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
Martin v. Löwis11437992002-04-12 09:54:03 +000012688int
12689main ()
12690{
12691if ((struct tm *) 0)
12692return 0;
12693 ;
12694 return 0;
12695}
12696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012697if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012698 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012699else
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12705$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012706if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012709
12710fi
12711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12713$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012714if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012715 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719#include <sys/types.h>
12720#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Martin v. Löwis11437992002-04-12 09:54:03 +000012722int
12723main ()
12724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725struct tm tm;
12726 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ;
12729 return 0;
12730}
12731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012732if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012733 ac_cv_struct_tm=time.h
12734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12740$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012741if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012744
12745fi
12746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747ac_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 +000012748#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750"
Victor Stinnere0be4232011-10-25 13:06:09 +020012751if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
12753cat >>confdefs.h <<_ACEOF
12754#define HAVE_STRUCT_TM_TM_ZONE 1
12755_ACEOF
12756
12757
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012759
Martin v. Löwis11437992002-04-12 09:54:03 +000012760if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763
12764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12766"
Victor Stinnere0be4232011-10-25 13:06:09 +020012767if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769else
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771fi
12772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012774#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775_ACEOF
12776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12778$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012779if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781else
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012784#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785#if !HAVE_DECL_TZNAME
12786extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
Martin v. Löwis11437992002-04-12 09:54:03 +000012789int
12790main ()
12791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 ;
12794 return 0;
12795}
12796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012797if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012798 ac_cv_var_tzname=yes
12799else
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012802rm -f core conftest.err conftest.$ac_objext \
12803 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12806$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012807 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012810
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811 fi
12812fi
12813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814ac_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 +020012815if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
12817cat >>confdefs.h <<_ACEOF
12818#define HAVE_STRUCT_STAT_ST_RDEV 1
12819_ACEOF
12820
12821
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012822fi
12823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824ac_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 +020012825if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012826
Martin v. Löwis11437992002-04-12 09:54:03 +000012827cat >>confdefs.h <<_ACEOF
12828#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12829_ACEOF
12830
12831
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012832fi
12833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834ac_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 +020012835if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012836
12837cat >>confdefs.h <<_ACEOF
12838#define HAVE_STRUCT_STAT_ST_FLAGS 1
12839_ACEOF
12840
12841
12842fi
12843
Matthias Kloseb9621712010-04-24 17:59:49 +000012844ac_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 +020012845if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012846
12847cat >>confdefs.h <<_ACEOF
12848#define HAVE_STRUCT_STAT_ST_GEN 1
12849_ACEOF
12850
12851
12852fi
12853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854ac_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 +020012855if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012856
12857cat >>confdefs.h <<_ACEOF
12858#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12859_ACEOF
12860
12861
12862fi
12863
Matthias Kloseb9621712010-04-24 17:59:49 +000012864ac_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 +020012865if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012866
Martin v. Löwis11437992002-04-12 09:54:03 +000012867cat >>confdefs.h <<_ACEOF
12868#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12869_ACEOF
12870
12871
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012872fi
12873
Stefan Krah267b6392016-04-26 01:09:18 +020012874ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12875 #include <sys/types.h>
12876 #include <pwd.h>
12877
12878"
12879if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12880
12881cat >>confdefs.h <<_ACEOF
12882#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12883_ACEOF
12884
12885
12886fi
12887ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12888 #include <sys/types.h>
12889 #include <pwd.h>
12890
12891"
12892if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12893
12894cat >>confdefs.h <<_ACEOF
12895#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12896_ACEOF
12897
12898
12899fi
12900
Michael W. Hudson54241132001-12-07 15:38:26 +000012901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12903$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012904if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906else
Matthias Kloseb159a552010-04-25 21:00:44 +000012907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012909/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012910#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012911int
12912main ()
12913{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012914return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 ;
12916 return 0;
12917}
12918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012919if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012920 ac_cv_header_time_altzone=yes
12921else
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926fi
12927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12929$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012930if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012931
Matthias Kloseb9621712010-04-24 17:59:49 +000012932$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933
12934fi
12935
Guido van Rossumda88dad1995-01-26 00:46:29 +000012936was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12938$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012940/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012941
12942#include <sys/types.h>
12943#include <sys/select.h>
12944#include <sys/time.h>
12945
Martin v. Löwis11437992002-04-12 09:54:03 +000012946int
12947main ()
12948{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949;
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 ;
12951 return 0;
12952}
12953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012954if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012955
12956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012958
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012959 was_it_defined=yes
12960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12964$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12967$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012968if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012970else
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012972/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012973#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012974int
12975main ()
12976{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012977struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 ;
12979 return 0;
12980}
12981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012983 ac_cv_struct_addrinfo=yes
12984else
Matthias Kloseb9621712010-04-24 17:59:49 +000012985 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12988fi
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12991$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012992if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
Matthias Kloseb9621712010-04-24 17:59:49 +000012994$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012995
12996fi
12997
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12999$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013000if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002else
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013004/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013005
13006# include <sys/types.h>
13007# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013008int
13009main ()
13010{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 ;
13013 return 0;
13014}
13015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013016if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013017 ac_cv_struct_sockaddr_storage=yes
13018else
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13022fi
13023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13025$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013026if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013029
13030fi
13031
Christian Heimesdffa3942016-09-05 23:54:41 +020013032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13033$as_echo_n "checking for sockaddr_alg... " >&6; }
13034if ${ac_cv_struct_sockaddr_alg+:} false; then :
13035 $as_echo_n "(cached) " >&6
13036else
13037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038/* end confdefs.h. */
13039
13040# include <sys/types.h>
13041# include <sys/socket.h>
13042# include <linux/if_alg.h>
13043int
13044main ()
13045{
13046struct sockaddr_alg s
13047 ;
13048 return 0;
13049}
13050_ACEOF
13051if ac_fn_c_try_compile "$LINENO"; then :
13052 ac_cv_struct_sockaddr_alg=yes
13053else
13054 ac_cv_struct_sockaddr_alg=no
13055fi
13056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13057fi
13058
13059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13060$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13061if test $ac_cv_struct_sockaddr_alg = yes; then
13062
13063$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13064
13065fi
13066
Guido van Rossum627b2d71993-12-24 10:39:16 +000013067# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13070$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013071if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013073else
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013076$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013077int
13078main ()
13079{
13080static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013081test_array [0] = 0;
13082return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013083
13084 ;
13085 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013086}
Martin v. Löwis11437992002-04-12 09:54:03 +000013087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013088if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013089 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013090else
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13096$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013097if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099
13100fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13103$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013104if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013106else
Matthias Kloseb9621712010-04-24 17:59:49 +000013107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013108/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013109
Martin v. Löwis11437992002-04-12 09:54:03 +000013110int
13111main ()
13112{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013113
Martin v. Löwis11437992002-04-12 09:54:03 +000013114#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013115 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013116 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013117 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013118 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013119 char const *const *pcpcc;
13120 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 /* NEC SVR4.0.2 mips cc rejects this. */
13122 struct point {int x, y;};
13123 static struct point const zero = {0,0};
13124 /* AIX XL C 1.02.0.0 rejects this.
13125 It does not let you subtract one const X* pointer from another in
13126 an arm of an if-expression whose if-part is not a constant
13127 expression */
13128 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013129 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131 ++pcpcc;
13132 ppc = (char**) pcpcc;
13133 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013134 { /* SCO 3.2v4 cc rejects this sort of thing. */
13135 char tx;
13136 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013138
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 }
13142 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13143 int x[] = {25, 17};
13144 const int *foo = &x[0];
13145 ++foo;
13146 }
13147 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13148 typedef const int *iptr;
13149 iptr p = 0;
13150 ++p;
13151 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013152 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013154 struct s { int j; const int *ap[3]; } bx;
13155 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 }
13157 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13158 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013159 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013161 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013162#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013163
Martin v. Löwis11437992002-04-12 09:54:03 +000013164 ;
13165 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013166}
Martin v. Löwis11437992002-04-12 09:54:03 +000013167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013168if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013169 ac_cv_c_const=yes
13170else
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13176$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013177if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013180
13181fi
13182
Michael W. Hudson54241132001-12-07 15:38:26 +000013183
Guido van Rossumda88dad1995-01-26 00:46:29 +000013184works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13186$as_echo_n "checking for working volatile... " >&6; }
13187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013188/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013189
Martin v. Löwis11437992002-04-12 09:54:03 +000013190int
13191main ()
13192{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 ;
13195 return 0;
13196}
13197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013198if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013199 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013200else
Skip Montanaro6dead952003-09-25 14:50:04 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013203
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013204
Guido van Rossum627b2d71993-12-24 10:39:16 +000013205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13208$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013209
Guido van Rossumda88dad1995-01-26 00:46:29 +000013210works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13212$as_echo_n "checking for working signed char... " >&6; }
13213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013214/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013215
Martin v. Löwis11437992002-04-12 09:54:03 +000013216int
13217main ()
13218{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013219signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 ;
13221 return 0;
13222}
13223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013224if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013225 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013226else
Skip Montanaro6dead952003-09-25 14:50:04 +000013227
Matthias Kloseb9621712010-04-24 17:59:49 +000013228$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013229
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013230
Guido van Rossum7f43da71994-08-01 12:15:30 +000013231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13234$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013235
Guido van Rossumda88dad1995-01-26 00:46:29 +000013236have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13238$as_echo_n "checking for prototypes... " >&6; }
13239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013240/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013241int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013242int
13243main ()
13244{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013245return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 ;
13247 return 0;
13248}
13249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013250if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013253
Matthias Kloseb159a552010-04-25 21:00:44 +000013254 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13258$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013259
Guido van Rossumda88dad1995-01-26 00:46:29 +000013260works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13262$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013264/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013265
13266#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013267int foo(int x, ...) {
13268 va_list va;
13269 va_start(va, x);
13270 va_arg(va, int);
13271 va_arg(va, char *);
13272 va_arg(va, double);
13273 return 0;
13274}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013275
Martin v. Löwis11437992002-04-12 09:54:03 +000013276int
13277main ()
13278{
Guido van Rossum90eea071996-08-30 20:58:57 +000013279return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ;
13281 return 0;
13282}
13283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013285
13286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013289 works=yes
13290
Guido van Rossum627b2d71993-12-24 10:39:16 +000013291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13294$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013295
Martin v. Löwisd6320502004-08-12 13:45:08 +000013296# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13298$as_echo_n "checking for socketpair... " >&6; }
13299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013300/* end confdefs.h. */
13301
13302#include <sys/types.h>
13303#include <sys/socket.h>
13304
13305int
13306main ()
13307{
13308void *x=socketpair
13309 ;
13310 return 0;
13311}
13312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013316
Matthias Kloseb159a552010-04-25 21:00:44 +000013317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13321$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013322
13323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013325
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013326# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13328$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013330/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013331#include <sys/types.h>
13332#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013333int
13334main ()
13335{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013336struct sockaddr x;
13337x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 ;
13339 return 0;
13340}
13341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013342if ac_fn_c_try_compile "$LINENO"; then :
13343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13344$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013347
13348else
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13350$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013351
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013354
Guido van Rossumda88dad1995-01-26 00:46:29 +000013355va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13357$as_echo_n "checking whether va_list is an array... " >&6; }
13358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013359/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360
13361#ifdef HAVE_STDARG_PROTOTYPES
13362#include <stdarg.h>
13363#else
13364#include <varargs.h>
13365#endif
13366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367int
13368main ()
13369{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013371 ;
13372 return 0;
13373}
13374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013375if ac_fn_c_try_compile "$LINENO"; then :
13376
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013377else
Skip Montanaro6dead952003-09-25 14:50:04 +000013378
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
Guido van Rossumda88dad1995-01-26 00:46:29 +000013382 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013383
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13387$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013388
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013389# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013390
13391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013393if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13398$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013399 OLD_CFLAGS=$CFLAGS
13400 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013402/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013403
13404# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
Martin v. Löwis11437992002-04-12 09:54:03 +000013406int
13407main ()
13408{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013409
13410 char *name;
13411 struct hostent *he, *res;
13412 char buffer[2048];
13413 int buflen = 2048;
13414 int h_errnop;
13415
13416 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
13418 ;
13419 return 0;
13420}
13421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013425
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13430$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013431
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013432else
Skip Montanaro6dead952003-09-25 14:50:04 +000013433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13435$as_echo "no" >&6; }
13436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13437$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013439/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013441# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013442
Martin v. Löwis11437992002-04-12 09:54:03 +000013443int
13444main ()
13445{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013446
13447 char *name;
13448 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013449 char buffer[2048];
13450 int buflen = 2048;
13451 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013452
Matthias Kloseb159a552010-04-25 21:00:44 +000013453 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
13455 ;
13456 return 0;
13457}
13458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Matthias Kloseb159a552010-04-25 21:00:44 +000013464$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13467$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013468
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013469else
Skip Montanaro6dead952003-09-25 14:50:04 +000013470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13472$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13474$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13476/* end confdefs.h. */
13477
13478# include <netdb.h>
13479
13480int
13481main ()
13482{
13483
13484 char *name;
13485 struct hostent *he;
13486 struct hostent_data data;
13487
13488 (void) gethostbyname_r(name, he, &data);
13489
13490 ;
13491 return 0;
13492}
13493_ACEOF
13494if ac_fn_c_try_compile "$LINENO"; then :
13495
13496 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13497
13498
13499$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13500
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13502$as_echo "yes" >&6; }
13503
13504else
13505
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13507$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013511
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013514
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013517 CFLAGS=$OLD_CFLAGS
13518
13519else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 for ac_func in gethostbyname
13522do :
13523 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013524if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013526#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013527_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013528
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013529fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013530done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013531
Michael W. Hudson54241132001-12-07 15:38:26 +000013532
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013533fi
13534
Michael W. Hudson54241132001-12-07 15:38:26 +000013535
13536
13537
13538
13539
13540
Guido van Rossum627b2d71993-12-24 10:39:16 +000013541# checks for system services
13542# (none yet)
13543
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013544# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013545ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013546if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013547
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013548else
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13550$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013551if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013553else
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013555LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013559/* Override any GCC internal prototype to avoid an error.
13560 Use char because int might match the return type of a GCC
13561 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013562#ifdef __cplusplus
13563extern "C"
13564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013565char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013566int
13567main ()
13568{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 ;
13571 return 0;
13572}
13573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013574if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013575 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013579rm -f core conftest.err conftest.$ac_objext \
13580 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013581LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13584$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013585if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 cat >>confdefs.h <<_ACEOF
13587#define HAVE_LIBIEEE 1
13588_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013589
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013590 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591
Guido van Rossum627b2d71993-12-24 10:39:16 +000013592fi
13593
Michael W. Hudson54241132001-12-07 15:38:26 +000013594
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013595fi
13596
Michael W. Hudson54241132001-12-07 15:38:26 +000013597
Guido van Rossum7f253911997-05-09 02:42:48 +000013598# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13600$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013602# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013603if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013605if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013606then
13607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13611$as_echo "yes" >&6; }
13612else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13613$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013614fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13617$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013618fi
13619
Guido van Rossum7f253911997-05-09 02:42:48 +000013620
Guido van Rossum7f43da71994-08-01 12:15:30 +000013621# check for --with-libm=...
13622
Guido van Rossum563e7081996-09-10 18:20:48 +000013623case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013624Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013625*) LIBM=-lm
13626esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13628$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013631if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013632 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013633if test "$withval" = no
13634then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13636$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013637elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013638then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13640$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013641else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013642fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13645$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013646fi
13647
Guido van Rossum7f43da71994-08-01 12:15:30 +000013648
13649# check for --with-libc=...
13650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13652$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013655if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013656 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013657if test "$withval" = no
13658then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13660$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013661elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013662then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13664$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013665else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013666fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013667else
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13669$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670fi
13671
Guido van Rossum7f43da71994-08-01 12:15:30 +000013672
Stefan Krah1919b7e2012-03-21 18:25:23 +010013673# **************************************
13674# * Check for gcc x64 inline assembler *
13675# **************************************
13676
13677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13678$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13680/* end confdefs.h. */
13681
13682int
13683main ()
13684{
13685
13686 __asm__ __volatile__ ("movq %rcx, %rax");
13687
13688 ;
13689 return 0;
13690}
13691_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013692if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013693 have_gcc_asm_for_x64=yes
13694else
13695 have_gcc_asm_for_x64=no
13696fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013697rm -f core conftest.err conftest.$ac_objext \
13698 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13700$as_echo "$have_gcc_asm_for_x64" >&6; }
13701if test "$have_gcc_asm_for_x64" = yes
13702then
13703
13704$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13705
13706fi
13707
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013708# **************************************************
13709# * Check for various properties of floating point *
13710# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13713$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013714if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013716else
13717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013719 ac_cv_little_endian_double=no
13720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013722/* end confdefs.h. */
13723
13724#include <string.h>
13725int main() {
13726 double x = 9006104071832581.0;
13727 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13728 return 0;
13729 else
13730 return 1;
13731}
13732
13733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013734if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013735 ac_cv_little_endian_double=yes
13736else
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13740 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013741fi
13742
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013743fi
13744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13746$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013747if test "$ac_cv_little_endian_double" = yes
13748then
13749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013751
13752fi
13753
Matthias Kloseb9621712010-04-24 17:59:49 +000013754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13755$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013756if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013757 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013758else
13759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013761 ac_cv_big_endian_double=no
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013764/* end confdefs.h. */
13765
13766#include <string.h>
13767int main() {
13768 double x = 9006104071832581.0;
13769 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13770 return 0;
13771 else
13772 return 1;
13773}
13774
13775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013776if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013777 ac_cv_big_endian_double=yes
13778else
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013783fi
13784
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013785fi
13786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13788$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013789if test "$ac_cv_big_endian_double" = yes
13790then
13791
Matthias Kloseb9621712010-04-24 17:59:49 +000013792$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013793
13794fi
13795
13796# Some ARM platforms use a mixed-endian representation for doubles.
13797# While Python doesn't currently have full support for these platforms
13798# (see e.g., issue 1762561), we can at least make sure that float <-> string
13799# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13801$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013802if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013804else
13805
Matthias Kloseb9621712010-04-24 17:59:49 +000013806if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013807 ac_cv_mixed_endian_double=no
13808else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013810/* end confdefs.h. */
13811
13812#include <string.h>
13813int main() {
13814 double x = 9006104071832581.0;
13815 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13816 return 0;
13817 else
13818 return 1;
13819}
13820
13821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013823 ac_cv_mixed_endian_double=yes
13824else
Matthias Kloseb9621712010-04-24 17:59:49 +000013825 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829fi
13830
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831fi
13832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13834$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013835if test "$ac_cv_mixed_endian_double" = yes
13836then
13837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013839
13840fi
13841
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013842# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013843# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013844# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013845# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013846# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013847# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013848
13849# This inline assembler syntax may also work for suncc and icc,
13850# so we try it on all platforms.
13851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13853$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013855/* end confdefs.h. */
13856
13857int
13858main ()
13859{
13860
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013861 unsigned short cw;
13862 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13863 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013864
13865 ;
13866 return 0;
13867}
13868_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013869if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013870 have_gcc_asm_for_x87=yes
13871else
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013873fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013874rm -f core conftest.err conftest.$ac_objext \
13875 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13877$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013878if test "$have_gcc_asm_for_x87" = yes
13879then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013880
Matthias Kloseb9621712010-04-24 17:59:49 +000013881$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013884
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13886$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13888/* end confdefs.h. */
13889
13890int
13891main ()
13892{
13893
13894 unsigned int fpcr;
13895 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13896 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13897
13898 ;
13899 return 0;
13900}
13901_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013902if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013903 have_gcc_asm_for_mc68881=yes
13904else
13905 have_gcc_asm_for_mc68881=no
13906fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013907rm -f core conftest.err conftest.$ac_objext \
13908 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13910$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13911if test "$have_gcc_asm_for_mc68881" = yes
13912then
13913
13914$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13915
13916fi
13917
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013918# Detect whether system arithmetic is subject to x87-style double
13919# rounding issues. The result of this test has little meaning on non
13920# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13921# mode is round-to-nearest and double rounding issues are present, and
13922# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13924$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013925# $BASECFLAGS may affect the result
13926ac_save_cc="$CC"
13927CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013928if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013929 ac_cv_x87_double_rounding=no
13930else
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013932/* end confdefs.h. */
13933
13934#include <stdlib.h>
13935#include <math.h>
13936int main() {
13937 volatile double x, y, z;
13938 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13939 x = 0.99999999999999989; /* 1-2**-53 */
13940 y = 1./x;
13941 if (y != 1.)
13942 exit(0);
13943 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13944 x = 1e16;
13945 y = 2.99999;
13946 z = x + y;
13947 if (z != 1e16+4.)
13948 exit(0);
13949 /* both tests show evidence of double rounding */
13950 exit(1);
13951}
13952
13953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013954if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013955 ac_cv_x87_double_rounding=no
13956else
Matthias Kloseb9621712010-04-24 17:59:49 +000013957 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013961fi
13962
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013963CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13965$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013966if test "$ac_cv_x87_double_rounding" = yes
13967then
13968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013970
13971fi
13972
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013973# ************************************
13974# * Check for mathematical functions *
13975# ************************************
13976
13977LIBS_SAVE=$LIBS
13978LIBS="$LIBS $LIBM"
13979
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013980for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13981do :
13982 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13983ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013984if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013985 cat >>confdefs.h <<_ACEOF
13986#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13987_ACEOF
13988
13989fi
13990done
13991
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013992for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013993do :
13994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13995ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013996if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013997 cat >>confdefs.h <<_ACEOF
13998#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13999_ACEOF
14000
14001fi
14002done
14003
14004ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14005"
Victor Stinnere0be4232011-10-25 13:06:09 +020014006if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014007 ac_have_decl=1
14008else
14009 ac_have_decl=0
14010fi
14011
14012cat >>confdefs.h <<_ACEOF
14013#define HAVE_DECL_ISINF $ac_have_decl
14014_ACEOF
14015ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14016"
Victor Stinnere0be4232011-10-25 13:06:09 +020014017if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014018 ac_have_decl=1
14019else
14020 ac_have_decl=0
14021fi
14022
14023cat >>confdefs.h <<_ACEOF
14024#define HAVE_DECL_ISNAN $ac_have_decl
14025_ACEOF
14026ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14027"
Victor Stinnere0be4232011-10-25 13:06:09 +020014028if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014029 ac_have_decl=1
14030else
14031 ac_have_decl=0
14032fi
14033
14034cat >>confdefs.h <<_ACEOF
14035#define HAVE_DECL_ISFINITE $ac_have_decl
14036_ACEOF
14037
14038
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014039# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14040# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14042$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014043if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014044 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014045else
14046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014048 ac_cv_tanh_preserves_zero_sign=no
14049else
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014051/* end confdefs.h. */
14052
14053#include <math.h>
14054#include <stdlib.h>
14055int main() {
14056 /* return 0 if either negative zeros don't exist
14057 on this platform or if negative zeros exist
14058 and tanh(-0.) == -0. */
14059 if (atan2(0., -1.) == atan2(-0., -1.) ||
14060 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14061 else exit(1);
14062}
14063
14064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014065if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014066 ac_cv_tanh_preserves_zero_sign=yes
14067else
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +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
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014072fi
14073
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014074fi
14075
Matthias Kloseb9621712010-04-24 17:59:49 +000014076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14077$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014078if test "$ac_cv_tanh_preserves_zero_sign" = yes
14079then
14080
Matthias Kloseb9621712010-04-24 17:59:49 +000014081$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014082
14083fi
14084
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014085if test "$ac_cv_func_log1p" = yes
14086then
14087 # On some versions of AIX, log1p(-0.) returns 0. instead of
14088 # -0. See issue #9920.
14089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14090$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014091 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014092 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014093else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014094
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014095 if test "$cross_compiling" = yes; then :
14096 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014097else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14099/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014100
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014101 #include <math.h>
14102 #include <stdlib.h>
14103 int main() {
14104 /* Fail if the signs of log1p(-0.) and -0. can be
14105 distinguished. */
14106 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14107 return 0;
14108 else
14109 return 1;
14110 }
14111
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014112_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014113if ac_fn_c_try_run "$LINENO"; then :
14114 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014115else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014116 ac_cv_log1p_drops_zero_sign=yes
14117fi
14118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14119 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014120fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014121
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014122fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014123
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14125$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14126fi
14127if test "$ac_cv_log1p_drops_zero_sign" = yes
14128then
14129
14130$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14131
14132fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014133
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014134LIBS=$LIBS_SAVE
14135
Mark Dickinsona614f042009-11-28 12:48:43 +000014136# For multiprocessing module, check that sem_open
14137# actually works. For FreeBSD versions <= 7.2,
14138# the kernel module that provides POSIX semaphores
14139# isn't loaded by default, so an attempt to call
14140# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14142$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014143if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014145else
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014147 ac_cv_posix_semaphores_enabled=yes
14148else
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014150/* end confdefs.h. */
14151
14152#include <unistd.h>
14153#include <fcntl.h>
14154#include <stdio.h>
14155#include <semaphore.h>
14156#include <sys/stat.h>
14157
14158int main(void) {
14159 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14160 if (a == SEM_FAILED) {
14161 perror("sem_open");
14162 return 1;
14163 }
14164 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014165 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014166 return 0;
14167}
14168
14169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014170if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014171 ac_cv_posix_semaphores_enabled=yes
14172else
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14176 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014177fi
14178
14179
Mark Dickinsona614f042009-11-28 12:48:43 +000014180fi
14181
Matthias Kloseb9621712010-04-24 17:59:49 +000014182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14183$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014184if test $ac_cv_posix_semaphores_enabled = no
14185then
14186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014188
14189fi
14190
Mark Dickinson10683072009-04-18 21:18:19 +000014191# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14193$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014194if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014196else
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014198 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014199else
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014201/* end confdefs.h. */
14202
14203#include <unistd.h>
14204#include <fcntl.h>
14205#include <stdio.h>
14206#include <semaphore.h>
14207#include <sys/stat.h>
14208
14209int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014210 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014211 int count;
14212 int res;
14213 if(a==SEM_FAILED){
14214 perror("sem_open");
14215 return 1;
14216
14217 }
14218 res = sem_getvalue(a, &count);
14219 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014220 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014221 return res==-1 ? 1 : 0;
14222}
14223
Mark Dickinson10683072009-04-18 21:18:19 +000014224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014225if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014226 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014227else
Matthias Kloseb9621712010-04-24 17:59:49 +000014228 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14231 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014232fi
14233
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014235fi
14236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14238$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014239if test $ac_cv_broken_sem_getvalue = yes
14240then
14241
Matthias Kloseb9621712010-04-24 17:59:49 +000014242$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014243
14244fi
14245
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014246ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14247"
14248if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14249 ac_have_decl=1
14250else
14251 ac_have_decl=0
14252fi
14253
14254cat >>confdefs.h <<_ACEOF
14255#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14256_ACEOF
14257ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14258"
14259if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14260 ac_have_decl=1
14261else
14262 ac_have_decl=0
14263fi
14264
14265cat >>confdefs.h <<_ACEOF
14266#define HAVE_DECL_RTLD_NOW $ac_have_decl
14267_ACEOF
14268ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14269"
14270if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14271 ac_have_decl=1
14272else
14273 ac_have_decl=0
14274fi
14275
14276cat >>confdefs.h <<_ACEOF
14277#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14278_ACEOF
14279ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14280"
14281if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14282 ac_have_decl=1
14283else
14284 ac_have_decl=0
14285fi
14286
14287cat >>confdefs.h <<_ACEOF
14288#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14289_ACEOF
14290ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14291"
14292if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14293 ac_have_decl=1
14294else
14295 ac_have_decl=0
14296fi
14297
14298cat >>confdefs.h <<_ACEOF
14299#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14300_ACEOF
14301ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14302"
14303if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14304 ac_have_decl=1
14305else
14306 ac_have_decl=0
14307fi
14308
14309cat >>confdefs.h <<_ACEOF
14310#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14311_ACEOF
14312ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14313"
14314if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14315 ac_have_decl=1
14316else
14317 ac_have_decl=0
14318fi
14319
14320cat >>confdefs.h <<_ACEOF
14321#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14322_ACEOF
14323
14324
Mark Dickinsonbd792642009-03-18 20:06:12 +000014325# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14327$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014328# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014329if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014330 enableval=$enable_big_digits; case $enable_big_digits in
14331yes)
14332 enable_big_digits=30 ;;
14333no)
14334 enable_big_digits=15 ;;
1433515|30)
14336 ;;
14337*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014338 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 +000014339esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14341$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014342
14343cat >>confdefs.h <<_ACEOF
14344#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14345_ACEOF
14346
14347
14348else
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14350$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014351fi
14352
14353
Guido van Rossumef2255b2000-03-10 22:30:29 +000014354# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014355ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014356if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014357
14358
Matthias Kloseb9621712010-04-24 17:59:49 +000014359$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014360
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014361 wchar_h="yes"
14362
Guido van Rossumef2255b2000-03-10 22:30:29 +000014363else
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014365
14366fi
14367
Michael W. Hudson54241132001-12-07 15:38:26 +000014368
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014370# determine wchar_t size
14371if test "$wchar_h" = yes
14372then
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14375# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14376# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14378$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014379if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014381else
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14383"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014384
Martin v. Löwis11437992002-04-12 09:54:03 +000014385else
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 if test "$ac_cv_type_wchar_t" = yes; then
14387 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014389as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014390See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391 else
14392 ac_cv_sizeof_wchar_t=0
14393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14398$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399
14400
14401
Martin v. Löwis11437992002-04-12 09:54:03 +000014402cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014403#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014404_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014405
Michael W. Hudson54241132001-12-07 15:38:26 +000014406
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014407fi
14408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14410$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014411have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014413/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014414
14415#include <tcl.h>
14416#if TCL_UTF_MAX != 6
14417# error "NOT UCS4_TCL"
14418#endif
14419int
14420main ()
14421{
14422
14423 ;
14424 return 0;
14425}
14426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014428
14429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014431
14432 have_ucs4_tcl=yes
14433
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14437$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014438
Skip Montanaro6dead952003-09-25 14:50:04 +000014439# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014440if test "$wchar_h" = yes
14441then
14442 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14444$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014445 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014447else
14448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014450 ac_cv_wchar_t_signed=yes
14451else
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014453/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014454
14455 #include <wchar.h>
14456 int main()
14457 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014458 /* Success: exit code 0 */
14459 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014460 }
14461
14462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014463if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014464 ac_cv_wchar_t_signed=yes
14465else
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14469 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014470fi
14471
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014472fi
14473
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14475$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476fi
14477
Georg Brandl52d168a2008-01-07 18:10:24 +000014478# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014479if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014480 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014481then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014482 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014485
Georg Brandl52d168a2008-01-07 18:10:24 +000014486else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014487 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014488fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14490$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014491
14492# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14494$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014495if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014497else
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 ac_cv_c_bigendian=unknown
14499 # See if we're dealing with a universal compiler.
14500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14501/* end confdefs.h. */
14502#ifndef __APPLE_CC__
14503 not a universal capable compiler
14504 #endif
14505 typedef int dummy;
14506
Skip Montanaro6dead952003-09-25 14:50:04 +000014507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014508if ac_fn_c_try_compile "$LINENO"; then :
14509
14510 # Check for potential -arch flags. It is not universal unless
14511 # there are at least two -arch flags with different values.
14512 ac_arch=
14513 ac_prev=
14514 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14515 if test -n "$ac_prev"; then
14516 case $ac_word in
14517 i?86 | x86_64 | ppc | ppc64)
14518 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14519 ac_arch=$ac_word
14520 else
14521 ac_cv_c_bigendian=universal
14522 break
14523 fi
14524 ;;
14525 esac
14526 ac_prev=
14527 elif test "x$ac_word" = "x-arch"; then
14528 ac_prev=arch
14529 fi
14530 done
14531fi
14532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14533 if test $ac_cv_c_bigendian = unknown; then
14534 # See if sys/param.h defines the BYTE_ORDER macro.
14535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014536/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014537#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014539
Martin v. Löwis11437992002-04-12 09:54:03 +000014540int
14541main ()
14542{
Matthias Kloseb9621712010-04-24 17:59:49 +000014543#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14544 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14545 && LITTLE_ENDIAN)
14546 bogus endian macros
14547 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
14549 ;
14550 return 0;
14551}
14552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014553if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014554 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014556/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014557#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560int
14561main ()
14562{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014563#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 not big endian
14565 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014566
14567 ;
14568 return 0;
14569}
14570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014571if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014572 ac_cv_c_bigendian=yes
14573else
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014577fi
14578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14579 fi
14580 if test $ac_cv_c_bigendian = unknown; then
14581 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014583/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014584#include <limits.h>
14585
Martin v. Löwis11437992002-04-12 09:54:03 +000014586int
14587main ()
14588{
Matthias Kloseb9621712010-04-24 17:59:49 +000014589#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14590 bogus endian macros
14591 #endif
14592
Martin v. Löwis11437992002-04-12 09:54:03 +000014593 ;
14594 return 0;
14595}
14596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if ac_fn_c_try_compile "$LINENO"; then :
14598 # It does; now see whether it defined to _BIG_ENDIAN or not.
14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14600/* end confdefs.h. */
14601#include <limits.h>
14602
14603int
14604main ()
14605{
14606#ifndef _BIG_ENDIAN
14607 not big endian
14608 #endif
14609
14610 ;
14611 return 0;
14612}
14613_ACEOF
14614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014615 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014616else
Matthias Kloseb9621712010-04-24 17:59:49 +000014617 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14620fi
14621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14622 fi
14623 if test $ac_cv_c_bigendian = unknown; then
14624 # Compile a test program.
14625 if test "$cross_compiling" = yes; then :
14626 # Try to guess by grepping values from an object file.
14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628/* end confdefs.h. */
14629short int ascii_mm[] =
14630 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14631 short int ascii_ii[] =
14632 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14633 int use_ascii (int i) {
14634 return ascii_mm[i] + ascii_ii[i];
14635 }
14636 short int ebcdic_ii[] =
14637 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14638 short int ebcdic_mm[] =
14639 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14640 int use_ebcdic (int i) {
14641 return ebcdic_mm[i] + ebcdic_ii[i];
14642 }
14643 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644
Matthias Kloseb9621712010-04-24 17:59:49 +000014645int
14646main ()
14647{
14648return use_ascii (foo) == use_ebcdic (foo);
14649 ;
14650 return 0;
14651}
14652_ACEOF
14653if ac_fn_c_try_compile "$LINENO"; then :
14654 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14655 ac_cv_c_bigendian=yes
14656 fi
14657 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14658 if test "$ac_cv_c_bigendian" = unknown; then
14659 ac_cv_c_bigendian=no
14660 else
14661 # finding both strings is unlikely to happen, but who knows?
14662 ac_cv_c_bigendian=unknown
14663 fi
14664 fi
14665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014667else
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014669/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014671int
14672main ()
14673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 /* Are we little or big endian? From Harbison&Steele. */
14676 union
14677 {
14678 long int l;
14679 char c[sizeof (long int)];
14680 } u;
14681 u.l = 1;
14682 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683
14684 ;
14685 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014686}
Martin v. Löwis11437992002-04-12 09:54:03 +000014687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014688if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014689 ac_cv_c_bigendian=no
14690else
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14694 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14700$as_echo "$ac_cv_c_bigendian" >&6; }
14701 case $ac_cv_c_bigendian in #(
14702 yes)
14703 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14704;; #(
14705 no)
14706 ;; #(
14707 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014708
Matthias Kloseb9621712010-04-24 17:59:49 +000014709$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 ;; #(
14712 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014713 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014714 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014716
Michael W. Hudson54241132001-12-07 15:38:26 +000014717
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014718# ABI version string for Python extension modules. This appears between the
14719# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14720# from the following attributes which affect the ABI of this Python build (in
14721# this order):
14722#
14723# * The Python implementation (always 'cpython-' for us)
14724# * The major and minor version numbers
14725# * --with-pydebug (adds a 'd')
14726# * --with-pymalloc (adds a 'm')
14727# * --with-wide-unicode (adds a 'u')
14728#
14729# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014730# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14731# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014732
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14734$as_echo_n "checking ABIFLAGS... " >&6; }
14735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14736$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14738$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014739SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14741$as_echo "$SOABI" >&6; }
14742
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014743
14744case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014745 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014746 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14747 *)
14748 EXT_SUFFIX=${SHLIB_SUFFIX};;
14749esac
14750
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14752$as_echo_n "checking LDVERSION... " >&6; }
14753LDVERSION='$(VERSION)$(ABIFLAGS)'
14754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14755$as_echo "$LDVERSION" >&6; }
14756
doko@python.org87421192013-01-26 11:39:31 +010014757
doko@ubuntu.com55532312016-06-14 08:55:19 +020014758if test x$PLATFORM_TRIPLET = x; then
14759 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14760else
14761 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14762fi
doko@python.org87421192013-01-26 11:39:31 +010014763
14764
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014765# Check whether right shifting a negative integer extends the sign bit
14766# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14768$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014769if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014770 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014771else
Martin v. Löwis11437992002-04-12 09:54:03 +000014772
Matthias Kloseb9621712010-04-24 17:59:49 +000014773if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014774 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014775else
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014777/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014778
14779int main()
14780{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014781 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014782}
14783
Martin v. Löwis11437992002-04-12 09:54:03 +000014784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014785if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014786 ac_cv_rshift_extends_sign=yes
14787else
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014792fi
14793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794fi
14795
Matthias Kloseb9621712010-04-24 17:59:49 +000014796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14797$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014798if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014799then
Martin v. Löwis11437992002-04-12 09:54:03 +000014800
Matthias Kloseb9621712010-04-24 17:59:49 +000014801$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014802
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014803fi
14804
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014805# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14807$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014808if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014810else
Martin v. Löwis11437992002-04-12 09:54:03 +000014811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014813/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014814#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014815int
14816main ()
14817{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014818
14819 FILE *f = fopen("/dev/null", "r");
14820 flockfile(f);
14821 getc_unlocked(f);
14822 funlockfile(f);
14823
Martin v. Löwis11437992002-04-12 09:54:03 +000014824 ;
14825 return 0;
14826}
14827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014828if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014829 ac_cv_have_getc_unlocked=yes
14830else
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 ac_cv_have_getc_unlocked=no
14832fi
14833rm -f core conftest.err conftest.$ac_objext \
14834 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14838$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014839if test "$ac_cv_have_getc_unlocked" = yes
14840then
Martin v. Löwis11437992002-04-12 09:54:03 +000014841
Matthias Kloseb9621712010-04-24 17:59:49 +000014842$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014843
14844fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014845
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014846# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014847# save the value of LIBS so we don't actually link Python with readline
14848LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014849
Gregory P. Smith18820942008-09-07 06:24:49 +000014850# On some systems we need to link readline to a termcap compatible
14851# library. NOTE: Keep the precedence of listed libraries synchronised
14852# with setup.py.
14853py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14855$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014856for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014857 if test -z "$py_libtermcap"; then
14858 READLINE_LIBS="-lreadline"
14859 else
14860 READLINE_LIBS="-lreadline -l$py_libtermcap"
14861 fi
14862 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014864/* end confdefs.h. */
14865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866/* Override any GCC internal prototype to avoid an error.
14867 Use char because int might match the return type of a GCC
14868 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014869#ifdef __cplusplus
14870extern "C"
14871#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014872char readline ();
14873int
14874main ()
14875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014877 ;
14878 return 0;
14879}
14880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014881if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014882 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014884rm -f core conftest.err conftest.$ac_objext \
14885 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014886 if test $py_cv_lib_readline = yes; then
14887 break
14888 fi
14889done
14890# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14891#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014892if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14894$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014895else
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14897$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014898
Matthias Kloseb9621712010-04-24 17:59:49 +000014899$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014900
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014901fi
14902
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014903# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14905$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014906if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014907 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014908else
14909 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014910LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014912/* end confdefs.h. */
14913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914/* Override any GCC internal prototype to avoid an error.
14915 Use char because int might match the return type of a GCC
14916 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014917#ifdef __cplusplus
14918extern "C"
14919#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014920char rl_callback_handler_install ();
14921int
14922main ()
14923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014925 ;
14926 return 0;
14927}
14928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014929if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014930 ac_cv_lib_readline_rl_callback_handler_install=yes
14931else
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014934rm -f core conftest.err conftest.$ac_objext \
14935 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014936LIBS=$ac_check_lib_save_LIBS
14937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14939$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014940if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014941
Matthias Kloseb9621712010-04-24 17:59:49 +000014942$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014943
14944fi
14945
14946
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014947# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014949/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014950#include <readline/readline.h>
14951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014952if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014953 have_readline=yes
14954else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014955 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014956
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014957fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014958rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014959if test $have_readline = yes
14960then
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014962/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014963#include <readline/readline.h>
14964
14965_ACEOF
14966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014968
Matthias Kloseb9621712010-04-24 17:59:49 +000014969$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014970
14971fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014972rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014973
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014975/* end confdefs.h. */
14976#include <readline/readline.h>
14977
14978_ACEOF
14979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014981
Matthias Kloseb9621712010-04-24 17:59:49 +000014982$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014983
14984fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014985rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014986
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014987fi
14988
Martin v. Löwis0daad592001-09-30 21:09:59 +000014989# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14991$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014992if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014994else
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014996LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000/* Override any GCC internal prototype to avoid an error.
15001 Use char because int might match the return type of a GCC
15002 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015003#ifdef __cplusplus
15004extern "C"
15005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015006char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015007int
15008main ()
15009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ;
15012 return 0;
15013}
15014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015015if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015017else
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015020rm -f core conftest.err conftest.$ac_objext \
15021 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015022LIBS=$ac_check_lib_save_LIBS
15023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15025$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015026if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015027
Matthias Kloseb9621712010-04-24 17:59:49 +000015028$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015029
Martin v. Löwis0daad592001-09-30 21:09:59 +000015030fi
15031
Michael W. Hudson54241132001-12-07 15:38:26 +000015032
Thomas Wouters89d996e2007-09-08 17:39:28 +000015033# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15035$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015036if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015038else
15039 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015040LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015042/* 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 rl_completion_display_matches_hook ();
15051int
15052main ()
15053{
15054return rl_completion_display_matches_hook ();
15055 ;
15056 return 0;
15057}
15058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015059if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015060 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15061else
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015064rm -f core conftest.err conftest.$ac_objext \
15065 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015066LIBS=$ac_check_lib_save_LIBS
15067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15069$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015070if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015071
Matthias Kloseb9621712010-04-24 17:59:49 +000015072$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015073
15074fi
15075
15076
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015077# also in 4.0, but not in editline
15078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15079$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15080if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15081 $as_echo_n "(cached) " >&6
15082else
15083 ac_check_lib_save_LIBS=$LIBS
15084LIBS="-lreadline $READLINE_LIBS $LIBS"
15085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15086/* end confdefs.h. */
15087
15088/* Override any GCC internal prototype to avoid an error.
15089 Use char because int might match the return type of a GCC
15090 builtin and then its argument prototype would still apply. */
15091#ifdef __cplusplus
15092extern "C"
15093#endif
15094char rl_resize_terminal ();
15095int
15096main ()
15097{
15098return rl_resize_terminal ();
15099 ;
15100 return 0;
15101}
15102_ACEOF
15103if ac_fn_c_try_link "$LINENO"; then :
15104 ac_cv_lib_readline_rl_resize_terminal=yes
15105else
15106 ac_cv_lib_readline_rl_resize_terminal=no
15107fi
15108rm -f core conftest.err conftest.$ac_objext \
15109 conftest$ac_exeext conftest.$ac_ext
15110LIBS=$ac_check_lib_save_LIBS
15111fi
15112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15113$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15114if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15115
15116$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15117
15118fi
15119
15120
Martin v. Löwis0daad592001-09-30 21:09:59 +000015121# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15123$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015124if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015126else
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015128LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132/* Override any GCC internal prototype to avoid an error.
15133 Use char because int might match the return type of a GCC
15134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015135#ifdef __cplusplus
15136extern "C"
15137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015138char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015139int
15140main ()
15141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ;
15144 return 0;
15145}
15146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015149else
Matthias Kloseb9621712010-04-24 17:59:49 +000015150 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015152rm -f core conftest.err conftest.$ac_objext \
15153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015154LIBS=$ac_check_lib_save_LIBS
15155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15157$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015158if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015161
Guido van Rossum353ae582001-07-10 16:45:32 +000015162fi
15163
Jack Jansendd19cf82001-12-06 22:36:17 +000015164
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015165# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015167/* end confdefs.h. */
15168#include <readline/readline.h>
15169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015170if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171 have_readline=yes
15172else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015173 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015174
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015175fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015176rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015177if test $have_readline = yes
15178then
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015180/* end confdefs.h. */
15181#include <readline/readline.h>
15182
15183_ACEOF
15184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015186
Matthias Kloseb9621712010-04-24 17:59:49 +000015187$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015188
15189fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015190rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015191
15192fi
15193
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15195$as_echo_n "checking for append_history in -lreadline... " >&6; }
15196if ${ac_cv_lib_readline_append_history+:} false; then :
15197 $as_echo_n "(cached) " >&6
15198else
15199 ac_check_lib_save_LIBS=$LIBS
15200LIBS="-lreadline $READLINE_LIBS $LIBS"
15201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15202/* end confdefs.h. */
15203
15204/* Override any GCC internal prototype to avoid an error.
15205 Use char because int might match the return type of a GCC
15206 builtin and then its argument prototype would still apply. */
15207#ifdef __cplusplus
15208extern "C"
15209#endif
15210char append_history ();
15211int
15212main ()
15213{
15214return append_history ();
15215 ;
15216 return 0;
15217}
15218_ACEOF
15219if ac_fn_c_try_link "$LINENO"; then :
15220 ac_cv_lib_readline_append_history=yes
15221else
15222 ac_cv_lib_readline_append_history=no
15223fi
15224rm -f core conftest.err conftest.$ac_objext \
15225 conftest$ac_exeext conftest.$ac_ext
15226LIBS=$ac_check_lib_save_LIBS
15227fi
15228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15229$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15230if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15231
15232$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15233
15234fi
15235
15236
Martin v. Löwis82bca632006-02-10 20:49:30 +000015237# End of readline checks: restore LIBS
15238LIBS=$LIBS_no_readline
15239
Matthias Kloseb9621712010-04-24 17:59:49 +000015240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15241$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015242if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015244else
Martin v. Löwis11437992002-04-12 09:54:03 +000015245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015247 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015248else
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015250/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015251
15252int main()
15253{
15254 int val1 = nice(1);
15255 if (val1 != -1 && val1 == nice(2))
15256 exit(0);
15257 exit(1);
15258}
15259
Martin v. Löwis11437992002-04-12 09:54:03 +000015260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015261if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015262 ac_cv_broken_nice=yes
15263else
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15267 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015268fi
15269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015270fi
15271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15273$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015274if test "$ac_cv_broken_nice" = yes
15275then
Martin v. Löwis11437992002-04-12 09:54:03 +000015276
Matthias Kloseb9621712010-04-24 17:59:49 +000015277$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015278
15279fi
15280
Matthias Kloseb9621712010-04-24 17:59:49 +000015281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15282$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015283if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015285else
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015287 ac_cv_broken_poll=no
15288else
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015290/* end confdefs.h. */
15291
15292#include <poll.h>
15293
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015294int main()
15295{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015296 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015297 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015298
15299 close (42);
15300
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015301 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015302 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015303 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015304 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015305 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015306 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015307 return 1;
15308}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015309
15310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015311if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015312 ac_cv_broken_poll=yes
15313else
Matthias Kloseb9621712010-04-24 17:59:49 +000015314 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015320fi
15321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15323$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015324if test "$ac_cv_broken_poll" = yes
15325then
15326
Matthias Kloseb9621712010-04-24 17:59:49 +000015327$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328
15329fi
15330
Brett Cannon43802422005-02-10 20:48:03 +000015331# 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 +000015332# (which is not required by ISO C or UNIX spec) and/or if we support
15333# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015334ac_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 +000015335#include <$ac_cv_struct_tm>
15336
Matthias Kloseb9621712010-04-24 17:59:49 +000015337"
Victor Stinnere0be4232011-10-25 13:06:09 +020015338if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015339
15340cat >>confdefs.h <<_ACEOF
15341#define HAVE_STRUCT_TM_TM_ZONE 1
15342_ACEOF
15343
15344
15345fi
15346
15347if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015350
15351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15353"
Victor Stinnere0be4232011-10-25 13:06:09 +020015354if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356else
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358fi
15359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015361#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362_ACEOF
15363
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15365$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015366if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368else
Matthias Kloseb9621712010-04-24 17:59:49 +000015369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015370/* end confdefs.h. */
15371#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372#if !HAVE_DECL_TZNAME
15373extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015374#endif
15375
15376int
15377main ()
15378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015380 ;
15381 return 0;
15382}
15383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015384if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015385 ac_cv_var_tzname=yes
15386else
Matthias Kloseb9621712010-04-24 17:59:49 +000015387 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015389rm -f core conftest.err conftest.$ac_objext \
15390 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15393$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015394 if test $ac_cv_var_tzname = yes; then
15395
Matthias Kloseb9621712010-04-24 17:59:49 +000015396$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015397
15398 fi
15399fi
15400
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015401
Martin v. Löwis1d459062005-03-14 21:23:33 +000015402# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15404$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015405if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015407else
15408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015410 ac_cv_working_tzset=no
15411else
Matthias Kloseb9621712010-04-24 17:59:49 +000015412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015413/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015414
15415#include <stdlib.h>
15416#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015417#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015418
15419#if HAVE_TZNAME
15420extern char *tzname[];
15421#endif
15422
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015423int main()
15424{
Brett Cannon18367812003-09-19 00:59:16 +000015425 /* Note that we need to ensure that not only does tzset(3)
15426 do 'something' with localtime, but it works as documented
15427 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015428 This includes making sure that tzname is set properly if
15429 tm->tm_zone does not exist since it is the alternative way
15430 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015431
15432 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015433 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015434 */
15435
Martin v. Löwis1d459062005-03-14 21:23:33 +000015436 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015437 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15438
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015439 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015440 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015441 if (localtime(&groundhogday)->tm_hour != 0)
15442 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015443#if HAVE_TZNAME
15444 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15445 if (strcmp(tzname[0], "UTC") ||
15446 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15447 exit(1);
15448#endif
Brett Cannon18367812003-09-19 00:59:16 +000015449
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015450 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015451 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015452 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015453 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015454#if HAVE_TZNAME
15455 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15456 exit(1);
15457#endif
Brett Cannon18367812003-09-19 00:59:16 +000015458
15459 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15460 tzset();
15461 if (localtime(&groundhogday)->tm_hour != 11)
15462 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015463#if HAVE_TZNAME
15464 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15465 exit(1);
15466#endif
15467
15468#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015469 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15470 exit(1);
15471 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15472 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015473#endif
Brett Cannon18367812003-09-19 00:59:16 +000015474
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015475 exit(0);
15476}
15477
15478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015479if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015480 ac_cv_working_tzset=yes
15481else
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015486fi
15487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015488fi
15489
Matthias Kloseb9621712010-04-24 17:59:49 +000015490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15491$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015492if test "$ac_cv_working_tzset" = yes
15493then
15494
Matthias Kloseb9621712010-04-24 17:59:49 +000015495$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015496
15497fi
15498
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015499# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15501$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015502if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015504else
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015506/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015507#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015508int
15509main ()
15510{
15511
15512struct stat st;
15513st.st_mtim.tv_nsec = 1;
15514
15515 ;
15516 return 0;
15517}
15518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015520 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015521else
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15525fi
15526
Matthias Kloseb9621712010-04-24 17:59:49 +000015527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15528$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015529if test "$ac_cv_stat_tv_nsec" = yes
15530then
15531
Matthias Kloseb9621712010-04-24 17:59:49 +000015532$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015533
15534fi
15535
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015536# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15538$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015539if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015541else
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015543/* end confdefs.h. */
15544#include <sys/stat.h>
15545int
15546main ()
15547{
15548
15549struct stat st;
15550st.st_mtimespec.tv_nsec = 1;
15551
15552 ;
15553 return 0;
15554}
15555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015557 ac_cv_stat_tv_nsec2=yes
15558else
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15562fi
15563
Matthias Kloseb9621712010-04-24 17:59:49 +000015564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15565$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015566if test "$ac_cv_stat_tv_nsec2" = yes
15567then
15568
Matthias Kloseb9621712010-04-24 17:59:49 +000015569$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015570
15571fi
15572
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015573# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015574ac_save_cppflags="$CPPFLAGS"
15575CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015576
15577for ac_header in curses.h ncurses.h
15578do :
15579 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15580ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15581if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15582 cat >>confdefs.h <<_ACEOF
15583#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15584_ACEOF
15585
15586fi
15587
15588done
15589
15590
15591# On Solaris, term.h requires curses.h
15592for ac_header in term.h
15593do :
15594 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15595#ifdef HAVE_CURSES_H
15596#include <curses.h>
15597#endif
15598
15599"
15600if test "x$ac_cv_header_term_h" = xyes; then :
15601 cat >>confdefs.h <<_ACEOF
15602#define HAVE_TERM_H 1
15603_ACEOF
15604
15605fi
15606
15607done
15608
15609
Jack Jansen666b1e72001-10-31 12:11:48 +000015610# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15612$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015613if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015615else
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015617/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015618#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015619int
15620main ()
15621{
Jack Jansen666b1e72001-10-31 12:11:48 +000015622
15623 int rtn;
15624 rtn = mvwdelch(0,0,0);
15625
Martin v. Löwis11437992002-04-12 09:54:03 +000015626 ;
15627 return 0;
15628}
15629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015630if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015631 ac_cv_mvwdelch_is_expression=yes
15632else
Matthias Kloseb9621712010-04-24 17:59:49 +000015633 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15636fi
15637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15639$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015640
15641if test "$ac_cv_mvwdelch_is_expression" = yes
15642then
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015645
15646fi
15647
Matthias Kloseb9621712010-04-24 17:59:49 +000015648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15649$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015650if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015652else
Matthias Kloseb9621712010-04-24 17:59:49 +000015653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015654/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015655#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015656int
15657main ()
15658{
Jack Jansen666b1e72001-10-31 12:11:48 +000015659
15660 WINDOW *w;
15661 w->_flags = 0;
15662
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 ;
15664 return 0;
15665}
15666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015667if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015668 ac_cv_window_has_flags=yes
15669else
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15673fi
15674
Matthias Kloseb9621712010-04-24 17:59:49 +000015675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15676$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015677
Jack Jansen666b1e72001-10-31 12:11:48 +000015678
15679if test "$ac_cv_window_has_flags" = yes
15680then
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
Matthias Kloseb9621712010-04-24 17:59:49 +000015682$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015683
15684fi
15685
Matthias Kloseb9621712010-04-24 17:59:49 +000015686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15687$as_echo_n "checking for is_term_resized... " >&6; }
15688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015689/* end confdefs.h. */
15690#include <curses.h>
15691int
15692main ()
15693{
15694void *x=is_term_resized
15695 ;
15696 return 0;
15697}
15698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015699if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015700
Matthias Kloseb9621712010-04-24 17:59:49 +000015701$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015702
Matthias Kloseb159a552010-04-25 21:00:44 +000015703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015704$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015705else
Matthias Kloseb9621712010-04-24 17:59:49 +000015706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15707$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015708
15709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15711
Matthias Kloseb9621712010-04-24 17:59:49 +000015712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15713$as_echo_n "checking for resize_term... " >&6; }
15714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015715/* end confdefs.h. */
15716#include <curses.h>
15717int
15718main ()
15719{
15720void *x=resize_term
15721 ;
15722 return 0;
15723}
15724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015725if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015726
Matthias Kloseb9621712010-04-24 17:59:49 +000015727$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015728
Matthias Kloseb159a552010-04-25 21:00:44 +000015729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015730$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015731else
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15733$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015734
15735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15737
Matthias Kloseb9621712010-04-24 17:59:49 +000015738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15739$as_echo_n "checking for resizeterm... " >&6; }
15740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015741/* end confdefs.h. */
15742#include <curses.h>
15743int
15744main ()
15745{
15746void *x=resizeterm
15747 ;
15748 return 0;
15749}
15750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015751if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015752
Matthias Kloseb9621712010-04-24 17:59:49 +000015753$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015754
Matthias Kloseb159a552010-04-25 21:00:44 +000015755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015756$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015757else
Matthias Kloseb9621712010-04-24 17:59:49 +000015758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15759$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015760
15761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015763# last curses configure check
15764CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15767$as_echo "$as_me: checking for device files" >&6;}
15768
15769if test "x$cross_compiling" = xyes; then
15770 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15772$as_echo_n "checking for /dev/ptmx... " >&6; }
15773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15774$as_echo "not set" >&6; }
15775 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15776 fi
15777 if test "${ac_cv_file__dev_ptc+set}" != set; then
15778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15779$as_echo_n "checking for /dev/ptc... " >&6; }
15780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15781$as_echo "not set" >&6; }
15782 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15783 fi
15784fi
15785
Matthias Kloseb9621712010-04-24 17:59:49 +000015786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15787$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015788if ${ac_cv_file__dev_ptmx+:} false; then :
15789 $as_echo_n "(cached) " >&6
15790else
15791 test "$cross_compiling" = yes &&
15792 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15793if test -r "/dev/ptmx"; then
15794 ac_cv_file__dev_ptmx=yes
15795else
15796 ac_cv_file__dev_ptmx=no
15797fi
15798fi
15799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15800$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15801if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015802
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015803fi
15804
15805if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015806
Matthias Kloseb9621712010-04-24 17:59:49 +000015807$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015808
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15811$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015812if ${ac_cv_file__dev_ptc+:} false; then :
15813 $as_echo_n "(cached) " >&6
15814else
15815 test "$cross_compiling" = yes &&
15816 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15817if test -r "/dev/ptc"; then
15818 ac_cv_file__dev_ptc=yes
15819else
15820 ac_cv_file__dev_ptc=no
15821fi
15822fi
15823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15824$as_echo "$ac_cv_file__dev_ptc" >&6; }
15825if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015826
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015827fi
15828
15829if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015832
Neal Norwitz865400f2003-03-21 01:42:58 +000015833fi
15834
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015835if test $ac_sys_system = Darwin
15836then
15837 LIBS="$LIBS -framework CoreFoundation"
15838fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015839
Matthias Kloseb9621712010-04-24 17:59:49 +000015840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15841$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015842if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015843 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015844else
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015846 ac_cv_have_size_t_format="cross -- assuming yes"
15847
Thomas Wouters477c8d52006-05-27 19:21:47 +000015848else
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015850/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015851
Thomas Wouters477c8d52006-05-27 19:21:47 +000015852#include <stdio.h>
15853#include <stddef.h>
15854#include <string.h>
15855
Christian Heimes2c181612007-12-17 20:04:13 +000015856#ifdef HAVE_SYS_TYPES_H
15857#include <sys/types.h>
15858#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015859
15860#ifdef HAVE_SSIZE_T
15861typedef ssize_t Py_ssize_t;
15862#elif SIZEOF_VOID_P == SIZEOF_LONG
15863typedef long Py_ssize_t;
15864#else
15865typedef int Py_ssize_t;
15866#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015867
Christian Heimes2c181612007-12-17 20:04:13 +000015868int main()
15869{
15870 char buffer[256];
15871
Thomas Wouters477c8d52006-05-27 19:21:47 +000015872 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15873 return 1;
15874
Thomas Wouters89f507f2006-12-13 04:49:30 +000015875 if (strcmp(buffer, "123"))
15876 return 1;
15877
15878 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15879 return 1;
15880
15881 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015882 return 1;
15883
15884 return 0;
15885}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015886
Thomas Wouters477c8d52006-05-27 19:21:47 +000015887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015888if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015889 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015890else
Matthias Kloseb9621712010-04-24 17:59:49 +000015891 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15894 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015895fi
15896
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15899$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015900if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015901
Matthias Kloseb9621712010-04-24 17:59:49 +000015902$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015903
15904fi
15905
Matthias Kloseb9621712010-04-24 17:59:49 +000015906ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015907#ifdef HAVE_SYS_TYPES_H
15908#include <sys/types.h>
15909#endif
15910#ifdef HAVE_SYS_SOCKET_H
15911#include <sys/socket.h>
15912#endif
15913
Matthias Kloseb9621712010-04-24 17:59:49 +000015914"
Victor Stinnere0be4232011-10-25 13:06:09 +020015915if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015916
Martin v. Löwis11437992002-04-12 09:54:03 +000015917else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015918
Matthias Kloseb9621712010-04-24 17:59:49 +000015919$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015920
15921fi
15922
Michael W. Hudson54241132001-12-07 15:38:26 +000015923
Matthias Kloseb9621712010-04-24 17:59:49 +000015924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15925$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015926if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015927 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015928else
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015930 ac_cv_broken_mbstowcs=no
15931else
Matthias Kloseb9621712010-04-24 17:59:49 +000015932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015933/* end confdefs.h. */
15934
Stefan Krah19c21392012-11-22 23:47:32 +010015935#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015936#include<stdlib.h>
15937int main() {
15938 size_t len = -1;
15939 const char *str = "text";
15940 len = mbstowcs(NULL, str, 0);
15941 return (len != 4);
15942}
15943
15944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015945if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015946 ac_cv_broken_mbstowcs=no
15947else
Matthias Kloseb9621712010-04-24 17:59:49 +000015948 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015952fi
15953
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015954fi
15955
Matthias Kloseb9621712010-04-24 17:59:49 +000015956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15957$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015958if test "$ac_cv_broken_mbstowcs" = yes
15959then
15960
Matthias Kloseb9621712010-04-24 17:59:49 +000015961$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015962
15963fi
15964
Antoine Pitroub52ec782009-01-25 16:34:23 +000015965# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15967$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015968
15969# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015970if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015971 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015972if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015973then
15974
Matthias Kloseb9621712010-04-24 17:59:49 +000015975$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015976
Matthias Kloseb9621712010-04-24 17:59:49 +000015977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15978$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015979fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015980if test "$withval" = no
15981then
15982
15983$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15984
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15986$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015987fi
15988
Antoine Pitrou042b1282010-08-13 21:15:58 +000015989else
15990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15991$as_echo "no value specified" >&6; }
15992fi
15993
Antoine Pitroub52ec782009-01-25 16:34:23 +000015994
Matthias Kloseb17289e2012-03-15 19:51:34 +010015995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15996$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15997if ${ac_cv_computed_gotos+:} false; then :
15998 $as_echo_n "(cached) " >&6
15999else
16000 if test "$cross_compiling" = yes; then :
16001 if test "${with_computed_gotos+set}" = set; then
16002 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16003 else
16004 ac_cv_computed_gotos=no
16005 fi
16006else
16007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16008/* end confdefs.h. */
16009
16010int main(int argc, char **argv)
16011{
16012 static void *targets[1] = { &&LABEL1 };
16013 goto LABEL2;
16014LABEL1:
16015 return 0;
16016LABEL2:
16017 goto *targets[0];
16018 return 1;
16019}
16020
16021_ACEOF
16022if ac_fn_c_try_run "$LINENO"; then :
16023 ac_cv_computed_gotos=yes
16024else
16025 ac_cv_computed_gotos=no
16026fi
16027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16028 conftest.$ac_objext conftest.beam conftest.$ac_ext
16029fi
16030
16031fi
16032
16033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16034$as_echo "$ac_cv_computed_gotos" >&6; }
16035case "$ac_cv_computed_gotos" in yes*)
16036
16037$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16038
16039esac
16040
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016041case $ac_sys_system in
16042AIX*)
16043
16044$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16045 ;;
16046esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016047
Michael W. Hudson54241132001-12-07 15:38:26 +000016048
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016049
16050
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016051for h in `(cd $srcdir;echo Python/thread_*.h)`
16052do
16053 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16054done
16055
Michael W. Hudson54241132001-12-07 15:38:26 +000016056
Ned Deily0db50cf2014-07-25 12:41:31 -070016057SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16059$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016060for dir in $SRCDIRS; do
16061 if test ! -d $dir; then
16062 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016063 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016064done
Matthias Kloseb9621712010-04-24 17:59:49 +000016065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16066$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016067
Stefan Krah1919b7e2012-03-21 18:25:23 +010016068# Availability of -O2:
16069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16070$as_echo_n "checking for -O2... " >&6; }
16071saved_cflags="$CFLAGS"
16072CFLAGS="-O2"
16073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16074/* end confdefs.h. */
16075
16076int
16077main ()
16078{
16079
16080
16081 ;
16082 return 0;
16083}
16084_ACEOF
16085if ac_fn_c_try_compile "$LINENO"; then :
16086 have_O2=yes
16087else
16088 have_O2=no
16089fi
16090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16092$as_echo "$have_O2" >&6; }
16093CFLAGS="$saved_cflags"
16094
16095# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16096# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16098$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16099saved_cflags="$CFLAGS"
16100CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16101if test "$have_O2" = no; then
16102 CFLAGS=""
16103fi
16104if test "$cross_compiling" = yes; then :
16105 have_glibc_memmove_bug=undefined
16106else
16107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16108/* end confdefs.h. */
16109
16110#include <stdio.h>
16111#include <stdlib.h>
16112#include <string.h>
16113void foo(void *p, void *q) { memmove(p, q, 19); }
16114int main() {
16115 char a[32] = "123456789000000000";
16116 foo(&a[9], a);
16117 if (strcmp(a, "123456789123456789000000000") != 0)
16118 return 1;
16119 foo(a, &a[9]);
16120 if (strcmp(a, "123456789000000000") != 0)
16121 return 1;
16122 return 0;
16123}
16124
16125_ACEOF
16126if ac_fn_c_try_run "$LINENO"; then :
16127 have_glibc_memmove_bug=no
16128else
16129 have_glibc_memmove_bug=yes
16130fi
16131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16132 conftest.$ac_objext conftest.beam conftest.$ac_ext
16133fi
16134
16135CFLAGS="$saved_cflags"
16136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16137$as_echo "$have_glibc_memmove_bug" >&6; }
16138if test "$have_glibc_memmove_bug" = yes; then
16139
16140$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16141
16142fi
16143
16144if test "$have_gcc_asm_for_x87" = yes; then
16145 # Some versions of gcc miscompile inline asm:
16146 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16147 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16148 case $CC in
16149 *gcc*)
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16151$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16152 saved_cflags="$CFLAGS"
16153 CFLAGS="-O2"
16154 if test "$cross_compiling" = yes; then :
16155 have_ipa_pure_const_bug=undefined
16156else
16157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16158/* end confdefs.h. */
16159
16160 __attribute__((noinline)) int
16161 foo(int *p) {
16162 int r;
16163 asm ( "movl \$6, (%1)\n\t"
16164 "xorl %0, %0\n\t"
16165 : "=r" (r) : "r" (p) : "memory"
16166 );
16167 return r;
16168 }
16169 int main() {
16170 int p = 8;
16171 if ((foo(&p) ? : p) != 6)
16172 return 1;
16173 return 0;
16174 }
16175
16176_ACEOF
16177if ac_fn_c_try_run "$LINENO"; then :
16178 have_ipa_pure_const_bug=no
16179else
16180 have_ipa_pure_const_bug=yes
16181fi
16182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16183 conftest.$ac_objext conftest.beam conftest.$ac_ext
16184fi
16185
16186 CFLAGS="$saved_cflags"
16187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16188$as_echo "$have_ipa_pure_const_bug" >&6; }
16189 if test "$have_ipa_pure_const_bug" = yes; then
16190
16191$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16192
16193 fi
16194 ;;
16195 esac
16196fi
16197
Victor Stinner4f5366e2015-01-09 02:13:19 +010016198# Check for stdatomic.h
16199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16200$as_echo_n "checking for stdatomic.h... " >&6; }
16201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16202/* end confdefs.h. */
16203
16204
16205 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016206 atomic_int value = ATOMIC_VAR_INIT(1);
16207 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016208 int main() {
16209 int loaded_value = atomic_load(&value);
16210 return 0;
16211 }
16212
16213
16214_ACEOF
16215if ac_fn_c_try_link "$LINENO"; then :
16216 have_stdatomic_h=yes
16217else
16218 have_stdatomic_h=no
16219fi
16220rm -f core conftest.err conftest.$ac_objext \
16221 conftest$ac_exeext conftest.$ac_ext
16222
16223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16224$as_echo "$have_stdatomic_h" >&6; }
16225
16226if test "$have_stdatomic_h" = yes; then
16227
16228$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16229
16230fi
16231
16232# Check for GCC >= 4.7 __atomic builtins
16233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16234$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16236/* end confdefs.h. */
16237
16238
16239 volatile int val = 1;
16240 int main() {
16241 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16242 return 0;
16243 }
16244
16245
16246_ACEOF
16247if ac_fn_c_try_link "$LINENO"; then :
16248 have_builtin_atomic=yes
16249else
16250 have_builtin_atomic=no
16251fi
16252rm -f core conftest.err conftest.$ac_objext \
16253 conftest$ac_exeext conftest.$ac_ext
16254
16255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16256$as_echo "$have_builtin_atomic" >&6; }
16257
16258if test "$have_builtin_atomic" = yes; then
16259
16260$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16261
16262fi
16263
Ned Deily322f5ba2013-11-21 23:01:59 -080016264# ensurepip option
16265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16266$as_echo_n "checking for ensurepip... " >&6; }
16267
16268# Check whether --with-ensurepip was given.
16269if test "${with_ensurepip+set}" = set; then :
16270 withval=$with_ensurepip;
16271else
16272 with_ensurepip=upgrade
16273fi
16274
16275case $with_ensurepip in #(
16276 yes|upgrade) :
16277 ENSUREPIP=upgrade ;; #(
16278 install) :
16279 ENSUREPIP=install ;; #(
16280 no) :
16281 ENSUREPIP=no ;; #(
16282 *) :
16283 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16284esac
16285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16286$as_echo "$ENSUREPIP" >&6; }
16287
16288
Victor Stinner35a97c02015-03-08 02:59:09 +010016289# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16291$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16293/* end confdefs.h. */
16294
16295
16296 #include <dirent.h>
16297
16298 int main() {
16299 struct dirent entry;
16300 return entry.d_type == DT_UNKNOWN;
16301 }
16302
16303
16304_ACEOF
16305if ac_fn_c_try_link "$LINENO"; then :
16306 have_dirent_d_type=yes
16307else
16308 have_dirent_d_type=no
16309fi
16310rm -f core conftest.err conftest.$ac_objext \
16311 conftest$ac_exeext conftest.$ac_ext
16312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16313$as_echo "$have_dirent_d_type" >&6; }
16314
16315if test "$have_dirent_d_type" = yes; then
16316
16317$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16318
16319fi
16320
Victor Stinner9eb57c52015-03-19 22:21:49 +010016321# check if the Linux getrandom() syscall is available
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16323$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16325/* end confdefs.h. */
16326
16327
Victor Stinner1b80b242016-04-12 22:34:58 +020016328 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016329 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016330 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016331
16332 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016333 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016334 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016335 const int flags = GRND_NONBLOCK;
16336 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016337 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016338 return 0;
16339 }
16340
16341
16342_ACEOF
16343if ac_fn_c_try_link "$LINENO"; then :
16344 have_getrandom_syscall=yes
16345else
16346 have_getrandom_syscall=no
16347fi
16348rm -f core conftest.err conftest.$ac_objext \
16349 conftest$ac_exeext conftest.$ac_ext
16350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16351$as_echo "$have_getrandom_syscall" >&6; }
16352
16353if test "$have_getrandom_syscall" = yes; then
16354
16355$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16356
16357fi
16358
Victor Stinner3abf44e2015-09-18 15:38:37 +020016359# check if the getrandom() function is available
16360# the test was written for the Solaris function of <sys/random.h>
16361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16362$as_echo_n "checking for the getrandom() function... " >&6; }
16363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16364/* end confdefs.h. */
16365
16366
16367 #include <sys/random.h>
16368
16369 int main() {
16370 char buffer[1];
16371 const size_t buflen = sizeof(buffer);
16372 const int flags = 0;
16373 /* ignore the result, Python checks for ENOSYS at runtime */
16374 (void)getrandom(buffer, buflen, flags);
16375 return 0;
16376 }
16377
16378
16379_ACEOF
16380if ac_fn_c_try_link "$LINENO"; then :
16381 have_getrandom=yes
16382else
16383 have_getrandom=no
16384fi
16385rm -f core conftest.err conftest.$ac_objext \
16386 conftest$ac_exeext conftest.$ac_ext
16387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16388$as_echo "$have_getrandom" >&6; }
16389
16390if test "$have_getrandom" = yes; then
16391
16392$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16393
16394fi
16395
Guido van Rossum627b2d71993-12-24 10:39:16 +000016396# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016397ac_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 +000016398
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016399ac_config_files="$ac_config_files Modules/ld_so_aix"
16400
Martin v. Löwis11437992002-04-12 09:54:03 +000016401cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016402# This file is a shell script that caches the results of configure
16403# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016404# scripts and configure runs, see configure's option --config-cache.
16405# It is not useful on other systems. If it contains results you don't
16406# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016407#
Martin v. Löwis11437992002-04-12 09:54:03 +000016408# config.status only pays attention to the cache file if you give it
16409# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016410#
Skip Montanaro6dead952003-09-25 14:50:04 +000016411# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016412# loading this file, other *unset* `ac_cv_foo' will be assigned the
16413# following values.
16414
16415_ACEOF
16416
Guido van Rossumf78abae1997-01-21 22:02:36 +000016417# The following way of writing the cache mishandles newlines in values,
16418# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016420# Ultrix sh set writes to stderr and can't be redirected directly,
16421# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016422(
16423 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16424 eval ac_val=\$$ac_var
16425 case $ac_val in #(
16426 *${as_nl}*)
16427 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016428 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16429$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430 esac
16431 case $ac_var in #(
16432 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016433 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16434 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016435 esac ;;
16436 esac
16437 done
16438
Martin v. Löwis11437992002-04-12 09:54:03 +000016439 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016440 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16441 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016442 # `set' does not quote correctly, so add quotes: double-quote
16443 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016445 "s/'/'\\\\''/g;
16446 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016448 *)
16449 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452 esac |
16453 sort
16454) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016455 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016456 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016457 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016458 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016459 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16460 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016461 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16462 :end' >>confcache
16463if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16464 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016465 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016466 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16467$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016468 if test ! -f "$cache_file" || test -h "$cache_file"; then
16469 cat confcache >"$cache_file"
16470 else
16471 case $cache_file in #(
16472 */* | ?:*)
16473 mv -f confcache "$cache_file"$$ &&
16474 mv -f "$cache_file"$$ "$cache_file" ;; #(
16475 *)
16476 mv -f confcache "$cache_file" ;;
16477 esac
16478 fi
16479 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016480 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016481 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16482$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016483 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016484fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016485rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016486
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016487test "x$prefix" = xNONE && prefix=$ac_default_prefix
16488# Let make expand exec_prefix.
16489test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016490
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016491DEFS=-DHAVE_CONFIG_H
16492
Skip Montanaro6dead952003-09-25 14:50:04 +000016493ac_libobjs=
16494ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016495U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016496for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16497 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016498 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016499 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016500 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16501 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016502 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16503 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016504done
16505LIBOBJS=$ac_libobjs
16506
16507LTLIBOBJS=$ac_ltlibobjs
16508
16509
Martin v. Löwis11437992002-04-12 09:54:03 +000016510
Matthias Kloseb9621712010-04-24 17:59:49 +000016511
Victor Stinnere0be4232011-10-25 13:06:09 +020016512: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016513ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016514ac_clean_files_save=$ac_clean_files
16515ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016516{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16517$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16518as_write_fail=0
16519cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016520#! $SHELL
16521# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016522# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016523# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016524# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016525
Martin v. Löwis11437992002-04-12 09:54:03 +000016526debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016527ac_cs_recheck=false
16528ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016529
Matthias Kloseb9621712010-04-24 17:59:49 +000016530SHELL=\${CONFIG_SHELL-$SHELL}
16531export SHELL
16532_ASEOF
16533cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16534## -------------------- ##
16535## M4sh Initialization. ##
16536## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538# Be more Bourne compatible
16539DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016540if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016541 emulate sh
16542 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016543 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016544 # is contrary to our usage. Disable this feature.
16545 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016547else
Matthias Kloseb9621712010-04-24 17:59:49 +000016548 case `(set -o) 2>/dev/null` in #(
16549 *posix*) :
16550 set -o posix ;; #(
16551 *) :
16552 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016554fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016555
16556
Matthias Kloseb9621712010-04-24 17:59:49 +000016557as_nl='
16558'
16559export as_nl
16560# Printing a long string crashes Solaris 7 /usr/bin/printf.
16561as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16562as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16563as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16564# Prefer a ksh shell builtin over an external printf program on Solaris,
16565# but without wasting forks for bash or zsh.
16566if test -z "$BASH_VERSION$ZSH_VERSION" \
16567 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16568 as_echo='print -r --'
16569 as_echo_n='print -rn --'
16570elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16571 as_echo='printf %s\n'
16572 as_echo_n='printf %s'
16573else
16574 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16575 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16576 as_echo_n='/usr/ucb/echo -n'
16577 else
16578 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16579 as_echo_n_body='eval
16580 arg=$1;
16581 case $arg in #(
16582 *"$as_nl"*)
16583 expr "X$arg" : "X\\(.*\\)$as_nl";
16584 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16585 esac;
16586 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16587 '
16588 export as_echo_n_body
16589 as_echo_n='sh -c $as_echo_n_body as_echo'
16590 fi
16591 export as_echo_body
16592 as_echo='sh -c $as_echo_body as_echo'
16593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016594
16595# The user is always right.
16596if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016597 PATH_SEPARATOR=:
16598 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16599 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16600 PATH_SEPARATOR=';'
16601 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604
16605# IFS
16606# We need space, tab and new line, in precisely that order. Quoting is
16607# there to prevent editors from complaining about space-tab.
16608# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16609# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610IFS=" "" $as_nl"
16611
16612# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016613as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016614case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615 *[\\/]* ) as_myself=$0 ;;
16616 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016617for as_dir in $PATH
16618do
16619 IFS=$as_save_IFS
16620 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016621 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16622 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625 ;;
16626esac
16627# We did not find ourselves, most probably we were run as `sh COMMAND'
16628# in which case we are not to be found in the path.
16629if test "x$as_myself" = x; then
16630 as_myself=$0
16631fi
16632if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016633 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16634 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016635fi
16636
Matthias Kloseb9621712010-04-24 17:59:49 +000016637# Unset variables that we do not need and which cause bugs (e.g. in
16638# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16639# suppresses any "Segmentation fault" message there. '((' could
16640# trigger a bug in pdksh 5.2.14.
16641for as_var in BASH_ENV ENV MAIL MAILPATH
16642do eval test x\${$as_var+set} = xset \
16643 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644done
16645PS1='$ '
16646PS2='> '
16647PS4='+ '
16648
16649# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016650LC_ALL=C
16651export LC_ALL
16652LANGUAGE=C
16653export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654
Matthias Kloseb9621712010-04-24 17:59:49 +000016655# CDPATH.
16656(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16657
16658
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016659# as_fn_error STATUS ERROR [LINENO LOG_FD]
16660# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016661# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16662# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016663# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016664as_fn_error ()
16665{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016666 as_status=$1; test $as_status -eq 0 && as_status=1
16667 if test "$4"; then
16668 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16669 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016670 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016671 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016672 as_fn_exit $as_status
16673} # as_fn_error
16674
16675
16676# as_fn_set_status STATUS
16677# -----------------------
16678# Set $? to STATUS, without forking.
16679as_fn_set_status ()
16680{
16681 return $1
16682} # as_fn_set_status
16683
16684# as_fn_exit STATUS
16685# -----------------
16686# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16687as_fn_exit ()
16688{
16689 set +e
16690 as_fn_set_status $1
16691 exit $1
16692} # as_fn_exit
16693
16694# as_fn_unset VAR
16695# ---------------
16696# Portably unset VAR.
16697as_fn_unset ()
16698{
16699 { eval $1=; unset $1;}
16700}
16701as_unset=as_fn_unset
16702# as_fn_append VAR VALUE
16703# ----------------------
16704# Append the text in VALUE to the end of the definition contained in VAR. Take
16705# advantage of any shell optimizations that allow amortized linear growth over
16706# repeated appends, instead of the typical quadratic growth present in naive
16707# implementations.
16708if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16709 eval 'as_fn_append ()
16710 {
16711 eval $1+=\$2
16712 }'
16713else
16714 as_fn_append ()
16715 {
16716 eval $1=\$$1\$2
16717 }
16718fi # as_fn_append
16719
16720# as_fn_arith ARG...
16721# ------------------
16722# Perform arithmetic evaluation on the ARGs, and store the result in the
16723# global $as_val. Take advantage of shells that can avoid forks. The arguments
16724# must be portable across $(()) and expr.
16725if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16726 eval 'as_fn_arith ()
16727 {
16728 as_val=$(( $* ))
16729 }'
16730else
16731 as_fn_arith ()
16732 {
16733 as_val=`expr "$@" || test $? -eq 1`
16734 }
16735fi # as_fn_arith
16736
16737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738if expr a : '\(a\)' >/dev/null 2>&1 &&
16739 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16740 as_expr=expr
16741else
16742 as_expr=false
16743fi
16744
16745if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16746 as_basename=basename
16747else
16748 as_basename=false
16749fi
16750
Matthias Kloseb9621712010-04-24 17:59:49 +000016751if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16752 as_dirname=dirname
16753else
16754 as_dirname=false
16755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757as_me=`$as_basename -- "$0" ||
16758$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16759 X"$0" : 'X\(//\)$' \| \
16760 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016761$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762 sed '/^.*\/\([^/][^/]*\)\/*$/{
16763 s//\1/
16764 q
16765 }
16766 /^X\/\(\/\/\)$/{
16767 s//\1/
16768 q
16769 }
16770 /^X\/\(\/\).*/{
16771 s//\1/
16772 q
16773 }
16774 s/.*/./; q'`
16775
Matthias Kloseb9621712010-04-24 17:59:49 +000016776# Avoid depending upon Character Ranges.
16777as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16778as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16779as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16780as_cr_digits='0123456789'
16781as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016782
16783ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016784case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016785-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016786 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016788 xy) ECHO_C='\c';;
16789 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16790 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791 esac;;
16792*)
16793 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016794esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016795
Martin v. Löwis11437992002-04-12 09:54:03 +000016796rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016797if test -d conf$$.dir; then
16798 rm -f conf$$.dir/conf$$.file
16799else
16800 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016801 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016803if (echo >conf$$.file) 2>/dev/null; then
16804 if ln -s conf$$.file conf$$ 2>/dev/null; then
16805 as_ln_s='ln -s'
16806 # ... but there are two gotchas:
16807 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16808 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016809 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016810 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016811 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016812 elif ln conf$$.file conf$$ 2>/dev/null; then
16813 as_ln_s=ln
16814 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016815 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016816 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016817else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016818 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016820rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16821rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016822
Matthias Kloseb9621712010-04-24 17:59:49 +000016823
16824# as_fn_mkdir_p
16825# -------------
16826# Create "$as_dir" as a directory, including parents if necessary.
16827as_fn_mkdir_p ()
16828{
16829
16830 case $as_dir in #(
16831 -*) as_dir=./$as_dir;;
16832 esac
16833 test -d "$as_dir" || eval $as_mkdir_p || {
16834 as_dirs=
16835 while :; do
16836 case $as_dir in #(
16837 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16838 *) as_qdir=$as_dir;;
16839 esac
16840 as_dirs="'$as_qdir' $as_dirs"
16841 as_dir=`$as_dirname -- "$as_dir" ||
16842$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16843 X"$as_dir" : 'X\(//\)[^/]' \| \
16844 X"$as_dir" : 'X\(//\)$' \| \
16845 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16846$as_echo X"$as_dir" |
16847 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16848 s//\1/
16849 q
16850 }
16851 /^X\(\/\/\)[^/].*/{
16852 s//\1/
16853 q
16854 }
16855 /^X\(\/\/\)$/{
16856 s//\1/
16857 q
16858 }
16859 /^X\(\/\).*/{
16860 s//\1/
16861 q
16862 }
16863 s/.*/./; q'`
16864 test -d "$as_dir" && break
16865 done
16866 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016867 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016868
16869
16870} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016871if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016872 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016873else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016874 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016875 as_mkdir_p=false
16876fi
16877
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016878
16879# as_fn_executable_p FILE
16880# -----------------------
16881# Test if FILE is an executable regular file.
16882as_fn_executable_p ()
16883{
16884 test -f "$1" && test -x "$1"
16885} # as_fn_executable_p
16886as_test_x='test -x'
16887as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016888
16889# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016890as_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 +000016891
16892# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016893as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016894
16895
Martin v. Löwis11437992002-04-12 09:54:03 +000016896exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016897## ----------------------------------- ##
16898## Main body of $CONFIG_STATUS script. ##
16899## ----------------------------------- ##
16900_ASEOF
16901test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016902
Matthias Kloseb9621712010-04-24 17:59:49 +000016903cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16904# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016905# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016906# values after options handling.
16907ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016908This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016909generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016910
16911 CONFIG_FILES = $CONFIG_FILES
16912 CONFIG_HEADERS = $CONFIG_HEADERS
16913 CONFIG_LINKS = $CONFIG_LINKS
16914 CONFIG_COMMANDS = $CONFIG_COMMANDS
16915 $ $0 $@
16916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917on `(hostname || uname -n) 2>/dev/null | sed 1q`
16918"
16919
Martin v. Löwis11437992002-04-12 09:54:03 +000016920_ACEOF
16921
Matthias Kloseb9621712010-04-24 17:59:49 +000016922case $ac_config_files in *"
16923"*) set x $ac_config_files; shift; ac_config_files=$*;;
16924esac
16925
16926case $ac_config_headers in *"
16927"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16928esac
16929
16930
16931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016932# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016933config_files="$ac_config_files"
16934config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016936_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016937
Matthias Kloseb9621712010-04-24 17:59:49 +000016938cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016939ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016940\`$as_me' instantiates files and other configuration actions
16941from templates according to the current configuration. Unless the files
16942and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016943
Matthias Kloseb9621712010-04-24 17:59:49 +000016944Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016945
16946 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016947 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016948 --config print configuration, then exit
16949 -q, --quiet, --silent
16950 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016951 -d, --debug don't remove temporary files
16952 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016953 --file=FILE[:TEMPLATE]
16954 instantiate the configuration file FILE
16955 --header=FILE[:TEMPLATE]
16956 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016957
16958Configuration files:
16959$config_files
16960
16961Configuration headers:
16962$config_headers
16963
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016964Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016967cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16968ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016969ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016970python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016971configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016972 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016973
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016974Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016975This config.status script is free software; the Free Software Foundation
16976gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016977
16978ac_pwd='$ac_pwd'
16979srcdir='$srcdir'
16980INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016981MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016982test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016983_ACEOF
16984
Matthias Kloseb9621712010-04-24 17:59:49 +000016985cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16986# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016987ac_need_defaults=:
16988while test $# != 0
16989do
16990 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016991 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016992 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16993 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016994 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016995 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016996 --*=)
16997 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16998 ac_optarg=
16999 ac_shift=:
17000 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017001 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017002 ac_option=$1
17003 ac_optarg=$2
17004 ac_shift=shift
17005 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017006 esac
17007
Skip Montanaro6dead952003-09-25 14:50:04 +000017008 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017010 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17011 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017012 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017013 $as_echo "$ac_cs_version"; exit ;;
17014 --config | --confi | --conf | --con | --co | --c )
17015 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017017 debug=: ;;
17018 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017019 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017020 case $ac_optarg in
17021 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017022 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017023 esac
17024 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017025 ac_need_defaults=false;;
17026 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017027 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017028 case $ac_optarg in
17029 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17030 esac
17031 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017032 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033 --he | --h)
17034 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017035 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017036Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017038 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017039 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17040 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17041 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017042
17043 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017044 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017045Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017046
Matthias Kloseb9621712010-04-24 17:59:49 +000017047 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017049
17050 esac
17051 shift
17052done
17053
Skip Montanaro6dead952003-09-25 14:50:04 +000017054ac_configure_extra_args=
17055
17056if $ac_cs_silent; then
17057 exec 6>/dev/null
17058 ac_configure_extra_args="$ac_configure_extra_args --silent"
17059fi
17060
17061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017063if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017064 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017065 shift
17066 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17067 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017069 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017070fi
17071
Martin v. Löwis11437992002-04-12 09:54:03 +000017072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017073cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074exec 5>>config.log
17075{
17076 echo
17077 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17078## Running $as_me. ##
17079_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017080 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017081} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017084cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017086
Matthias Kloseb9621712010-04-24 17:59:49 +000017087cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088
17089# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017090for ac_config_target in $ac_config_targets
17091do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092 case $ac_config_target in
17093 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17094 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17095 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017096 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17097 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17099 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017100 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017101 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017102 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103
Victor Stinnere0be4232011-10-25 13:06:09 +020017104 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017105 esac
17106done
17107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017108
Martin v. Löwis11437992002-04-12 09:54:03 +000017109# If the user did not use the arguments to specify the items to instantiate,
17110# then the envvar interface is used. Set only those that are not.
17111# We use the long form for the default assignment because of an extremely
17112# bizarre bug on SunOS 4.1.3.
17113if $ac_need_defaults; then
17114 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17115 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17116fi
17117
Skip Montanaro6dead952003-09-25 14:50:04 +000017118# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017120# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017121# Hook for its removal unless debugging.
17122# Note that there is a small window in which the directory will not be cleaned:
17123# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017124$debug ||
17125{
Victor Stinnere0be4232011-10-25 13:06:09 +020017126 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017127 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017128 : "${ac_tmp:=$tmp}"
17129 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017130' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017131 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017132}
Martin v. Löwis11437992002-04-12 09:54:03 +000017133# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017134
Martin v. Löwis11437992002-04-12 09:54:03 +000017135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017137 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017138} ||
17139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140 tmp=./conf$$-$RANDOM
17141 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017142} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017143ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017144
Matthias Kloseb9621712010-04-24 17:59:49 +000017145# Set up the scripts for CONFIG_FILES section.
17146# No need to generate them if there are no CONFIG_FILES.
17147# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017148if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017149
Matthias Kloseb9621712010-04-24 17:59:49 +000017150
17151ac_cr=`echo X | tr X '\015'`
17152# On cygwin, bash can eat \r inside `` if the user requested igncr.
17153# But we know of no other shell where ac_cr would be empty at this
17154# point, so we can use a bashism as a fallback.
17155if test "x$ac_cr" = x; then
17156 eval ac_cr=\$\'\\r\'
17157fi
17158ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17159if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017160 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017161else
17162 ac_cs_awk_cr=$ac_cr
17163fi
17164
Victor Stinnere0be4232011-10-25 13:06:09 +020017165echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017166_ACEOF
17167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017168
Matthias Kloseb9621712010-04-24 17:59:49 +000017169{
17170 echo "cat >conf$$subs.awk <<_ACEOF" &&
17171 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17172 echo "_ACEOF"
17173} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017174 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17175ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176ac_delim='%!_!# '
17177for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017178 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017179 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180
Matthias Kloseb9621712010-04-24 17:59:49 +000017181 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17182 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183 break
17184 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017185 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186 else
17187 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017188 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017189done
Matthias Kloseb9621712010-04-24 17:59:49 +000017190rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191
Matthias Kloseb9621712010-04-24 17:59:49 +000017192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017193cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017195sed -n '
17196h
17197s/^/S["/; s/!.*/"]=/
17198p
17199g
17200s/^[^!]*!//
17201:repl
17202t repl
17203s/'"$ac_delim"'$//
17204t delim
17205:nl
17206h
17207s/\(.\{148\}\)..*/\1/
17208t more1
17209s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17210p
17211n
17212b repl
17213:more1
17214s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17215p
17216g
17217s/.\{148\}//
17218t nl
17219:delim
17220h
17221s/\(.\{148\}\)..*/\1/
17222t more2
17223s/["\\]/\\&/g; s/^/"/; s/$/"/
17224p
17225b
17226:more2
17227s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17228p
17229g
17230s/.\{148\}//
17231t delim
17232' <conf$$subs.awk | sed '
17233/^[^""]/{
17234 N
17235 s/\n//
17236}
17237' >>$CONFIG_STATUS || ac_write_fail=1
17238rm -f conf$$subs.awk
17239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17240_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017241cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017242 for (key in S) S_is_set[key] = 1
17243 FS = ""
17244
17245}
17246{
17247 line = $ 0
17248 nfields = split(line, field, "@")
17249 substed = 0
17250 len = length(field[1])
17251 for (i = 2; i < nfields; i++) {
17252 key = field[i]
17253 keylen = length(key)
17254 if (S_is_set[key]) {
17255 value = S[key]
17256 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17257 len += length(value) + length(field[++i])
17258 substed = 1
17259 } else
17260 len += 1 + keylen
17261 }
17262
17263 print line
17264}
17265
17266_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17269if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17270 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17271else
17272 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017273fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017274 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017275_ACEOF
17276
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17278# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279# trailing colons and then remove the whole line if VPATH becomes empty
17280# (actually we leave an empty line to preserve line numbers).
17281if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017282 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17283h
17284s///
17285s/^/:/
17286s/[ ]*$/:/
17287s/:\$(srcdir):/:/g
17288s/:\${srcdir}:/:/g
17289s/:@srcdir@:/:/g
17290s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017291s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017292x
17293s/\(=[ ]*\).*/\1/
17294G
17295s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017296s/^[^=]*=[ ]*$//
17297}'
17298fi
17299
Matthias Kloseb9621712010-04-24 17:59:49 +000017300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017301fi # test -n "$CONFIG_FILES"
17302
Matthias Kloseb9621712010-04-24 17:59:49 +000017303# Set up the scripts for CONFIG_HEADERS section.
17304# No need to generate them if there are no CONFIG_HEADERS.
17305# This happens for instance with `./config.status Makefile'.
17306if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017307cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017308BEGIN {
17309_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310
Matthias Kloseb9621712010-04-24 17:59:49 +000017311# Transform confdefs.h into an awk script `defines.awk', embedded as
17312# here-document in config.status, that substitutes the proper values into
17313# config.h.in to produce config.h.
17314
17315# Create a delimiter string that does not exist in confdefs.h, to ease
17316# handling of long lines.
17317ac_delim='%!_!# '
17318for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017319 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17320 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017321 break
17322 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017323 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017324 else
17325 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17326 fi
17327done
17328
17329# For the awk script, D is an array of macro values keyed by name,
17330# likewise P contains macro parameters if any. Preserve backslash
17331# newline sequences.
17332
17333ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17334sed -n '
17335s/.\{148\}/&'"$ac_delim"'/g
17336t rset
17337:rset
17338s/^[ ]*#[ ]*define[ ][ ]*/ /
17339t def
17340d
17341:def
17342s/\\$//
17343t bsnl
17344s/["\\]/\\&/g
17345s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17346D["\1"]=" \3"/p
17347s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17348d
17349:bsnl
17350s/["\\]/\\&/g
17351s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17352D["\1"]=" \3\\\\\\n"\\/p
17353t cont
17354s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17355t cont
17356d
17357:cont
17358n
17359s/.\{148\}/&'"$ac_delim"'/g
17360t clear
17361:clear
17362s/\\$//
17363t bsnlc
17364s/["\\]/\\&/g; s/^/"/; s/$/"/p
17365d
17366:bsnlc
17367s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17368b cont
17369' <confdefs.h | sed '
17370s/'"$ac_delim"'/"\\\
17371"/g' >>$CONFIG_STATUS || ac_write_fail=1
17372
17373cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17374 for (key in D) D_is_set[key] = 1
17375 FS = ""
17376}
17377/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17378 line = \$ 0
17379 split(line, arg, " ")
17380 if (arg[1] == "#") {
17381 defundef = arg[2]
17382 mac1 = arg[3]
17383 } else {
17384 defundef = substr(arg[1], 2)
17385 mac1 = arg[2]
17386 }
17387 split(mac1, mac2, "(") #)
17388 macro = mac2[1]
17389 prefix = substr(line, 1, index(line, defundef) - 1)
17390 if (D_is_set[macro]) {
17391 # Preserve the white space surrounding the "#".
17392 print prefix "define", macro P[macro] D[macro]
17393 next
17394 } else {
17395 # Replace #undef with comments. This is necessary, for example,
17396 # in the case of _POSIX_SOURCE, which is predefined and required
17397 # on some systems where configure will not decide to define it.
17398 if (defundef == "undef") {
17399 print "/*", prefix defundef, macro, "*/"
17400 next
17401 }
17402 }
17403}
17404{ print }
17405_ACAWK
17406_ACEOF
17407cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017408 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017409fi # test -n "$CONFIG_HEADERS"
17410
17411
17412eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17413shift
17414for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415do
17416 case $ac_tag in
17417 :[FHLC]) ac_mode=$ac_tag; continue;;
17418 esac
17419 case $ac_mode$ac_tag in
17420 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017421 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017422 :[FH]-) ac_tag=-:-;;
17423 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17424 esac
17425 ac_save_IFS=$IFS
17426 IFS=:
17427 set x $ac_tag
17428 IFS=$ac_save_IFS
17429 shift
17430 ac_file=$1
17431 shift
17432
17433 case $ac_mode in
17434 :L) ac_source=$1;;
17435 :[FH])
17436 ac_file_inputs=
17437 for ac_f
17438 do
17439 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017440 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441 *) # Look for the file first in the build tree, then in the source tree
17442 # (if the path is not absolute). The absolute path cannot be DOS-style,
17443 # because $ac_f cannot contain `:'.
17444 test -f "$ac_f" ||
17445 case $ac_f in
17446 [\\/$]*) false;;
17447 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17448 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017449 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017450 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017451 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17452 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017453 done
17454
17455 # Let's still pretend it is `configure' which instantiates (i.e., don't
17456 # use $as_me), people would be surprised to read:
17457 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017458 configure_input='Generated from '`
17459 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17460 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461 if test x"$ac_file" != x-; then
17462 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017463 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17464$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017466 # Neutralize special characters interpreted by sed in replacement strings.
17467 case $configure_input in #(
17468 *\&* | *\|* | *\\* )
17469 ac_sed_conf_input=`$as_echo "$configure_input" |
17470 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17471 *) ac_sed_conf_input=$configure_input;;
17472 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017473
17474 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017475 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17476 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477 esac
17478 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 esac
17480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017481 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017482$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017483 X"$ac_file" : 'X\(//\)[^/]' \| \
17484 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017486$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17488 s//\1/
17489 q
17490 }
17491 /^X\(\/\/\)[^/].*/{
17492 s//\1/
17493 q
17494 }
17495 /^X\(\/\/\)$/{
17496 s//\1/
17497 q
17498 }
17499 /^X\(\/\).*/{
17500 s//\1/
17501 q
17502 }
17503 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017504 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017505 ac_builddir=.
17506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507case "$ac_dir" in
17508.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17509*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017510 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017512 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017513 case $ac_top_builddir_sub in
17514 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17515 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17516 esac ;;
17517esac
17518ac_abs_top_builddir=$ac_pwd
17519ac_abs_builddir=$ac_pwd$ac_dir_suffix
17520# for backward compatibility:
17521ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017522
17523case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526 ac_top_srcdir=$ac_top_builddir_sub
17527 ac_abs_top_srcdir=$ac_pwd ;;
17528 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017529 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530 ac_top_srcdir=$srcdir
17531 ac_abs_top_srcdir=$srcdir ;;
17532 *) # Relative name.
17533 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17534 ac_top_srcdir=$ac_top_build_prefix$srcdir
17535 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017536esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017538
Martin v. Löwis11437992002-04-12 09:54:03 +000017539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540 case $ac_mode in
17541 :F)
17542 #
17543 # CONFIG_FILE
17544 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017545
17546 case $INSTALL in
17547 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017549 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017550 ac_MKDIR_P=$MKDIR_P
17551 case $MKDIR_P in
17552 [\\/$]* | ?:[\\/]* ) ;;
17553 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17554 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017555_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556
Matthias Kloseb9621712010-04-24 17:59:49 +000017557cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558# If the template does not know about datarootdir, expand it.
17559# FIXME: This hack should be removed a few years after 2.60.
17560ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017561ac_sed_dataroot='
17562/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563 p
17564 q
17565}
17566/@datadir@/p
17567/@docdir@/p
17568/@infodir@/p
17569/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017570/@mandir@/p'
17571case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572*datarootdir*) ac_datarootdir_seen=yes;;
17573*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017574 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17575$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017577cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578 ac_datarootdir_hack='
17579 s&@datadir@&$datadir&g
17580 s&@docdir@&$docdir&g
17581 s&@infodir@&$infodir&g
17582 s&@localedir@&$localedir&g
17583 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017584 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585esac
17586_ACEOF
17587
17588# Neutralize VPATH when `$srcdir' = `.'.
17589# Shell code in configure.ac might set extrasub.
17590# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17592ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017593$extrasub
17594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017596:t
17597/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017598s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017600s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601s&@srcdir@&$ac_srcdir&;t t
17602s&@abs_srcdir@&$ac_abs_srcdir&;t t
17603s&@top_srcdir@&$ac_top_srcdir&;t t
17604s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17605s&@builddir@&$ac_builddir&;t t
17606s&@abs_builddir@&$ac_abs_builddir&;t t
17607s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17608s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017609s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017610$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017611"
Victor Stinnere0be4232011-10-25 13:06:09 +020017612eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17613 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017616 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17617 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17618 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017619 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017620which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017621$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017622which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017623
Victor Stinnere0be4232011-10-25 13:06:09 +020017624 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017625 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017626 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17627 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017628 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017629 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017630 ;;
17631 :H)
17632 #
17633 # CONFIG_HEADER
17634 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017635 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017636 {
17637 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017638 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17639 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017640 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017641 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017642 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17643$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017645 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017646 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017647 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 fi
17649 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017650 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017651 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017652 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017653 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656
17657 esac
17658
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017659
17660 case $ac_file$ac_mode in
17661 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17662
17663 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664done # for ac_tag
17665
Guido van Rossum627b2d71993-12-24 10:39:16 +000017666
Matthias Kloseb9621712010-04-24 17:59:49 +000017667as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017668_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017669ac_clean_files=$ac_clean_files_save
17670
Matthias Kloseb9621712010-04-24 17:59:49 +000017671test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017672 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017673
Martin v. Löwis11437992002-04-12 09:54:03 +000017674
17675# configure is writing to config.log, and then calls config.status.
17676# config.status does its own redirection, appending to config.log.
17677# Unfortunately, on DOS this fails, as config.log is still kept open
17678# by configure, so config.status won't be able to write to it; its
17679# output is simply discarded. So we exec the FD to /dev/null,
17680# effectively closing config.log, so it can be properly (re)opened and
17681# appended to by config.status. When coming back to configure, we
17682# need to make the FD available again.
17683if test "$no_create" != yes; then
17684 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017685 ac_config_status_args=
17686 test "$silent" = yes &&
17687 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017688 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017689 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017690 exec 5>>config.log
17691 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17692 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017693 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017694fi
17695if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17697$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017698fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017699
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017700
Christian Heimes75ed8902013-11-20 01:11:18 +010017701echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017702if test ! -f Modules/Setup
17703then
17704 cp $srcdir/Modules/Setup.dist Modules/Setup
17705fi
17706
Christian Heimes75ed8902013-11-20 01:11:18 +010017707echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017708if test ! -f Modules/Setup.local
17709then
17710 echo "# Edit this file for local setup changes" >Modules/Setup.local
17711fi
17712
Christian Heimes75ed8902013-11-20 01:11:18 +010017713echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017714$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17715 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017716 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017717mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017718
17719if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17720 echo "" >&6
17721 echo "" >&6
17722 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17723 echo "please run ./configure --with-optimizations" >&6
17724 echo "" >&6
17725 echo "" >&6
17726fi
17727