blob: 4590423aacc4a823770fbadcdcc66b5b8780efaf [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700671target_os
672target_vendor
673target_cpu
674target
675LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_ERR
677LLVM_PROF_FILE
678LLVM_PROF_MERGER
679PGO_PROF_USE_FLAG
680PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700681LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700682DEF_MAKE_RULE
683DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000684ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000685LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100686MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000687INSTALL_DATA
688INSTALL_SCRIPT
689INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200690ac_ct_READELF
691READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000692ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200693ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000694AR
695RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000696USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000697GNULD
698LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000699LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000700RUNSHARED
701INSTSONAME
702LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000703PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000704BLDLIBRARY
705DLLLIBRARY
706LDLIBRARY
707LIBRARY
708BUILDEXEEXT
709EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200710NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200711MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200712PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200713PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200718GREP
719CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000720OBJEXT
721EXEEXT
722ac_ct_CC
723CPPFLAGS
724LDFLAGS
725CFLAGS
726CC
727EXPORT_MACOSX_DEPLOYMENT_TARGET
728CONFIGURE_MACOSX_DEPLOYMENT_TARGET
729SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000731MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000732FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800734FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKALTINSTALLLAST
736FRAMEWORKALTINSTALLFIRST
737FRAMEWORKINSTALLLAST
738FRAMEWORKINSTALLFIRST
739PYTHONFRAMEWORKINSTALLDIR
740PYTHONFRAMEWORKPREFIX
741PYTHONFRAMEWORKDIR
742PYTHONFRAMEWORKIDENTIFIER
743PYTHONFRAMEWORK
744LIPO_32BIT_FLAGS
745ARCH_RUN_32BIT
746UNIVERSALSDK
747CONFIG_ARGS
748SOVERSION
749VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000750GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200752PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500761HAS_HG
762HGBRANCH
763HGTAG
764HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
Benjamin Petersona9296e72016-09-07 11:06:17 -0700785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
812with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600813with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
Brett Cannon63d98bc2016-09-06 17:12:40 -0700819with_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_libs
824with_system_expat
825with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100826with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000827enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700828with_tcltk_includes
829with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_dbmliborder
831with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
836with_tsc
837with_pymalloc
838with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_fpectl
840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Benjamin Petersona9296e72016-09-07 11:06:17 -0700897runstatedir='${localstatedir}/run'
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
Benjamin Petersona9296e72016-09-07 11:06:17 -07001150 -runstatedir | --runstatedir | --runstatedi | --runstated \
1151 | --runstate | --runstat | --runsta | --runst | --runs \
1152 | --run | --ru | --r)
1153 ac_prev=runstatedir ;;
1154 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1155 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1156 | --run=* | --ru=* | --r=*)
1157 runstatedir=$ac_optarg ;;
1158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160 ac_prev=sbindir ;;
1161 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
1165 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167 | --sharedst | --shareds | --shared | --share | --shar \
1168 | --sha | --sh)
1169 ac_prev=sharedstatedir ;;
1170 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 -site | --site | --sit)
1177 ac_prev=site ;;
1178 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182 ac_prev=srcdir ;;
1183 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187 | --syscon | --sysco | --sysc | --sys | --sy)
1188 ac_prev=sysconfdir ;;
1189 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199 verbose=yes ;;
1200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 -version | --version | --versio | --versi | --vers | -V)
1202 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
1220 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 ac_useropt_orig=$ac_useropt
1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227 case $ac_user_opts in
1228 *"
1229"with_$ac_useropt"
1230"*) ;;
1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232 ac_unrecognized_sep=', ';;
1233 esac
1234 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 --x)
1237 # Obsolete; use --with-x.
1238 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241 | --x-incl | --x-inc | --x-in | --x-i)
1242 ac_prev=x_includes ;;
1243 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
1247 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249 ac_prev=x_libraries ;;
1250 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 *=*)
1259 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 case $ac_envvar in #(
1262 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 export $ac_envvar ;;
1267
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001268 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001273 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 ;;
1275
1276 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277done
1278
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282fi
1283
Matthias Kloseb9621712010-04-24 17:59:49 +00001284if test -n "$ac_unrecognized_opts"; then
1285 case $enable_option_checking in
1286 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289 esac
1290fi
1291
1292# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294 datadir sysconfdir sharedstatedir localstatedir includedir \
1295 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersona9296e72016-09-07 11:06:17 -07001296 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 # Remove trailing slashes.
1300 case $ac_val in
1301 */ )
1302 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303 eval $ac_var=\$ac_val;;
1304 esac
1305 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 [\\/$]* | ?:[\\/]* ) continue;;
1308 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001311done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# There might be people who depend on the old broken behavior: `$host'
1314# used to hold the argument of --host etc.
1315# FIXME: To remove some day.
1316build=$build_alias
1317host=$host_alias
1318target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320# FIXME: To remove some day.
1321if test "x$host_alias" != x; then
1322 if test "x$build_alias" = x; then
1323 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 elif test "x$build_alias" != "x$host_alias"; then
1325 cross_compiling=yes
1326 fi
1327fi
1328
1329ac_tool_prefix=
1330test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332test "$silent" = yes && exec 6>/dev/null
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336ac_ls_di=`ls -di .` &&
1337ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341
1342
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343# Find the source files, if location was not specified.
1344if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 ac_confdir=`$as_dirname -- "$as_myself" ||
1348$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349 X"$as_myself" : 'X\(//\)[^/]' \| \
1350 X"$as_myself" : 'X\(//\)$' \| \
1351 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)[^/].*/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\/\)$/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\).*/{
1366 s//\1/
1367 q
1368 }
1369 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 srcdir=..
1373 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374else
1375 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377if test ! -r "$srcdir/$ac_unique_file"; then
1378 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384 pwd)`
1385# When building in place, set srcdir=.
1386if test "$ac_abs_confdir" = "$ac_pwd"; then
1387 srcdir=.
1388fi
1389# Remove unnecessary trailing slashes from srcdir.
1390# Double slashes in file names in object file debugging info
1391# mess up M-x gdb in Emacs.
1392case $srcdir in
1393*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394esac
1395for ac_var in $ac_precious_vars; do
1396 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_env_${ac_var}_value=\$${ac_var}
1398 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402#
1403# Report the --help message.
1404#
1405if test "$ac_init_help" = "long"; then
1406 # Omit some internal or obsolete options to make the list less imposing.
1407 # This message is too long to be a string in the A/UX 3.1 sh.
1408 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001409\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414VAR=VALUE. See below for descriptions of some of the useful variables.
1415
1416Defaults for the options are specified in brackets.
1417
1418Configuration:
1419 -h, --help display this help and exit
1420 --help=short display options specific to this package
1421 --help=recursive display the short help of all the included packages
1422 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001423 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --cache-file=FILE cache test results in FILE [disabled]
1425 -C, --config-cache alias for \`--cache-file=config.cache'
1426 -n, --no-create do not create output files
1427 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429Installation directories:
1430 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435By default, \`make install' will install all the files in
1436\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1437an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438for instance \`--prefix=\$HOME'.
1439
1440For better control, use the options below.
1441
1442Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --bindir=DIR user executables [EPREFIX/bin]
1444 --sbindir=DIR system admin executables [EPREFIX/sbin]
1445 --libexecdir=DIR program executables [EPREFIX/libexec]
1446 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1447 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1448 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersona9296e72016-09-07 11:06:17 -07001449 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 --libdir=DIR object code libraries [EPREFIX/lib]
1451 --includedir=DIR C header files [PREFIX/include]
1452 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1453 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1454 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1455 --infodir=DIR info documentation [DATAROOTDIR/info]
1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1457 --mandir=DIR man documentation [DATAROOTDIR/man]
1458 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1459 --htmldir=DIR html documentation [DOCDIR]
1460 --dvidir=DIR dvi documentation [DOCDIR]
1461 --pdfdir=DIR pdf documentation [DOCDIR]
1462 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464
1465 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001466
1467System types:
1468 --build=BUILD configure for building on BUILD [guessed]
1469 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001470 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001471_ACEOF
1472fi
1473
1474if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001475 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001476 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 cat <<\_ACEOF
1479
1480Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1483 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001484 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001485 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-framework[=INSTALLDIR]
1487 Build (MacOSX|Darwin) framework
1488 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001489 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001490 --enable-loadable-sqlite-extensions
1491 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --enable-ipv6 Enable ipv6 (with ipv4) support
1493 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001494 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001496
1497Optional Packages:
1498 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1499 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001500 --with-universal-archs=ARCH
1501 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001502 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001503 --with-framework-name=FRAMEWORK
1504 specify an alternate name of the framework built
1505 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001507 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001508 --with-cxx-main=<compiler>
1509 compile main() and link python executable with C++
1510 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --with-suffix=.exe set executable suffix
1512 --with-pydebug build with Py_DEBUG defined
Brett Cannon63d98bc2016-09-06 17:12:40 -07001513 --with-optimizations Enable all optimizations when available (LTO, PGO,
1514 etc). Disabled by default.
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001515 --with-lto Enable Link Time Optimization in PGO builds.
1516 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001517 --with-hash-algorithm=[fnv|siphash24]
1518 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001519 --with-address-sanitizer
1520 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001522 --with-system-expat build pyexpat module using an installed expat
1523 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001524 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001525 --with-system-libmpdec build _decimal module using an installed libmpdec
1526 library
Ned Deilyd819b932013-09-06 01:07:05 -07001527 --with-tcltk-includes='-I...'
1528 override search for Tcl and Tk include files
1529 --with-tcltk-libs='-L...'
1530 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001531 --with-dbmliborder=db1:db2:...
1532 order to check db backends for dbm. Valid value is a
1533 colon separated string with the backend names
1534 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001536 --with(out)-threads[=DIRECTORY]
1537 disable/enable thread support
1538 --with(out)-thread[=DIRECTORY]
1539 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001541 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001542 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001543 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001544 --with-fpectl enable SIGFPE catching
1545 --with-libm=STRING math library
1546 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001547 --with(out)-computed-gotos
1548 Use computed gotos in evaluation loop (enabled by
1549 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001550 --with(out)-ensurepip=[=upgrade]
1551 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001554 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 CC C compiler command
1556 CFLAGS C compiler flags
1557 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1558 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001560 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001563 PKG_CONFIG path to pkg-config utility
1564 PKG_CONFIG_PATH
1565 directories to add to pkg-config's search path
1566 PKG_CONFIG_LIBDIR
1567 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
1569Use these variables to override the choices made by `configure' or to help
1570it to find libraries and programs with nonstandard names/locations.
1571
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001572Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001575fi
1576
1577if test "$ac_init_help" = "recursive"; then
1578 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 test -d "$ac_dir" ||
1581 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1582 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ac_builddir=.
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585case "$ac_dir" in
1586.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $ac_top_builddir_sub in
1592 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594 esac ;;
1595esac
1596ac_abs_top_builddir=$ac_pwd
1597ac_abs_builddir=$ac_pwd$ac_dir_suffix
1598# for backward compatibility:
1599ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
1601case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$ac_top_builddir_sub
1605 ac_abs_top_srcdir=$ac_pwd ;;
1606 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 ac_top_srcdir=$srcdir
1609 ac_abs_top_srcdir=$srcdir ;;
1610 *) # Relative name.
1611 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1612 ac_top_srcdir=$ac_top_build_prefix$srcdir
1613 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001614esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 cd "$ac_dir" || { ac_status=$?; continue; }
1618 # Check for guested configure.
1619 if test -f "$ac_srcdir/configure.gnu"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1622 elif test -f "$ac_srcdir/configure"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 fi || ac_status=$?
1628 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 done
1630fi
1631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if $ac_init_version; then
1634 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001635python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001637
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001638Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639This configure script is free software; the Free Software Foundation
1640gives unlimited permission to copy, distribute and modify it.
1641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001644
1645## ------------------------ ##
1646## Autoconf initialization. ##
1647## ------------------------ ##
1648
1649# ac_fn_c_try_compile LINENO
1650# --------------------------
1651# Try to compile conftest.$ac_ext, and return whether this succeeded.
1652ac_fn_c_try_compile ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 rm -f conftest.$ac_objext
1656 if { { ac_try="$ac_compile"
1657case "(($ac_try" in
1658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659 *) ac_try_echo=$ac_try;;
1660esac
1661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662$as_echo "$ac_try_echo"; } >&5
1663 (eval "$ac_compile") 2>conftest.err
1664 ac_status=$?
1665 if test -s conftest.err; then
1666 grep -v '^ *+' conftest.err >conftest.er1
1667 cat conftest.er1 >&5
1668 mv -f conftest.er1 conftest.err
1669 fi
1670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671 test $ac_status = 0; } && {
1672 test -z "$ac_c_werror_flag" ||
1673 test ! -s conftest.err
1674 } && test -s conftest.$ac_objext; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
1679
1680 ac_retval=1
1681fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001682 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001683 as_fn_set_status $ac_retval
1684
1685} # ac_fn_c_try_compile
1686
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001687# ac_fn_c_try_cpp LINENO
1688# ----------------------
1689# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_cpp ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_cpp conftest.$ac_ext"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1701 ac_status=$?
1702 if test -s conftest.err; then
1703 grep -v '^ *+' conftest.err >conftest.er1
1704 cat conftest.er1 >&5
1705 mv -f conftest.er1 conftest.err
1706 fi
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } > conftest.i && {
1709 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1710 test ! -s conftest.err
1711 }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
1716
1717 ac_retval=1
1718fi
1719 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720 as_fn_set_status $ac_retval
1721
1722} # ac_fn_c_try_cpp
1723
Matthias Kloseb9621712010-04-24 17:59:49 +00001724# ac_fn_c_try_link LINENO
1725# -----------------------
1726# Try to link conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_link ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext conftest$ac_exeext
1731 if { { ac_try="$ac_link"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_link") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest$ac_exeext && {
1750 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001751 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 }; then :
1753 ac_retval=0
1754else
1755 $as_echo "$as_me: failed program was:" >&5
1756sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759fi
1760 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1761 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1762 # interfere with the next link command; also delete a directory that is
1763 # left behind by Apple's compiler. We do this before executing the actions.
1764 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001766 as_fn_set_status $ac_retval
1767
1768} # ac_fn_c_try_link
1769
Matthias Kloseb9621712010-04-24 17:59:49 +00001770# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771# -------------------------------------------------------
1772# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773# the include files in INCLUDES and setting the cache variable VAR
1774# accordingly.
1775ac_fn_c_check_header_mongrel ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001778 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001781if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 $as_echo_n "(cached) " >&6
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787else
1788 # Is the header compilable?
1789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790$as_echo_n "checking $2 usability... " >&6; }
1791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792/* end confdefs.h. */
1793$4
1794#include <$2>
1795_ACEOF
1796if ac_fn_c_try_compile "$LINENO"; then :
1797 ac_header_compiler=yes
1798else
1799 ac_header_compiler=no
1800fi
1801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803$as_echo "$ac_header_compiler" >&6; }
1804
1805# Is the header present?
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807$as_echo_n "checking $2 presence... " >&6; }
1808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810#include <$2>
1811_ACEOF
1812if ac_fn_c_try_cpp "$LINENO"; then :
1813 ac_header_preproc=yes
1814else
1815 ac_header_preproc=no
1816fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001817rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819$as_echo "$ac_header_preproc" >&6; }
1820
1821# So? What about this header?
1822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1823 yes:no: )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828 ;;
1829 no:yes:* )
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1833$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1837$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001840( $as_echo "## --------------------------------------- ##
1841## Report this to https://bugs.python.org/ ##
1842## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 ) | sed "s/^/$as_me: WARNING: /" >&2
1844 ;;
1845esac
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001848if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001849 $as_echo_n "(cached) " >&6
1850else
1851 eval "$3=\$ac_header_compiler"
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858
1859} # ac_fn_c_check_header_mongrel
1860
1861# ac_fn_c_try_run LINENO
1862# ----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1864# that executables *can* be run.
1865ac_fn_c_try_run ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>&5
1876 ac_status=$?
1877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1879 { { case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_try") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; }; }; then :
1889 ac_retval=0
1890else
1891 $as_echo "$as_me: program exited with status $ac_status" >&5
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=$ac_status
1896fi
1897 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001899 as_fn_set_status $ac_retval
1900
1901} # ac_fn_c_try_run
1902
1903# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1904# -------------------------------------------------------
1905# Tests whether HEADER exists and can be compiled using the include files in
1906# INCLUDES, setting the cache variable VAR accordingly.
1907ac_fn_c_check_header_compile ()
1908{
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1911$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001912if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001913 $as_echo_n "(cached) " >&6
1914else
1915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916/* end confdefs.h. */
1917$4
1918#include <$2>
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 eval "$3=yes"
1922else
1923 eval "$3=no"
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932} # ac_fn_c_check_header_compile
1933
Matthias Kloseb9621712010-04-24 17:59:49 +00001934# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1935# -------------------------------------------
1936# Tests whether TYPE exists after having included INCLUDES, setting cache
1937# variable VAR accordingly.
1938ac_fn_c_check_type ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001943if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950int
1951main ()
1952{
1953if (sizeof ($2))
1954 return 0;
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$4
1963int
1964main ()
1965{
1966if (sizeof (($2)))
1967 return 0;
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973
1974else
1975 eval "$3=yes"
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986} # ac_fn_c_check_type
1987
Matthias Kloseb9621712010-04-24 17:59:49 +00001988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002005test_array [0] = 0;
2006return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013 ac_lo=0 ac_mid=0
2014 while :; do
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002022test_array [0] = 0;
2023return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_hi=-1 ac_mid=-1
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=$ac_mid; break
2075else
2076 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2077 if test $ac_mid -le $ac_hi; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 ac_lo= ac_hi=
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091# Binary search between lo and hi bounds.
2092while test "x$ac_lo" != "x$ac_hi"; do
2093 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002166 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002179if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235
2236} # ac_fn_c_check_func
2237
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002238# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2239# ---------------------------------------------
2240# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2241# accordingly.
2242ac_fn_c_check_decl ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 as_decl_name=`echo $2|sed 's/ *(.*//'`
2246 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2248$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2249if eval \${$3+:} false; then :
2250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255int
2256main ()
2257{
2258#ifndef $as_decl_name
2259#ifdef __cplusplus
2260 (void) $as_decl_use;
2261#else
2262 (void) $as_decl_name;
2263#endif
2264#endif
2265
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_compile "$LINENO"; then :
2271 eval "$3=yes"
2272else
2273 eval "$3=no"
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277eval ac_res=\$$3
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2279$as_echo "$ac_res" >&6; }
2280 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281
2282} # ac_fn_c_check_decl
2283
Matthias Kloseb9621712010-04-24 17:59:49 +00002284# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2285# ----------------------------------------------------
2286# Tries to find if the field MEMBER exists in type AGGR, after including
2287# INCLUDES, setting cache variable VAR accordingly.
2288ac_fn_c_check_member ()
2289{
2290 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2292$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002293if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 $as_echo_n "(cached) " >&6
2295else
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$5
2299int
2300main ()
2301{
2302static $2 ac_aggr;
2303if (ac_aggr.$3)
2304return 0;
2305 ;
2306 return 0;
2307}
2308_ACEOF
2309if ac_fn_c_try_compile "$LINENO"; then :
2310 eval "$4=yes"
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (sizeof ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 eval "$4=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$4
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002344It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002345generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002381 $as_echo "PATH: $as_dir"
2382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Kloseb9621712010-04-24 17:59:49 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Kloseb9621712010-04-24 17:59:49 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Kloseb9621712010-04-24 17:59:49 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002603See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693
Trent Nelson5595ab52012-10-17 04:47:31 -04002694if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002695 # If we're building out-of-tree, we need to make sure the following
2696 # resources get picked up before their $srcdir counterparts.
2697 # Objects/ -> typeslots.inc
2698 # Include/ -> Python-ast.h, graminit.h
2699 # Python/ -> importlib.h
2700 # (A side effect of this is that these resources will automatically be
2701 # regenerated when building out-of-tree, regardless of whether or not
2702 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2703 # off.)
2704 BASECPPFLAGS="-IObjects -IInclude -IPython"
2705else
2706 BASECPPFLAGS=""
2707fi
2708
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709
2710
2711
2712
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002713if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714then
2715# Extract the first word of "hg", so it can be a program name with args.
2716set dummy hg; ac_word=$2
2717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002719if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 $as_echo_n "(cached) " >&6
2721else
2722 if test -n "$HAS_HG"; then
2723 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2724else
2725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2726for as_dir in $PATH
2727do
2728 IFS=$as_save_IFS
2729 test -z "$as_dir" && as_dir=.
2730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 ac_cv_prog_HAS_HG="found"
2733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2734 break 2
2735 fi
2736done
2737 done
2738IFS=$as_save_IFS
2739
2740 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2741fi
2742fi
2743HAS_HG=$ac_cv_prog_HAS_HG
2744if test -n "$HAS_HG"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2746$as_echo "$HAS_HG" >&6; }
2747else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749$as_echo "no" >&6; }
2750fi
2751
2752
2753else
2754HAS_HG=no-repository
2755fi
2756if test $HAS_HG = found
2757then
2758 HGVERSION="hg id -i \$(srcdir)"
2759 HGTAG="hg id -t \$(srcdir)"
2760 HGBRANCH="hg id -b \$(srcdir)"
2761else
2762 HGVERSION=""
2763 HGTAG=""
2764 HGBRANCH=""
2765fi
2766
2767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
2770
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002771ac_aux_dir=
2772for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2773 if test -f "$ac_dir/install-sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install-sh -c"
2776 break
2777 elif test -f "$ac_dir/install.sh"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/install.sh -c"
2780 break
2781 elif test -f "$ac_dir/shtool"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/shtool install -c"
2784 break
2785 fi
2786done
2787if test -z "$ac_aux_dir"; then
2788 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2789fi
2790
2791# These three variables are undocumented and unsupported,
2792# and are intended to be withdrawn in a future Autoconf release.
2793# They can cause serious problems if a builder's source tree is in a directory
2794# whose full name contains unusual characters.
2795ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2796ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2797ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2798
2799
2800# Make sure we can run config.sub.
2801$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2802 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2803
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2805$as_echo_n "checking build system type... " >&6; }
2806if ${ac_cv_build+:} false; then :
2807 $as_echo_n "(cached) " >&6
2808else
2809 ac_build_alias=$build_alias
2810test "x$ac_build_alias" = x &&
2811 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2812test "x$ac_build_alias" = x &&
2813 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2814ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2815 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2816
2817fi
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2819$as_echo "$ac_cv_build" >&6; }
2820case $ac_cv_build in
2821*-*-*) ;;
2822*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2823esac
2824build=$ac_cv_build
2825ac_save_IFS=$IFS; IFS='-'
2826set x $ac_cv_build
2827shift
2828build_cpu=$1
2829build_vendor=$2
2830shift; shift
2831# Remember, the first character of IFS is used to create $*,
2832# except with old shells:
2833build_os=$*
2834IFS=$ac_save_IFS
2835case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2836
2837
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2839$as_echo_n "checking host system type... " >&6; }
2840if ${ac_cv_host+:} false; then :
2841 $as_echo_n "(cached) " >&6
2842else
2843 if test "x$host_alias" = x; then
2844 ac_cv_host=$ac_cv_build
2845else
2846 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2847 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2848fi
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2852$as_echo "$ac_cv_host" >&6; }
2853case $ac_cv_host in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2856esac
2857host=$ac_cv_host
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_host
2860shift
2861host_cpu=$1
2862host_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866host_os=$*
2867IFS=$ac_save_IFS
2868case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2869
2870
2871
doko@python.orga10e4a92013-01-25 18:45:12 +01002872
2873
Ned Deilyfcbc2462014-08-22 13:32:49 -07002874# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2875rm -f pybuilddir.txt
2876
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002877for ac_prog in python$PACKAGE_VERSION python3 python
2878do
2879 # Extract the first word of "$ac_prog", so it can be a program name with args.
2880set dummy $ac_prog; ac_word=$2
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
2883if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2884 $as_echo_n "(cached) " >&6
2885else
2886 if test -n "$PYTHON_FOR_GEN"; then
2887 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2888else
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
2894 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2896 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2898 break 2
2899 fi
2900done
2901 done
2902IFS=$as_save_IFS
2903
2904fi
2905fi
2906PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2907if test -n "$PYTHON_FOR_GEN"; then
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2909$as_echo "$PYTHON_FOR_GEN" >&6; }
2910else
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
2913fi
2914
2915
2916 test -n "$PYTHON_FOR_GEN" && break
2917done
2918test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2919
2920if test "$PYTHON_FOR_GEN" = not-found; then
2921 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2922 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2923 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2924fi
2925
2926
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002927if test "$cross_compiling" = yes; then
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2929$as_echo_n "checking for python interpreter for cross build... " >&6; }
2930 if test -z "$PYTHON_FOR_BUILD"; then
2931 for interp in python$PACKAGE_VERSION python3 python; do
2932 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002933 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 +02002934 break
2935 fi
2936 interp=
2937 done
2938 if test x$interp = x; then
2939 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2940 fi
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2942$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002943 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 +02002944 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002945 # Used to comment out stuff for rebuilding generated files
2946 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002947elif test "$cross_compiling" = maybe; then
2948 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002949else
2950 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002951 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Martin Pantereac67be2016-07-28 01:28:27 +00002956
Benjamin Petersond23f8222009-04-05 19:13:16 +00002957if test "$prefix" != "/"; then
2958 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2959fi
2960
2961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002964# We don't use PACKAGE_ variables, and they cause conflicts
2965# with other autoconf-based packages that include Python.h
2966grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2967rm confdefs.h
2968mv confdefs.h.new confdefs.h
2969
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002970
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002971VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002972
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002973# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974
2975SOVERSION=1.0
2976
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977# The later defininition of _XOPEN_SOURCE disables certain features
2978# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
2982
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988
2989
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995
2996
Martin v. Löwisd6320502004-08-12 13:45:08 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003001
3002
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
3009
3010
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003011define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003013# Arguments passed to configure.
3014
3015CONFIG_ARGS="$ac_configure_args"
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3018$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003020if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 case $enableval in
3023 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 # Locate the best usable SDK, see Mac/README.txt for more
3025 # information
3026 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003027 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003029 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3030 if test ! -d "${enableval}"
3031 then
3032 enableval=/
3033 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
3037 case $enableval in
3038 no)
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041 ;;
3042 *)
3043 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 if test ! -d "${UNIVERSALSDK}"
3045 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003046 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003050
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052else
3053
3054 UNIVERSALSDK=
3055 enable_universalsdk=
3056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059if test -n "${UNIVERSALSDK}"
3060then
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3062$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063else
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003069
Ned Deily87adb6e2013-10-18 21:09:56 -07003070ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003071
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072# For backward compatibility reasons we prefer to select '32-bit' if available,
3073# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003075if test "`uname -s`" = "Darwin"
3076then
3077 if test -n "${UNIVERSALSDK}"
3078 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003079 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003080 then
3081 UNIVERSAL_ARCHS="intel"
3082 fi
3083 fi
3084fi
3085
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3088$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089
3090# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093 UNIVERSAL_ARCHS="$withval"
3094
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095fi
3096
Ned Deily87adb6e2013-10-18 21:09:56 -07003097if test -n "${UNIVERSALSDK}"
3098then
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3100$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3101else
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3103$as_echo "no" >&6; }
3104fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106
3107# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003109 withval=$with_framework_name;
3110 PYTHONFRAMEWORK=${withval}
3111 PYTHONFRAMEWORKDIR=${withval}.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3113
3114else
3115
3116 PYTHONFRAMEWORK=Python
3117 PYTHONFRAMEWORKDIR=Python.framework
3118 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3119
3120fi
3121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003125 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003126 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003127 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 esac
3129 case $enableval in
3130 no)
3131 PYTHONFRAMEWORK=
3132 PYTHONFRAMEWORKDIR=no-framework
3133 PYTHONFRAMEWORKPREFIX=
3134 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST=
3136 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 FRAMEWORKALTINSTALLFIRST=
3138 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003139 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE"; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003146 ;;
3147 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003149 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003151 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003152 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3153 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003154 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 if test "x${prefix}" = "xNONE" ; then
3158 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 else
3161 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3162 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163
3164 case "${enableval}" in
3165 /System*)
3166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3167 if test "${prefix}" = "NONE" ; then
3168 # See below
3169 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3170 fi
3171 ;;
3172
3173 /Library*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176
3177 */Library/Frameworks)
3178 MDIR="`dirname "${enableval}"`"
3179 MDIR="`dirname "${MDIR}"`"
3180 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3181
3182 if test "${prefix}" = "NONE"; then
3183 # User hasn't specified the
3184 # --prefix option, but wants to install
3185 # the framework in a non-default location,
3186 # ensure that the compatibility links get
3187 # installed relative to that prefix as well
3188 # instead of in /usr/local.
3189 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3190 fi
3191 ;;
3192
3193 *)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 ;;
3196 esac
3197
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003206 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3207
3208 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3209
Jack Jansene578a632001-08-15 01:27:14 +00003210 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Guido van Rossum563e7081996-09-10 18:20:48 +00003212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003215 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORKPREFIX=
3217 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST=
3219 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 FRAMEWORKALTINSTALLFIRST=
3221 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223 if test "x${prefix}" = "xNONE" ; then
3224 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3225 else
3226 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3227 fi
Jack Jansene578a632001-08-15 01:27:14 +00003228 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231fi
3232
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
3234
Michael W. Hudson54241132001-12-07 15:38:26 +00003235
3236
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240
3241
3242
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003243
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003244
Ned Deilyb8f944f2013-11-21 22:42:25 -08003245
Jack Jansene578a632001-08-15 01:27:14 +00003246##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003247## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003248## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003249##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250# Set name for machine-dependent library files
3251
Matthias Kloseb9621712010-04-24 17:59:49 +00003252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3253$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254if test -z "$MACHDEP"
3255then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 # avoid using uname for cross builds
3257 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003258 # ac_sys_system and ac_sys_release are used for setting
3259 # a lot of different things including 'define_xopen_source'
3260 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 case "$host" in
3262 *-*-linux*)
3263 ac_sys_system=Linux
3264 ;;
3265 *-*-cygwin*)
3266 ac_sys_system=Cygwin
3267 ;;
3268 *)
3269 # for now, limit cross builds to known configurations
3270 MACHDEP="unknown"
3271 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3272 esac
3273 ac_sys_release=
3274 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003276 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003277 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 fi
3283 ac_md_system=`echo $ac_sys_system |
3284 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3285 ac_md_release=`echo $ac_sys_release |
3286 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3287 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003288
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003290 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003291 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003292 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003293 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003294 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003296fi
Guido van Rossum91922671997-10-09 20:24:13 +00003297
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003298
3299if test "$cross_compiling" = yes; then
3300 case "$host" in
3301 *-*-linux*)
3302 case "$host_cpu" in
3303 arm*)
3304 _host_cpu=arm
3305 ;;
3306 *)
3307 _host_cpu=$host_cpu
3308 esac
3309 ;;
3310 *-*-cygwin*)
3311 _host_cpu=
3312 ;;
3313 *)
3314 # for now, limit cross builds to known configurations
3315 MACHDEP="unknown"
3316 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3317 esac
3318 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3319fi
3320
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003321# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3322# disable features if it is defined, without any means to access these
3323# features as extensions. For these systems, we skip the definition of
3324# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3325# some feature, make sure there is no alternative way to access this
3326# feature. Also, when using wildcards, make sure you have verified the
3327# need for not defining _XOPEN_SOURCE on all systems matching the
3328# wildcard, and that the wildcard does not include future systems
3329# (which may remove their limitations).
3330case $ac_sys_system/$ac_sys_release in
3331 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3332 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003333 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003334 # In addition, Stefan Krah confirms that issue #1244610 exists through
3335 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337 define_xopen_source=no
3338 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3339 # also defined. This can be overridden by defining _BSD_SOURCE
3340 # As this has a different meaning on Linux, only define it on OpenBSD
3341
Matthias Kloseb9621712010-04-24 17:59:49 +00003342$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003343
3344 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003346 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3347 # also defined. This can be overridden by defining _BSD_SOURCE
3348 # As this has a different meaning on Linux, only define it on OpenBSD
3349
Matthias Kloseb9621712010-04-24 17:59:49 +00003350$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003351
3352 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003353 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3354 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3355 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003356 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 +00003357 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003358 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3359 # request to enable features supported by the standard as a request
3360 # to disable features not supported by the standard. The best way
3361 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3362 # entirely and define __EXTENSIONS__ instead.
3363 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003364 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003365 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3366 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003367 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003368 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003369 define_xopen_source=no;;
3370 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003371 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003374 # On FreeBSD 4, the math functions C89 does not cover are never defined
3375 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3376 FreeBSD/4.*)
3377 define_xopen_source=no;;
3378 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3379 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3380 # identifies itself as Darwin/7.*
3381 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3382 # disables platform specific features beyond repair.
3383 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3384 # has no effect, don't bother defining them
3385 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003386 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003387 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003388 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003389 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3390 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3391 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003392 AIX/4)
3393 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003394 AIX/5)
3395 if test `uname -r` -eq 1; then
3396 define_xopen_source=no
3397 fi
3398 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003399 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3400 # defining NI_NUMERICHOST.
3401 QNX/6.3.2)
3402 define_xopen_source=no
3403 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003404
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003405esac
3406
3407if test $define_xopen_source = yes
3408then
Victor Stinner14d098d2011-09-07 22:29:43 +02003409 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
Victor Stinner14d098d2011-09-07 22:29:43 +02003411$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003412
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
3414 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3415 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3416 # several APIs are not declared. Since this is also needed in some
3417 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Matthias Kloseb9621712010-04-24 17:59:49 +00003419$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
3421
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003422
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003423$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003424
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003425fi
3426
Christian Heimes647cd872013-12-07 23:39:33 +01003427# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3428case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429 hp*|HP*)
3430 define_stdc_a1=yes;;
3431 *)
3432 define_stdc_a1=no;;
3433esac
3434
3435if test $define_stdc_a1 = yes
3436then
Christian Heimes647cd872013-12-07 23:39:33 +01003437
3438$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3439
Christian Heimesb02bcae2013-12-08 15:21:08 +01003440fi
Christian Heimes647cd872013-12-07 23:39:33 +01003441
Guido van Rossum91922671997-10-09 20:24:13 +00003442#
3443# SGI compilers allow the specification of the both the ABI and the
3444# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003445# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003446#
3447# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3448# thus supply support for various ABI/ISA combinations. The MACHDEP
3449# variable is also adjusted.
3450#
3451
3452if test ! -z "$SGI_ABI"
3453then
3454 CC="cc $SGI_ABI"
3455 LDFLAGS="$SGI_ABI $LDFLAGS"
3456 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3459$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003460
Jack Jansen6b08a402004-06-03 12:41:45 +00003461# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3462# it may influence the way we can build extensions, so distutils
3463# needs to check it
3464
Thomas Wouters477c8d52006-05-27 19:21:47 +00003465
Jack Jansen6b08a402004-06-03 12:41:45 +00003466CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003467EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003468
Guido van Rossum627b2d71993-12-24 10:39:16 +00003469# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003470
3471# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3472# for debug/optimization stuff. BASECFLAGS is for flags that are required
3473# just to get things to compile and link. Users are free to override OPT
3474# when running configure or make. The build should not break if they do.
3475# BASECFLAGS should generally not be messed with, however.
3476
3477# XXX shouldn't some/most/all of this code be merged with the stuff later
3478# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3480$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003483if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003485 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003486 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003487 without_gcc=yes;;
3488 yes) CC=gcc
3489 without_gcc=no;;
3490 *) CC=$withval
3491 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003492 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003493else
Martin v. Löwis11437992002-04-12 09:54:03 +00003494
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003495 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003496 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003497 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003498 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003499 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003500fi
3501
Matthias Kloseb9621712010-04-24 17:59:49 +00003502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3503$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003504
Zachary Ware5af85642015-12-21 12:09:17 -06003505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3506$as_echo_n "checking for --with-icc... " >&6; }
3507
3508# Check whether --with-icc was given.
3509if test "${with_icc+set}" = set; then :
3510 withval=$with_icc;
3511 case $withval in
3512 no) CC=${CC:-cc}
3513 with_icc=no;;
3514 yes) CC=icc
3515 CXX=icpc
3516 with_icc=yes;;
3517 *) CC=$withval
3518 with_icc=$withval;;
3519 esac
3520else
3521
3522 with_icc=no
3523fi
3524
3525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3526$as_echo "$with_icc" >&6; }
3527
Guido van Rossum8b131c51995-03-09 14:10:13 +00003528# If the user switches compilers, we can't believe the cache
3529if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3530then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003531 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003532(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003533fi
3534
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003535# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3536# when the compiler supports them, but we don't always want -O2, and
3537# we set -g later.
3538if test -z "$CFLAGS"; then
3539 CFLAGS=
3540fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003541
3542if test "$ac_sys_system" = "Darwin"
3543then
3544 # Compiler selection on MacOSX is more complicated than
3545 # AC_PROG_CC can handle, see Mac/README.txt for more
3546 # information
3547 if test -z "${CC}"
3548 then
3549 found_gcc=
3550 found_clang=
3551 as_save_IFS=$IFS; IFS=:
3552 for as_dir in $PATH
3553 do
3554 IFS=$as_save_IFS
3555 if test -x $as_dir/gcc; then
3556 if test -z "${found_gcc}"; then
3557 found_gcc=$as_dir/gcc
3558 fi
3559 fi
3560 if test -x $as_dir/clang; then
3561 if test -z "${found_clang}"; then
3562 found_clang=$as_dir/clang
3563 fi
3564 fi
3565 done
3566 IFS=$as_save_IFS
3567
3568 if test -n "$found_gcc" -a -n "$found_clang"
3569 then
3570 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3571 then
3572 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3573$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3574 CC="$found_clang"
3575 CXX="$found_clang++"
3576 fi
3577
3578
3579 elif test -z "$found_gcc" -a -n "$found_clang"
3580 then
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3582$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3583 CC="$found_clang"
3584 CXX="$found_clang++"
3585
3586 elif test -z "$found_gcc" -a -z "$found_clang"
3587 then
3588 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3589 if test -n "${found_clang}"
3590 then
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3592$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3593 CC="${found_clang}"
3594 CXX="`/usr/bin/xcrun -find clang++`"
3595
3596 # else: use default behaviour
3597 fi
3598 fi
3599 fi
3600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003601ac_ext=c
3602ac_cpp='$CPP $CPPFLAGS'
3603ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3604ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3605ac_compiler_gnu=$ac_cv_c_compiler_gnu
3606if test -n "$ac_tool_prefix"; then
3607 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3608set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3610$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003611if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003613else
3614 if test -n "$CC"; then
3615 ac_cv_prog_CC="$CC" # Let the user override the test.
3616else
Martin v. Löwis11437992002-04-12 09:54:03 +00003617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3618for as_dir in $PATH
3619do
3620 IFS=$as_save_IFS
3621 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $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 +00003626 break 2
3627 fi
3628done
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003631
Jack Jansendd19cf82001-12-06 22:36:17 +00003632fi
3633fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003634CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003635if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3637$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003638else
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3640$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003641fi
3642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643
Martin v. Löwis11437992002-04-12 09:54:03 +00003644fi
3645if test -z "$ac_cv_prog_CC"; then
3646 ac_ct_CC=$CC
3647 # Extract the first word of "gcc", so it can be a program name with args.
3648set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3650$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003651if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003653else
3654 if test -n "$ac_ct_CC"; then
3655 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3656else
3657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658for as_dir in $PATH
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 $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 +00003666 break 2
3667 fi
3668done
Matthias Kloseb9621712010-04-24 17:59:49 +00003669 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003670IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003671
3672fi
3673fi
3674ac_ct_CC=$ac_cv_prog_ac_ct_CC
3675if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3677$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003678else
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3680$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003681fi
3682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683 if test "x$ac_ct_CC" = x; then
3684 CC=""
3685 else
3686 case $cross_compiling:$ac_tool_warned in
3687yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003688{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3689$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690ac_tool_warned=yes ;;
3691esac
3692 CC=$ac_ct_CC
3693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003694else
3695 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003696fi
3697
Jack Jansendd19cf82001-12-06 22:36:17 +00003698if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699 if test -n "$ac_tool_prefix"; then
3700 # 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 +00003701set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3703$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003704if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003706else
3707 if test -n "$CC"; then
3708 ac_cv_prog_CC="$CC" # Let the user override the test.
3709else
Martin v. Löwis11437992002-04-12 09:54:03 +00003710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3711for as_dir in $PATH
3712do
3713 IFS=$as_save_IFS
3714 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $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 +00003719 break 2
3720 fi
3721done
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
3725fi
3726fi
3727CC=$ac_cv_prog_CC
3728if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3730$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003731else
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3733$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003734fi
3735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003738fi
3739if test -z "$CC"; then
3740 # Extract the first word of "cc", so it can be a program name with args.
3741set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3743$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003744if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003746else
3747 if test -n "$CC"; then
3748 ac_cv_prog_CC="$CC" # Let the user override the test.
3749else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003750 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3752for as_dir in $PATH
3753do
3754 IFS=$as_save_IFS
3755 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3759 ac_prog_rejected=yes
3760 continue
3761 fi
3762 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $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 +00003764 break 2
3765 fi
3766done
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003769
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770if test $ac_prog_rejected = yes; then
3771 # We found a bogon in the path, so make sure we never use it.
3772 set dummy $ac_cv_prog_CC
3773 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003775 # We chose a different compiler from the bogus one.
3776 # However, it has the same basename, so the bogon will be chosen
3777 # first if we set CC to just the basename; use the full file name.
3778 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003779 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780 fi
3781fi
3782fi
3783fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003784CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003785if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3787$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788else
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3790$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791fi
3792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793
Martin v. Löwis11437992002-04-12 09:54:03 +00003794fi
3795if test -z "$CC"; then
3796 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 do
3799 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3800set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3802$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003803if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003805else
3806 if test -n "$CC"; then
3807 ac_cv_prog_CC="$CC" # Let the user override the test.
3808else
Martin v. Löwis11437992002-04-12 09:54:03 +00003809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3810for as_dir in $PATH
3811do
3812 IFS=$as_save_IFS
3813 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $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 +00003818 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003819 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003820done
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003823
3824fi
3825fi
3826CC=$ac_cv_prog_CC
3827if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3829$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830else
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3832$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003833fi
3834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 test -n "$CC" && break
3837 done
3838fi
3839if test -z "$CC"; then
3840 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003842do
3843 # Extract the first word of "$ac_prog", so it can be a program name with args.
3844set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3846$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003847if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003849else
3850 if test -n "$ac_ct_CC"; then
3851 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3852else
3853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3854for as_dir in $PATH
3855do
3856 IFS=$as_save_IFS
3857 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 $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 +00003862 break 2
3863 fi
3864done
Matthias Kloseb9621712010-04-24 17:59:49 +00003865 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868fi
3869fi
3870ac_ct_CC=$ac_cv_prog_ac_ct_CC
3871if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3873$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003874else
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3876$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879
Martin v. Löwis11437992002-04-12 09:54:03 +00003880 test -n "$ac_ct_CC" && break
3881done
Michael W. Hudson54241132001-12-07 15:38:26 +00003882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883 if test "x$ac_ct_CC" = x; then
3884 CC=""
3885 else
3886 case $cross_compiling:$ac_tool_warned in
3887yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003888{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3889$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890ac_tool_warned=yes ;;
3891esac
3892 CC=$ac_ct_CC
3893 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003894fi
3895
3896fi
3897
3898
Matthias Kloseb9621712010-04-24 17:59:49 +00003899test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003901as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003902See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003903
3904# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003905$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3906set X $ac_compile
3907ac_compiler=$2
3908for ac_option in --version -v -V -qversion; do
3909 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910case "(($ac_try" in
3911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3912 *) ac_try_echo=$ac_try;;
3913esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3915$as_echo "$ac_try_echo"; } >&5
3916 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003918 if test -s conftest.err; then
3919 sed '10a\
3920... rest of stderr output deleted ...
3921 10q' conftest.err >conftest.er1
3922 cat conftest.er1 >&5
3923 fi
3924 rm -f conftest.er1 conftest.err
3925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3926 test $ac_status = 0; }
3927done
Martin v. Löwis11437992002-04-12 09:54:03 +00003928
Matthias Kloseb9621712010-04-24 17:59:49 +00003929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003930/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003931
Martin v. Löwis11437992002-04-12 09:54:03 +00003932int
3933main ()
3934{
3935
3936 ;
3937 return 0;
3938}
3939_ACEOF
3940ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003941ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003942# Try to create an executable without -o first, disregard a.out.
3943# It will help us diagnose broken compilers, and finding out an intuition
3944# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3946$as_echo_n "checking whether the C compiler works... " >&6; }
3947ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3948
3949# The possible output files:
3950ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952ac_rmfiles=
3953for ac_file in $ac_files
3954do
3955 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3958 esac
3959done
3960rm -f $ac_rmfiles
3961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963case "(($ac_try" in
3964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3965 *) ac_try_echo=$ac_try;;
3966esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3968$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3972 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3974# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3975# in a Makefile. We should not override ac_cv_exeext if it was cached,
3976# so that the user can short-circuit this test for compilers unknown to
3977# Autoconf.
3978for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003979do
3980 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003981 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983 ;;
3984 [ab].out )
3985 # We found the default executable, but exeext='' is most
3986 # certainly right.
3987 break;;
3988 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990 then :; else
3991 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3992 fi
3993 # We set ac_cv_exeext here because the later test for it is not
3994 # safe: cross compilers may not add the suffix if given an `-o'
3995 # argument, so we may need to know it at that point already.
3996 # Even if this section looks crufty: it has the advantage of
3997 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998 break;;
3999 * )
4000 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 esac
4002done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003test "$ac_cv_exeext" = no && ac_cv_exeext=
4004
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004005else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006 ac_file=''
4007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004008if test -z "$ac_file"; then :
4009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4010$as_echo "no" >&6; }
4011$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004012sed 's/^/| /' conftest.$ac_ext >&5
4013
Matthias Kloseb9621712010-04-24 17:59:49 +00004014{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004016as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004017See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004018else
4019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4020$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4023$as_echo_n "checking for C compiler default output file name... " >&6; }
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4025$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004027
Matthias Kloseb9621712010-04-24 17:59:49 +00004028rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4031$as_echo_n "checking for suffix of executables... " >&6; }
4032if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033case "(($ac_try" in
4034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4035 *) ac_try_echo=$ac_try;;
4036esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4038$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004040 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4042 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4044# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4045# work properly (i.e., refer to `conftest.exe'), while it won't with
4046# `rm'.
4047for ac_file in conftest.exe conftest conftest.*; do
4048 test -f "$ac_file" || continue
4049 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4052 break;;
4053 * ) break;;
4054 esac
4055done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056else
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004059as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004060See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004062rm -f conftest conftest$ac_cv_exeext
4063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4064$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004065
4066rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004067EXEEXT=$ac_cv_exeext
4068ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4070/* end confdefs.h. */
4071#include <stdio.h>
4072int
4073main ()
4074{
4075FILE *f = fopen ("conftest.out", "w");
4076 return ferror (f) || fclose (f) != 0;
4077
4078 ;
4079 return 0;
4080}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004082ac_clean_files="$ac_clean_files conftest.out"
4083# Check that the compiler produces executables we can run. If not, either
4084# the compiler is broken, or we cross compile.
4085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4086$as_echo_n "checking whether we are cross compiling... " >&6; }
4087if test "$cross_compiling" != yes; then
4088 { { ac_try="$ac_link"
4089case "(($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_link") 2>&5
4096 ac_status=$?
4097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4098 test $ac_status = 0; }
4099 if { ac_try='./conftest$ac_cv_exeext'
4100 { { case "(($ac_try" in
4101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4102 *) ac_try_echo=$ac_try;;
4103esac
4104eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4105$as_echo "$ac_try_echo"; } >&5
4106 (eval "$ac_try") 2>&5
4107 ac_status=$?
4108 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4109 test $ac_status = 0; }; }; then
4110 cross_compiling=no
4111 else
4112 if test "$cross_compiling" = maybe; then
4113 cross_compiling=yes
4114 else
4115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004117as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004118If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004119See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 fi
4121 fi
4122fi
4123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4124$as_echo "$cross_compiling" >&6; }
4125
4126rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4127ac_clean_files=$ac_clean_files_save
4128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4129$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004130if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 $as_echo_n "(cached) " >&6
4132else
4133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134/* end confdefs.h. */
4135
4136int
4137main ()
4138{
4139
4140 ;
4141 return 0;
4142}
4143_ACEOF
4144rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004145if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146case "(($ac_try" in
4147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4148 *) ac_try_echo=$ac_try;;
4149esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004150eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4151$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004153 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4155 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156 for ac_file in conftest.o conftest.obj conftest.*; do
4157 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4161 break;;
4162 esac
4163done
4164else
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004166sed 's/^/| /' conftest.$ac_ext >&5
4167
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004170as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004171See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004172fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004173rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4176$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004177OBJEXT=$ac_cv_objext
4178ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4180$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004181if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004183else
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004186
Martin v. Löwis11437992002-04-12 09:54:03 +00004187int
4188main ()
4189{
4190#ifndef __GNUC__
4191 choke me
4192#endif
4193
4194 ;
4195 return 0;
4196}
4197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004199 ac_compiler_gnu=yes
4200else
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004204ac_cv_c_compiler_gnu=$ac_compiler_gnu
4205
4206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4208$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4209if test $ac_compiler_gnu = yes; then
4210 GCC=yes
4211else
4212 GCC=
4213fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004214ac_test_CFLAGS=${CFLAGS+set}
4215ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4217$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004218if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004220else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221 ac_save_c_werror_flag=$ac_c_werror_flag
4222 ac_c_werror_flag=yes
4223 ac_cv_prog_cc_g=no
4224 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004227
Martin v. Löwis11437992002-04-12 09:54:03 +00004228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004236if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004237 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238else
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 CFLAGS=""
4240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241/* end confdefs.h. */
4242
4243int
4244main ()
4245{
4246
4247 ;
4248 return 0;
4249}
4250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004251if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252
Matthias Kloseb9621712010-04-24 17:59:49 +00004253else
4254 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257/* end confdefs.h. */
4258
4259int
4260main ()
4261{
4262
4263 ;
4264 return 0;
4265}
4266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004267if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275 ac_c_werror_flag=$ac_save_c_werror_flag
4276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4278$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004280 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281elif test $ac_cv_prog_cc_g = yes; then
4282 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004283 CFLAGS="-g -O2"
4284 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004285 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286 fi
4287else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004288 if test "$GCC" = yes; then
4289 CFLAGS="-O2"
4290 else
4291 CFLAGS=
4292 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4295$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004296if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004297 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004298else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004300ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004302/* end confdefs.h. */
4303#include <stdarg.h>
4304#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004305struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004306/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4307struct buf { int x; };
4308FILE * (*rcsopen) (struct buf *, struct stat *, int);
4309static char *e (p, i)
4310 char **p;
4311 int i;
4312{
4313 return p[i];
4314}
4315static char *f (char * (*g) (char **, int), char **p, ...)
4316{
4317 char *s;
4318 va_list v;
4319 va_start (v,p);
4320 s = g (p, va_arg (v,int));
4321 va_end (v);
4322 return s;
4323}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004324
4325/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4326 function prototypes and stuff, but not '\xHH' hex character constants.
4327 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004329 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4330 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004332int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4335 inside strings and character constants. */
4336#define FOO(x) 'x'
4337int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4338
Skip Montanaro6dead952003-09-25 14:50:04 +00004339int test (int i, double x);
4340struct s1 {int (*f) (int a);};
4341struct s2 {int (*f) (double a);};
4342int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4343int argc;
4344char **argv;
4345int
4346main ()
4347{
4348return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4349 ;
4350 return 0;
4351}
4352_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4354 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004355do
4356 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360rm -f core conftest.err conftest.$ac_objext
4361 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004362done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004364CC=$ac_save_CC
4365
4366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367# AC_CACHE_VAL
4368case "x$ac_cv_prog_cc_c89" in
4369 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4371$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4374$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004375 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4378$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004379esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004380if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004381
Matthias Kloseb9621712010-04-24 17:59:49 +00004382fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Martin v. Löwis11437992002-04-12 09:54:03 +00004384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004390ac_ext=c
4391ac_cpp='$CPP $CPPFLAGS'
4392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4394ac_compiler_gnu=$ac_cv_c_compiler_gnu
4395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4396$as_echo_n "checking how to run the C preprocessor... " >&6; }
4397# On Suns, sometimes $CPP names a directory.
4398if test -n "$CPP" && test -d "$CPP"; then
4399 CPP=
4400fi
4401if test -z "$CPP"; then
4402 if ${ac_cv_prog_CPP+:} false; then :
4403 $as_echo_n "(cached) " >&6
4404else
4405 # Double quotes because CPP needs to be expanded
4406 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4407 do
4408 ac_preproc_ok=false
4409for ac_c_preproc_warn_flag in '' yes
4410do
4411 # Use a header file that comes with gcc, so configuring glibc
4412 # with a fresh cross-compiler works.
4413 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4414 # <limits.h> exists even on freestanding compilers.
4415 # On the NeXT, cc -E runs the code through the compiler's parser,
4416 # not just through cpp. "Syntax error" is here to catch this case.
4417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4418/* end confdefs.h. */
4419#ifdef __STDC__
4420# include <limits.h>
4421#else
4422# include <assert.h>
4423#endif
4424 Syntax error
4425_ACEOF
4426if ac_fn_c_try_cpp "$LINENO"; then :
4427
4428else
4429 # Broken: fails on valid input.
4430continue
4431fi
4432rm -f conftest.err conftest.i conftest.$ac_ext
4433
4434 # OK, works on sane cases. Now check whether nonexistent headers
4435 # can be detected and how.
4436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4437/* end confdefs.h. */
4438#include <ac_nonexistent.h>
4439_ACEOF
4440if ac_fn_c_try_cpp "$LINENO"; then :
4441 # Broken: success on invalid input.
4442continue
4443else
4444 # Passes both tests.
4445ac_preproc_ok=:
4446break
4447fi
4448rm -f conftest.err conftest.i conftest.$ac_ext
4449
4450done
4451# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4452rm -f conftest.i conftest.err conftest.$ac_ext
4453if $ac_preproc_ok; then :
4454 break
4455fi
4456
4457 done
4458 ac_cv_prog_CPP=$CPP
4459
4460fi
4461 CPP=$ac_cv_prog_CPP
4462else
4463 ac_cv_prog_CPP=$CPP
4464fi
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4466$as_echo "$CPP" >&6; }
4467ac_preproc_ok=false
4468for ac_c_preproc_warn_flag in '' yes
4469do
4470 # Use a header file that comes with gcc, so configuring glibc
4471 # with a fresh cross-compiler works.
4472 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4473 # <limits.h> exists even on freestanding compilers.
4474 # On the NeXT, cc -E runs the code through the compiler's parser,
4475 # not just through cpp. "Syntax error" is here to catch this case.
4476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4477/* end confdefs.h. */
4478#ifdef __STDC__
4479# include <limits.h>
4480#else
4481# include <assert.h>
4482#endif
4483 Syntax error
4484_ACEOF
4485if ac_fn_c_try_cpp "$LINENO"; then :
4486
4487else
4488 # Broken: fails on valid input.
4489continue
4490fi
4491rm -f conftest.err conftest.i conftest.$ac_ext
4492
4493 # OK, works on sane cases. Now check whether nonexistent headers
4494 # can be detected and how.
4495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4496/* end confdefs.h. */
4497#include <ac_nonexistent.h>
4498_ACEOF
4499if ac_fn_c_try_cpp "$LINENO"; then :
4500 # Broken: success on invalid input.
4501continue
4502else
4503 # Passes both tests.
4504ac_preproc_ok=:
4505break
4506fi
4507rm -f conftest.err conftest.i conftest.$ac_ext
4508
4509done
4510# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4511rm -f conftest.i conftest.err conftest.$ac_ext
4512if $ac_preproc_ok; then :
4513
4514else
4515 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4516$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4517as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4518See \`config.log' for more details" "$LINENO" 5; }
4519fi
4520
4521ac_ext=c
4522ac_cpp='$CPP $CPPFLAGS'
4523ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4524ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4525ac_compiler_gnu=$ac_cv_c_compiler_gnu
4526
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4528$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4529if ${ac_cv_path_GREP+:} false; then :
4530 $as_echo_n "(cached) " >&6
4531else
4532 if test -z "$GREP"; then
4533 ac_path_GREP_found=false
4534 # Loop through the user's path and test for each of PROGNAME-LIST
4535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4536for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4537do
4538 IFS=$as_save_IFS
4539 test -z "$as_dir" && as_dir=.
4540 for ac_prog in grep ggrep; do
4541 for ac_exec_ext in '' $ac_executable_extensions; do
4542 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4543 as_fn_executable_p "$ac_path_GREP" || continue
4544# Check for GNU ac_path_GREP and select it if it is found.
4545 # Check for GNU $ac_path_GREP
4546case `"$ac_path_GREP" --version 2>&1` in
4547*GNU*)
4548 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4549*)
4550 ac_count=0
4551 $as_echo_n 0123456789 >"conftest.in"
4552 while :
4553 do
4554 cat "conftest.in" "conftest.in" >"conftest.tmp"
4555 mv "conftest.tmp" "conftest.in"
4556 cp "conftest.in" "conftest.nl"
4557 $as_echo 'GREP' >> "conftest.nl"
4558 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4559 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4560 as_fn_arith $ac_count + 1 && ac_count=$as_val
4561 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4562 # Best one so far, save it but keep looking for a better one
4563 ac_cv_path_GREP="$ac_path_GREP"
4564 ac_path_GREP_max=$ac_count
4565 fi
4566 # 10*(2^10) chars as input seems more than enough
4567 test $ac_count -gt 10 && break
4568 done
4569 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4570esac
4571
4572 $ac_path_GREP_found && break 3
4573 done
4574 done
4575 done
4576IFS=$as_save_IFS
4577 if test -z "$ac_cv_path_GREP"; then
4578 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4579 fi
4580else
4581 ac_cv_path_GREP=$GREP
4582fi
4583
4584fi
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4586$as_echo "$ac_cv_path_GREP" >&6; }
4587 GREP="$ac_cv_path_GREP"
4588
4589
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004590
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004591
4592
Matthias Kloseb9621712010-04-24 17:59:49 +00004593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4594$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004596# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004597if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004598 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004599
4600 case $withval in
4601 no) with_cxx_main=no
4602 MAINCC='$(CC)';;
4603 yes) with_cxx_main=yes
4604 MAINCC='$(CXX)';;
4605 *) with_cxx_main=yes
4606 MAINCC=$withval
4607 if test -z "$CXX"
4608 then
4609 CXX=$withval
4610 fi;;
4611 esac
4612else
4613
4614 with_cxx_main=no
4615 MAINCC='$(CC)'
4616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004617fi
4618
Matthias Kloseb9621712010-04-24 17:59:49 +00004619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4620$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004621
4622preset_cxx="$CXX"
4623if test -z "$CXX"
4624then
4625 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004626 gcc) if test -n "$ac_tool_prefix"; then
4627 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4628set dummy ${ac_tool_prefix}g++; ac_word=$2
4629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4630$as_echo_n "checking for $ac_word... " >&6; }
4631if ${ac_cv_path_CXX+:} false; then :
4632 $as_echo_n "(cached) " >&6
4633else
4634 case $CXX in
4635 [\\/]* | ?:[\\/]*)
4636 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4637 ;;
4638 *)
4639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4640for as_dir in notfound
4641do
4642 IFS=$as_save_IFS
4643 test -z "$as_dir" && as_dir=.
4644 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004646 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4648 break 2
4649 fi
4650done
4651 done
4652IFS=$as_save_IFS
4653
4654 ;;
4655esac
4656fi
4657CXX=$ac_cv_path_CXX
4658if test -n "$CXX"; then
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4660$as_echo "$CXX" >&6; }
4661else
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4663$as_echo "no" >&6; }
4664fi
4665
4666
4667fi
4668if test -z "$ac_cv_path_CXX"; then
4669 ac_pt_CXX=$CXX
4670 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004671set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4673$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004674if ${ac_cv_path_ac_pt_CXX+:} false; then :
4675 $as_echo_n "(cached) " >&6
4676else
4677 case $ac_pt_CXX in
4678 [\\/]* | ?:[\\/]*)
4679 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4680 ;;
4681 *)
4682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4683for as_dir in notfound
4684do
4685 IFS=$as_save_IFS
4686 test -z "$as_dir" && as_dir=.
4687 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004689 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4691 break 2
4692 fi
4693done
4694 done
4695IFS=$as_save_IFS
4696
4697 ;;
4698esac
4699fi
4700ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4701if test -n "$ac_pt_CXX"; then
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4703$as_echo "$ac_pt_CXX" >&6; }
4704else
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4706$as_echo "no" >&6; }
4707fi
4708
4709 if test "x$ac_pt_CXX" = x; then
4710 CXX="g++"
4711 else
4712 case $cross_compiling:$ac_tool_warned in
4713yes:)
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4715$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4716ac_tool_warned=yes ;;
4717esac
4718 CXX=$ac_pt_CXX
4719 fi
4720else
4721 CXX="$ac_cv_path_CXX"
4722fi
4723 ;;
4724 cc) if test -n "$ac_tool_prefix"; then
4725 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4726set dummy ${ac_tool_prefix}c++; ac_word=$2
4727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4728$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004729if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004730 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004731else
4732 case $CXX in
4733 [\\/]* | ?:[\\/]*)
4734 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4735 ;;
4736 *)
4737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4738for as_dir in notfound
4739do
4740 IFS=$as_save_IFS
4741 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004744 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746 break 2
4747 fi
4748done
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004750IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752 ;;
4753esac
4754fi
4755CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004756if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4758$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004759else
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004763
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764
4765fi
4766if test -z "$ac_cv_path_CXX"; then
4767 ac_pt_CXX=$CXX
4768 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4771$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004772if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004773 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004774else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004775 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004777 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 +00004778 ;;
4779 *)
4780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4781for as_dir in notfound
4782do
4783 IFS=$as_save_IFS
4784 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004787 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789 break 2
4790 fi
4791done
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004793IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795 ;;
4796esac
4797fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004798ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4799if test -n "$ac_pt_CXX"; then
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4801$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004802else
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4804$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004806
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004807 if test "x$ac_pt_CXX" = x; then
4808 CXX="c++"
4809 else
4810 case $cross_compiling:$ac_tool_warned in
4811yes:)
4812{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4813$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4814ac_tool_warned=yes ;;
4815esac
4816 CXX=$ac_pt_CXX
4817 fi
4818else
4819 CXX="$ac_cv_path_CXX"
4820fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004821 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822 clang|*/clang) if test -n "$ac_tool_prefix"; then
4823 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4824set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
4827if ${ac_cv_path_CXX+:} false; then :
4828 $as_echo_n "(cached) " >&6
4829else
4830 case $CXX in
4831 [\\/]* | ?:[\\/]*)
4832 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4833 ;;
4834 *)
4835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836for as_dir in notfound
4837do
4838 IFS=$as_save_IFS
4839 test -z "$as_dir" && as_dir=.
4840 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004842 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4844 break 2
4845 fi
4846done
4847 done
4848IFS=$as_save_IFS
4849
Ned Deilycbfb9a52012-06-23 16:02:19 -07004850 ;;
4851esac
4852fi
4853CXX=$ac_cv_path_CXX
4854if test -n "$CXX"; then
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4856$as_echo "$CXX" >&6; }
4857else
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
4860fi
4861
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004862
4863fi
4864if test -z "$ac_cv_path_CXX"; then
4865 ac_pt_CXX=$CXX
4866 # Extract the first word of "clang++", so it can be a program name with args.
4867set dummy clang++; ac_word=$2
4868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4869$as_echo_n "checking for $ac_word... " >&6; }
4870if ${ac_cv_path_ac_pt_CXX+:} false; then :
4871 $as_echo_n "(cached) " >&6
4872else
4873 case $ac_pt_CXX in
4874 [\\/]* | ?:[\\/]*)
4875 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4876 ;;
4877 *)
4878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4879for as_dir in notfound
4880do
4881 IFS=$as_save_IFS
4882 test -z "$as_dir" && as_dir=.
4883 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004885 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4887 break 2
4888 fi
4889done
4890 done
4891IFS=$as_save_IFS
4892
4893 ;;
4894esac
4895fi
4896ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4897if test -n "$ac_pt_CXX"; then
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4899$as_echo "$ac_pt_CXX" >&6; }
4900else
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902$as_echo "no" >&6; }
4903fi
4904
4905 if test "x$ac_pt_CXX" = x; then
4906 CXX="clang++"
4907 else
4908 case $cross_compiling:$ac_tool_warned in
4909yes:)
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4911$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4912ac_tool_warned=yes ;;
4913esac
4914 CXX=$ac_pt_CXX
4915 fi
4916else
4917 CXX="$ac_cv_path_CXX"
4918fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004919 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004920 icc|*/icc) if test -n "$ac_tool_prefix"; then
4921 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4922set dummy ${ac_tool_prefix}icpc; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if ${ac_cv_path_CXX+:} false; then :
4926 $as_echo_n "(cached) " >&6
4927else
4928 case $CXX in
4929 [\\/]* | ?:[\\/]*)
4930 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4931 ;;
4932 *)
4933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934for as_dir in notfound
4935do
4936 IFS=$as_save_IFS
4937 test -z "$as_dir" && as_dir=.
4938 for ac_exec_ext in '' $ac_executable_extensions; do
4939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4940 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942 break 2
4943 fi
4944done
4945 done
4946IFS=$as_save_IFS
4947
4948 ;;
4949esac
4950fi
4951CXX=$ac_cv_path_CXX
4952if test -n "$CXX"; then
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4954$as_echo "$CXX" >&6; }
4955else
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957$as_echo "no" >&6; }
4958fi
4959
4960
4961fi
4962if test -z "$ac_cv_path_CXX"; then
4963 ac_pt_CXX=$CXX
4964 # Extract the first word of "icpc", so it can be a program name with args.
4965set dummy icpc; ac_word=$2
4966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4967$as_echo_n "checking for $ac_word... " >&6; }
4968if ${ac_cv_path_ac_pt_CXX+:} false; then :
4969 $as_echo_n "(cached) " >&6
4970else
4971 case $ac_pt_CXX in
4972 [\\/]* | ?:[\\/]*)
4973 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4974 ;;
4975 *)
4976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977for as_dir in notfound
4978do
4979 IFS=$as_save_IFS
4980 test -z "$as_dir" && as_dir=.
4981 for ac_exec_ext in '' $ac_executable_extensions; do
4982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985 break 2
4986 fi
4987done
4988 done
4989IFS=$as_save_IFS
4990
4991 ;;
4992esac
4993fi
4994ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4995if test -n "$ac_pt_CXX"; then
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4997$as_echo "$ac_pt_CXX" >&6; }
4998else
4999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5000$as_echo "no" >&6; }
5001fi
5002
5003 if test "x$ac_pt_CXX" = x; then
5004 CXX="icpc"
5005 else
5006 case $cross_compiling:$ac_tool_warned in
5007yes:)
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5009$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5010ac_tool_warned=yes ;;
5011esac
5012 CXX=$ac_pt_CXX
5013 fi
5014else
5015 CXX="$ac_cv_path_CXX"
5016fi
5017 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005018 esac
5019 if test "$CXX" = "notfound"
5020 then
5021 CXX=""
5022 fi
5023fi
5024if test -z "$CXX"
5025then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005026 if test -n "$ac_tool_prefix"; then
5027 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5028 do
5029 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005033if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005035else
5036 if test -n "$CXX"; then
5037 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5038else
5039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005046 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005048 break 2
5049 fi
5050done
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005052IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005053
5054fi
5055fi
5056CXX=$ac_cv_prog_CXX
5057if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5059$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060else
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005063fi
5064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005066 test -n "$CXX" && break
5067 done
5068fi
5069if test -z "$CXX"; then
5070 ac_ct_CXX=$CXX
5071 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5072do
5073 # Extract the first word of "$ac_prog", so it can be a program name with args.
5074set dummy $ac_prog; ac_word=$2
5075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5076$as_echo_n "checking for $ac_word... " >&6; }
5077if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5078 $as_echo_n "(cached) " >&6
5079else
5080 if test -n "$ac_ct_CXX"; then
5081 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5082else
5083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084for as_dir in $PATH
5085do
5086 IFS=$as_save_IFS
5087 test -z "$as_dir" && as_dir=.
5088 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005090 ac_cv_prog_ac_ct_CXX="$ac_prog"
5091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5092 break 2
5093 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005094done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005095 done
5096IFS=$as_save_IFS
5097
5098fi
5099fi
5100ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5101if test -n "$ac_ct_CXX"; then
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5103$as_echo "$ac_ct_CXX" >&6; }
5104else
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
5107fi
5108
5109
5110 test -n "$ac_ct_CXX" && break
5111done
5112
5113 if test "x$ac_ct_CXX" = x; then
5114 CXX="notfound"
5115 else
5116 case $cross_compiling:$ac_tool_warned in
5117yes:)
5118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5120ac_tool_warned=yes ;;
5121esac
5122 CXX=$ac_ct_CXX
5123 fi
5124fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125
5126 if test "$CXX" = "notfound"
5127 then
5128 CXX=""
5129 fi
5130fi
5131if test "$preset_cxx" != "$CXX"
5132then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005133 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005134
5135 By default, distutils will build C++ extension modules with \"$CXX\".
5136 If this is not intended, then set CXX on the configure command line.
5137 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005138$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005139
5140 By default, distutils will build C++ extension modules with \"$CXX\".
5141 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005142 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005143fi
5144
5145
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005146MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5147
5148
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5150$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5151cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005152#undef bfin
5153#undef cris
5154#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005155#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005156#undef hppa
5157#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005158#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005159#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005160#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005161#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005162#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005163#if defined(__ANDROID__)
5164# if defined(__x86_64__) && defined(__LP64__)
5165 x86_64-linux-android
5166# elif defined(__i386__)
5167 i686-linux-android
5168# elif defined(__aarch64__) && defined(__AARCH64EL__)
5169# if defined(__ILP32__)
5170 aarch64_ilp32-linux-android
5171# else
5172 aarch64-linux-android
5173# endif
5174# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5175 arm-linux-androideabi
5176# elif defined(__mips_hard_float) && defined(_MIPSEL)
5177# if _MIPS_SIM == _ABIO32
5178 mipsel-linux-android
5179# elif _MIPS_SIM == _ABI64
5180 mips64el-linux-android
5181# else
5182# error unknown platform triplet
5183# endif
5184# else
5185# error unknown platform triplet
5186# endif
5187#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005188# if defined(__x86_64__) && defined(__LP64__)
5189 x86_64-linux-gnu
5190# elif defined(__x86_64__) && defined(__ILP32__)
5191 x86_64-linux-gnux32
5192# elif defined(__i386__)
5193 i386-linux-gnu
5194# elif defined(__aarch64__) && defined(__AARCH64EL__)
5195# if defined(__ILP32__)
5196 aarch64_ilp32-linux-gnu
5197# else
5198 aarch64-linux-gnu
5199# endif
5200# elif defined(__aarch64__) && defined(__AARCH64EB__)
5201# if defined(__ILP32__)
5202 aarch64_be_ilp32-linux-gnu
5203# else
5204 aarch64_be-linux-gnu
5205# endif
5206# elif defined(__alpha__)
5207 alpha-linux-gnu
5208# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5209# if defined(__ARMEL__)
5210 arm-linux-gnueabihf
5211# else
5212 armeb-linux-gnueabihf
5213# endif
5214# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5215# if defined(__ARMEL__)
5216 arm-linux-gnueabi
5217# else
5218 armeb-linux-gnueabi
5219# endif
5220# elif defined(__hppa__)
5221 hppa-linux-gnu
5222# elif defined(__ia64__)
5223 ia64-linux-gnu
5224# elif defined(__m68k__) && !defined(__mcoldfire__)
5225 m68k-linux-gnu
5226# elif defined(__mips_hard_float) && defined(_MIPSEL)
5227# if _MIPS_SIM == _ABIO32
5228 mipsel-linux-gnu
5229# elif _MIPS_SIM == _ABIN32
5230 mips64el-linux-gnuabin32
5231# elif _MIPS_SIM == _ABI64
5232 mips64el-linux-gnuabi64
5233# else
5234# error unknown platform triplet
5235# endif
5236# elif defined(__mips_hard_float)
5237# if _MIPS_SIM == _ABIO32
5238 mips-linux-gnu
5239# elif _MIPS_SIM == _ABIN32
5240 mips64-linux-gnuabin32
5241# elif _MIPS_SIM == _ABI64
5242 mips64-linux-gnuabi64
5243# else
5244# error unknown platform triplet
5245# endif
5246# elif defined(__or1k__)
5247 or1k-linux-gnu
5248# elif defined(__powerpc__) && defined(__SPE__)
5249 powerpc-linux-gnuspe
5250# elif defined(__powerpc64__)
5251# if defined(__LITTLE_ENDIAN__)
5252 powerpc64le-linux-gnu
5253# else
5254 powerpc64-linux-gnu
5255# endif
5256# elif defined(__powerpc__)
5257 powerpc-linux-gnu
5258# elif defined(__s390x__)
5259 s390x-linux-gnu
5260# elif defined(__s390__)
5261 s390-linux-gnu
5262# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5263 sh4-linux-gnu
5264# elif defined(__sparc__) && defined(__arch64__)
5265 sparc64-linux-gnu
5266# elif defined(__sparc__)
5267 sparc-linux-gnu
5268# else
5269# error unknown platform triplet
5270# endif
5271#elif defined(__FreeBSD_kernel__)
5272# if defined(__LP64__)
5273 x86_64-kfreebsd-gnu
5274# elif defined(__i386__)
5275 i386-kfreebsd-gnu
5276# else
5277# error unknown platform triplet
5278# endif
5279#elif defined(__gnu_hurd__)
5280 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005281#elif defined(__APPLE__)
5282 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005283#else
5284# error unknown platform triplet
5285#endif
5286
5287EOF
5288
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005289if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005290 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5292$as_echo "$PLATFORM_TRIPLET" >&6; }
5293else
5294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5295$as_echo "none" >&6; }
5296fi
5297rm -f conftest.c conftest.out
5298
5299if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5300 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5301 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5302 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005303elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5304 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005306if test x$PLATFORM_TRIPLET = x; then
5307 PLATDIR=plat-$MACHDEP
5308else
5309 PLATDIR=plat-$PLATFORM_TRIPLET
5310fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005311
5312
doko@ubuntu.com55532312016-06-14 08:55:19 +02005313if test x$MULTIARCH != x; then
5314 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5315fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005316
5317
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5319$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5320save_LDFLAGS="$LDFLAGS"
5321LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005322
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5324/* end confdefs.h. */
5325
5326int
5327main ()
5328{
5329
5330 ;
5331 return 0;
5332}
5333_ACEOF
5334if ac_fn_c_try_link "$LINENO"; then :
5335 NO_AS_NEEDED="-Wl,--no-as-needed"
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5337$as_echo "yes" >&6; }
5338else
5339 NO_AS_NEEDED=""
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5341$as_echo "no" >&6; }
5342fi
5343rm -f core conftest.err conftest.$ac_objext \
5344 conftest$ac_exeext conftest.$ac_ext
5345LDFLAGS="$save_LDFLAGS"
5346
5347
5348
5349# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005350
Matthias Kloseb9621712010-04-24 17:59:49 +00005351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5352$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005353if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005354 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005355else
5356 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5357 then ac_cv_path_EGREP="$GREP -E"
5358 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005359 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005360 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005361 # Loop through the user's path and test for each of PROGNAME-LIST
5362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5364do
5365 IFS=$as_save_IFS
5366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 for ac_prog in egrep; do
5368 for ac_exec_ext in '' $ac_executable_extensions; do
5369 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005370 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005371# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005372 # Check for GNU $ac_path_EGREP
5373case `"$ac_path_EGREP" --version 2>&1` in
5374*GNU*)
5375 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5376*)
5377 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379 while :
5380 do
5381 cat "conftest.in" "conftest.in" >"conftest.tmp"
5382 mv "conftest.tmp" "conftest.in"
5383 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5386 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5389 # Best one so far, save it but keep looking for a better one
5390 ac_cv_path_EGREP="$ac_path_EGREP"
5391 ac_path_EGREP_max=$ac_count
5392 fi
5393 # 10*(2^10) chars as input seems more than enough
5394 test $ac_count -gt 10 && break
5395 done
5396 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5397esac
5398
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 $ac_path_EGREP_found && break 3
5400 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005405 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 +00005406 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407else
5408 ac_cv_path_EGREP=$EGREP
5409fi
5410
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 fi
5412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5414$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005416
5417
Matthias Kloseb9621712010-04-24 17:59:49 +00005418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5419$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005420if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 $as_echo_n "(cached) " >&6
5422else
5423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005424/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005425#include <stdlib.h>
5426#include <stdarg.h>
5427#include <string.h>
5428#include <float.h>
5429
5430int
5431main ()
5432{
5433
5434 ;
5435 return 0;
5436}
5437_ACEOF
5438if ac_fn_c_try_compile "$LINENO"; then :
5439 ac_cv_header_stdc=yes
5440else
5441 ac_cv_header_stdc=no
5442fi
5443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5444
5445if test $ac_cv_header_stdc = yes; then
5446 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5448/* end confdefs.h. */
5449#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005450
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005451_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005454
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005455else
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005457fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005458rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459
Matthias Kloseb9621712010-04-24 17:59:49 +00005460fi
5461
5462if test $ac_cv_header_stdc = yes; then
5463 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5465/* end confdefs.h. */
5466#include <stdlib.h>
5467
5468_ACEOF
5469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5470 $EGREP "free" >/dev/null 2>&1; then :
5471
5472else
5473 ac_cv_header_stdc=no
5474fi
5475rm -f conftest*
5476
5477fi
5478
5479if test $ac_cv_header_stdc = yes; then
5480 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5481 if test "$cross_compiling" = yes; then :
5482 :
5483else
5484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5485/* end confdefs.h. */
5486#include <ctype.h>
5487#include <stdlib.h>
5488#if ((' ' & 0x0FF) == 0x020)
5489# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5490# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5491#else
5492# define ISLOWER(c) \
5493 (('a' <= (c) && (c) <= 'i') \
5494 || ('j' <= (c) && (c) <= 'r') \
5495 || ('s' <= (c) && (c) <= 'z'))
5496# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5497#endif
5498
5499#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5500int
5501main ()
5502{
5503 int i;
5504 for (i = 0; i < 256; i++)
5505 if (XOR (islower (i), ISLOWER (i))
5506 || toupper (i) != TOUPPER (i))
5507 return 2;
5508 return 0;
5509}
5510_ACEOF
5511if ac_fn_c_try_run "$LINENO"; then :
5512
5513else
5514 ac_cv_header_stdc=no
5515fi
5516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5517 conftest.$ac_objext conftest.beam conftest.$ac_ext
5518fi
5519
5520fi
5521fi
5522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5523$as_echo "$ac_cv_header_stdc" >&6; }
5524if test $ac_cv_header_stdc = yes; then
5525
5526$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5527
5528fi
5529
5530# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5531for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5532 inttypes.h stdint.h unistd.h
5533do :
5534 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5535ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5536"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005537if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005538 cat >>confdefs.h <<_ACEOF
5539#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5540_ACEOF
5541
5542fi
5543
5544done
5545
5546
5547
5548 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 +02005549if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 MINIX=yes
5551else
5552 MINIX=
5553fi
5554
5555
5556 if test "$MINIX" = yes; then
5557
5558$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5559
5560
5561$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5562
5563
5564$as_echo "#define _MINIX 1" >>confdefs.h
5565
5566 fi
5567
5568
5569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5570$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005571if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005572 $as_echo_n "(cached) " >&6
5573else
5574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5575/* end confdefs.h. */
5576
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005577# define __EXTENSIONS__ 1
5578 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005579int
5580main ()
5581{
5582
5583 ;
5584 return 0;
5585}
5586_ACEOF
5587if ac_fn_c_try_compile "$LINENO"; then :
5588 ac_cv_safe_to_define___extensions__=yes
5589else
5590 ac_cv_safe_to_define___extensions__=no
5591fi
5592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593fi
5594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5595$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5596 test $ac_cv_safe_to_define___extensions__ = yes &&
5597 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5598
5599 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5600
5601 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5602
5603 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5604
5605 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5606
5607
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608
Xavier de Gaye95750b12016-07-09 11:05:42 +02005609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5610$as_echo_n "checking for the Android API level... " >&6; }
5611cat >> conftest.c <<EOF
5612#ifdef __ANDROID__
5613#include <android/api-level.h>
5614__ANDROID_API__
5615#else
5616#error not Android
5617#endif
5618EOF
5619
5620if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5621 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5623$as_echo "$ANDROID_API_LEVEL" >&6; }
5624
5625cat >>confdefs.h <<_ACEOF
5626#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5627_ACEOF
5628
5629else
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5631$as_echo "not Android" >&6; }
5632fi
5633rm -f conftest.c conftest.out
5634
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635# Check for unsupported systems
5636case $ac_sys_system/$ac_sys_release in
5637atheos*|Linux*/1*)
5638 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5639 echo See README for details.
5640 exit 1;;
5641esac
5642
5643
Matthias Kloseb9621712010-04-24 17:59:49 +00005644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5645$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646
5647# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005648if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649 withval=$with_suffix;
5650 case $withval in
5651 no) EXEEXT=;;
5652 yes) EXEEXT=.exe;;
5653 *) EXEEXT=$withval;;
5654 esac
5655fi
5656
Matthias Kloseb9621712010-04-24 17:59:49 +00005657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5658$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659
5660# Test whether we're running on a non-case-sensitive system, in which
5661# case we give a warning if no ext is given
5662
Matthias Kloseb9621712010-04-24 17:59:49 +00005663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5664$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665if test ! -d CaseSensitiveTestDir; then
5666mkdir CaseSensitiveTestDir
5667fi
5668
5669if test -d casesensitivetestdir
5670then
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5672$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 BUILDEXEEXT=.exe
5674else
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677 BUILDEXEEXT=$EXEEXT
5678fi
5679rmdir CaseSensitiveTestDir
5680
5681case $MACHDEP in
5682bsdos*)
5683 case $CC in
5684 gcc) CC="$CC -D_HAVE_BSDI";;
5685 esac;;
5686esac
5687
5688case $ac_sys_system in
5689hp*|HP*)
5690 case $CC in
5691 cc|*/cc) CC="$CC -Ae";;
5692 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693esac
5694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5697$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698if test -z "$LIBRARY"
5699then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005700 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5703$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
5705# LDLIBRARY is the name of the library to link against (as opposed to the
5706# name of the library into which to insert object files). BLDLIBRARY is also
5707# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5708# is blank as the main program is not linked directly against LDLIBRARY.
5709# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5710# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5711# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5712# DLLLIBRARY is the shared (i.e., DLL) library.
5713#
5714# RUNSHARED is used to run shared python without installed libraries
5715#
5716# INSTSONAME is the name of the shared library that will be use to install
5717# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005718#
5719# LDVERSION is the shared library version number, normally the Python version
5720# with the ABI build flags appended.
5721
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722
5723
5724
5725
5726
5727
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729LDLIBRARY="$LIBRARY"
5730BLDLIBRARY='$(LDLIBRARY)'
5731INSTSONAME='$(LDLIBRARY)'
5732DLLLIBRARY=''
5733LDLIBRARYDIR=''
5734RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005735LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736
5737# LINKCC is the command that links the python executable -- default is $(CC).
5738# If CXX is set, and if it is needed to link a main function that was
5739# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5740# python might then depend on the C++ runtime
5741# This is altered for AIX in order to build the export list before
5742# linking.
5743
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5745$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746if test -z "$LINKCC"
5747then
5748 LINKCC='$(PURIFY) $(MAINCC)'
5749 case $ac_sys_system in
5750 AIX*)
5751 exp_extra="\"\""
5752 if test $ac_sys_release -ge 5 -o \
5753 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5754 exp_extra="."
5755 fi
5756 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 QNX*)
5758 # qcc must be used because the other compilers do not
5759 # support -N.
5760 LINKCC=qcc;;
5761 esac
5762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5764$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5767# make sure we default having it set to "no": this is used by
5768# distutils.unixccompiler to know if it should add --enable-new-dtags
5769# to linker command lines, and failing to detect GNU ld simply results
5770# in the same bahaviour as before.
5771
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5773$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774ac_prog=ld
5775if test "$GCC" = yes; then
5776 ac_prog=`$CC -print-prog-name=ld`
5777fi
5778case `"$ac_prog" -V 2>&1 < /dev/null` in
5779 *GNU*)
5780 GNULD=yes;;
5781 *)
5782 GNULD=no;;
5783esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5785$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5788$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005789if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005790 $as_echo_n "(cached) " >&6
5791else
5792 ac_cv_c_inline=no
5793for ac_kw in inline __inline__ __inline; do
5794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5795/* end confdefs.h. */
5796#ifndef __cplusplus
5797typedef int foo_t;
5798static $ac_kw foo_t static_foo () {return 0; }
5799$ac_kw foo_t foo () {return 0; }
5800#endif
5801
5802_ACEOF
5803if ac_fn_c_try_compile "$LINENO"; then :
5804 ac_cv_c_inline=$ac_kw
5805fi
5806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5807 test "$ac_cv_c_inline" != no && break
5808done
5809
5810fi
5811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5812$as_echo "$ac_cv_c_inline" >&6; }
5813
5814case $ac_cv_c_inline in
5815 inline | yes) ;;
5816 *)
5817 case $ac_cv_c_inline in
5818 no) ac_val=;;
5819 *) ac_val=$ac_cv_c_inline;;
5820 esac
5821 cat >>confdefs.h <<_ACEOF
5822#ifndef __cplusplus
5823#define inline $ac_val
5824#endif
5825_ACEOF
5826 ;;
5827esac
5828
5829if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005830
5831$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005832
5833
5834fi
5835
5836
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5838$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005840if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841 enableval=$enable_shared;
5842fi
5843
5844
5845if test -z "$enable_shared"
5846then
5847 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005848 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849 enable_shared="yes";;
5850 *)
5851 enable_shared="no";;
5852 esac
5853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5855$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5858$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005860if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005861 enableval=$enable_profiling;
5862fi
5863
5864if test "x$enable_profiling" = xyes; then
5865 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005866 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868/* end confdefs.h. */
5869int main() { return 0; }
5870_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871if ac_fn_c_try_link "$LINENO"; then :
5872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005874 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876rm -f core conftest.err conftest.$ac_objext \
5877 conftest$ac_exeext conftest.$ac_ext
5878 CC="$ac_save_cc"
5879else
5880 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5883$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
doko@ubuntu.comba015832012-06-30 16:52:05 +02005885if test "x$enable_profiling" = xyes; then
5886 BASECFLAGS="-pg $BASECFLAGS"
5887 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888fi
5889
Matthias Kloseb9621712010-04-24 17:59:49 +00005890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5891$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892
5893# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5894# library that we build, but we do not want to link against it (we
5895# will find it with a -framework option). For this reason there is an
5896# extra variable BLDLIBRARY against which Python and the extension
5897# modules are linked, BLDLIBRARY. This is normally the same as
5898# LDLIBRARY, but empty for MacOSX framework builds.
5899if test "$enable_framework"
5900then
5901 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005902 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 BLDLIBRARY=''
5904else
5905 BLDLIBRARY='$(LDLIBRARY)'
5906fi
5907
5908# Other platforms follow
5909if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005910 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911
Matthias Kloseb9621712010-04-24 17:59:49 +00005912$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913
5914 case $ac_sys_system in
5915 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005916 LDLIBRARY='libpython$(LDVERSION).dll.a'
5917 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 ;;
5919 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).so'
5921 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005924 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005925 then
5926 PY3LIBRARY=libpython3.so
5927 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005929 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).so'
5931 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005932 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005934 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005935 then
5936 PY3LIBRARY=libpython3.so
5937 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
5939 hp*|HP*)
5940 case `uname -m` in
5941 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
5944 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005945 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 ;;
5947 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005948 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005949 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 LDLIBRARY='libpython$(LDVERSION).dylib'
5953 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005954 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005956 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005957 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005958 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005959 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960
5961 esac
5962else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005963 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964 case $ac_sys_system in
5965 CYGWIN*)
5966 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005967 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 ;;
5969 esac
5970fi
5971
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005972if test "$cross_compiling" = yes; then
5973 RUNSHARED=
5974fi
5975
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5977$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978
5979if test -n "$ac_tool_prefix"; then
5980 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5981set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005984if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986else
5987 if test -n "$RANLIB"; then
5988 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5989else
5990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993 IFS=$as_save_IFS
5994 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999 break 2
6000 fi
6001done
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003IFS=$as_save_IFS
6004
6005fi
6006fi
6007RANLIB=$ac_cv_prog_RANLIB
6008if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6010$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011else
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014fi
6015
6016
6017fi
6018if test -z "$ac_cv_prog_RANLIB"; then
6019 ac_ct_RANLIB=$RANLIB
6020 # Extract the first word of "ranlib", so it can be a program name with args.
6021set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6023$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006024if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026else
6027 if test -n "$ac_ct_RANLIB"; then
6028 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6029else
6030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6031for as_dir in $PATH
6032do
6033 IFS=$as_save_IFS
6034 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039 break 2
6040 fi
6041done
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043IFS=$as_save_IFS
6044
6045fi
6046fi
6047ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6048if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6050$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051else
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054fi
6055
6056 if test "x$ac_ct_RANLIB" = x; then
6057 RANLIB=":"
6058 else
6059 case $cross_compiling:$ac_tool_warned in
6060yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063ac_tool_warned=yes ;;
6064esac
6065 RANLIB=$ac_ct_RANLIB
6066 fi
6067else
6068 RANLIB="$ac_cv_prog_RANLIB"
6069fi
6070
6071
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006072if test -n "$ac_tool_prefix"; then
6073 for ac_prog in ar aal
6074 do
6075 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6076set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6078$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006079if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006080 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081else
6082 if test -n "$AR"; then
6083 ac_cv_prog_AR="$AR" # Let the user override the test.
6084else
6085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6086for as_dir in $PATH
6087do
6088 IFS=$as_save_IFS
6089 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006092 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094 break 2
6095 fi
6096done
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098IFS=$as_save_IFS
6099
6100fi
6101fi
6102AR=$ac_cv_prog_AR
6103if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6105$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106else
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6108$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109fi
6110
6111
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006112 test -n "$AR" && break
6113 done
6114fi
6115if test -z "$AR"; then
6116 ac_ct_AR=$AR
6117 for ac_prog in ar aal
6118do
6119 # Extract the first word of "$ac_prog", so it can be a program name with args.
6120set dummy $ac_prog; ac_word=$2
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6122$as_echo_n "checking for $ac_word... " >&6; }
6123if ${ac_cv_prog_ac_ct_AR+:} false; then :
6124 $as_echo_n "(cached) " >&6
6125else
6126 if test -n "$ac_ct_AR"; then
6127 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6128else
6129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6130for as_dir in $PATH
6131do
6132 IFS=$as_save_IFS
6133 test -z "$as_dir" && as_dir=.
6134 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006136 ac_cv_prog_ac_ct_AR="$ac_prog"
6137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6138 break 2
6139 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006140done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006141 done
6142IFS=$as_save_IFS
6143
6144fi
6145fi
6146ac_ct_AR=$ac_cv_prog_ac_ct_AR
6147if test -n "$ac_ct_AR"; then
6148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6149$as_echo "$ac_ct_AR" >&6; }
6150else
6151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6152$as_echo "no" >&6; }
6153fi
6154
6155
6156 test -n "$ac_ct_AR" && break
6157done
6158
6159 if test "x$ac_ct_AR" = x; then
6160 AR="ar"
6161 else
6162 case $cross_compiling:$ac_tool_warned in
6163yes:)
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6166ac_tool_warned=yes ;;
6167esac
6168 AR=$ac_ct_AR
6169 fi
6170fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171
6172
6173# tweak ARFLAGS only if the user didn't set it on the command line
6174
6175if test -z "$ARFLAGS"
6176then
6177 ARFLAGS="rc"
6178fi
6179
doko@ubuntu.com58844492012-06-30 18:25:32 +02006180if test -n "$ac_tool_prefix"; then
6181 for ac_prog in readelf
6182 do
6183 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6184set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6186$as_echo_n "checking for $ac_word... " >&6; }
6187if ${ac_cv_prog_READELF+:} false; then :
6188 $as_echo_n "(cached) " >&6
6189else
6190 if test -n "$READELF"; then
6191 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6192else
6193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6194for as_dir in $PATH
6195do
6196 IFS=$as_save_IFS
6197 test -z "$as_dir" && as_dir=.
6198 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006199 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006200 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6201 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6202 break 2
6203 fi
6204done
6205 done
6206IFS=$as_save_IFS
6207
6208fi
6209fi
6210READELF=$ac_cv_prog_READELF
6211if test -n "$READELF"; then
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6213$as_echo "$READELF" >&6; }
6214else
6215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6216$as_echo "no" >&6; }
6217fi
6218
6219
6220 test -n "$READELF" && break
6221 done
6222fi
6223if test -z "$READELF"; then
6224 ac_ct_READELF=$READELF
6225 for ac_prog in readelf
6226do
6227 # Extract the first word of "$ac_prog", so it can be a program name with args.
6228set dummy $ac_prog; ac_word=$2
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230$as_echo_n "checking for $ac_word... " >&6; }
6231if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6232 $as_echo_n "(cached) " >&6
6233else
6234 if test -n "$ac_ct_READELF"; then
6235 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6236else
6237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6238for as_dir in $PATH
6239do
6240 IFS=$as_save_IFS
6241 test -z "$as_dir" && as_dir=.
6242 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006243 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006244 ac_cv_prog_ac_ct_READELF="$ac_prog"
6245 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6246 break 2
6247 fi
6248done
6249 done
6250IFS=$as_save_IFS
6251
6252fi
6253fi
6254ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6255if test -n "$ac_ct_READELF"; then
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6257$as_echo "$ac_ct_READELF" >&6; }
6258else
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6260$as_echo "no" >&6; }
6261fi
6262
6263
6264 test -n "$ac_ct_READELF" && break
6265done
6266
6267 if test "x$ac_ct_READELF" = x; then
6268 READELF=":"
6269 else
6270 case $cross_compiling:$ac_tool_warned in
6271yes:)
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6273$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6274ac_tool_warned=yes ;;
6275esac
6276 READELF=$ac_ct_READELF
6277 fi
6278fi
6279
6280if test "$cross_compiling" = yes; then
6281 case "$READELF" in
6282 readelf|:)
6283 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6284 ;;
6285 esac
6286fi
6287
6288
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290case $MACHDEP in
6291bsdos*|hp*|HP*)
6292 # install -d does not work on BSDI or HP-UX
6293 if test -z "$INSTALL"
6294 then
6295 INSTALL="${srcdir}/install-sh -c"
6296 fi
6297esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298# Find a good install program. We prefer a C program (faster),
6299# so one script is as good as another. But avoid the broken or
6300# incompatible versions:
6301# SysV /etc/install, /usr/sbin/install
6302# SunOS /usr/etc/install
6303# IRIX /sbin/install
6304# AIX /bin/install
6305# AmigaOS /C/install, which installs bootblocks on floppy discs
6306# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6307# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6308# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6309# OS/2's system install, which has a completely different semantic
6310# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006311# Reject install programs that cannot install multiple files.
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6313$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006315if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006316 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317else
6318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6319for as_dir in $PATH
6320do
6321 IFS=$as_save_IFS
6322 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006323 # Account for people who put trailing slashes in PATH elements.
6324case $as_dir/ in #((
6325 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 /usr/ucb/* ) ;;
6329 *)
6330 # OSF1 and SCO ODT 3.0 have their own names for install.
6331 # Don't use installbsd from OSF since it installs stuff as root
6332 # by default.
6333 for ac_prog in ginstall scoinst install; do
6334 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006335 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336 if test $ac_prog = install &&
6337 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6338 # AIX install. It has an incompatible calling convention.
6339 :
6340 elif test $ac_prog = install &&
6341 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6342 # program-specific install script used by HP pwplus--don't use.
6343 :
6344 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006345 rm -rf conftest.one conftest.two conftest.dir
6346 echo one > conftest.one
6347 echo two > conftest.two
6348 mkdir conftest.dir
6349 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6350 test -s conftest.one && test -s conftest.two &&
6351 test -s conftest.dir/conftest.one &&
6352 test -s conftest.dir/conftest.two
6353 then
6354 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6355 break 3
6356 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357 fi
6358 fi
6359 done
6360 done
6361 ;;
6362esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006363
6364 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365IFS=$as_save_IFS
6366
Matthias Kloseb9621712010-04-24 17:59:49 +00006367rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368
6369fi
6370 if test "${ac_cv_path_install+set}" = set; then
6371 INSTALL=$ac_cv_path_install
6372 else
6373 # As a last resort, use the slow shell script. Don't cache a
6374 # value for INSTALL within a source directory, because that will
6375 # break other packages using the cache if that directory is
6376 # removed, or if the value is a relative name.
6377 INSTALL=$ac_install_sh
6378 fi
6379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6381$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382
6383# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6384# It thinks the first close brace ends the variable substitution.
6385test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6386
6387test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6388
6389test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6390
Matthias Klose93a0ef12012-03-15 18:08:34 +01006391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6392$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6393if test -z "$MKDIR_P"; then
6394 if ${ac_cv_path_mkdir+:} false; then :
6395 $as_echo_n "(cached) " >&6
6396else
6397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6398for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6399do
6400 IFS=$as_save_IFS
6401 test -z "$as_dir" && as_dir=.
6402 for ac_prog in mkdir gmkdir; do
6403 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006404 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006405 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6406 'mkdir (GNU coreutils) '* | \
6407 'mkdir (coreutils) '* | \
6408 'mkdir (fileutils) '4.1*)
6409 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6410 break 3;;
6411 esac
6412 done
6413 done
6414 done
6415IFS=$as_save_IFS
6416
6417fi
6418
6419 test -d ./--version && rmdir ./--version
6420 if test "${ac_cv_path_mkdir+set}" = set; then
6421 MKDIR_P="$ac_cv_path_mkdir -p"
6422 else
6423 # As a last resort, use the slow shell script. Don't cache a
6424 # value for MKDIR_P within a source directory, because that will
6425 # break other packages using the cache if that directory is
6426 # removed, or if the value is a relative name.
6427 MKDIR_P="$ac_install_sh -d"
6428 fi
6429fi
6430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6431$as_echo "$MKDIR_P" >&6; }
6432
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433
6434# Not every filesystem supports hard links
6435
6436if test -z "$LN" ; then
6437 case $ac_sys_system in
6438 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006439 *) LN=ln;;
6440 esac
6441fi
6442
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006443# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006444
6445ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006446
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6449$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450
6451# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006452if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006453 withval=$with_pydebug;
6454if test "$withval" != no
6455then
6456
Matthias Kloseb9621712010-04-24 17:59:49 +00006457$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458
Matthias Kloseb9621712010-04-24 17:59:49 +00006459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6460$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006461 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006462 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006463else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006465fi
6466else
Matthias Kloseb9621712010-04-24 17:59:49 +00006467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469fi
6470
6471
Brett Cannon63d98bc2016-09-06 17:12:40 -07006472# Enable optimization flags
6473
6474
6475Py_OPT='false'
6476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6477$as_echo_n "checking for --with-optimizations... " >&6; }
6478
6479# Check whether --with-optimizations was given.
6480if test "${with_optimizations+set}" = set; then :
6481 withval=$with_optimizations;
6482if test "$withval" != no
6483then
6484 Py_OPT='true'
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6486$as_echo "yes" >&6; };
6487else
6488 Py_OPT='false'
6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; };
6491fi
6492else
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6494$as_echo "no" >&6; }
6495fi
6496
6497if test "$Py_OPT" = 'true' ; then
6498 Py_LTO='true'
6499 case $ac_sys_system in
6500 Darwin*)
6501 # At least on macOS El Capitan, LTO does not work with PGO.
6502 Py_LTO='false'
6503 ;;
6504 esac
6505 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006506 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006507 DEF_MAKE_RULE="build_all"
6508else
6509 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006510 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006511 DEF_MAKE_RULE="all"
6512fi
6513
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006514# Enable LTO flags
6515
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6517$as_echo_n "checking for --with-lto... " >&6; }
6518
6519# Check whether --with-lto was given.
6520if test "${with_lto+set}" = set; then :
6521 withval=$with_lto;
6522if test "$withval" != no
6523then
6524 Py_LTO='true'
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6526$as_echo "yes" >&6; };
6527else
6528 Py_LTO='false'
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530$as_echo "no" >&6; };
6531fi
6532else
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }
6535fi
6536
6537if test "$Py_LTO" = 'true' ; then
6538 case $CC in
6539 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006540 case $ac_sys_system in
6541 Darwin*)
6542 # Any changes made here should be reflected in the GCC+Darwin case below
6543 LTOFLAGS="-flto -Wl,-export_dynamic"
6544 ;;
6545 *)
6546 LTOFLAGS="-flto"
6547 ;;
6548 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006549 ;;
6550 *gcc*)
6551 case $ac_sys_system in
6552 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006553 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006554 ;;
6555 *)
6556 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6557 ;;
6558 esac
6559 ;;
6560 esac
6561fi
6562
Brett Cannon7188a3e2015-09-18 15:13:44 -07006563# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006564
6565
6566
6567
6568
Gregory P. Smith799520c2016-09-07 16:10:00 -07006569# Make this work on systems where llvm tools are not installed with their
6570# normal names in the default $PATH (ie: Ubuntu). They exist under the
6571# non-suffixed name in their versioned llvm directory.
6572llvm_bin_dir=''
6573llvm_path="${PATH}"
6574if test "${CC}" = "clang"
6575then
6576 clang_bin=`which clang`
6577 # Some systems install clang elsewhere as a symlink to the real path
6578 # which is where the related llvm tools are located.
6579 if test -L "${clang_bin}"
6580 then
6581 clang_dir=`dirname "${clang_bin}"`
6582 clang_bin=`readlink "${clang_bin}"`
6583 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6584 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6585 fi
6586fi
Zachary Ware5af85642015-12-21 12:09:17 -06006587
Gregory P. Smith799520c2016-09-07 16:10:00 -07006588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6589$as_echo_n "checking target system type... " >&6; }
6590if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006591 $as_echo_n "(cached) " >&6
6592else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006593 if test "x$target_alias" = x; then
6594 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006595else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006596 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6597 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6598fi
6599
6600fi
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6602$as_echo "$ac_cv_target" >&6; }
6603case $ac_cv_target in
6604*-*-*) ;;
6605*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6606esac
6607target=$ac_cv_target
6608ac_save_IFS=$IFS; IFS='-'
6609set x $ac_cv_target
6610shift
6611target_cpu=$1
6612target_vendor=$2
6613shift; shift
6614# Remember, the first character of IFS is used to create $*,
6615# except with old shells:
6616target_os=$*
6617IFS=$ac_save_IFS
6618case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6619
6620
6621# The aliases save the names the user supplied, while $host etc.
6622# will get canonicalized.
6623test -n "$target_alias" &&
6624 test "$program_prefix$program_suffix$program_transform_name" = \
6625 NONENONEs,x,x, &&
6626 program_prefix=${target_alias}-
6627# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6628set dummy $target_alias-llvm-profdata; ac_word=$2
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6630$as_echo_n "checking for $ac_word... " >&6; }
6631if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6632 $as_echo_n "(cached) " >&6
6633else
6634 case $LLVM_PROFDATA in
6635 [\\/]* | ?:[\\/]*)
6636 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6637 ;;
6638 *)
6639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6640for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006641do
6642 IFS=$as_save_IFS
6643 test -z "$as_dir" && as_dir=.
6644 for ac_exec_ext in '' $ac_executable_extensions; do
6645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006646 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6648 break 2
6649 fi
6650done
6651 done
6652IFS=$as_save_IFS
6653
Gregory P. Smith799520c2016-09-07 16:10:00 -07006654 ;;
6655esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006657LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6658if test -n "$LLVM_PROFDATA"; then
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6660$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661else
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6663$as_echo "no" >&6; }
6664fi
6665
6666
Gregory P. Smith799520c2016-09-07 16:10:00 -07006667if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6668 if test "$build" = "$target"; then
6669 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6670 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6671set dummy llvm-profdata; ac_word=$2
6672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6673$as_echo_n "checking for $ac_word... " >&6; }
6674if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6675 $as_echo_n "(cached) " >&6
6676else
6677 case $ac_pt_LLVM_PROFDATA in
6678 [\\/]* | ?:[\\/]*)
6679 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6680 ;;
6681 *)
6682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6683for as_dir in ${llvm_path}
6684do
6685 IFS=$as_save_IFS
6686 test -z "$as_dir" && as_dir=.
6687 for ac_exec_ext in '' $ac_executable_extensions; do
6688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6689 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6691 break 2
6692 fi
6693done
6694 done
6695IFS=$as_save_IFS
6696
6697 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6698 ;;
6699esac
6700fi
6701ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6702if test -n "$ac_pt_LLVM_PROFDATA"; then
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6704$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6705else
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6707$as_echo "no" >&6; }
6708fi
6709
6710 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6711 else
6712 LLVM_PROFDATA="''"
6713 fi
6714else
6715 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6716fi
6717
6718
6719if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6720then
6721 LLVM_PROF_FOUND="found"
6722else
6723 LLVM_PROF_FOUND="not-found"
6724fi
6725if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6726then
6727 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6728 if test -n "${found_llvm_profdata}"
6729 then
6730 # llvm-profdata isn't directly in $PATH in some cases.
6731 # https://apple.stackexchange.com/questions/197053/
6732 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6733 LLVM_PROF_FOUND=found
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6735$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6736 fi
6737fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006738LLVM_PROF_ERR=no
6739case $CC in
6740 *clang*)
6741 # Any changes made here should be reflected in the GCC+Darwin case below
6742 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6743 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006745 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6746 if test $LLVM_PROF_FOUND = not-found
6747 then
6748 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006749 if test "${REQUIRE_PGO}" = "yes"
6750 then
6751 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6752 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006753 fi
6754 ;;
6755 *gcc*)
6756 case $ac_sys_system in
6757 Darwin*)
6758 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6759 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006762 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006763 then
6764 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006765 if test "${REQUIRE_PGO}" = "yes"
6766 then
6767 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6768 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006769 fi
6770 ;;
6771 *)
6772 PGO_PROF_GEN_FLAG="-fprofile-generate"
6773 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6774 LLVM_PROF_MERGER="true"
6775 LLVM_PROF_FILE=""
6776 ;;
6777 esac
6778 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006779 *icc*)
6780 PGO_PROF_GEN_FLAG="-prof-gen"
6781 PGO_PROF_USE_FLAG="-prof-use"
6782 LLVM_PROF_MERGER="true"
6783 LLVM_PROF_FILE=""
6784 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785esac
6786
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6788# merged with this chunk of code?
6789
6790# Optimizer/debugger flags
6791# ------------------------
6792# (The following bit of code is complicated enough - please keep things
6793# indented properly. Just pretend you're editing Python code. ;-)
6794
6795# There are two parallel sets of case statements below, one that checks to
6796# see if OPT was set and one that does BASECFLAGS setting based upon
6797# compiler and platform. BASECFLAGS tweaks need to be made even if the
6798# user set OPT.
6799
6800# tweak OPT based on compiler and platform, only if the user didn't set
6801# it on the command line
6802
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006803if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804then
6805 case $GCC in
6806 yes)
6807 if test "$CC" != 'g++' ; then
6808 STRICT_PROTO="-Wstrict-prototypes"
6809 fi
6810 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6811 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6812 WRAP="-fwrapv"
6813 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006814
6815 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006816 case $CC in
6817 *clang*) WRAP="-fwrapv"
6818 ;;
6819 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821 case $ac_cv_prog_cc_g in
6822 yes)
6823 if test "$Py_DEBUG" = 'true' ; then
6824 # Optimization messes up debuggers, so turn it off for
6825 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006826 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6827 OPT="-g -Og -Wall $STRICT_PROTO"
6828 else
6829 OPT="-g -O0 -Wall $STRICT_PROTO"
6830 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831 else
6832 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6833 fi
6834 ;;
6835 *)
6836 OPT="-O3 -Wall $STRICT_PROTO"
6837 ;;
6838 esac
6839 case $ac_sys_system in
6840 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6841 ;;
6842 esac
6843 ;;
6844
6845 *)
6846 OPT="-O"
6847 ;;
6848 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849fi
6850
6851
6852
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854# The -arch flags for universal builds on OSX
6855UNIVERSAL_ARCH_FLAGS=
6856
6857
6858# tweak BASECFLAGS based on compiler and platform
6859case $GCC in
6860yes)
Christian Heimes7f9eb6e2016-09-08 11:39:42 +02006861 # GNU dialect of C99, enables GNU extensions like __attribute__. GNU99
6862 # is required by bluetooth.h on big endian machines.
6863 CFLAGS_NODIST="$CFLAGS_NODIST -std=gnu99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006864
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006865 # Python doesn't violate C99 aliasing rules, but older versions of
6866 # GCC produce warnings for legal Python code. Enable
6867 # -fno-strict-aliasing on versions of GCC that support but produce
6868 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6870$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871 ac_save_cc="$CC"
6872 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006873 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006874 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006875 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006876else
Matthias Kloseb9621712010-04-24 17:59:49 +00006877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006879
Matthias Kloseb159a552010-04-25 21:00:44 +00006880
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006881int
6882main ()
6883{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006884
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006885 ;
6886 return 0;
6887}
Matthias Kloseb159a552010-04-25 21:00:44 +00006888
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006890if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006891
6892 CC="$ac_save_cc -fstrict-aliasing"
6893 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006895/* end confdefs.h. */
6896
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006897 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006898int
6899main ()
6900{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006901double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006902 ;
6903 return 0;
6904}
Matthias Kloseb159a552010-04-25 21:00:44 +00006905
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006907if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006908
6909 ac_cv_no_strict_aliasing=no
6910
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911else
Matthias Kloseb159a552010-04-25 21:00:44 +00006912
6913 ac_cv_no_strict_aliasing=yes
6914
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006915fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006917
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006918else
Matthias Kloseb159a552010-04-25 21:00:44 +00006919
6920 ac_cv_no_strict_aliasing=no
6921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006924fi
6925
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006926 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006927 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6929$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006930 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006931 then
6932 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6933 fi
6934
Zachary Ware5af85642015-12-21 12:09:17 -06006935 # ICC doesn't recognize the option, but only emits a warning
6936 ## XXX does it emit an unused result warning and can it be disabled?
6937 case "$CC" in
6938 *icc*)
6939 ac_cv_disable_unused_result_warning=no
6940 ;;
6941 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6943$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6944 ac_save_cc="$CC"
6945 CC="$CC -Wunused-result -Werror"
6946 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006947 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006948 $as_echo_n "(cached) " >&6
6949else
6950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951/* end confdefs.h. */
6952
6953
6954int
6955main ()
6956{
6957
6958 ;
6959 return 0;
6960}
6961
6962_ACEOF
6963if ac_fn_c_try_compile "$LINENO"; then :
6964
6965 ac_cv_disable_unused_result_warning=yes
6966
6967else
6968
6969 ac_cv_disable_unused_result_warning=no
6970
6971fi
6972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6973fi
6974
6975 CFLAGS="$save_CFLAGS"
6976 CC="$ac_save_cc"
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6978$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006979 ;;
6980 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006981
6982 if test $ac_cv_disable_unused_result_warning = yes
6983 then
6984 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6985 fi
6986
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6988$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6989 ac_save_cc="$CC"
6990 CC="$CC -Wsign-compare"
6991 save_CFLAGS="$CFLAGS"
6992 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6993 $as_echo_n "(cached) " >&6
6994else
6995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6996/* end confdefs.h. */
6997
6998
6999int
7000main ()
7001{
7002
7003 ;
7004 return 0;
7005}
7006
7007_ACEOF
7008if ac_fn_c_try_compile "$LINENO"; then :
7009
7010 ac_cv_enable_sign_compare_warning=yes
7011
7012else
7013
7014 ac_cv_enable_sign_compare_warning=no
7015
7016fi
7017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7018fi
7019
7020 CFLAGS="$save_CFLAGS"
7021 CC="$ac_save_cc"
7022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7023$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7024
7025 if test $ac_cv_enable_sign_compare_warning = yes
7026 then
7027 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7028 fi
7029
7030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7031$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7032 ac_save_cc="$CC"
7033 CC="$CC -Wunreachable-code"
7034 save_CFLAGS="$CFLAGS"
7035 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7036 $as_echo_n "(cached) " >&6
7037else
7038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7039/* end confdefs.h. */
7040
7041
7042int
7043main ()
7044{
7045
7046 ;
7047 return 0;
7048}
7049
7050_ACEOF
7051if ac_fn_c_try_compile "$LINENO"; then :
7052
7053 ac_cv_enable_unreachable_code_warning=yes
7054
7055else
7056
7057 ac_cv_enable_unreachable_code_warning=no
7058
7059fi
7060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7061fi
7062
7063 CFLAGS="$save_CFLAGS"
7064 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007065
7066 # Don't enable unreachable code warning in debug mode, since it usually
7067 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007068 # Issue #24324: Unfortunately, the unreachable code warning does not work
7069 # correctly on gcc and has been silently removed from the compiler.
7070 # It is supported on clang but on OS X systems gcc may be an alias
7071 # for clang. Try to determine if the compiler is not really gcc and,
7072 # if so, only then enable the warning.
7073 if test $ac_cv_enable_unreachable_code_warning = yes && \
7074 test "$Py_DEBUG" != "true" && \
7075 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007076 then
7077 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007078 else
7079 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007080 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7082$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007083
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007084 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7085 # support. Without this, treatment of subnormals doesn't follow
7086 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007087 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007088 alpha*)
7089 BASECFLAGS="$BASECFLAGS -mieee"
7090 ;;
7091 esac
7092
7093 case $ac_sys_system in
7094 SCO_SV*)
7095 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7096 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007097
7098 # is there any other compiler on Darwin besides gcc?
7099 Darwin*)
7100 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7101 # used to be here, but non-Apple gcc doesn't accept them.
7102 if test "${CC}" = gcc
7103 then
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007105$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007106 case "${UNIVERSALSDK}" in
7107 */MacOSX10.4u.sdk)
7108 # Build using 10.4 SDK, force usage of gcc when the
7109 # compiler is gcc, otherwise the user will get very
7110 # confusing error messages when building on OSX 10.6
7111 CC=gcc-4.0
7112 CPP=cpp-4.0
7113 ;;
7114 esac
7115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007116$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007117 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007118
Ned Deily87adb6e2013-10-18 21:09:56 -07007119 if test "${enable_universalsdk}"
7120 then
7121 case "$UNIVERSAL_ARCHS" in
7122 32-bit)
7123 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7124 LIPO_32BIT_FLAGS=""
7125 ARCH_RUN_32BIT=""
7126 ;;
7127 64-bit)
7128 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7129 LIPO_32BIT_FLAGS=""
7130 ARCH_RUN_32BIT="true"
7131 ;;
7132 all)
7133 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7134 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7135 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7136 ;;
7137 intel)
7138 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7139 LIPO_32BIT_FLAGS="-extract i386"
7140 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7141 ;;
7142 intel-32)
7143 UNIVERSAL_ARCH_FLAGS="-arch i386"
7144 LIPO_32BIT_FLAGS=""
7145 ARCH_RUN_32BIT=""
7146 ;;
7147 3-way)
7148 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7149 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7150 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7151 ;;
7152 *)
7153 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7154 ;;
7155 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007156
Ned Deily87adb6e2013-10-18 21:09:56 -07007157 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7158 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7159 if test "${UNIVERSALSDK}" != "/"
7160 then
7161 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7162 fi
7163 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007164
Ned Deily87adb6e2013-10-18 21:09:56 -07007165 # Calculate an appropriate deployment target for this build:
7166 # The deployment target value is used explicitly to enable certain
7167 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007168 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007169 # component of the string returned by distutils.get_platform().
7170 #
7171 # Use the value from:
7172 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7173 # 2. the operating system version of the build machine if >= 10.6
7174 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7175 # below to pick either 10.3, 10.4, or 10.5 as the target.
7176 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007177
Ned Deily87adb6e2013-10-18 21:09:56 -07007178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7179$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007180 cur_target_major=`sw_vers -productVersion | \
7181 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7182 cur_target_minor=`sw_vers -productVersion | \
7183 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7184 cur_target="${cur_target_major}.${cur_target_minor}"
7185 if test ${cur_target_major} -eq 10 && \
7186 test ${cur_target_minor} -ge 3 && \
7187 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007188 then
Ned Deily36820b62014-06-25 13:44:22 -07007189 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007190 cur_target=10.3
7191 if test ${enable_universalsdk}
7192 then
7193 case "$UNIVERSAL_ARCHS" in
7194 all|3-way|intel|64-bit)
7195 # These configurations were first supported in 10.5
7196 cur_target='10.5'
7197 ;;
7198 esac
7199 else
7200 if test `/usr/bin/arch` = "i386"
7201 then
7202 # 10.4 was the first release to support Intel archs
7203 cur_target="10.4"
7204 fi
7205 fi
7206 fi
7207 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007208
Ned Deily87adb6e2013-10-18 21:09:56 -07007209 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7210 # environment with a value that is the same as what we'll use
7211 # in the Makefile to ensure that we'll get the same compiler
7212 # environment during configure and build time.
7213 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7214 export MACOSX_DEPLOYMENT_TARGET
7215 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7217$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007218
Ned Deily87adb6e2013-10-18 21:09:56 -07007219 # end of Darwin* tests
7220 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007221 esac
7222 ;;
7223
7224*)
7225 case $ac_sys_system in
7226 OpenUNIX*|UnixWare*)
7227 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7228 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007229 SCO_SV*)
7230 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7231 ;;
7232 esac
7233 ;;
7234esac
7235
Zachary Ware5af85642015-12-21 12:09:17 -06007236# ICC needs -fp-model strict or floats behave badly
7237case "$CC" in
7238*icc*)
7239 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7240 ;;
7241esac
7242
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007243if test "$Py_DEBUG" = 'true'; then
7244 :
7245else
7246 OPT="-DNDEBUG $OPT"
7247fi
7248
7249if test "$ac_arch_flags"
7250then
7251 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7252fi
7253
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254# On some compilers, pthreads are available without further options
7255# (e.g. MacOS X). On some of these systems, the compiler will not
7256# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7257# So we have to see first whether pthreads are available without
7258# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7260$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007261if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263else
Matthias Kloseb9621712010-04-24 17:59:49 +00007264 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265 ac_cv_pthread_is_default=no
7266else
Matthias Kloseb9621712010-04-24 17:59:49 +00007267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007268/* end confdefs.h. */
7269
Stefan Krah7dba5942012-11-22 22:49:11 +01007270#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007271#include <pthread.h>
7272
7273void* routine(void* p){return NULL;}
7274
7275int main(){
7276 pthread_t p;
7277 if(pthread_create(&p,NULL,routine,NULL)!=0)
7278 return 1;
7279 (void)pthread_detach(p);
7280 return 0;
7281}
7282
7283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007284if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007285
7286 ac_cv_pthread_is_default=yes
7287 ac_cv_kthread=no
7288 ac_cv_pthread=no
7289
7290else
Matthias Kloseb9621712010-04-24 17:59:49 +00007291 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295fi
7296
7297
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298fi
7299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7301$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007302
7303
7304if test $ac_cv_pthread_is_default = yes
7305then
7306 ac_cv_kpthread=no
7307else
7308# -Kpthread, if available, provides the right #defines
7309# and linker options to make pthread_create available
7310# Some compilers won't report that they do not support -Kpthread,
7311# so we need to run a program to see whether it really made the
7312# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7314$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007315if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317else
7318 ac_save_cc="$CC"
7319CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007320if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007321 ac_cv_kpthread=no
7322else
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007324/* end confdefs.h. */
7325
Stefan Krah7dba5942012-11-22 22:49:11 +01007326#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007327#include <pthread.h>
7328
7329void* routine(void* p){return NULL;}
7330
7331int main(){
7332 pthread_t p;
7333 if(pthread_create(&p,NULL,routine,NULL)!=0)
7334 return 1;
7335 (void)pthread_detach(p);
7336 return 0;
7337}
7338
7339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007340if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341 ac_cv_kpthread=yes
7342else
Matthias Kloseb9621712010-04-24 17:59:49 +00007343 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7346 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007347fi
7348
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007349CC="$ac_save_cc"
7350fi
7351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7353$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007354fi
7355
7356if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7357then
7358# -Kthread, if available, provides the right #defines
7359# and linker options to make pthread_create available
7360# Some compilers won't report that they do not support -Kthread,
7361# so we need to run a program to see whether it really made the
7362# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7364$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007365if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007366 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367else
7368 ac_save_cc="$CC"
7369CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007370if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007371 ac_cv_kthread=no
7372else
Matthias Kloseb9621712010-04-24 17:59:49 +00007373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374/* end confdefs.h. */
7375
Stefan Krah7dba5942012-11-22 22:49:11 +01007376#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377#include <pthread.h>
7378
7379void* routine(void* p){return NULL;}
7380
7381int main(){
7382 pthread_t p;
7383 if(pthread_create(&p,NULL,routine,NULL)!=0)
7384 return 1;
7385 (void)pthread_detach(p);
7386 return 0;
7387}
7388
7389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007390if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391 ac_cv_kthread=yes
7392else
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7396 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397fi
7398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399CC="$ac_save_cc"
7400fi
7401
Matthias Kloseb9621712010-04-24 17:59:49 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7403$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404fi
7405
7406if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7407then
7408# -pthread, if available, provides the right #defines
7409# and linker options to make pthread_create available
7410# Some compilers won't report that they do not support -pthread,
7411# so we need to run a program to see whether it really made the
7412# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7414$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007415if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007416 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417else
7418 ac_save_cc="$CC"
7419CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007420if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007421 ac_cv_pthread=no
7422else
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424/* end confdefs.h. */
7425
Stefan Krah7dba5942012-11-22 22:49:11 +01007426#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427#include <pthread.h>
7428
7429void* routine(void* p){return NULL;}
7430
7431int main(){
7432 pthread_t p;
7433 if(pthread_create(&p,NULL,routine,NULL)!=0)
7434 return 1;
7435 (void)pthread_detach(p);
7436 return 0;
7437}
7438
7439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007440if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441 ac_cv_pthread=yes
7442else
Matthias Kloseb9621712010-04-24 17:59:49 +00007443 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7446 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447fi
7448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449CC="$ac_save_cc"
7450fi
7451
Matthias Kloseb9621712010-04-24 17:59:49 +00007452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7453$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454fi
7455
7456# If we have set a CC compiler flag for thread support then
7457# check if it works for CXX, too.
7458ac_cv_cxx_thread=no
7459if test ! -z "$CXX"
7460then
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7462$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463ac_save_cxx="$CXX"
7464
7465if test "$ac_cv_kpthread" = "yes"
7466then
7467 CXX="$CXX -Kpthread"
7468 ac_cv_cxx_thread=yes
7469elif test "$ac_cv_kthread" = "yes"
7470then
7471 CXX="$CXX -Kthread"
7472 ac_cv_cxx_thread=yes
7473elif test "$ac_cv_pthread" = "yes"
7474then
7475 CXX="$CXX -pthread"
7476 ac_cv_cxx_thread=yes
7477fi
7478
7479if test $ac_cv_cxx_thread = yes
7480then
7481 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7482 $CXX -c conftest.$ac_ext 2>&5
7483 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7484 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7485 then
7486 ac_cv_cxx_thread=yes
7487 else
7488 ac_cv_cxx_thread=no
7489 fi
7490 rm -fr conftest*
7491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7493$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494fi
7495CXX="$ac_save_cxx"
7496
7497
7498# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7500$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007501if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007502 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503else
Matthias Kloseb9621712010-04-24 17:59:49 +00007504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505/* end confdefs.h. */
7506#include <stdlib.h>
7507#include <stdarg.h>
7508#include <string.h>
7509#include <float.h>
7510
7511int
7512main ()
7513{
7514
7515 ;
7516 return 0;
7517}
7518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007519if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007520 ac_cv_header_stdc=yes
7521else
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7525
7526if test $ac_cv_header_stdc = yes; then
7527 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529/* end confdefs.h. */
7530#include <string.h>
7531
7532_ACEOF
7533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 $EGREP "memchr" >/dev/null 2>&1; then :
7535
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536else
7537 ac_cv_header_stdc=no
7538fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007539rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540
7541fi
7542
7543if test $ac_cv_header_stdc = yes; then
7544 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546/* end confdefs.h. */
7547#include <stdlib.h>
7548
7549_ACEOF
7550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 $EGREP "free" >/dev/null 2>&1; then :
7552
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553else
7554 ac_cv_header_stdc=no
7555fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007556rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557
7558fi
7559
7560if test $ac_cv_header_stdc = yes; then
7561 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007562 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563 :
7564else
Matthias Kloseb9621712010-04-24 17:59:49 +00007565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566/* end confdefs.h. */
7567#include <ctype.h>
7568#include <stdlib.h>
7569#if ((' ' & 0x0FF) == 0x020)
7570# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7571# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7572#else
7573# define ISLOWER(c) \
7574 (('a' <= (c) && (c) <= 'i') \
7575 || ('j' <= (c) && (c) <= 'r') \
7576 || ('s' <= (c) && (c) <= 'z'))
7577# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7578#endif
7579
7580#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7581int
7582main ()
7583{
7584 int i;
7585 for (i = 0; i < 256; i++)
7586 if (XOR (islower (i), ISLOWER (i))
7587 || toupper (i) != TOUPPER (i))
7588 return 2;
7589 return 0;
7590}
7591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007592if ac_fn_c_try_run "$LINENO"; then :
7593
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594else
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7598 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599fi
7600
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601fi
7602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7604$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605if test $ac_cv_header_stdc = yes; then
7606
Matthias Kloseb9621712010-04-24 17:59:49 +00007607$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608
7609fi
7610
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007611for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007612fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007613ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007614sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007615unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007616poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007617sys/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 +01007618sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007619sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007620sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007621sys/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 -07007622libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007623bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007624sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007625do :
7626 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7627ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007628if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007630#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007631_ACEOF
7632
7633fi
7634
Guido van Rossum627b2d71993-12-24 10:39:16 +00007635done
7636
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007637ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007638for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7641$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007642if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007643 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007644else
Matthias Kloseb9621712010-04-24 17:59:49 +00007645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007646/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007647#include <sys/types.h>
7648#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007649
Martin v. Löwis11437992002-04-12 09:54:03 +00007650int
7651main ()
7652{
7653if ((DIR *) 0)
7654return 0;
7655 ;
7656 return 0;
7657}
7658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007666eval ac_res=\$$as_ac_Header
7667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7668$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007669if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007671#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007672_ACEOF
7673
7674ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007675fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007676
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007677done
7678# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7679if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7681$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007682if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007684else
Martin v. Löwis11437992002-04-12 09:54:03 +00007685 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689/* Override any GCC internal prototype to avoid an error.
7690 Use char because int might match the return type of a GCC
7691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007692#ifdef __cplusplus
7693extern "C"
7694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007695char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007696int
7697main ()
7698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 ;
7701 return 0;
7702}
7703_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704for ac_lib in '' dir; do
7705 if test -z "$ac_lib"; then
7706 ac_res="none required"
7707 else
7708 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007709 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007711 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007712 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007714rm -f core conftest.err conftest.$ac_objext \
7715 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007716 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719done
Victor Stinnere0be4232011-10-25 13:06:09 +02007720if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007722else
7723 ac_cv_search_opendir=no
7724fi
7725rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007726LIBS=$ac_func_search_save_LIBS
7727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7729$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007730ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007731if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007733
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007734fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007735
Michael W. Hudson54241132001-12-07 15:38:26 +00007736else
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7738$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007739if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007741else
7742 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746/* Override any GCC internal prototype to avoid an error.
7747 Use char because int might match the return type of a GCC
7748 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007749#ifdef __cplusplus
7750extern "C"
7751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007752char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007753int
7754main ()
7755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 ;
7758 return 0;
7759}
7760_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761for ac_lib in '' x; do
7762 if test -z "$ac_lib"; then
7763 ac_res="none required"
7764 else
7765 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007766 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771rm -f core conftest.err conftest.$ac_objext \
7772 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007773 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776done
Victor Stinnere0be4232011-10-25 13:06:09 +02007777if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007779else
7780 ac_cv_search_opendir=no
7781fi
7782rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007783LIBS=$ac_func_search_save_LIBS
7784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7786$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007788if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007790
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007791fi
7792
7793fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007794
Matthias Kloseb9621712010-04-24 17:59:49 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7796$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007797if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007799else
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007801/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007802#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007803int
7804main ()
7805{
7806return makedev(0, 0);
7807 ;
7808 return 0;
7809}
7810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007812 ac_cv_header_sys_types_h_makedev=yes
7813else
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816rm -f core conftest.err conftest.$ac_objext \
7817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007818
7819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7821$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007822
7823if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007824ac_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 +02007825if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007826
Matthias Kloseb9621712010-04-24 17:59:49 +00007827$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007828
7829fi
7830
7831
7832
7833 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 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 +02007835if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007836
Matthias Kloseb9621712010-04-24 17:59:49 +00007837$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007838
7839fi
7840
7841
7842 fi
7843fi
7844
Michael W. Hudson54241132001-12-07 15:38:26 +00007845
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007846# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7847for ac_header in net/if.h
7848do :
7849 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7850#ifdef STDC_HEADERS
7851# include <stdlib.h>
7852# include <stddef.h>
7853#else
7854# ifdef HAVE_STDLIB_H
7855# include <stdlib.h>
7856# endif
7857#endif
7858#ifdef HAVE_SYS_SOCKET_H
7859# include <sys/socket.h>
7860#endif
7861
7862"
Victor Stinnere0be4232011-10-25 13:06:09 +02007863if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007864 cat >>confdefs.h <<_ACEOF
7865#define HAVE_NET_IF_H 1
7866_ACEOF
7867
7868fi
7869
7870done
7871
7872
Martin v. Löwis11017b12006-01-14 18:12:57 +00007873# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007874for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007875do :
7876 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 +00007877#ifdef HAVE_ASM_TYPES_H
7878#include <asm/types.h>
7879#endif
7880#ifdef HAVE_SYS_SOCKET_H
7881#include <sys/socket.h>
7882#endif
7883
Matthias Kloseb9621712010-04-24 17:59:49 +00007884"
Victor Stinnere0be4232011-10-25 13:06:09 +02007885if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007886 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007887#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007888_ACEOF
7889
7890fi
7891
7892done
7893
7894
Charles-François Natali47413c12011-10-06 19:47:44 +02007895# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007896for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007897do :
7898 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7899ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7900#ifdef HAVE_SYS_SOCKET_H
7901#include <sys/socket.h>
7902#endif
7903
7904"
7905if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7906 cat >>confdefs.h <<_ACEOF
7907#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7908_ACEOF
7909
7910fi
7911
7912done
7913
7914
Guido van Rossum627b2d71993-12-24 10:39:16 +00007915# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007916was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7918$as_echo_n "checking for clock_t in time.h... " >&6; }
7919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007920/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007921#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007922
7923_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007925 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007926 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007927else
Martin v. Löwis11437992002-04-12 09:54:03 +00007928
7929
Matthias Kloseb9621712010-04-24 17:59:49 +00007930$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007931
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007932
Guido van Rossum627b2d71993-12-24 10:39:16 +00007933fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007934rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007935
Matthias Kloseb9621712010-04-24 17:59:49 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7937$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007938
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7940$as_echo_n "checking for makedev... " >&6; }
7941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007942/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007943
Jesus Cea740f53a2010-04-28 11:35:30 +00007944#if defined(MAJOR_IN_MKDEV)
7945#include <sys/mkdev.h>
7946#elif defined(MAJOR_IN_SYSMACROS)
7947#include <sys/sysmacros.h>
7948#else
7949#include <sys/types.h>
7950#endif
7951
Neal Norwitz11690112002-07-30 01:08:28 +00007952int
7953main ()
7954{
Jesus Cea740f53a2010-04-28 11:35:30 +00007955
7956 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007957 ;
7958 return 0;
7959}
Matthias Kloseb159a552010-04-25 21:00:44 +00007960
Neal Norwitz11690112002-07-30 01:08:28 +00007961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007962if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007963 ac_cv_has_makedev=yes
7964else
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967rm -f core conftest.err conftest.$ac_objext \
7968 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7970$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007971if test "$ac_cv_has_makedev" = "yes"; then
7972
Matthias Kloseb9621712010-04-24 17:59:49 +00007973$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007974
7975fi
7976
Christian Heimes985ecdc2013-11-20 11:46:18 +01007977# byte swapping
7978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7979$as_echo_n "checking for le64toh... " >&6; }
7980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7981/* end confdefs.h. */
7982
7983#ifdef HAVE_ENDIAN_H
7984#include <endian.h>
7985#elif defined(HAVE_SYS_ENDIAN_H)
7986#include <sys/endian.h>
7987#endif
7988
7989int
7990main ()
7991{
7992
7993 le64toh(1)
7994 ;
7995 return 0;
7996}
7997
7998_ACEOF
7999if ac_fn_c_try_link "$LINENO"; then :
8000 ac_cv_has_le64toh=yes
8001else
8002 ac_cv_has_le64toh=no
8003fi
8004rm -f core conftest.err conftest.$ac_objext \
8005 conftest$ac_exeext conftest.$ac_ext
8006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8007$as_echo "$ac_cv_has_le64toh" >&6; }
8008if test "$ac_cv_has_le64toh" = "yes"; then
8009
8010$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8011
8012fi
8013
Martin v. Löwis399a6892002-10-04 10:22:02 +00008014# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8015# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8016# defined, but the compiler does not support pragma redefine_extname,
8017# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8018# structures (such as rlimit64) without declaring them. As a
8019# work-around, disable LFS on such configurations
8020
8021use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8023$as_echo_n "checking Solaris LFS bug... " >&6; }
8024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008025/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008026
8027#define _LARGEFILE_SOURCE 1
8028#define _FILE_OFFSET_BITS 64
8029#include <sys/resource.h>
8030
Martin v. Löwis399a6892002-10-04 10:22:02 +00008031int
8032main ()
8033{
8034struct rlimit foo;
8035 ;
8036 return 0;
8037}
8038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008039if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008040 sol_lfs_bug=no
8041else
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8046$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008047if test "$sol_lfs_bug" = "yes"; then
8048 use_lfs=no
8049fi
8050
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008051# Don't use largefile support for GNU/Hurd
8052case $ac_sys_system in GNU*)
8053 use_lfs=no
8054esac
8055
Martin v. Löwis399a6892002-10-04 10:22:02 +00008056if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008057# Two defines needed to enable largefile support on various platforms
8058# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008059case $ac_sys_system/$ac_sys_release in
8060AIX*)
8061
8062$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8063
8064 ;;
8065esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008066
Matthias Kloseb9621712010-04-24 17:59:49 +00008067$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008068
8069
Matthias Kloseb9621712010-04-24 17:59:49 +00008070$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008071
Martin v. Löwis399a6892002-10-04 10:22:02 +00008072fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008073
Guido van Rossum84e7b241996-08-19 21:59:00 +00008074# Add some code to confdefs.h so that the test for off_t works on SCO
8075cat >> confdefs.h <<\EOF
8076#if defined(SCO_DS)
8077#undef _OFF_T
8078#endif
8079EOF
8080
Guido van Rossumef2255b2000-03-10 22:30:29 +00008081# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008082ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008083if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008085else
Martin v. Löwis11437992002-04-12 09:54:03 +00008086
8087cat >>confdefs.h <<_ACEOF
8088#define mode_t int
8089_ACEOF
8090
8091fi
8092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008094if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008096else
Martin v. Löwis11437992002-04-12 09:54:03 +00008097
8098cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008100_ACEOF
8101
8102fi
8103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008105if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008107else
Martin v. Löwis11437992002-04-12 09:54:03 +00008108
8109cat >>confdefs.h <<_ACEOF
8110#define pid_t int
8111_ACEOF
8112
8113fi
8114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008115
Martin v. Löwis11437992002-04-12 09:54:03 +00008116cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008117#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008118_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008119
Matthias Kloseb9621712010-04-24 17:59:49 +00008120ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008121if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008122
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008123else
Martin v. Löwis11437992002-04-12 09:54:03 +00008124
8125cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008126#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008127_ACEOF
8128
8129fi
8130
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8132$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008133if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008135else
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008137/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008138#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008139
8140_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008143 ac_cv_type_uid_t=yes
8144else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008145 ac_cv_type_uid_t=no
8146fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008147rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8151$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008152if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008155
8156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008158
8159fi
8160
Mark Dickinson983bc162012-12-02 12:11:38 +00008161
Matthias Kloseb9621712010-04-24 17:59:49 +00008162ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008163if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164
Matthias Kloseb9621712010-04-24 17:59:49 +00008165$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008166
8167fi
8168
Stefan Krah1919b7e2012-03-21 18:25:23 +01008169ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8170if test "x$ac_cv_type___uint128_t" = xyes; then :
8171
8172$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8173
8174fi
8175
Jack Jansendd19cf82001-12-06 22:36:17 +00008176
Michael W. Hudson54241132001-12-07 15:38:26 +00008177# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008178# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179# The cast to long int works around a bug in the HP C Compiler
8180# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8181# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8182# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8184$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008185if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008187else
Matthias Kloseb9621712010-04-24 17:59:49 +00008188 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 +00008189
Martin v. Löwis11437992002-04-12 09:54:03 +00008190else
Matthias Kloseb9621712010-04-24 17:59:49 +00008191 if test "$ac_cv_type_int" = yes; then
8192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008194as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008195See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196 else
8197 ac_cv_sizeof_int=0
8198 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008200
Martin v. Löwis11437992002-04-12 09:54:03 +00008201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8203$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204
8205
8206
Martin v. Löwis11437992002-04-12 09:54:03 +00008207cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008208#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008209_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008210
8211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212# The cast to long int works around a bug in the HP C Compiler
8213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8215# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8217$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008218if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008220else
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 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 +00008222
Martin v. Löwis11437992002-04-12 09:54:03 +00008223else
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 if test "$ac_cv_type_long" = yes; then
8225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008227as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008228See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229 else
8230 ac_cv_sizeof_long=0
8231 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008233
Martin v. Löwis11437992002-04-12 09:54:03 +00008234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8236$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237
8238
8239
Martin v. Löwis11437992002-04-12 09:54:03 +00008240cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008241#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008242_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008243
8244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245# The cast to long int works around a bug in the HP C Compiler
8246# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8247# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8248# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8250$as_echo_n "checking size of long long... " >&6; }
8251if ${ac_cv_sizeof_long_long+:} false; then :
8252 $as_echo_n "(cached) " >&6
8253else
8254 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8255
8256else
8257 if test "$ac_cv_type_long_long" = yes; then
8258 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8259$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8260as_fn_error 77 "cannot compute sizeof (long long)
8261See \`config.log' for more details" "$LINENO" 5; }
8262 else
8263 ac_cv_sizeof_long_long=0
8264 fi
8265fi
8266
8267fi
8268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8269$as_echo "$ac_cv_sizeof_long_long" >&6; }
8270
8271
8272
8273cat >>confdefs.h <<_ACEOF
8274#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8275_ACEOF
8276
8277
8278# The cast to long int works around a bug in the HP C Compiler
8279# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8280# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8281# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8283$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008284if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008286else
Matthias Kloseb9621712010-04-24 17:59:49 +00008287 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 +00008288
Martin v. Löwis11437992002-04-12 09:54:03 +00008289else
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 if test "$ac_cv_type_void_p" = yes; then
8291 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8292$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008293as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008294See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295 else
8296 ac_cv_sizeof_void_p=0
8297 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008299
Martin v. Löwis11437992002-04-12 09:54:03 +00008300fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8302$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303
8304
8305
Martin v. Löwis11437992002-04-12 09:54:03 +00008306cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008307#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008308_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008309
8310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311# The cast to long int works around a bug in the HP C Compiler
8312# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8313# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8314# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8316$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008317if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008319else
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 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 +00008321
Martin v. Löwis11437992002-04-12 09:54:03 +00008322else
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 if test "$ac_cv_type_short" = yes; then
8324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008326as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008327See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328 else
8329 ac_cv_sizeof_short=0
8330 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332
Martin v. Löwis11437992002-04-12 09:54:03 +00008333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8335$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336
8337
8338
Martin v. Löwis11437992002-04-12 09:54:03 +00008339cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008340#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008341_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008342
8343
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008344# The cast to long int works around a bug in the HP C Compiler
8345# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8346# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8347# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8349$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008350if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008352else
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 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 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355else
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 if test "$ac_cv_type_float" = yes; then
8357 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8358$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008359as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008360See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361 else
8362 ac_cv_sizeof_float=0
8363 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008365
Martin v. Löwis11437992002-04-12 09:54:03 +00008366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8368$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369
8370
8371
Martin v. Löwis11437992002-04-12 09:54:03 +00008372cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008373#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008374_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008375
8376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377# The cast to long int works around a bug in the HP C Compiler
8378# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8379# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8380# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8382$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008383if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008385else
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 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 +00008387
Martin v. Löwis11437992002-04-12 09:54:03 +00008388else
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 if test "$ac_cv_type_double" = yes; then
8390 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008392as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008393See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394 else
8395 ac_cv_sizeof_double=0
8396 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8401$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402
8403
8404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008406#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008408
8409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410# The cast to long int works around a bug in the HP C Compiler
8411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8413# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8415$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008416if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008418else
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 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 +00008420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421else
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 if test "$ac_cv_type_fpos_t" = yes; then
8423 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008425as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008426See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427 else
8428 ac_cv_sizeof_fpos_t=0
8429 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8434$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435
8436
8437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008439#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008440_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008441
Michael W. Hudson54241132001-12-07 15:38:26 +00008442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443# The cast to long int works around a bug in the HP C Compiler
8444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8446# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8448$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008449if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 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 +00008453
Martin v. Löwis18e16552006-02-15 17:27:45 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 if test "$ac_cv_type_size_t" = yes; then
8456 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008458as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008459See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460 else
8461 ac_cv_sizeof_size_t=0
8462 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008464
Martin v. Löwis18e16552006-02-15 17:27:45 +00008465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8467$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468
8469
8470
Martin v. Löwis18e16552006-02-15 17:27:45 +00008471cat >>confdefs.h <<_ACEOF
8472#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8473_ACEOF
8474
8475
Christian Heimes400adb02008-02-01 08:12:03 +00008476# The cast to long int works around a bug in the HP C Compiler
8477# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8478# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8479# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8481$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008482if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008484else
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 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 +00008486
Christian Heimes400adb02008-02-01 08:12:03 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 if test "$ac_cv_type_pid_t" = yes; then
8489 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008491as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008492See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008493 else
8494 ac_cv_sizeof_pid_t=0
8495 fi
8496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008497
Christian Heimes400adb02008-02-01 08:12:03 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8500$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008501
8502
8503
8504cat >>confdefs.h <<_ACEOF
8505#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8506_ACEOF
8507
8508
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008509# The cast to long int works around a bug in the HP C Compiler
8510# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8511# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8512# This bug is HP SR number 8606223364.
8513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8514$as_echo_n "checking size of uintptr_t... " >&6; }
8515if ${ac_cv_sizeof_uintptr_t+:} false; then :
8516 $as_echo_n "(cached) " >&6
8517else
8518 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8519
8520else
8521 if test "$ac_cv_type_uintptr_t" = yes; then
8522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8524as_fn_error 77 "cannot compute sizeof (uintptr_t)
8525See \`config.log' for more details" "$LINENO" 5; }
8526 else
8527 ac_cv_sizeof_uintptr_t=0
8528 fi
8529fi
8530
8531fi
8532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8533$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8534
8535
8536
8537cat >>confdefs.h <<_ACEOF
8538#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8539_ACEOF
8540
8541
Michael W. Hudson54241132001-12-07 15:38:26 +00008542
Matthias Kloseb9621712010-04-24 17:59:49 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8544$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008545have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008547/* end confdefs.h. */
8548
8549int
8550main ()
8551{
8552long double x; x = (long double)0;
8553 ;
8554 return 0;
8555}
8556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008557if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008558
8559
Matthias Kloseb9621712010-04-24 17:59:49 +00008560$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008561
8562 have_long_double=yes
8563
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008564fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8567$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008568if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008569# The cast to long int works around a bug in the HP C Compiler
8570# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8571# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8572# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8574$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008575if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008577else
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 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 +00008579
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008580else
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 if test "$ac_cv_type_long_double" = yes; then
8582 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008584as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008585See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008586 else
8587 ac_cv_sizeof_long_double=0
8588 fi
8589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8593$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008594
8595
8596
8597cat >>confdefs.h <<_ACEOF
8598#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8599_ACEOF
8600
8601
8602fi
8603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604# The cast to long int works around a bug in the HP C Compiler
8605# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8606# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8607# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8609$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008610if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008612else
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 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 +00008614
Thomas Woutersb2137042007-02-01 18:02:27 +00008615else
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 if test "$ac_cv_type__Bool" = yes; then
8617 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008619as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008620See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621 else
8622 ac_cv_sizeof__Bool=0
8623 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625
Thomas Woutersb2137042007-02-01 18:02:27 +00008626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8628$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629
8630
8631
Thomas Woutersb2137042007-02-01 18:02:27 +00008632cat >>confdefs.h <<_ACEOF
8633#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8634_ACEOF
8635
8636
Thomas Woutersb2137042007-02-01 18:02:27 +00008637
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008638# The cast to long int works around a bug in the HP C Compiler
8639# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8640# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8641# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8643$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008644if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008646else
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008648#ifdef HAVE_SYS_TYPES_H
8649#include <sys/types.h>
8650#endif
8651
Matthias Kloseb9621712010-04-24 17:59:49 +00008652"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008653
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008654else
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 if test "$ac_cv_type_off_t" = yes; then
8656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008658as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008659See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008660 else
8661 ac_cv_sizeof_off_t=0
8662 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8667$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008669
8670
Martin v. Löwis11437992002-04-12 09:54:03 +00008671cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008672#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008673_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008674
Michael W. Hudson54241132001-12-07 15:38:26 +00008675
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008676
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8678$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008679if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008680 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008681
Matthias Kloseb9621712010-04-24 17:59:49 +00008682$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008683
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8685$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8688$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008689fi
8690
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008691# The cast to long int works around a bug in the HP C Compiler
8692# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8693# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8694# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8696$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008697if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008699else
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008701#ifdef HAVE_SYS_TYPES_H
8702#include <sys/types.h>
8703#endif
8704#ifdef HAVE_TIME_H
8705#include <time.h>
8706#endif
8707
Matthias Kloseb9621712010-04-24 17:59:49 +00008708"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008709
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 if test "$ac_cv_type_time_t" = yes; then
8712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008714as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008715See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008716 else
8717 ac_cv_sizeof_time_t=0
8718 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8723$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008724
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008725
8726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008728#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008729_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008730
Michael W. Hudson54241132001-12-07 15:38:26 +00008731
8732
Trent Mick635f6fb2000-08-23 21:33:05 +00008733# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008734ac_save_cc="$CC"
8735if test "$ac_cv_kpthread" = "yes"
8736then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008737elif test "$ac_cv_kthread" = "yes"
8738then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008739elif test "$ac_cv_pthread" = "yes"
8740then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008741fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008742
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8744$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008745have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008747/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008748
8749 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008750int
8751main ()
8752{
Guido van Rossum12580492000-09-24 16:47:19 +00008753pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ;
8755 return 0;
8756}
Matthias Kloseb159a552010-04-25 21:00:44 +00008757
Martin v. Löwis11437992002-04-12 09:54:03 +00008758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008759if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008760 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8764$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008765if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008767# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8768# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8769# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8771$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008772if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774else
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008776#ifdef HAVE_PTHREAD_H
8777#include <pthread.h>
8778#endif
8779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008781
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008782else
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 if test "$ac_cv_type_pthread_t" = yes; then
8784 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008786as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008787See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788 else
8789 ac_cv_sizeof_pthread_t=0
8790 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792
Trent Mick635f6fb2000-08-23 21:33:05 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8795$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008796
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008797
8798
Martin v. Löwis11437992002-04-12 09:54:03 +00008799cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008800#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008801_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008802
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008803
Trent Mick635f6fb2000-08-23 21:33:05 +00008804fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008805CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008806
Michael W. Hudson54241132001-12-07 15:38:26 +00008807
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008808case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008809 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008810 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8811 ;;
8812 Darwin/*)
8813 OTHER_LIBTOOL_OPT=""
8814 ;;
8815esac
8816
8817
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008818
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008819case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008820 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008821 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8822 if test "${enable_universalsdk}"; then
8823 :
8824 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008825 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008826 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008827 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008828 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008829 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008830 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008831 if test ${gcc_version} '<' 4.0
8832 then
8833 LIBTOOL_CRUFT="-lcc_dynamic"
8834 else
8835 LIBTOOL_CRUFT=""
8836 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008838 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008839else
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008841/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008842
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008843 #include <unistd.h>
8844 int main(int argc, char*argv[])
8845 {
8846 if (sizeof(long) == 4) {
8847 return 0;
8848 } else {
8849 return 1;
8850 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008851 }
8852
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008854if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008855 ac_osx_32bit=yes
8856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008861fi
8862
8863
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008864 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008865 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008866 i386)
8867 MACOSX_DEFAULT_ARCH="i386"
8868 ;;
8869 ppc)
8870 MACOSX_DEFAULT_ARCH="ppc"
8871 ;;
8872 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008873 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008874 ;;
8875 esac
8876 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008877 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008878 i386)
8879 MACOSX_DEFAULT_ARCH="x86_64"
8880 ;;
8881 ppc)
8882 MACOSX_DEFAULT_ARCH="ppc64"
8883 ;;
8884 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008885 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008886 ;;
8887 esac
8888
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008889 fi
8890
8891 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008892 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008893 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008894esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8896$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008897if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008898then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008899 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008901 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008902
Matthias Kloseb9621712010-04-24 17:59:49 +00008903$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008904
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8906$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008907 if test $enable_shared = "yes"
8908 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008909 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 +00008910 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008911else
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8913$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008914fi
8915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8917$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008918case $ac_sys_system/$ac_sys_release in
8919 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008920
Matthias Kloseb9621712010-04-24 17:59:49 +00008921$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008922
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8924$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008925 ;;
8926 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8928$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008929 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008930esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008931
Guido van Rossum0a516c91994-09-12 10:58:40 +00008932# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008933
Michael W. Hudson54241132001-12-07 15:38:26 +00008934
8935
8936
8937
Benjamin Peterson99f03762010-04-11 22:15:28 +00008938
Thomas Wouters477c8d52006-05-27 19:21:47 +00008939
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008940# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8941# -- usually .so, .sl on HP-UX, .dll on Cygwin
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8943$as_echo_n "checking the extension of shared libraries... " >&6; }
8944if test -z "$SHLIB_SUFFIX"; then
8945 case $ac_sys_system in
8946 hp*|HP*)
8947 case `uname -m` in
8948 ia64) SHLIB_SUFFIX=.so;;
8949 *) SHLIB_SUFFIX=.sl;;
8950 esac
8951 ;;
8952 CYGWIN*) SHLIB_SUFFIX=.dll;;
8953 *) SHLIB_SUFFIX=.so;;
8954 esac
8955fi
8956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8957$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008958
Guido van Rossum0a516c91994-09-12 10:58:40 +00008959# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008960# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008961# (Shared libraries in this instance are shared modules to be loaded into
8962# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8964$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008965if test -z "$LDSHARED"
8966then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008967 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008968 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008969 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008970 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008971 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008972 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008973 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008975 if test "$GCC" = "yes" ; then
8976 LDSHARED='$(CC) -shared'
8977 LDCXXSHARED='$(CXX) -shared'
8978 else
8979 LDSHARED='$(CC) -G'
8980 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008981 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008982 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008983 if test "$GCC" = "yes" ; then
8984 LDSHARED='$(CC) -shared'
8985 LDCXXSHARED='$(CXX) -shared'
8986 else
8987 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008988 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008989 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008990 LDSHARED='$(CC) -bundle'
8991 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008992 if test "$enable_framework" ; then
8993 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008994 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8995 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008996 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008997 else
8998 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008999 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009000 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009001 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009002 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009003 LDSHARED='$(CC) -bundle'
9004 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009005 if test "$enable_framework" ; then
9006 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009007 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9008 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009009 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009010 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009011 # No framework, use the Python app as bundle-loader
9012 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009013 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009014 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009015 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009016 Darwin/*)
9017 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9018 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009019
Ned Deily36820b62014-06-25 13:44:22 -07009020 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9021 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9022 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9023 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9024 if test ${dep_target_major} -eq 10 && \
9025 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009026 then
Ned Deily36820b62014-06-25 13:44:22 -07009027 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009028 LDSHARED='$(CC) -bundle'
9029 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009030 if test "$enable_framework" ; then
9031 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009032 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9033 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009034 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009035 else
9036 # No framework, use the Python app as bundle-loader
9037 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9038 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009039 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009040 fi
Ned Deily36820b62014-06-25 13:44:22 -07009041 else
9042 # building for OS X 10.3 and later
9043 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9044 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9045 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009046 fi
9047 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009048 Linux*|GNU*|QNX*)
9049 LDSHARED='$(CC) -shared'
9050 LDCXXSHARED='$(CXX) -shared';;
9051 BSD/OS*/4*)
9052 LDSHARED="gcc -shared"
9053 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009054 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009055 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009056 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009057 LDSHARED='$(CC) -shared'
9058 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009059 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009060 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009061 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009062 OpenBSD*)
9063 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9064 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009065 LDSHARED='$(CC) -shared $(CCSHARED)'
9066 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009067 else
9068 case `uname -r` in
9069 [01].* | 2.[0-7] | 2.[0-7].*)
9070 LDSHARED="ld -Bshareable ${LDFLAGS}"
9071 ;;
9072 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009073 LDSHARED='$(CC) -shared $(CCSHARED)'
9074 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009075 ;;
9076 esac
9077 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009078 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009079 LDSHARED='$(CC) -shared'
9080 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009081 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009082 if test "$GCC" = "yes" ; then
9083 LDSHARED='$(CC) -shared'
9084 LDCXXSHARED='$(CXX) -shared'
9085 else
9086 LDSHARED='$(CC) -G'
9087 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009088 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009089 SCO_SV*)
9090 LDSHARED='$(CC) -Wl,-G,-Bexport'
9091 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9092 CYGWIN*)
9093 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9094 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009095 *) LDSHARED="ld";;
9096 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9099$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009100LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009101BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009102# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009103# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9105$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009106if test -z "$CCSHARED"
9107then
Guido van Rossum07397971997-04-29 21:49:50 +00009108 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009109 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009110 then CCSHARED="-fPIC";
9111 elif test `uname -p` = sparc;
9112 then CCSHARED="-xcode=pic32";
9113 else CCSHARED="-Kpic";
9114 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009115 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009116 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009117 else CCSHARED="+z";
9118 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009119 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009120 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009121 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009122 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009123 if test "$GCC" = "yes"
9124 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009125 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009126 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009127 SCO_SV*)
9128 if test "$GCC" = "yes"
9129 then CCSHARED="-fPIC"
9130 else CCSHARED="-Kpic -belf"
9131 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009132 IRIX*/6*) case $CC in
9133 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009134 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009135 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009136 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9139$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009140# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009141# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9143$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009144if test -z "$LINKFORSHARED"
9145then
Guido van Rossum07397971997-04-29 21:49:50 +00009146 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009147 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009148 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009149 LINKFORSHARED="-Wl,-E -Wl,+s";;
9150# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009151 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009152 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009153 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009154 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009155 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009156
9157 # Issue #18075: the default maximum stack size (8MBytes) is too
9158 # small for the default recursion limit. Increase the stack size
9159 # to ensure that tests don't crash
9160 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9161
Jack Jansene578a632001-08-15 01:27:14 +00009162 if test "$enable_framework"
9163 then
Jack Jansenda49e192005-01-07 13:08:22 +00009164 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009165 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009166 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009167 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009168 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009169 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009170 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009171 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9172 then
9173 LINKFORSHARED="-Wl,--export-dynamic"
9174 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009175 SunOS/5*) case $CC in
9176 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009177 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009178 then
9179 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009180 fi;;
9181 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009182 CYGWIN*)
9183 if test $enable_shared = "no"
9184 then
9185 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9186 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009187 QNX*)
9188 # -Wl,-E causes the symbols to be added to the dynamic
9189 # symbol table so that they can be found when a module
9190 # is loaded. -N 2048K causes the stack size to be set
9191 # to 2048 kilobytes so that the stack doesn't overflow
9192 # when running test_compile.py.
9193 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009194 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9197$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009198
Michael W. Hudson54241132001-12-07 15:38:26 +00009199
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009200
Matthias Kloseb9621712010-04-24 17:59:49 +00009201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9202$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009203if test ! "$LIBRARY" = "$LDLIBRARY"
9204then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009205 case $ac_sys_system in
9206 CYGWIN*)
9207 # Cygwin needs CCSHARED when building extension DLLs
9208 # but not when building the interpreter DLL.
9209 CFLAGSFORSHARED='';;
9210 *)
9211 CFLAGSFORSHARED='$(CCSHARED)'
9212 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9215$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009216
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009217# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9218# library (with --enable-shared).
9219# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009220# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9221# if it is not required, since it creates a dependency of the shared library
9222# to LIBS. This, in turn, means that applications linking the shared libpython
9223# don't need to link LIBS explicitly. The default should be only changed
9224# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9227$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009228case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009229 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009230 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009231esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9233$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009234
9235
Guido van Rossum627b2d71993-12-24 10:39:16 +00009236# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9238$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009239if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009240 $as_echo_n "(cached) " >&6
9241else
9242 ac_check_lib_save_LIBS=$LIBS
9243LIBS="-lsendfile $LIBS"
9244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9245/* end confdefs.h. */
9246
9247/* Override any GCC internal prototype to avoid an error.
9248 Use char because int might match the return type of a GCC
9249 builtin and then its argument prototype would still apply. */
9250#ifdef __cplusplus
9251extern "C"
9252#endif
9253char sendfile ();
9254int
9255main ()
9256{
9257return sendfile ();
9258 ;
9259 return 0;
9260}
9261_ACEOF
9262if ac_fn_c_try_link "$LINENO"; then :
9263 ac_cv_lib_sendfile_sendfile=yes
9264else
9265 ac_cv_lib_sendfile_sendfile=no
9266fi
9267rm -f core conftest.err conftest.$ac_objext \
9268 conftest$ac_exeext conftest.$ac_ext
9269LIBS=$ac_check_lib_save_LIBS
9270fi
9271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9272$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009273if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009274 cat >>confdefs.h <<_ACEOF
9275#define HAVE_LIBSENDFILE 1
9276_ACEOF
9277
9278 LIBS="-lsendfile $LIBS"
9279
9280fi
9281
Matthias Kloseb9621712010-04-24 17:59:49 +00009282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9283$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009284if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009285 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009286else
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009288LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009291
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009292/* Override any GCC internal prototype to avoid an error.
9293 Use char because int might match the return type of a GCC
9294 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009295#ifdef __cplusplus
9296extern "C"
9297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009298char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009299int
9300main ()
9301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ;
9304 return 0;
9305}
9306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009309else
Matthias Kloseb9621712010-04-24 17:59:49 +00009310 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009312rm -f core conftest.err conftest.$ac_objext \
9313 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009314LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9317$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009318if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 cat >>confdefs.h <<_ACEOF
9320#define HAVE_LIBDL 1
9321_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009322
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009323 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009324
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009325fi
9326 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9328$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009329if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009330 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009331else
Martin v. Löwis11437992002-04-12 09:54:03 +00009332 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009333LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337/* Override any GCC internal prototype to avoid an error.
9338 Use char because int might match the return type of a GCC
9339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009340#ifdef __cplusplus
9341extern "C"
9342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009343char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009344int
9345main ()
9346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009347return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 ;
9349 return 0;
9350}
9351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009352if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009354else
Matthias Kloseb9621712010-04-24 17:59:49 +00009355 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009357rm -f core conftest.err conftest.$ac_objext \
9358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9362$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009363if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 cat >>confdefs.h <<_ACEOF
9365#define HAVE_LIBDLD 1
9366_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009367
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009368 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009369
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009370fi
9371 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009372
Georg Brandlb1441c72009-01-03 22:33:39 +00009373# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009374if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9376$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009377if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009378 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009379else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009380 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009384/* Override any GCC internal prototype to avoid an error.
9385 Use char because int might match the return type of a GCC
9386 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009387#ifdef __cplusplus
9388extern "C"
9389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009390char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009391int
9392main ()
9393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 ;
9396 return 0;
9397}
9398_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399for ac_lib in '' pthread rt posix4; do
9400 if test -z "$ac_lib"; then
9401 ac_res="none required"
9402 else
9403 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009404 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009406 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009409rm -f core conftest.err conftest.$ac_objext \
9410 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009411 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414done
Victor Stinnere0be4232011-10-25 13:06:09 +02009415if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417else
9418 ac_cv_search_sem_init=no
9419fi
9420rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009421LIBS=$ac_func_search_save_LIBS
9422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9424$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009426if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009428
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009429fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009430 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009431 # posix4 on Solaris 2.6
9432 # pthread (first!) on Linux
9433fi
9434
Martin v. Löwis19d17342003-06-14 21:03:05 +00009435# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9437$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009438if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009439 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009440else
9441 ac_check_lib_save_LIBS=$LIBS
9442LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009444/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446/* Override any GCC internal prototype to avoid an error.
9447 Use char because int might match the return type of a GCC
9448 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009449#ifdef __cplusplus
9450extern "C"
9451#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009452char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009453int
9454main ()
9455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009457 ;
9458 return 0;
9459}
9460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009461if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009462 ac_cv_lib_intl_textdomain=yes
9463else
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009466rm -f core conftest.err conftest.$ac_objext \
9467 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009468LIBS=$ac_check_lib_save_LIBS
9469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9471$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009472if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009473
Matthias Kloseb9621712010-04-24 17:59:49 +00009474$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009475
Brett Cannonc6d936e2009-06-07 20:09:53 +00009476 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009477fi
9478
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009479
9480# checks for system dependent C++ extensions support
9481case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9483$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009485/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009486
Georg Brandl59e87bd2011-02-15 19:48:59 +00009487 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009488int
9489main ()
9490{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009491loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 ;
9493 return 0;
9494}
Matthias Kloseb159a552010-04-25 21:00:44 +00009495
Martin v. Löwis11437992002-04-12 09:54:03 +00009496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009497if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009498
Matthias Kloseb159a552010-04-25 21:00:44 +00009499
Matthias Kloseb9621712010-04-24 17:59:49 +00009500$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009501
Matthias Kloseb159a552010-04-25 21:00:44 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009503$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009504
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009505else
Matthias Kloseb159a552010-04-25 21:00:44 +00009506
9507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009508$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009509
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009511rm -f core conftest.err conftest.$ac_objext \
9512 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009513 *) ;;
9514esac
9515
Christian Heimes985ecdc2013-11-20 11:46:18 +01009516# check for systems that require aligned memory access
9517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9518$as_echo_n "checking aligned memory access is required... " >&6; }
9519if test "$cross_compiling" = yes; then :
9520 aligned_required=yes
9521else
9522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9523/* end confdefs.h. */
9524
9525int main()
9526{
9527 char s[16];
9528 int i, *p1, *p2;
9529 for (i=0; i < 16; i++)
9530 s[i] = i;
9531 p1 = (int*)(s+1);
9532 p2 = (int*)(s+2);
9533 if (*p1 == *p2)
9534 return 1;
9535 return 0;
9536}
9537
9538_ACEOF
9539if ac_fn_c_try_run "$LINENO"; then :
9540 aligned_required=no
9541else
9542 aligned_required=yes
9543fi
9544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9545 conftest.$ac_objext conftest.beam conftest.$ac_ext
9546fi
9547
9548
9549if test "$aligned_required" = yes ; then
9550
9551$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9552
9553fi
9554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9555$as_echo "$aligned_required" >&6; }
9556
9557
9558# str, bytes and memoryview hash algorithm
9559
9560
9561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9562$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9563
9564# Check whether --with-hash_algorithm was given.
9565if test "${with_hash_algorithm+set}" = set; then :
9566 withval=$with_hash_algorithm;
9567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9568$as_echo "$withval" >&6; }
9569case "$withval" in
9570 siphash24)
9571 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9572
9573 ;;
9574 fnv)
9575 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9576
9577 ;;
9578 *)
9579 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9580 ;;
9581esac
9582
9583else
9584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9585$as_echo "default" >&6; }
9586fi
9587
9588
Charles-François Natalid30b0222014-05-08 23:08:51 +01009589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9590$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9591
9592# Check whether --with-address_sanitizer was given.
9593if test "${with_address_sanitizer+set}" = set; then :
9594 withval=$with_address_sanitizer;
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9596$as_echo "$withval" >&6; }
9597BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9598LDFLAGS="-fsanitize=address $LDFLAGS"
9599
9600else
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9602$as_echo "no" >&6; }
9603fi
9604
9605
Guido van Rossum70c7f481998-03-26 18:44:10 +00009606# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9608$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009609if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009610 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009611else
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009613LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617/* Override any GCC internal prototype to avoid an error.
9618 Use char because int might match the return type of a GCC
9619 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009620#ifdef __cplusplus
9621extern "C"
9622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009623char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009624int
9625main ()
9626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 ;
9629 return 0;
9630}
9631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009632if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009634else
Matthias Kloseb9621712010-04-24 17:59:49 +00009635 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009637rm -f core conftest.err conftest.$ac_objext \
9638 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009639LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9642$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009643if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009644 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009645fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009646 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9648$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009649if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009651else
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009653LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657/* Override any GCC internal prototype to avoid an error.
9658 Use char because int might match the return type of a GCC
9659 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009660#ifdef __cplusplus
9661extern "C"
9662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009663char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009664int
9665main ()
9666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ;
9669 return 0;
9670}
9671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009674else
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009677rm -f core conftest.err conftest.$ac_objext \
9678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009679LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9682$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009683if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009684 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009685fi
9686 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009687
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9689$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009692if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9695$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009696LIBS="$withval $LIBS"
9697
9698else
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9700$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701fi
9702
Guido van Rossum7f43da71994-08-01 12:15:30 +00009703
Victor Stinner8291b5e2015-03-20 16:03:14 +01009704
9705
9706
9707
9708
9709
9710
9711if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9712 if test -n "$ac_tool_prefix"; then
9713 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9714set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9716$as_echo_n "checking for $ac_word... " >&6; }
9717if ${ac_cv_path_PKG_CONFIG+:} false; then :
9718 $as_echo_n "(cached) " >&6
9719else
9720 case $PKG_CONFIG in
9721 [\\/]* | ?:[\\/]*)
9722 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9723 ;;
9724 *)
9725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9726for as_dir in $PATH
9727do
9728 IFS=$as_save_IFS
9729 test -z "$as_dir" && as_dir=.
9730 for ac_exec_ext in '' $ac_executable_extensions; do
9731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9732 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9734 break 2
9735 fi
9736done
9737 done
9738IFS=$as_save_IFS
9739
9740 ;;
9741esac
9742fi
9743PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9744if test -n "$PKG_CONFIG"; then
9745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9746$as_echo "$PKG_CONFIG" >&6; }
9747else
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749$as_echo "no" >&6; }
9750fi
9751
9752
9753fi
9754if test -z "$ac_cv_path_PKG_CONFIG"; then
9755 ac_pt_PKG_CONFIG=$PKG_CONFIG
9756 # Extract the first word of "pkg-config", so it can be a program name with args.
9757set dummy pkg-config; ac_word=$2
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9759$as_echo_n "checking for $ac_word... " >&6; }
9760if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9761 $as_echo_n "(cached) " >&6
9762else
9763 case $ac_pt_PKG_CONFIG in
9764 [\\/]* | ?:[\\/]*)
9765 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9766 ;;
9767 *)
9768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9769for as_dir in $PATH
9770do
9771 IFS=$as_save_IFS
9772 test -z "$as_dir" && as_dir=.
9773 for ac_exec_ext in '' $ac_executable_extensions; do
9774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9775 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9777 break 2
9778 fi
9779done
9780 done
9781IFS=$as_save_IFS
9782
9783 ;;
9784esac
9785fi
9786ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9787if test -n "$ac_pt_PKG_CONFIG"; then
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9789$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9790else
9791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9792$as_echo "no" >&6; }
9793fi
9794
9795 if test "x$ac_pt_PKG_CONFIG" = x; then
9796 PKG_CONFIG=""
9797 else
9798 case $cross_compiling:$ac_tool_warned in
9799yes:)
9800{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9801$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9802ac_tool_warned=yes ;;
9803esac
9804 PKG_CONFIG=$ac_pt_PKG_CONFIG
9805 fi
9806else
9807 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9808fi
9809
9810fi
9811if test -n "$PKG_CONFIG"; then
9812 _pkg_min_version=0.9.0
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9814$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9815 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9817$as_echo "yes" >&6; }
9818 else
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820$as_echo "no" >&6; }
9821 PKG_CONFIG=""
9822 fi
9823fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009824
9825# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9827$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009828
9829# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009830if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009831 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009832else
9833 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009834fi
9835
9836
Matthias Kloseb9621712010-04-24 17:59:49 +00009837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9838$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009839
9840# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9842$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009843
9844# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009845if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009846 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009847else
9848 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009849fi
9850
9851
9852if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009853 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9854else
9855 LIBFFI_INCLUDEDIR=""
9856fi
9857
9858
Matthias Kloseb9621712010-04-24 17:59:49 +00009859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9860$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009861
Stefan Krah60187b52012-03-23 19:06:27 +01009862# Check for use of the system libmpdec library
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9864$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9865
9866# Check whether --with-system_libmpdec was given.
9867if test "${with_system_libmpdec+set}" = set; then :
9868 withval=$with_system_libmpdec;
9869else
9870 with_system_libmpdec="no"
9871fi
9872
9873
9874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9875$as_echo "$with_system_libmpdec" >&6; }
9876
Benjamin Peterson076ed002010-10-31 17:11:02 +00009877# Check for support for loadable sqlite extensions
9878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9879$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9880# Check whether --enable-loadable-sqlite-extensions was given.
9881if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9882 enableval=$enable_loadable_sqlite_extensions;
9883else
9884 enable_loadable_sqlite_extensions="no"
9885fi
9886
9887
9888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9889$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9890
Ned Deilyd819b932013-09-06 01:07:05 -07009891# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9892
9893
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9895$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9896
9897# Check whether --with-tcltk-includes was given.
9898if test "${with_tcltk_includes+set}" = set; then :
9899 withval=$with_tcltk_includes;
9900else
9901 with_tcltk_includes="default"
9902fi
9903
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9905$as_echo "$with_tcltk_includes" >&6; }
9906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9907$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9908
9909# Check whether --with-tcltk-libs was given.
9910if test "${with_tcltk_libs+set}" = set; then :
9911 withval=$with_tcltk_libs;
9912else
9913 with_tcltk_libs="default"
9914fi
9915
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9917$as_echo "$with_tcltk_libs" >&6; }
9918if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9919then
9920 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9921 then
9922 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9923 fi
9924 TCLTK_INCLUDES=""
9925 TCLTK_LIBS=""
9926else
9927 TCLTK_INCLUDES="$with_tcltk_includes"
9928 TCLTK_LIBS="$with_tcltk_libs"
9929fi
9930
Matthias Klose55708cc2009-04-30 08:06:49 +00009931# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9933$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009934
9935# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009936if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009937 withval=$with_dbmliborder;
9938if test x$with_dbmliborder = xyes
9939then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009940as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009941else
9942 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9943 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9944 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009945 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009946 fi
9947 done
9948fi
9949fi
9950
Matthias Kloseb9621712010-04-24 17:59:49 +00009951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9952$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009953
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009954# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009955
9956
Matthias Kloseb9621712010-04-24 17:59:49 +00009957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9958$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009960# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009961if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009962 withval=$with_signal_module;
9963fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009964
9965
9966if test -z "$with_signal_module"
9967then with_signal_module="yes"
9968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9970$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009971
9972if test "${with_signal_module}" = "yes"; then
9973 USE_SIGNAL_MODULE=""
9974 SIGNAL_OBJS=""
9975else
9976 USE_SIGNAL_MODULE="#"
9977 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9978fi
9979
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009980# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009981
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009982USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984
Martin v. Löwis11437992002-04-12 09:54:03 +00009985
9986# Templates for things AC_DEFINEd more than once.
9987# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009988
9989
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Matthias Kloseb9621712010-04-24 17:59:49 +00009991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9992$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009995if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996 withval=$with_threads;
9997fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009998
9999
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010000# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010003if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004 withval=$with_thread; with_threads=$with_thread
10005fi
10006
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010007
10008if test -z "$with_threads"
10009then with_threads="yes"
10010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10012$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010013
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010014
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010015if test "$with_threads" = "no"
10016then
10017 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010018elif test "$ac_cv_pthread_is_default" = yes
10019then
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010021
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010022 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010024
10025 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010027elif test "$ac_cv_kpthread" = "yes"
10028then
10029 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010030 if test "$ac_cv_cxx_thread" = "yes"; then
10031 CXX="$CXX -Kpthread"
10032 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010034
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010035 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010036 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010037elif test "$ac_cv_kthread" = "yes"
10038then
10039 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010040 if test "$ac_cv_cxx_thread" = "yes"; then
10041 CXX="$CXX -Kthread"
10042 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010044
10045 posix_threads=yes
10046 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010047elif test "$ac_cv_pthread" = "yes"
10048then
10049 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010050 if test "$ac_cv_cxx_thread" = "yes"; then
10051 CXX="$CXX -pthread"
10052 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010053 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010054
10055 posix_threads=yes
10056 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010057else
10058 if test ! -z "$with_threads" -a -d "$with_threads"
10059 then LDFLAGS="$LDFLAGS -L$with_threads"
10060 fi
10061 if test ! -z "$withval" -a -d "$withval"
10062 then LDFLAGS="$LDFLAGS -L$withval"
10063 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010064
10065 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010066 # define _POSIX_THREADS in unistd.h. Some apparently don't
10067 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10069$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010071/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010072
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010073#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010074#ifdef _POSIX_THREADS
10075yes
10076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010077
10078_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010081 unistd_defines_pthreads=yes
10082else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010083 unistd_defines_pthreads=no
10084fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010085rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10088$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010089
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010091
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010092 # Just looking for pthread_create in libpthread is not enough:
10093 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10094 # So we really have to include pthread.h, and then link.
10095 _libs=$LIBS
10096 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10098$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010100/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010101
10102#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010103#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010104
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010105void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010106int
10107main ()
10108{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010109
10110pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 ;
10112 return 0;
10113}
10114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010115if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010116
Matthias Kloseb9621712010-04-24 17:59:49 +000010117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10118$as_echo "yes" >&6; }
10119 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010120
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010121 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010122 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010123else
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010125 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010127if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010129
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010130 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010131 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010132else
Guido van Rossumad678af1998-10-02 14:42:15 +000010133
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10135$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010136if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010137 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010138else
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010140LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144/* Override any GCC internal prototype to avoid an error.
10145 Use char because int might match the return type of a GCC
10146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010147#ifdef __cplusplus
10148extern "C"
10149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010150char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010151int
10152main ()
10153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 ;
10156 return 0;
10157}
10158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010161else
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164rm -f core conftest.err conftest.$ac_objext \
10165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010166LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10169$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010170if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010172
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010173 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010174 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010175 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010176else
Greg Steinadf63d62000-07-05 10:38:09 +000010177
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10179$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010180if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010182else
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010184LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188/* Override any GCC internal prototype to avoid an error.
10189 Use char because int might match the return type of a GCC
10190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010191#ifdef __cplusplus
10192extern "C"
10193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010194char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010195int
10196main ()
10197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 ;
10200 return 0;
10201}
10202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010205else
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208rm -f core conftest.err conftest.$ac_objext \
10209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010210LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10213$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010214if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010216
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010217 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010218 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010219 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010220else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010221
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10223$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010224if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010226else
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010228LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232/* Override any GCC internal prototype to avoid an error.
10233 Use char because int might match the return type of a GCC
10234 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010235#ifdef __cplusplus
10236extern "C"
10237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010238char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010239int
10240main ()
10241{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 ;
10244 return 0;
10245}
10246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010247if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010249else
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010252rm -f core conftest.err conftest.$ac_objext \
10253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010254LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10257$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010258if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010260
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010261 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010262 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010263 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010264else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010265
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10267$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010268if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010270else
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010272LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276/* Override any GCC internal prototype to avoid an error.
10277 Use char because int might match the return type of a GCC
10278 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010279#ifdef __cplusplus
10280extern "C"
10281#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010282char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010283int
10284main ()
10285{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ;
10288 return 0;
10289}
10290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010291if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010293else
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010296rm -f core conftest.err conftest.$ac_objext \
10297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010298LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10301$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010302if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010304
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010305 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010306 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010307 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010308else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010309
Martin v. Löwis130fb172001-07-19 11:00:41 +000010310 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010311fi
10312
Guido van Rossum627b2d71993-12-24 10:39:16 +000010313
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010314fi
10315
Guido van Rossum0be3e491997-05-22 20:33:33 +000010316fi
10317
Guido van Rossum49545951997-12-02 19:28:29 +000010318fi
10319
Guido van Rossumb93a8621998-05-07 13:27:32 +000010320fi
10321
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010323rm -f core conftest.err conftest.$ac_objext \
10324 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010325
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10327$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010328if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010330else
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010332LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336/* Override any GCC internal prototype to avoid an error.
10337 Use char because int might match the return type of a GCC
10338 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010339#ifdef __cplusplus
10340extern "C"
10341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010342char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010343int
10344main ()
10345{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 ;
10348 return 0;
10349}
10350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010351if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010353else
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010356rm -f core conftest.err conftest.$ac_objext \
10357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010358LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10361$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010362if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010364
Martin v. Löwis130fb172001-07-19 11:00:41 +000010365 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010366 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010367 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010368fi
10369
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010370
Neal Norwitza978ab02002-11-02 16:58:05 +000010371 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10373$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010374if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010376else
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010378LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382/* Override any GCC internal prototype to avoid an error.
10383 Use char because int might match the return type of a GCC
10384 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010385#ifdef __cplusplus
10386extern "C"
10387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010388char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010389int
10390main ()
10391{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010392return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 ;
10394 return 0;
10395}
10396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010397if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010399else
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010402rm -f core conftest.err conftest.$ac_objext \
10403 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010404LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10407$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010408if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010410
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010411 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010412 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010413 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010414fi
10415
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010416 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010417fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010418
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010419if test "$posix_threads" = "yes"; then
10420 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010421
Matthias Kloseb9621712010-04-24 17:59:49 +000010422$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010423
10424 fi
10425
10426 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10427 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010428 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010429$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010430
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010431 ;;
10432 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010433$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010434
10435 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010436 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010437$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010438
10439 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010440 esac
10441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10443$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010444 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010446else
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010448 ac_cv_pthread_system_supported=no
10449else
Matthias Kloseb9621712010-04-24 17:59:49 +000010450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010451/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010452
10453 #include <stdio.h>
10454 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010455 void *foo(void *parm) {
10456 return NULL;
10457 }
10458 main() {
10459 pthread_attr_t attr;
10460 pthread_t id;
10461 if (pthread_attr_init(&attr)) exit(-1);
10462 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10463 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10464 exit(0);
10465 }
10466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010467if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010468 ac_cv_pthread_system_supported=yes
10469else
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10473 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010474fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476
Guido van Rossum627b2d71993-12-24 10:39:16 +000010477fi
10478
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10480$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010481 if test "$ac_cv_pthread_system_supported" = "yes"; then
10482
Matthias Kloseb9621712010-04-24 17:59:49 +000010483$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010484
10485 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 for ac_func in pthread_sigmask
10487do :
10488 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010489if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010490 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010491#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010492_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010493 case $ac_sys_system in
10494 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010495
Matthias Kloseb9621712010-04-24 17:59:49 +000010496$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010497
10498 ;;
10499 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010500fi
10501done
10502
Christian Heimesf77b4b22013-08-21 13:26:05 +020010503 for ac_func in pthread_atfork
10504do :
10505 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10506if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10507 cat >>confdefs.h <<_ACEOF
10508#define HAVE_PTHREAD_ATFORK 1
10509_ACEOF
10510
10511fi
10512done
10513
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010514fi
10515
10516
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010517# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10520$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010522if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010523 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010524 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10526$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010527 ipv6=no
10528 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10530$as_echo "yes" >&6; }
10531 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010532
10533 ipv6=yes
10534 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010535 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010536else
Martin v. Löwis11437992002-04-12 09:54:03 +000010537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010539/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010540 /* AF_INET6 available check */
10541#include <sys/types.h>
10542#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010543int
10544main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010545{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010546int domain = AF_INET6;
10547 ;
10548 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010549}
Martin v. Löwis11437992002-04-12 09:54:03 +000010550_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010551if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010552
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10554$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010555 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010556
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010557else
Matthias Kloseb159a552010-04-25 21:00:44 +000010558
Matthias Kloseb9621712010-04-24 17:59:49 +000010559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10560$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010561 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010562
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010563fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010566if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10568$as_echo_n "checking if RFC2553 API is available... " >&6; }
10569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010570/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010571
10572 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010573#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010574int
10575main ()
10576{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010577struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010578 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 ;
10580 return 0;
10581}
Matthias Kloseb159a552010-04-25 21:00:44 +000010582
Martin v. Löwis11437992002-04-12 09:54:03 +000010583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010584if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010585
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010587$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010588 ipv6=yes
10589
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010590else
Matthias Kloseb159a552010-04-25 21:00:44 +000010591
10592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010593$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010594 ipv6=no
10595
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010598fi
10599
10600if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010602
10603fi
10604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010605fi
10606
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010607
10608ipv6type=unknown
10609ipv6lib=none
10610ipv6trylibc=no
10611
10612if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10614$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010615 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10616 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010617 case $i in
10618 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010621
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010622#include <netinet/in.h>
10623#ifdef IPV6_INRIA_VERSION
10624yes
10625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010626_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010629 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010630fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010631rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632
10633 ;;
10634 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010636/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010637
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638#include <netinet/in.h>
10639#ifdef __KAME__
10640yes
10641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010642_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645 ipv6type=$i;
10646 ipv6lib=inet6
10647 ipv6libdir=/usr/local/v6/lib
10648 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010649fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010650rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010651
10652 ;;
10653 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010655/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010656
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010657#include <features.h>
10658#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10659yes
10660#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010661_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010664 ipv6type=$i;
10665 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010666fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010667rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010668
10669 ;;
10670 linux-inet6)
10671 if test -d /usr/inet6; then
10672 ipv6type=$i
10673 ipv6lib=inet6
10674 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010675 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010676 fi
10677 ;;
10678 solaris)
10679 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010680 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010681 ipv6type=$i
10682 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010683 fi
10684 fi
10685 ;;
10686 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010688/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010689
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010690#include <sys/param.h>
10691#ifdef _TOSHIBA_INET6
10692yes
10693#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010694_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697 ipv6type=$i;
10698 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010699 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010700fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010701rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702
10703 ;;
10704 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010706/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010707
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708#include </usr/local/v6/include/sys/v6config.h>
10709#ifdef __V6D__
10710yes
10711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010712_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715 ipv6type=$i;
10716 ipv6lib=v6;
10717 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010718 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010719fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010720rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010721
10722 ;;
10723 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010725/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010726
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727#include <sys/param.h>
10728#ifdef _ZETA_MINAMI_INET6
10729yes
10730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010731_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734 ipv6type=$i;
10735 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010736 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010738rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739
10740 ;;
10741 esac
10742 if test "$ipv6type" != "unknown"; then
10743 break
10744 fi
10745 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10747$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748fi
10749
10750if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10751 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10752 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10753 echo "using lib$ipv6lib"
10754 else
10755 if test $ipv6trylibc = "yes"; then
10756 echo "using libc"
10757 else
10758 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10759 echo "You need to fetch lib$ipv6lib.a from appropriate"
10760 echo 'ipv6 kit and compile beforehand.'
10761 exit 1
10762 fi
10763 fi
10764fi
10765
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10767$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10769/* end confdefs.h. */
10770 /* CAN_RAW_FD_FRAMES available check */
10771#include <linux/can/raw.h>
10772int
10773main ()
10774{
10775int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10776 ;
10777 return 0;
10778}
10779_ACEOF
10780if ac_fn_c_try_compile "$LINENO"; then :
10781
10782
10783$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10784
10785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10786$as_echo "yes" >&6; }
10787
10788else
10789
10790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10791$as_echo "no" >&6; }
10792
10793fi
10794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10797$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010799/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010800
10801 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010802int
10803main ()
10804{
10805FSIORefNum fRef = 0
10806 ;
10807 return 0;
10808}
Matthias Kloseb159a552010-04-25 21:00:44 +000010809
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010811if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010812
Matthias Kloseb159a552010-04-25 21:00:44 +000010813
Matthias Kloseb9621712010-04-24 17:59:49 +000010814$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10817$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010818
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010819else
Matthias Kloseb159a552010-04-25 21:00:44 +000010820
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010823
10824fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10826
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010827# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10829$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010831# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010832if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010833 withval=$with_doc_strings;
10834fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010835
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010836
10837if test -z "$with_doc_strings"
10838then with_doc_strings="yes"
10839fi
10840if test "$with_doc_strings" != "no"
10841then
10842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010844
10845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10847$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010848
Antoine Pitrou042b1282010-08-13 21:15:58 +000010849# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10851$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010853# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010854if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010855 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010856if test "$withval" != no
10857then
10858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10862$as_echo "yes" >&6; }
10863else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10864$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010865fi
10866else
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10868$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010869fi
10870
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010871
10872# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10874$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010877if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010878 withval=$with_pymalloc;
10879fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010880
Neil Schemenauera35c6882001-02-27 04:45:05 +000010881
Neil Schemenauer16c22972002-03-22 15:34:49 +000010882if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010883then
10884 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010885fi
10886if test "$with_pymalloc" != "no"
10887then
Martin v. Löwis11437992002-04-12 09:54:03 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010890
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010891 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10894$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010895
Benjamin Peterson05159c42009-12-03 03:01:27 +000010896# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10898$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010899
10900# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010901if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010902 withval=$with_valgrind;
10903else
10904 with_valgrind=no
10905fi
10906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10908$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010909if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 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 +020010911if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010914
10915else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010916 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010917
10918fi
10919
10920
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010921 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010922fi
10923
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010924# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010925
Guido van Rossum98935bf2001-09-05 19:13:16 +000010926DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010927
Guido van Rossume97ee181999-12-20 21:27:22 +000010928# the dlopen() function means we might want to use dynload_shlib.o. some
10929# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010930for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010931do :
10932 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010933if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010934 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010935#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010936_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010937
Guido van Rossume97ee181999-12-20 21:27:22 +000010938fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010939done
Guido van Rossume97ee181999-12-20 21:27:22 +000010940
Michael W. Hudson54241132001-12-07 15:38:26 +000010941
Guido van Rossume97ee181999-12-20 21:27:22 +000010942# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10943# loading of modules.
10944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10946$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010947if test -z "$DYNLOADFILE"
10948then
10949 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010950 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10951 if test "$ac_cv_func_dlopen" = yes
10952 then DYNLOADFILE="dynload_shlib.o"
10953 else DYNLOADFILE="dynload_aix.o"
10954 fi
10955 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010956 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010957 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10958 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010959 *)
10960 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10961 # out any dynamic loading
10962 if test "$ac_cv_func_dlopen" = yes
10963 then DYNLOADFILE="dynload_shlib.o"
10964 else DYNLOADFILE="dynload_stub.o"
10965 fi
10966 ;;
10967 esac
10968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10970$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010971if test "$DYNLOADFILE" != "dynload_stub.o"
10972then
Martin v. Löwis11437992002-04-12 09:54:03 +000010973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010975
10976fi
10977
Neil Schemenauer4e425612001-06-19 15:44:15 +000010978# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10979
Michael W. Hudson54241132001-12-07 15:38:26 +000010980
Matthias Kloseb9621712010-04-24 17:59:49 +000010981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10982$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010983if test -z "$MACHDEP_OBJS"
10984then
Jack Jansene578a632001-08-15 01:27:14 +000010985 MACHDEP_OBJS=$extra_machdep_objs
10986else
10987 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010988fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010989if test -z "$MACHDEP_OBJS"; then
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10991$as_echo "none" >&6; }
10992else
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10994$as_echo "$MACHDEP_OBJS" >&6; }
10995fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010996
Guido van Rossum627b2d71993-12-24 10:39:16 +000010997# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010998for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010999 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011000 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011001 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011002 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011003 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011004 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011005 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11006 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011007 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011008 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011009 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011010 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011011 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011012 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011013 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11014 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011015 sigaction sigaltstack siginterrupt sigpending sigrelse \
11016 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011017 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011018 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011019 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011020do :
11021 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11022ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011023if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011024 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011025#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011026_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011027
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011028fi
11029done
11030
Michael W. Hudson54241132001-12-07 15:38:26 +000011031
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011032ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11033 #include <dirent.h>
11034"
11035if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11036
11037$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11038
11039fi
11040
11041
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011042# For some functions, having a definition is not sufficient, since
11043# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11045$as_echo_n "checking for chroot... " >&6; }
11046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011047/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011048#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011049int
11050main ()
11051{
11052void *x=chroot
11053 ;
11054 return 0;
11055}
11056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011058
Matthias Kloseb9621712010-04-24 17:59:49 +000011059$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011060
Matthias Kloseb159a552010-04-25 21:00:44 +000011061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011063else
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011066
11067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11070$as_echo_n "checking for link... " >&6; }
11071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011072/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011073#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011074int
11075main ()
11076{
11077void *x=link
11078 ;
11079 return 0;
11080}
11081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011083
Matthias Kloseb9621712010-04-24 17:59:49 +000011084$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011085
Matthias Kloseb159a552010-04-25 21:00:44 +000011086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011087$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011088else
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11090$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011091
11092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11095$as_echo_n "checking for symlink... " >&6; }
11096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011097/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011098#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011099int
11100main ()
11101{
11102void *x=symlink
11103 ;
11104 return 0;
11105}
11106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011110
Matthias Kloseb159a552010-04-25 21:00:44 +000011111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011112$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011113else
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11115$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011116
11117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11120$as_echo_n "checking for fchdir... " >&6; }
11121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011122/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011123#include <unistd.h>
11124int
11125main ()
11126{
11127void *x=fchdir
11128 ;
11129 return 0;
11130}
11131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011132if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011133
Matthias Kloseb9621712010-04-24 17:59:49 +000011134$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011135
Matthias Kloseb159a552010-04-25 21:00:44 +000011136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011137$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011138else
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011141
11142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11145$as_echo_n "checking for fsync... " >&6; }
11146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011148#include <unistd.h>
11149int
11150main ()
11151{
11152void *x=fsync
11153 ;
11154 return 0;
11155}
11156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011158
Matthias Kloseb9621712010-04-24 17:59:49 +000011159$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011160
Matthias Kloseb159a552010-04-25 21:00:44 +000011161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011162$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011163else
Matthias Kloseb9621712010-04-24 17:59:49 +000011164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11165$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011166
11167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11170$as_echo_n "checking for fdatasync... " >&6; }
11171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011173#include <unistd.h>
11174int
11175main ()
11176{
11177void *x=fdatasync
11178 ;
11179 return 0;
11180}
11181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011183
Matthias Kloseb9621712010-04-24 17:59:49 +000011184$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011185
Matthias Kloseb159a552010-04-25 21:00:44 +000011186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011188else
Matthias Kloseb9621712010-04-24 17:59:49 +000011189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11190$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011191
11192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11195$as_echo_n "checking for epoll... " >&6; }
11196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011197/* end confdefs.h. */
11198#include <sys/epoll.h>
11199int
11200main ()
11201{
11202void *x=epoll_create
11203 ;
11204 return 0;
11205}
11206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011208
Matthias Kloseb9621712010-04-24 17:59:49 +000011209$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011210
Matthias Kloseb159a552010-04-25 21:00:44 +000011211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011212$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011213else
Matthias Kloseb9621712010-04-24 17:59:49 +000011214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11215$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011216
11217fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11220$as_echo_n "checking for epoll_create1... " >&6; }
11221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11222/* end confdefs.h. */
11223#include <sys/epoll.h>
11224int
11225main ()
11226{
11227void *x=epoll_create1
11228 ;
11229 return 0;
11230}
11231_ACEOF
11232if ac_fn_c_try_compile "$LINENO"; then :
11233
11234$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11235
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11237$as_echo "yes" >&6; }
11238else
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11240$as_echo "no" >&6; }
11241
11242fi
11243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11245$as_echo_n "checking for kqueue... " >&6; }
11246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011247/* end confdefs.h. */
11248
11249#include <sys/types.h>
11250#include <sys/event.h>
11251
11252int
11253main ()
11254{
11255int x=kqueue()
11256 ;
11257 return 0;
11258}
11259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011261
Matthias Kloseb9621712010-04-24 17:59:49 +000011262$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +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; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011266else
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11268$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011269
11270fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11273$as_echo_n "checking for prlimit... " >&6; }
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11275/* end confdefs.h. */
11276
11277#include <sys/time.h>
11278#include <sys/resource.h>
11279
11280int
11281main ()
11282{
11283void *x=prlimit
11284 ;
11285 return 0;
11286}
11287_ACEOF
11288if ac_fn_c_try_compile "$LINENO"; then :
11289
11290$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11291
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11293$as_echo "yes" >&6; }
11294else
11295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296$as_echo "no" >&6; }
11297
11298fi
11299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11300
Martin v. Löwisd5843682002-11-21 20:41:28 +000011301# On some systems (eg. FreeBSD 5), we would find a definition of the
11302# functions ctermid_r, setgroups in the library, but no prototype
11303# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11304# address to avoid compiler warnings and potential miscompilations
11305# because of the missing prototypes.
11306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11308$as_echo_n "checking for ctermid_r... " >&6; }
11309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011310/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011311
Martin v. Löwisd5843682002-11-21 20:41:28 +000011312#include <stdio.h>
11313
Martin v. Löwisd5843682002-11-21 20:41:28 +000011314int
11315main ()
11316{
11317void* p = ctermid_r
11318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011325
Matthias Kloseb159a552010-04-25 21:00:44 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011327$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011328else
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011331
11332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11334
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11336$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011337if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011338 $as_echo_n "(cached) " >&6
11339else
11340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011341/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011342#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011343int
11344main ()
11345{
11346void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011347
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011348 ;
11349 return 0;
11350}
11351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011352if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011353 ac_cv_flock_decl=yes
11354else
11355 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011356
11357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011359
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011360fi
11361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11362$as_echo "$ac_cv_flock_decl" >&6; }
11363if test "x${ac_cv_flock_decl}" = xyes; then
11364 for ac_func in flock
11365do :
11366 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011367if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011368 cat >>confdefs.h <<_ACEOF
11369#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011370_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011371
Antoine Pitroua3000072010-09-07 14:52:42 +000011372else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011374$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011375if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011376 $as_echo_n "(cached) " >&6
11377else
11378 ac_check_lib_save_LIBS=$LIBS
11379LIBS="-lbsd $LIBS"
11380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11381/* end confdefs.h. */
11382
11383/* Override any GCC internal prototype to avoid an error.
11384 Use char because int might match the return type of a GCC
11385 builtin and then its argument prototype would still apply. */
11386#ifdef __cplusplus
11387extern "C"
11388#endif
11389char flock ();
11390int
11391main ()
11392{
11393return flock ();
11394 ;
11395 return 0;
11396}
11397_ACEOF
11398if ac_fn_c_try_link "$LINENO"; then :
11399 ac_cv_lib_bsd_flock=yes
11400else
11401 ac_cv_lib_bsd_flock=no
11402fi
11403rm -f core conftest.err conftest.$ac_objext \
11404 conftest$ac_exeext conftest.$ac_ext
11405LIBS=$ac_check_lib_save_LIBS
11406fi
11407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11408$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011409if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011410 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011411
11412
11413$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11414
11415
11416fi
11417
11418
11419fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011420done
11421
Antoine Pitroua3000072010-09-07 14:52:42 +000011422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11425$as_echo_n "checking for getpagesize... " >&6; }
11426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011427/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011428
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011429#include <unistd.h>
11430
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011431int
11432main ()
11433{
11434void* p = getpagesize
11435 ;
11436 return 0;
11437}
11438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011440
Matthias Kloseb9621712010-04-24 17:59:49 +000011441$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011442
Matthias Kloseb159a552010-04-25 21:00:44 +000011443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011444$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011445else
Matthias Kloseb9621712010-04-24 17:59:49 +000011446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011448
11449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011451
Victor Stinner984890f2011-11-24 13:53:38 +010011452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11453$as_echo_n "checking for broken unsetenv... " >&6; }
11454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11455/* end confdefs.h. */
11456
11457#include <stdlib.h>
11458
11459int
11460main ()
11461{
11462int res = unsetenv("DUMMY")
11463 ;
11464 return 0;
11465}
11466_ACEOF
11467if ac_fn_c_try_compile "$LINENO"; then :
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469$as_echo "no" >&6; }
11470else
11471
11472$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11473
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11475$as_echo "yes" >&6; }
11476
11477fi
11478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11479
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011480for ac_prog in true
11481do
11482 # Extract the first word of "$ac_prog", so it can be a program name with args.
11483set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11485$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011486if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011487 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011488else
11489 if test -n "$TRUE"; then
11490 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11491else
11492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11493for as_dir in $PATH
11494do
11495 IFS=$as_save_IFS
11496 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011499 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 $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 +000011501 break 2
11502 fi
11503done
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011506
11507fi
11508fi
11509TRUE=$ac_cv_prog_TRUE
11510if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11512$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011513else
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011516fi
11517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011519 test -n "$TRUE" && break
11520done
11521test -n "$TRUE" || TRUE="/bin/true"
11522
11523
Matthias Kloseb9621712010-04-24 17:59:49 +000011524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11525$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011526if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011528else
11529 ac_check_lib_save_LIBS=$LIBS
11530LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011532/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534/* Override any GCC internal prototype to avoid an error.
11535 Use char because int might match the return type of a GCC
11536 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011537#ifdef __cplusplus
11538extern "C"
11539#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011540char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011541int
11542main ()
11543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011545 ;
11546 return 0;
11547}
11548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011549if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011550 ac_cv_lib_c_inet_aton=yes
11551else
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011554rm -f core conftest.err conftest.$ac_objext \
11555 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011556LIBS=$ac_check_lib_save_LIBS
11557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11559$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011560if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011561 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011562else
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11564$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011565if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011567else
11568 ac_check_lib_save_LIBS=$LIBS
11569LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573/* Override any GCC internal prototype to avoid an error.
11574 Use char because int might match the return type of a GCC
11575 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011576#ifdef __cplusplus
11577extern "C"
11578#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011579char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011580int
11581main ()
11582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011584 ;
11585 return 0;
11586}
11587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011588if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011589 ac_cv_lib_resolv_inet_aton=yes
11590else
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011593rm -f core conftest.err conftest.$ac_objext \
11594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011595LIBS=$ac_check_lib_save_LIBS
11596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11598$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011599if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011600 cat >>confdefs.h <<_ACEOF
11601#define HAVE_LIBRESOLV 1
11602_ACEOF
11603
11604 LIBS="-lresolv $LIBS"
11605
11606fi
11607
11608
11609fi
11610
11611
Christian Heimesd0764e22007-12-04 15:00:33 +000011612# On Tru64, chflags seems to be present, but calling it will
11613# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11615$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011616if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011618else
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011620 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011621else
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011623/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011624
Christian Heimesd0764e22007-12-04 15:00:33 +000011625#include <sys/stat.h>
11626#include <unistd.h>
11627int main(int argc, char*argv[])
11628{
11629 if(chflags(argv[0], 0) != 0)
11630 return 1;
11631 return 0;
11632}
Ned Deily3eb67d52011-06-28 00:00:28 -070011633
Christian Heimesd0764e22007-12-04 15:00:33 +000011634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011635if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011636 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011642fi
11643
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011644
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11647$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011648if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011650if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011651 ac_cv_have_chflags="yes"
11652else
11653 ac_cv_have_chflags="no"
11654fi
11655
11656fi
11657if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011658
Matthias Kloseb9621712010-04-24 17:59:49 +000011659$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011660
11661fi
11662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11664$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011665if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011667else
Matthias Kloseb9621712010-04-24 17:59:49 +000011668 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011669 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011670else
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011672/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011673
Christian Heimesd0764e22007-12-04 15:00:33 +000011674#include <sys/stat.h>
11675#include <unistd.h>
11676int main(int argc, char*argv[])
11677{
11678 if(lchflags(argv[0], 0) != 0)
11679 return 1;
11680 return 0;
11681}
Ned Deily3eb67d52011-06-28 00:00:28 -070011682
Christian Heimesd0764e22007-12-04 15:00:33 +000011683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011684if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011685 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011686else
Matthias Kloseb9621712010-04-24 17:59:49 +000011687 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011691fi
11692
11693
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11696$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011697if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011699if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011700 ac_cv_have_lchflags="yes"
11701else
11702 ac_cv_have_lchflags="no"
11703fi
11704
11705fi
11706if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011709
11710fi
11711
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011712case $ac_sys_system/$ac_sys_release in
11713Darwin/*)
11714 _CUR_CFLAGS="${CFLAGS}"
11715 _CUR_LDFLAGS="${LDFLAGS}"
11716 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11717 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11718 ;;
11719esac
11720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11722$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011723if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011725else
11726 ac_check_lib_save_LIBS=$LIBS
11727LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011729/* end confdefs.h. */
11730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011731/* Override any GCC internal prototype to avoid an error.
11732 Use char because int might match the return type of a GCC
11733 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011734#ifdef __cplusplus
11735extern "C"
11736#endif
11737char inflateCopy ();
11738int
11739main ()
11740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011741return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011742 ;
11743 return 0;
11744}
11745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011747 ac_cv_lib_z_inflateCopy=yes
11748else
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011751rm -f core conftest.err conftest.$ac_objext \
11752 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011753LIBS=$ac_check_lib_save_LIBS
11754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11756$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011757if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011758
Matthias Kloseb9621712010-04-24 17:59:49 +000011759$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011760
11761fi
11762
11763
11764case $ac_sys_system/$ac_sys_release in
11765Darwin/*)
11766 CFLAGS="${_CUR_CFLAGS}"
11767 LDFLAGS="${_CUR_LDFLAGS}"
11768 ;;
11769esac
11770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11772$as_echo_n "checking for hstrerror... " >&6; }
11773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011774/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011775
Martin v. Löwise9416172003-05-03 10:12:45 +000011776#include <netdb.h>
11777
Martin v. Löwise9416172003-05-03 10:12:45 +000011778int
11779main ()
11780{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011781void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011789
Matthias Kloseb159a552010-04-25 21:00:44 +000011790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11794$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011795
11796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011797rm -f core conftest.err conftest.$ac_objext \
11798 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799
Matthias Kloseb9621712010-04-24 17:59:49 +000011800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11801$as_echo_n "checking for inet_aton... " >&6; }
11802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011803/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011804
Martin v. Löwis86d66262006-02-17 08:40:11 +000011805#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011806#include <sys/socket.h>
11807#include <netinet/in.h>
11808#include <arpa/inet.h>
11809
Martin v. Löwise9416172003-05-03 10:12:45 +000011810int
11811main ()
11812{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011813void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011814 ;
11815 return 0;
11816}
11817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011821
Matthias Kloseb159a552010-04-25 21:00:44 +000011822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011823$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011824else
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11826$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011827
11828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011829rm -f core conftest.err conftest.$ac_objext \
11830 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11833$as_echo_n "checking for inet_pton... " >&6; }
11834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011836
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011837#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011838#include <sys/socket.h>
11839#include <netinet/in.h>
11840#include <arpa/inet.h>
11841
Martin v. Löwise9416172003-05-03 10:12:45 +000011842int
11843main ()
11844{
11845void* p = inet_pton
11846 ;
11847 return 0;
11848}
11849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011853
Matthias Kloseb159a552010-04-25 21:00:44 +000011854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011855$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011856else
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11858$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011859
11860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011862
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011863# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11865$as_echo_n "checking for setgroups... " >&6; }
11866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011867/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011868
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011869#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011870#ifdef HAVE_GRP_H
11871#include <grp.h>
11872#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011873
Martin v. Löwisd5843682002-11-21 20:41:28 +000011874int
11875main ()
11876{
11877void* p = setgroups
11878 ;
11879 return 0;
11880}
11881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011885
Matthias Kloseb159a552010-04-25 21:00:44 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011887$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11890$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011891
11892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011894
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011895# check for openpty and forkpty
11896
11897for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011898do :
11899 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011900if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011901 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011902#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011903_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011904
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011905else
Matthias Kloseb9621712010-04-24 17:59:49 +000011906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11907$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011908if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011910else
Martin v. Löwis11437992002-04-12 09:54:03 +000011911 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011912LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011916/* Override any GCC internal prototype to avoid an error.
11917 Use char because int might match the return type of a GCC
11918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011919#ifdef __cplusplus
11920extern "C"
11921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011922char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011923int
11924main ()
11925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011926return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011927 ;
11928 return 0;
11929}
11930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011931if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011932 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011933else
Matthias Kloseb9621712010-04-24 17:59:49 +000011934 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011936rm -f core conftest.err conftest.$ac_objext \
11937 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011938LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11941$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011942if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011944 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011945else
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11947$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011948if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011950else
11951 ac_check_lib_save_LIBS=$LIBS
11952LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011954/* end confdefs.h. */
11955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011956/* Override any GCC internal prototype to avoid an error.
11957 Use char because int might match the return type of a GCC
11958 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011959#ifdef __cplusplus
11960extern "C"
11961#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011962char openpty ();
11963int
11964main ()
11965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011967 ;
11968 return 0;
11969}
11970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011971if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011972 ac_cv_lib_bsd_openpty=yes
11973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011976rm -f core conftest.err conftest.$ac_objext \
11977 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011978LIBS=$ac_check_lib_save_LIBS
11979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11981$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011982if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011983 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011984 LIBS="$LIBS -lbsd"
11985fi
11986
11987
11988fi
11989
Fred Drake8cef4cf2000-06-28 16:40:38 +000011990
11991fi
11992done
11993
11994for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011995do :
11996 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011997if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011998 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011999#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012000_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012001
Fred Drake8cef4cf2000-06-28 16:40:38 +000012002else
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12004$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012005if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012007else
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012009LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012013/* Override any GCC internal prototype to avoid an error.
12014 Use char because int might match the return type of a GCC
12015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012016#ifdef __cplusplus
12017extern "C"
12018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012019char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012020int
12021main ()
12022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012023return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 ;
12025 return 0;
12026}
12027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012030else
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012033rm -f core conftest.err conftest.$ac_objext \
12034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012035LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12038$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012039if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012041 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012042else
Matthias Kloseb9621712010-04-24 17:59:49 +000012043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12044$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012045if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012047else
12048 ac_check_lib_save_LIBS=$LIBS
12049LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012051/* end confdefs.h. */
12052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053/* Override any GCC internal prototype to avoid an error.
12054 Use char because int might match the return type of a GCC
12055 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012056#ifdef __cplusplus
12057extern "C"
12058#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012059char forkpty ();
12060int
12061main ()
12062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012063return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012064 ;
12065 return 0;
12066}
12067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012069 ac_cv_lib_bsd_forkpty=yes
12070else
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012073rm -f core conftest.err conftest.$ac_objext \
12074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012075LIBS=$ac_check_lib_save_LIBS
12076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12078$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012079if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012081 LIBS="$LIBS -lbsd"
12082fi
12083
12084
12085fi
12086
Fred Drake8cef4cf2000-06-28 16:40:38 +000012087
12088fi
12089done
12090
Jack Jansendd19cf82001-12-06 22:36:17 +000012091
Christian Heimesb186d002008-03-18 15:15:01 +000012092# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012093for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012094do :
12095 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012096if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012097 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012098#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012099_ACEOF
12100
12101fi
12102done
12103
12104
Michael W. Hudson54241132001-12-07 15:38:26 +000012105# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012106for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012107do :
12108 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12109ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012110if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012112#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012113_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012114
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012115fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012116done
12117
Michael W. Hudson54241132001-12-07 15:38:26 +000012118
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012119ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012121 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012122
Martin v. Löwis1142de32002-03-29 16:28:31 +000012123else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012125 *" dup2.$ac_objext "* ) ;;
12126 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012128esac
12129
Martin v. Löwis1142de32002-03-29 16:28:31 +000012130fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012131
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012132ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012133if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012134 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12135
12136else
12137 case " $LIBOBJS " in
12138 *" strdup.$ac_objext "* ) ;;
12139 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12140 ;;
12141esac
12142
12143fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012144
12145
12146for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012147do :
12148 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012149if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012154/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012155#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012156int
12157main ()
12158{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 ;
12161 return 0;
12162}
12163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012164if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012167
Guido van Rossum627b2d71993-12-24 10:39:16 +000012168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012170
Guido van Rossum627b2d71993-12-24 10:39:16 +000012171fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012172done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012173
Jack Jansen150753c2003-03-29 22:07:47 +000012174for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012175do :
12176 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012177if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012178 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012179#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012182/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012183#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012184int
12185main ()
12186{
12187setpgrp(0,0);
12188 ;
12189 return 0;
12190}
12191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012193
Matthias Kloseb9621712010-04-24 17:59:49 +000012194$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012195
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012198
12199fi
12200done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012201
Thomas Wouters3a584202000-08-05 23:28:51 +000012202for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012203do :
12204 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012205if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012207#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012210/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012211#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012212int
12213main ()
12214{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012215gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 ;
12217 return 0;
12218}
12219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if ac_fn_c_try_compile "$LINENO"; then :
12221
Guido van Rossum627b2d71993-12-24 10:39:16 +000012222else
Skip Montanaro6dead952003-09-25 14:50:04 +000012223
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012225
Martin v. Löwis11437992002-04-12 09:54:03 +000012226
Guido van Rossum627b2d71993-12-24 10:39:16 +000012227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012229
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012230fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012231done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012232
Michael W. Hudson54241132001-12-07 15:38:26 +000012233
Victor Stinnere0be4232011-10-25 13:06:09 +020012234for ac_func in clock_gettime
12235do :
12236 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12237if test "x$ac_cv_func_clock_gettime" = xyes; then :
12238 cat >>confdefs.h <<_ACEOF
12239#define HAVE_CLOCK_GETTIME 1
12240_ACEOF
12241
12242else
12243
12244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12245$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12246if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12247 $as_echo_n "(cached) " >&6
12248else
12249 ac_check_lib_save_LIBS=$LIBS
12250LIBS="-lrt $LIBS"
12251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12252/* end confdefs.h. */
12253
12254/* Override any GCC internal prototype to avoid an error.
12255 Use char because int might match the return type of a GCC
12256 builtin and then its argument prototype would still apply. */
12257#ifdef __cplusplus
12258extern "C"
12259#endif
12260char clock_gettime ();
12261int
12262main ()
12263{
12264return clock_gettime ();
12265 ;
12266 return 0;
12267}
12268_ACEOF
12269if ac_fn_c_try_link "$LINENO"; then :
12270 ac_cv_lib_rt_clock_gettime=yes
12271else
12272 ac_cv_lib_rt_clock_gettime=no
12273fi
12274rm -f core conftest.err conftest.$ac_objext \
12275 conftest$ac_exeext conftest.$ac_ext
12276LIBS=$ac_check_lib_save_LIBS
12277fi
12278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12279$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12280if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12281
Victor Stinner7efb8332014-08-29 15:41:08 +020012282 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012283 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12284
12285
12286$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12287
12288
12289fi
12290
12291
12292fi
12293done
12294
12295
12296for ac_func in clock_getres
12297do :
12298 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12299if test "x$ac_cv_func_clock_getres" = xyes; then :
12300 cat >>confdefs.h <<_ACEOF
12301#define HAVE_CLOCK_GETRES 1
12302_ACEOF
12303
12304else
12305
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12307$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12308if ${ac_cv_lib_rt_clock_getres+:} false; then :
12309 $as_echo_n "(cached) " >&6
12310else
12311 ac_check_lib_save_LIBS=$LIBS
12312LIBS="-lrt $LIBS"
12313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12314/* end confdefs.h. */
12315
12316/* Override any GCC internal prototype to avoid an error.
12317 Use char because int might match the return type of a GCC
12318 builtin and then its argument prototype would still apply. */
12319#ifdef __cplusplus
12320extern "C"
12321#endif
12322char clock_getres ();
12323int
12324main ()
12325{
12326return clock_getres ();
12327 ;
12328 return 0;
12329}
12330_ACEOF
12331if ac_fn_c_try_link "$LINENO"; then :
12332 ac_cv_lib_rt_clock_getres=yes
12333else
12334 ac_cv_lib_rt_clock_getres=no
12335fi
12336rm -f core conftest.err conftest.$ac_objext \
12337 conftest$ac_exeext conftest.$ac_ext
12338LIBS=$ac_check_lib_save_LIBS
12339fi
12340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12341$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12342if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12343
12344 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12345
12346
12347fi
12348
12349
12350fi
12351done
12352
12353
Matthias Kloseb9621712010-04-24 17:59:49 +000012354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12355$as_echo_n "checking for major... " >&6; }
12356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012357/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012358
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012359#if defined(MAJOR_IN_MKDEV)
12360#include <sys/mkdev.h>
12361#elif defined(MAJOR_IN_SYSMACROS)
12362#include <sys/sysmacros.h>
12363#else
12364#include <sys/types.h>
12365#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012366
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012367int
12368main ()
12369{
12370
12371 makedev(major(0),minor(0));
12372
12373 ;
12374 return 0;
12375}
12376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012377if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012378
12379
Matthias Kloseb9621712010-04-24 17:59:49 +000012380$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012381
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12383$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012384
12385else
Skip Montanaro6dead952003-09-25 14:50:04 +000012386
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12388$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012389
12390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012391rm -f core conftest.err conftest.$ac_objext \
12392 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012393
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012394# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012395# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12397$as_echo_n "checking for getaddrinfo... " >&6; }
12398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012399/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012400
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012401#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012402#include <sys/socket.h>
12403#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012404#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012405
Martin v. Löwis11437992002-04-12 09:54:03 +000012406int
12407main ()
12408{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012409getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 ;
12411 return 0;
12412}
12413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012414if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012415 have_getaddrinfo=yes
12416else
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012419rm -f core conftest.err conftest.$ac_objext \
12420 conftest$ac_exeext conftest.$ac_ext
12421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12422$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012423if test $have_getaddrinfo = yes
12424then
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12426$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012427 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012428 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012429else
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012431
12432if test "${enable_ipv6+set}" = set; then
12433 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12434else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012435 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012436fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012437else
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012439/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012440
Stefan Krah19c21392012-11-22 23:47:32 +010012441#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012442#include <sys/types.h>
12443#include <netdb.h>
12444#include <string.h>
12445#include <sys/socket.h>
12446#include <netinet/in.h>
12447
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012448int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012449{
12450 int passive, gaierr, inet4 = 0, inet6 = 0;
12451 struct addrinfo hints, *ai, *aitop;
12452 char straddr[INET6_ADDRSTRLEN], strport[16];
12453
12454 for (passive = 0; passive <= 1; passive++) {
12455 memset(&hints, 0, sizeof(hints));
12456 hints.ai_family = AF_UNSPEC;
12457 hints.ai_flags = passive ? AI_PASSIVE : 0;
12458 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012459 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012460 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12461 (void)gai_strerror(gaierr);
12462 goto bad;
12463 }
12464 for (ai = aitop; ai; ai = ai->ai_next) {
12465 if (ai->ai_addr == NULL ||
12466 ai->ai_addrlen == 0 ||
12467 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12468 straddr, sizeof(straddr), strport, sizeof(strport),
12469 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12470 goto bad;
12471 }
12472 switch (ai->ai_family) {
12473 case AF_INET:
12474 if (strcmp(strport, "54321") != 0) {
12475 goto bad;
12476 }
12477 if (passive) {
12478 if (strcmp(straddr, "0.0.0.0") != 0) {
12479 goto bad;
12480 }
12481 } else {
12482 if (strcmp(straddr, "127.0.0.1") != 0) {
12483 goto bad;
12484 }
12485 }
12486 inet4++;
12487 break;
12488 case AF_INET6:
12489 if (strcmp(strport, "54321") != 0) {
12490 goto bad;
12491 }
12492 if (passive) {
12493 if (strcmp(straddr, "::") != 0) {
12494 goto bad;
12495 }
12496 } else {
12497 if (strcmp(straddr, "::1") != 0) {
12498 goto bad;
12499 }
12500 }
12501 inet6++;
12502 break;
12503 case AF_UNSPEC:
12504 goto bad;
12505 break;
12506 default:
12507 /* another family support? */
12508 break;
12509 }
12510 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012511 freeaddrinfo(aitop);
12512 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012513 }
12514
12515 if (!(inet4 == 0 || inet4 == 2))
12516 goto bad;
12517 if (!(inet6 == 0 || inet6 == 2))
12518 goto bad;
12519
12520 if (aitop)
12521 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012522 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012523
12524 bad:
12525 if (aitop)
12526 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012527 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012528}
12529
Martin v. Löwis11437992002-04-12 09:54:03 +000012530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012532 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12537 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012540fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012541
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12545$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12546
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012547if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012548then
12549 if test $ipv6 = yes
12550 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012551 echo 'Fatal: You must get working getaddrinfo() function.'
12552 echo ' or you can specify "--disable-ipv6"'.
12553 exit 1
12554 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012555else
Martin v. Löwis11437992002-04-12 09:54:03 +000012556
Matthias Kloseb9621712010-04-24 17:59:49 +000012557$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012558
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012559fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012560
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012561for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012562do :
12563 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012564if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012565 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012566#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012567_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012568
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012569fi
12570done
12571
Michael W. Hudson54241132001-12-07 15:38:26 +000012572
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012573# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12575$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012576if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012577 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012578else
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012580/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012581#include <sys/types.h>
12582#include <sys/time.h>
12583#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012584
Martin v. Löwis11437992002-04-12 09:54:03 +000012585int
12586main ()
12587{
12588if ((struct tm *) 0)
12589return 0;
12590 ;
12591 return 0;
12592}
12593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012594if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012595 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012596else
Matthias Kloseb9621712010-04-24 17:59:49 +000012597 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12602$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012603if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012604
Matthias Kloseb9621712010-04-24 17:59:49 +000012605$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606
12607fi
12608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12610$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012611if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012612 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012613else
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012615/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012616#include <sys/types.h>
12617#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012618
Martin v. Löwis11437992002-04-12 09:54:03 +000012619int
12620main ()
12621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012622struct tm tm;
12623 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012625 ;
12626 return 0;
12627}
12628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012629if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012630 ac_cv_struct_tm=time.h
12631else
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12637$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012638if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641
12642fi
12643
Matthias Kloseb9621712010-04-24 17:59:49 +000012644ac_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 +000012645#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012646
Matthias Kloseb9621712010-04-24 17:59:49 +000012647"
Victor Stinnere0be4232011-10-25 13:06:09 +020012648if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012649
12650cat >>confdefs.h <<_ACEOF
12651#define HAVE_STRUCT_TM_TM_ZONE 1
12652_ACEOF
12653
12654
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012656
Martin v. Löwis11437992002-04-12 09:54:03 +000012657if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12658
Matthias Kloseb9621712010-04-24 17:59:49 +000012659$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012660
12661else
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12663"
Victor Stinnere0be4232011-10-25 13:06:09 +020012664if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666else
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668fi
12669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672_ACEOF
12673
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12675$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012676if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678else
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012681#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012682#if !HAVE_DECL_TZNAME
12683extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Martin v. Löwis11437992002-04-12 09:54:03 +000012686int
12687main ()
12688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 ;
12691 return 0;
12692}
12693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012694if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012695 ac_cv_var_tzname=yes
12696else
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012699rm -f core conftest.err conftest.$ac_objext \
12700 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12703$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012704 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012707
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012708 fi
12709fi
12710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711ac_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 +020012712if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012713
12714cat >>confdefs.h <<_ACEOF
12715#define HAVE_STRUCT_STAT_ST_RDEV 1
12716_ACEOF
12717
12718
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012719fi
12720
Matthias Kloseb9621712010-04-24 17:59:49 +000012721ac_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 +020012722if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012723
Martin v. Löwis11437992002-04-12 09:54:03 +000012724cat >>confdefs.h <<_ACEOF
12725#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12726_ACEOF
12727
12728
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012729fi
12730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731ac_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 +020012732if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012733
12734cat >>confdefs.h <<_ACEOF
12735#define HAVE_STRUCT_STAT_ST_FLAGS 1
12736_ACEOF
12737
12738
12739fi
12740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741ac_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 +020012742if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012743
12744cat >>confdefs.h <<_ACEOF
12745#define HAVE_STRUCT_STAT_ST_GEN 1
12746_ACEOF
12747
12748
12749fi
12750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751ac_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 +020012752if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012753
12754cat >>confdefs.h <<_ACEOF
12755#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12756_ACEOF
12757
12758
12759fi
12760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761ac_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 +020012762if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012763
Martin v. Löwis11437992002-04-12 09:54:03 +000012764cat >>confdefs.h <<_ACEOF
12765#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12766_ACEOF
12767
12768
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012769fi
12770
Stefan Krah267b6392016-04-26 01:09:18 +020012771ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12772 #include <sys/types.h>
12773 #include <pwd.h>
12774
12775"
12776if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12777
12778cat >>confdefs.h <<_ACEOF
12779#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12780_ACEOF
12781
12782
12783fi
12784ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12785 #include <sys/types.h>
12786 #include <pwd.h>
12787
12788"
12789if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12790
12791cat >>confdefs.h <<_ACEOF
12792#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12793_ACEOF
12794
12795
12796fi
12797
Michael W. Hudson54241132001-12-07 15:38:26 +000012798
Matthias Kloseb9621712010-04-24 17:59:49 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12800$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012801if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012803else
Matthias Kloseb159a552010-04-25 21:00:44 +000012804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012807#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012808int
12809main ()
12810{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ;
12813 return 0;
12814}
12815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012816if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012817 ac_cv_header_time_altzone=yes
12818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823fi
12824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12826$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012827if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012828
Matthias Kloseb9621712010-04-24 17:59:49 +000012829$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012830
12831fi
12832
Guido van Rossumda88dad1995-01-26 00:46:29 +000012833was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12835$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012837/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012838
12839#include <sys/types.h>
12840#include <sys/select.h>
12841#include <sys/time.h>
12842
Martin v. Löwis11437992002-04-12 09:54:03 +000012843int
12844main ()
12845{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846;
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 ;
12848 return 0;
12849}
12850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012851if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012852
12853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012855
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012856 was_it_defined=yes
12857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12861$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012862
Matthias Kloseb9621712010-04-24 17:59:49 +000012863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12864$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012865if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012866 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012867else
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012869/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012870#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012871int
12872main ()
12873{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012874struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 ;
12876 return 0;
12877}
12878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012879if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012880 ac_cv_struct_addrinfo=yes
12881else
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12885fi
12886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12888$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012889if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012892
12893fi
12894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12896$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012897if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012899else
Matthias Kloseb9621712010-04-24 17:59:49 +000012900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012901/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012902
12903# include <sys/types.h>
12904# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012905int
12906main ()
12907{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012908struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 ;
12910 return 0;
12911}
12912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012913if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012914 ac_cv_struct_sockaddr_storage=yes
12915else
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12919fi
12920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12922$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012923if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012924
Matthias Kloseb9621712010-04-24 17:59:49 +000012925$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012926
12927fi
12928
Christian Heimesdffa3942016-09-05 23:54:41 +020012929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12930$as_echo_n "checking for sockaddr_alg... " >&6; }
12931if ${ac_cv_struct_sockaddr_alg+:} false; then :
12932 $as_echo_n "(cached) " >&6
12933else
12934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12935/* end confdefs.h. */
12936
12937# include <sys/types.h>
12938# include <sys/socket.h>
12939# include <linux/if_alg.h>
12940int
12941main ()
12942{
12943struct sockaddr_alg s
12944 ;
12945 return 0;
12946}
12947_ACEOF
12948if ac_fn_c_try_compile "$LINENO"; then :
12949 ac_cv_struct_sockaddr_alg=yes
12950else
12951 ac_cv_struct_sockaddr_alg=no
12952fi
12953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12954fi
12955
12956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12957$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12958if test $ac_cv_struct_sockaddr_alg = yes; then
12959
12960$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12961
12962fi
12963
Guido van Rossum627b2d71993-12-24 10:39:16 +000012964# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12967$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012968if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012973$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012974int
12975main ()
12976{
12977static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012978test_array [0] = 0;
12979return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012980
12981 ;
12982 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012983}
Martin v. Löwis11437992002-04-12 09:54:03 +000012984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012985if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012986 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012987else
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12993$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012996
12997fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13000$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013001if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013005/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006
Martin v. Löwis11437992002-04-12 09:54:03 +000013007int
13008main ()
13009{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013010
Martin v. Löwis11437992002-04-12 09:54:03 +000013011#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013012 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013013 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013014 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013016 char const *const *pcpcc;
13017 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 /* NEC SVR4.0.2 mips cc rejects this. */
13019 struct point {int x, y;};
13020 static struct point const zero = {0,0};
13021 /* AIX XL C 1.02.0.0 rejects this.
13022 It does not let you subtract one const X* pointer from another in
13023 an arm of an if-expression whose if-part is not a constant
13024 expression */
13025 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013027 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013028 ++pcpcc;
13029 ppc = (char**) pcpcc;
13030 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013031 { /* SCO 3.2v4 cc rejects this sort of thing. */
13032 char tx;
13033 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013035
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 }
13039 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13040 int x[] = {25, 17};
13041 const int *foo = &x[0];
13042 ++foo;
13043 }
13044 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13045 typedef const int *iptr;
13046 iptr p = 0;
13047 ++p;
13048 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013049 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013050 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013051 struct s { int j; const int *ap[3]; } bx;
13052 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 }
13054 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13055 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013059#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013060
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 ;
13062 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013063}
Martin v. Löwis11437992002-04-12 09:54:03 +000013064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013065if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013066 ac_cv_c_const=yes
13067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13073$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013074if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013075
Matthias Kloseb9621712010-04-24 17:59:49 +000013076$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013077
13078fi
13079
Michael W. Hudson54241132001-12-07 15:38:26 +000013080
Guido van Rossumda88dad1995-01-26 00:46:29 +000013081works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13083$as_echo_n "checking for working volatile... " >&6; }
13084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013085/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013086
Martin v. Löwis11437992002-04-12 09:54:03 +000013087int
13088main ()
13089{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013090volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 ;
13092 return 0;
13093}
13094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013095if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013096 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013097else
Skip Montanaro6dead952003-09-25 14:50:04 +000013098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013100
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013101
Guido van Rossum627b2d71993-12-24 10:39:16 +000013102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13105$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013106
Guido van Rossumda88dad1995-01-26 00:46:29 +000013107works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13109$as_echo_n "checking for working signed char... " >&6; }
13110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013111/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013112
Martin v. Löwis11437992002-04-12 09:54:03 +000013113int
13114main ()
13115{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013116signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013117 ;
13118 return 0;
13119}
13120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013121if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013122 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013123else
Skip Montanaro6dead952003-09-25 14:50:04 +000013124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013126
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013127
Guido van Rossum7f43da71994-08-01 12:15:30 +000013128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13131$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013132
Guido van Rossumda88dad1995-01-26 00:46:29 +000013133have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13135$as_echo_n "checking for prototypes... " >&6; }
13136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013137/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013138int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013139int
13140main ()
13141{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013142return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 ;
13144 return 0;
13145}
13146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013150
Matthias Kloseb159a552010-04-25 21:00:44 +000013151 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13155$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013156
Guido van Rossumda88dad1995-01-26 00:46:29 +000013157works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13159$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013161/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013162
13163#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013164int foo(int x, ...) {
13165 va_list va;
13166 va_start(va, x);
13167 va_arg(va, int);
13168 va_arg(va, char *);
13169 va_arg(va, double);
13170 return 0;
13171}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013172
Martin v. Löwis11437992002-04-12 09:54:03 +000013173int
13174main ()
13175{
Guido van Rossum90eea071996-08-30 20:58:57 +000013176return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 ;
13178 return 0;
13179}
13180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013185
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013186 works=yes
13187
Guido van Rossum627b2d71993-12-24 10:39:16 +000013188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13191$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013192
Martin v. Löwisd6320502004-08-12 13:45:08 +000013193# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13195$as_echo_n "checking for socketpair... " >&6; }
13196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013197/* end confdefs.h. */
13198
13199#include <sys/types.h>
13200#include <sys/socket.h>
13201
13202int
13203main ()
13204{
13205void *x=socketpair
13206 ;
13207 return 0;
13208}
13209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013213
Matthias Kloseb159a552010-04-25 21:00:44 +000013214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13218$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013219
13220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013222
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13225$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013227/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013228#include <sys/types.h>
13229#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013230int
13231main ()
13232{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233struct sockaddr x;
13234x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 ;
13236 return 0;
13237}
13238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013239if ac_fn_c_try_compile "$LINENO"; then :
13240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13241$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013244
13245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13247$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013248
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251
Guido van Rossumda88dad1995-01-26 00:46:29 +000013252va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13254$as_echo_n "checking whether va_list is an array... " >&6; }
13255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013256/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013257
13258#ifdef HAVE_STDARG_PROTOTYPES
13259#include <stdarg.h>
13260#else
13261#include <varargs.h>
13262#endif
13263
Martin v. Löwis11437992002-04-12 09:54:03 +000013264int
13265main ()
13266{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013268 ;
13269 return 0;
13270}
13271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013272if ac_fn_c_try_compile "$LINENO"; then :
13273
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013274else
Skip Montanaro6dead952003-09-25 14:50:04 +000013275
Martin v. Löwis11437992002-04-12 09:54:03 +000013276
Matthias Kloseb9621712010-04-24 17:59:49 +000013277$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Guido van Rossumda88dad1995-01-26 00:46:29 +000013279 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013280
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13284$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013285
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013286# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
13288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013290if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13295$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013296 OLD_CFLAGS=$CFLAGS
13297 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013299/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013300
13301# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
Martin v. Löwis11437992002-04-12 09:54:03 +000013303int
13304main ()
13305{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013306
13307 char *name;
13308 struct hostent *he, *res;
13309 char buffer[2048];
13310 int buflen = 2048;
13311 int h_errnop;
13312
13313 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
13315 ;
13316 return 0;
13317}
13318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013322
Martin v. Löwis11437992002-04-12 09:54:03 +000013323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13327$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013329else
Skip Montanaro6dead952003-09-25 14:50:04 +000013330
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13332$as_echo "no" >&6; }
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13334$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013336/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013337
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013338# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340int
13341main ()
13342{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013343
13344 char *name;
13345 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013346 char buffer[2048];
13347 int buflen = 2048;
13348 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013349
Matthias Kloseb159a552010-04-25 21:00:44 +000013350 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
13352 ;
13353 return 0;
13354}
13355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013359
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Matthias Kloseb159a552010-04-25 21:00:44 +000013361$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013362
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13364$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013365
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013366else
Skip Montanaro6dead952003-09-25 14:50:04 +000013367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13369$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13371$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13373/* end confdefs.h. */
13374
13375# include <netdb.h>
13376
13377int
13378main ()
13379{
13380
13381 char *name;
13382 struct hostent *he;
13383 struct hostent_data data;
13384
13385 (void) gethostbyname_r(name, he, &data);
13386
13387 ;
13388 return 0;
13389}
13390_ACEOF
13391if ac_fn_c_try_compile "$LINENO"; then :
13392
13393 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13394
13395
13396$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13397
13398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13399$as_echo "yes" >&6; }
13400
13401else
13402
13403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13404$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013408
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013411
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013414 CFLAGS=$OLD_CFLAGS
13415
13416else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 for ac_func in gethostbyname
13419do :
13420 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013421if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013423#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013424_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013425
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013426fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013427done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013428
Michael W. Hudson54241132001-12-07 15:38:26 +000013429
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013430fi
13431
Michael W. Hudson54241132001-12-07 15:38:26 +000013432
13433
13434
13435
13436
13437
Guido van Rossum627b2d71993-12-24 10:39:16 +000013438# checks for system services
13439# (none yet)
13440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013441# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013442ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013443if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013444
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13447$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013448if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450else
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013452LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013456/* Override any GCC internal prototype to avoid an error.
13457 Use char because int might match the return type of a GCC
13458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013459#ifdef __cplusplus
13460extern "C"
13461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013462char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013463int
13464main ()
13465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013466return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 ;
13468 return 0;
13469}
13470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013471if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013472 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013473else
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013476rm -f core conftest.err conftest.$ac_objext \
13477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013478LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13481$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013482if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 cat >>confdefs.h <<_ACEOF
13484#define HAVE_LIBIEEE 1
13485_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013487 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013488
Guido van Rossum627b2d71993-12-24 10:39:16 +000013489fi
13490
Michael W. Hudson54241132001-12-07 15:38:26 +000013491
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013492fi
13493
Michael W. Hudson54241132001-12-07 15:38:26 +000013494
Guido van Rossum7f253911997-05-09 02:42:48 +000013495# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13497$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013499# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013500if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013501 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013502if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013503then
13504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13508$as_echo "yes" >&6; }
13509else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13510$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013511fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013512else
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13514$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515fi
13516
Guido van Rossum7f253911997-05-09 02:42:48 +000013517
Guido van Rossum7f43da71994-08-01 12:15:30 +000013518# check for --with-libm=...
13519
Guido van Rossum563e7081996-09-10 18:20:48 +000013520case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013521Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013522*) LIBM=-lm
13523esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13525$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013528if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013529 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013530if test "$withval" = no
13531then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13533$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013534elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013535then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13537$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013538else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013539fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13542$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543fi
13544
Guido van Rossum7f43da71994-08-01 12:15:30 +000013545
13546# check for --with-libc=...
13547
Matthias Kloseb9621712010-04-24 17:59:49 +000013548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13549$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013551# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013552if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013554if test "$withval" = no
13555then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13557$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013558elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013559then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13561$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013562else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013563fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13566$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567fi
13568
Guido van Rossum7f43da71994-08-01 12:15:30 +000013569
Stefan Krah1919b7e2012-03-21 18:25:23 +010013570# **************************************
13571# * Check for gcc x64 inline assembler *
13572# **************************************
13573
13574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13575$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13577/* end confdefs.h. */
13578
13579int
13580main ()
13581{
13582
13583 __asm__ __volatile__ ("movq %rcx, %rax");
13584
13585 ;
13586 return 0;
13587}
13588_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013589if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013590 have_gcc_asm_for_x64=yes
13591else
13592 have_gcc_asm_for_x64=no
13593fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013594rm -f core conftest.err conftest.$ac_objext \
13595 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13597$as_echo "$have_gcc_asm_for_x64" >&6; }
13598if test "$have_gcc_asm_for_x64" = yes
13599then
13600
13601$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13602
13603fi
13604
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013605# **************************************************
13606# * Check for various properties of floating point *
13607# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13610$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013611if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013613else
13614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013616 ac_cv_little_endian_double=no
13617else
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013619/* end confdefs.h. */
13620
13621#include <string.h>
13622int main() {
13623 double x = 9006104071832581.0;
13624 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13625 return 0;
13626 else
13627 return 1;
13628}
13629
13630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013631if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013632 ac_cv_little_endian_double=yes
13633else
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013638fi
13639
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013640fi
13641
Matthias Kloseb9621712010-04-24 17:59:49 +000013642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13643$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013644if test "$ac_cv_little_endian_double" = yes
13645then
13646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013648
13649fi
13650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13652$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013653if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013655else
13656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013658 ac_cv_big_endian_double=no
13659else
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013661/* end confdefs.h. */
13662
13663#include <string.h>
13664int main() {
13665 double x = 9006104071832581.0;
13666 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13667 return 0;
13668 else
13669 return 1;
13670}
13671
13672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013673if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013674 ac_cv_big_endian_double=yes
13675else
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013680fi
13681
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013682fi
13683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13685$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013686if test "$ac_cv_big_endian_double" = yes
13687then
13688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013690
13691fi
13692
13693# Some ARM platforms use a mixed-endian representation for doubles.
13694# While Python doesn't currently have full support for these platforms
13695# (see e.g., issue 1762561), we can at least make sure that float <-> string
13696# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13698$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013699if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013701else
13702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013704 ac_cv_mixed_endian_double=no
13705else
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013707/* end confdefs.h. */
13708
13709#include <string.h>
13710int main() {
13711 double x = 9006104071832581.0;
13712 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13713 return 0;
13714 else
13715 return 1;
13716}
13717
13718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013719if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013720 ac_cv_mixed_endian_double=yes
13721else
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013726fi
13727
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013728fi
13729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13731$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013732if test "$ac_cv_mixed_endian_double" = yes
13733then
13734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013736
13737fi
13738
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013739# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013740# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013741# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013742# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013743# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013744# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013745
13746# This inline assembler syntax may also work for suncc and icc,
13747# so we try it on all platforms.
13748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13750$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013752/* end confdefs.h. */
13753
13754int
13755main ()
13756{
13757
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013758 unsigned short cw;
13759 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13760 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013761
13762 ;
13763 return 0;
13764}
13765_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013766if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013767 have_gcc_asm_for_x87=yes
13768else
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013770fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013771rm -f core conftest.err conftest.$ac_objext \
13772 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13774$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013775if test "$have_gcc_asm_for_x87" = yes
13776then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13783$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785/* end confdefs.h. */
13786
13787int
13788main ()
13789{
13790
13791 unsigned int fpcr;
13792 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13793 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13794
13795 ;
13796 return 0;
13797}
13798_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013799if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013800 have_gcc_asm_for_mc68881=yes
13801else
13802 have_gcc_asm_for_mc68881=no
13803fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013804rm -f core conftest.err conftest.$ac_objext \
13805 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13807$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13808if test "$have_gcc_asm_for_mc68881" = yes
13809then
13810
13811$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13812
13813fi
13814
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013815# Detect whether system arithmetic is subject to x87-style double
13816# rounding issues. The result of this test has little meaning on non
13817# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13818# mode is round-to-nearest and double rounding issues are present, and
13819# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13821$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013822# $BASECFLAGS may affect the result
13823ac_save_cc="$CC"
13824CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013825if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013826 ac_cv_x87_double_rounding=no
13827else
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013829/* end confdefs.h. */
13830
13831#include <stdlib.h>
13832#include <math.h>
13833int main() {
13834 volatile double x, y, z;
13835 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13836 x = 0.99999999999999989; /* 1-2**-53 */
13837 y = 1./x;
13838 if (y != 1.)
13839 exit(0);
13840 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13841 x = 1e16;
13842 y = 2.99999;
13843 z = x + y;
13844 if (z != 1e16+4.)
13845 exit(0);
13846 /* both tests show evidence of double rounding */
13847 exit(1);
13848}
13849
13850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013851if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013852 ac_cv_x87_double_rounding=no
13853else
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013858fi
13859
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13862$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013863if test "$ac_cv_x87_double_rounding" = yes
13864then
13865
Matthias Kloseb9621712010-04-24 17:59:49 +000013866$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013867
13868fi
13869
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013870# ************************************
13871# * Check for mathematical functions *
13872# ************************************
13873
13874LIBS_SAVE=$LIBS
13875LIBS="$LIBS $LIBM"
13876
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013877for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13878do :
13879 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13880ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013881if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013882 cat >>confdefs.h <<_ACEOF
13883#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13884_ACEOF
13885
13886fi
13887done
13888
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013889for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013890do :
13891 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13892ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013893if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013894 cat >>confdefs.h <<_ACEOF
13895#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13896_ACEOF
13897
13898fi
13899done
13900
13901ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13902"
Victor Stinnere0be4232011-10-25 13:06:09 +020013903if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013904 ac_have_decl=1
13905else
13906 ac_have_decl=0
13907fi
13908
13909cat >>confdefs.h <<_ACEOF
13910#define HAVE_DECL_ISINF $ac_have_decl
13911_ACEOF
13912ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13913"
Victor Stinnere0be4232011-10-25 13:06:09 +020013914if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013915 ac_have_decl=1
13916else
13917 ac_have_decl=0
13918fi
13919
13920cat >>confdefs.h <<_ACEOF
13921#define HAVE_DECL_ISNAN $ac_have_decl
13922_ACEOF
13923ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13924"
Victor Stinnere0be4232011-10-25 13:06:09 +020013925if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013926 ac_have_decl=1
13927else
13928 ac_have_decl=0
13929fi
13930
13931cat >>confdefs.h <<_ACEOF
13932#define HAVE_DECL_ISFINITE $ac_have_decl
13933_ACEOF
13934
13935
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013936# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13937# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13939$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013940if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013942else
13943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013945 ac_cv_tanh_preserves_zero_sign=no
13946else
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013948/* end confdefs.h. */
13949
13950#include <math.h>
13951#include <stdlib.h>
13952int main() {
13953 /* return 0 if either negative zeros don't exist
13954 on this platform or if negative zeros exist
13955 and tanh(-0.) == -0. */
13956 if (atan2(0., -1.) == atan2(-0., -1.) ||
13957 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13958 else exit(1);
13959}
13960
13961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013962if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013963 ac_cv_tanh_preserves_zero_sign=yes
13964else
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13968 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013969fi
13970
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013971fi
13972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13974$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013975if test "$ac_cv_tanh_preserves_zero_sign" = yes
13976then
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013979
13980fi
13981
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013982if test "$ac_cv_func_log1p" = yes
13983then
13984 # On some versions of AIX, log1p(-0.) returns 0. instead of
13985 # -0. See issue #9920.
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13987$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013988 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013989 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013990else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013991
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013992 if test "$cross_compiling" = yes; then :
13993 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013994else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13996/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013997
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013998 #include <math.h>
13999 #include <stdlib.h>
14000 int main() {
14001 /* Fail if the signs of log1p(-0.) and -0. can be
14002 distinguished. */
14003 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14004 return 0;
14005 else
14006 return 1;
14007 }
14008
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014009_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014010if ac_fn_c_try_run "$LINENO"; then :
14011 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014012else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014013 ac_cv_log1p_drops_zero_sign=yes
14014fi
14015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14016 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014017fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014018
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014019fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014020
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14022$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14023fi
14024if test "$ac_cv_log1p_drops_zero_sign" = yes
14025then
14026
14027$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14028
14029fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014030
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014031LIBS=$LIBS_SAVE
14032
Mark Dickinsona614f042009-11-28 12:48:43 +000014033# For multiprocessing module, check that sem_open
14034# actually works. For FreeBSD versions <= 7.2,
14035# the kernel module that provides POSIX semaphores
14036# isn't loaded by default, so an attempt to call
14037# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14039$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014040if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014042else
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014044 ac_cv_posix_semaphores_enabled=yes
14045else
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014047/* end confdefs.h. */
14048
14049#include <unistd.h>
14050#include <fcntl.h>
14051#include <stdio.h>
14052#include <semaphore.h>
14053#include <sys/stat.h>
14054
14055int main(void) {
14056 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14057 if (a == SEM_FAILED) {
14058 perror("sem_open");
14059 return 1;
14060 }
14061 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014062 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014063 return 0;
14064}
14065
14066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014067if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014068 ac_cv_posix_semaphores_enabled=yes
14069else
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14073 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014074fi
14075
14076
Mark Dickinsona614f042009-11-28 12:48:43 +000014077fi
14078
Matthias Kloseb9621712010-04-24 17:59:49 +000014079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14080$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014081if test $ac_cv_posix_semaphores_enabled = no
14082then
14083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014085
14086fi
14087
Mark Dickinson10683072009-04-18 21:18:19 +000014088# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14090$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014091if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014093else
Matthias Kloseb9621712010-04-24 17:59:49 +000014094 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014095 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014096else
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014098/* end confdefs.h. */
14099
14100#include <unistd.h>
14101#include <fcntl.h>
14102#include <stdio.h>
14103#include <semaphore.h>
14104#include <sys/stat.h>
14105
14106int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014107 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014108 int count;
14109 int res;
14110 if(a==SEM_FAILED){
14111 perror("sem_open");
14112 return 1;
14113
14114 }
14115 res = sem_getvalue(a, &count);
14116 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014117 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014118 return res==-1 ? 1 : 0;
14119}
14120
Mark Dickinson10683072009-04-18 21:18:19 +000014121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014122if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014123 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014124else
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014129fi
14130
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014131
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014132fi
14133
Matthias Kloseb9621712010-04-24 17:59:49 +000014134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14135$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014136if test $ac_cv_broken_sem_getvalue = yes
14137then
14138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014140
14141fi
14142
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014143ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14144"
14145if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14146 ac_have_decl=1
14147else
14148 ac_have_decl=0
14149fi
14150
14151cat >>confdefs.h <<_ACEOF
14152#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14153_ACEOF
14154ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14155"
14156if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14157 ac_have_decl=1
14158else
14159 ac_have_decl=0
14160fi
14161
14162cat >>confdefs.h <<_ACEOF
14163#define HAVE_DECL_RTLD_NOW $ac_have_decl
14164_ACEOF
14165ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14166"
14167if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14168 ac_have_decl=1
14169else
14170 ac_have_decl=0
14171fi
14172
14173cat >>confdefs.h <<_ACEOF
14174#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14175_ACEOF
14176ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14177"
14178if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14179 ac_have_decl=1
14180else
14181 ac_have_decl=0
14182fi
14183
14184cat >>confdefs.h <<_ACEOF
14185#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14186_ACEOF
14187ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14188"
14189if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14190 ac_have_decl=1
14191else
14192 ac_have_decl=0
14193fi
14194
14195cat >>confdefs.h <<_ACEOF
14196#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14197_ACEOF
14198ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14199"
14200if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14201 ac_have_decl=1
14202else
14203 ac_have_decl=0
14204fi
14205
14206cat >>confdefs.h <<_ACEOF
14207#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14208_ACEOF
14209ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14210"
14211if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14212 ac_have_decl=1
14213else
14214 ac_have_decl=0
14215fi
14216
14217cat >>confdefs.h <<_ACEOF
14218#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14219_ACEOF
14220
14221
Mark Dickinsonbd792642009-03-18 20:06:12 +000014222# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14224$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014225# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014226if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014227 enableval=$enable_big_digits; case $enable_big_digits in
14228yes)
14229 enable_big_digits=30 ;;
14230no)
14231 enable_big_digits=15 ;;
1423215|30)
14233 ;;
14234*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014235 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 +000014236esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14238$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014239
14240cat >>confdefs.h <<_ACEOF
14241#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14242_ACEOF
14243
14244
14245else
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14247$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014248fi
14249
14250
Guido van Rossumef2255b2000-03-10 22:30:29 +000014251# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014252ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014253if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014254
14255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014257
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014258 wchar_h="yes"
14259
Guido van Rossumef2255b2000-03-10 22:30:29 +000014260else
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014262
14263fi
14264
Michael W. Hudson54241132001-12-07 15:38:26 +000014265
Martin v. Löwis11437992002-04-12 09:54:03 +000014266
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014267# determine wchar_t size
14268if test "$wchar_h" = yes
14269then
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14273# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14275$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014276if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014278else
Matthias Kloseb9621712010-04-24 17:59:49 +000014279 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14280"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
Martin v. Löwis11437992002-04-12 09:54:03 +000014282else
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 if test "$ac_cv_type_wchar_t" = yes; then
14284 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014286as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014287See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288 else
14289 ac_cv_sizeof_wchar_t=0
14290 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014292
Martin v. Löwis11437992002-04-12 09:54:03 +000014293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14295$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296
14297
14298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014300#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014301_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014302
Michael W. Hudson54241132001-12-07 15:38:26 +000014303
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014304fi
14305
Matthias Kloseb9621712010-04-24 17:59:49 +000014306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14307$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014308have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014310/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014311
14312#include <tcl.h>
14313#if TCL_UTF_MAX != 6
14314# error "NOT UCS4_TCL"
14315#endif
14316int
14317main ()
14318{
14319
14320 ;
14321 return 0;
14322}
14323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014325
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014328
14329 have_ucs4_tcl=yes
14330
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14334$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014335
Skip Montanaro6dead952003-09-25 14:50:04 +000014336# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014337if test "$wchar_h" = yes
14338then
14339 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14341$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014342 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014344else
14345
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014347 ac_cv_wchar_t_signed=yes
14348else
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014350/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014351
14352 #include <wchar.h>
14353 int main()
14354 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014355 /* Success: exit code 0 */
14356 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014357 }
14358
14359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014360if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014361 ac_cv_wchar_t_signed=yes
14362else
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014367fi
14368
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014369fi
14370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14372$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373fi
14374
Georg Brandl52d168a2008-01-07 18:10:24 +000014375# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014376if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014377 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014378then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014379 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014380
Matthias Kloseb9621712010-04-24 17:59:49 +000014381$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
Georg Brandl52d168a2008-01-07 18:10:24 +000014383else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014384 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014385fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14387$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014388
14389# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14391$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014392if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014393 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014394else
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 ac_cv_c_bigendian=unknown
14396 # See if we're dealing with a universal compiler.
14397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14398/* end confdefs.h. */
14399#ifndef __APPLE_CC__
14400 not a universal capable compiler
14401 #endif
14402 typedef int dummy;
14403
Skip Montanaro6dead952003-09-25 14:50:04 +000014404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014405if ac_fn_c_try_compile "$LINENO"; then :
14406
14407 # Check for potential -arch flags. It is not universal unless
14408 # there are at least two -arch flags with different values.
14409 ac_arch=
14410 ac_prev=
14411 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14412 if test -n "$ac_prev"; then
14413 case $ac_word in
14414 i?86 | x86_64 | ppc | ppc64)
14415 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14416 ac_arch=$ac_word
14417 else
14418 ac_cv_c_bigendian=universal
14419 break
14420 fi
14421 ;;
14422 esac
14423 ac_prev=
14424 elif test "x$ac_word" = "x-arch"; then
14425 ac_prev=arch
14426 fi
14427 done
14428fi
14429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14430 if test $ac_cv_c_bigendian = unknown; then
14431 # See if sys/param.h defines the BYTE_ORDER macro.
14432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014433/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014434#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437int
14438main ()
14439{
Matthias Kloseb9621712010-04-24 17:59:49 +000014440#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14441 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14442 && LITTLE_ENDIAN)
14443 bogus endian macros
14444 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
14446 ;
14447 return 0;
14448}
14449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014450if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014451 # It does; now see whether it defined to BIG_ENDIAN or not.
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. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014454#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014455 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014456
Martin v. Löwis11437992002-04-12 09:54:03 +000014457int
14458main ()
14459{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014460#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 not big endian
14462 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014463
14464 ;
14465 return 0;
14466}
14467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014468if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014469 ac_cv_c_bigendian=yes
14470else
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014474fi
14475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14476 fi
14477 if test $ac_cv_c_bigendian = unknown; then
14478 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014480/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014481#include <limits.h>
14482
Martin v. Löwis11437992002-04-12 09:54:03 +000014483int
14484main ()
14485{
Matthias Kloseb9621712010-04-24 17:59:49 +000014486#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14487 bogus endian macros
14488 #endif
14489
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 ;
14491 return 0;
14492}
14493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014494if ac_fn_c_try_compile "$LINENO"; then :
14495 # It does; now see whether it defined to _BIG_ENDIAN or not.
14496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14497/* end confdefs.h. */
14498#include <limits.h>
14499
14500int
14501main ()
14502{
14503#ifndef _BIG_ENDIAN
14504 not big endian
14505 #endif
14506
14507 ;
14508 return 0;
14509}
14510_ACEOF
14511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014513else
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14517fi
14518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14519 fi
14520 if test $ac_cv_c_bigendian = unknown; then
14521 # Compile a test program.
14522 if test "$cross_compiling" = yes; then :
14523 # Try to guess by grepping values from an object file.
14524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14525/* end confdefs.h. */
14526short int ascii_mm[] =
14527 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14528 short int ascii_ii[] =
14529 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14530 int use_ascii (int i) {
14531 return ascii_mm[i] + ascii_ii[i];
14532 }
14533 short int ebcdic_ii[] =
14534 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14535 short int ebcdic_mm[] =
14536 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14537 int use_ebcdic (int i) {
14538 return ebcdic_mm[i] + ebcdic_ii[i];
14539 }
14540 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541
Matthias Kloseb9621712010-04-24 17:59:49 +000014542int
14543main ()
14544{
14545return use_ascii (foo) == use_ebcdic (foo);
14546 ;
14547 return 0;
14548}
14549_ACEOF
14550if ac_fn_c_try_compile "$LINENO"; then :
14551 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14552 ac_cv_c_bigendian=yes
14553 fi
14554 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14555 if test "$ac_cv_c_bigendian" = unknown; then
14556 ac_cv_c_bigendian=no
14557 else
14558 # finding both strings is unlikely to happen, but who knows?
14559 ac_cv_c_bigendian=unknown
14560 fi
14561 fi
14562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014564else
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014566/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014568int
14569main ()
14570{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 /* Are we little or big endian? From Harbison&Steele. */
14573 union
14574 {
14575 long int l;
14576 char c[sizeof (long int)];
14577 } u;
14578 u.l = 1;
14579 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580
14581 ;
14582 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014583}
Martin v. Löwis11437992002-04-12 09:54:03 +000014584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014585if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014586 ac_cv_c_bigendian=no
14587else
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14597$as_echo "$ac_cv_c_bigendian" >&6; }
14598 case $ac_cv_c_bigendian in #(
14599 yes)
14600 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14601;; #(
14602 no)
14603 ;; #(
14604 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014607
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 ;; #(
14609 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014610 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014611 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014613
Michael W. Hudson54241132001-12-07 15:38:26 +000014614
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014615# ABI version string for Python extension modules. This appears between the
14616# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14617# from the following attributes which affect the ABI of this Python build (in
14618# this order):
14619#
14620# * The Python implementation (always 'cpython-' for us)
14621# * The major and minor version numbers
14622# * --with-pydebug (adds a 'd')
14623# * --with-pymalloc (adds a 'm')
14624# * --with-wide-unicode (adds a 'u')
14625#
14626# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014627# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14628# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014629
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14631$as_echo_n "checking ABIFLAGS... " >&6; }
14632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14633$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14635$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014636SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14638$as_echo "$SOABI" >&6; }
14639
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014640
14641case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014642 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014643 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14644 *)
14645 EXT_SUFFIX=${SHLIB_SUFFIX};;
14646esac
14647
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14649$as_echo_n "checking LDVERSION... " >&6; }
14650LDVERSION='$(VERSION)$(ABIFLAGS)'
14651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14652$as_echo "$LDVERSION" >&6; }
14653
doko@python.org87421192013-01-26 11:39:31 +010014654
doko@ubuntu.com55532312016-06-14 08:55:19 +020014655if test x$PLATFORM_TRIPLET = x; then
14656 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14657else
14658 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14659fi
doko@python.org87421192013-01-26 11:39:31 +010014660
14661
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014662# Check whether right shifting a negative integer extends the sign bit
14663# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14665$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014666if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014668else
Martin v. Löwis11437992002-04-12 09:54:03 +000014669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014671 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014672else
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014674/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014675
14676int main()
14677{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014678 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014679}
14680
Martin v. Löwis11437992002-04-12 09:54:03 +000014681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014682if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014683 ac_cv_rshift_extends_sign=yes
14684else
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014689fi
14690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691fi
14692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14694$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014695if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014696then
Martin v. Löwis11437992002-04-12 09:54:03 +000014697
Matthias Kloseb9621712010-04-24 17:59:49 +000014698$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014699
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014700fi
14701
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014702# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14704$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014705if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014707else
Martin v. Löwis11437992002-04-12 09:54:03 +000014708
Matthias Kloseb9621712010-04-24 17:59:49 +000014709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014710/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014711#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014712int
14713main ()
14714{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014715
14716 FILE *f = fopen("/dev/null", "r");
14717 flockfile(f);
14718 getc_unlocked(f);
14719 funlockfile(f);
14720
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 ;
14722 return 0;
14723}
14724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014725if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014726 ac_cv_have_getc_unlocked=yes
14727else
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 ac_cv_have_getc_unlocked=no
14729fi
14730rm -f core conftest.err conftest.$ac_objext \
14731 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14735$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014736if test "$ac_cv_have_getc_unlocked" = yes
14737then
Martin v. Löwis11437992002-04-12 09:54:03 +000014738
Matthias Kloseb9621712010-04-24 17:59:49 +000014739$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014740
14741fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014742
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014743# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014744# save the value of LIBS so we don't actually link Python with readline
14745LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014746
Gregory P. Smith18820942008-09-07 06:24:49 +000014747# On some systems we need to link readline to a termcap compatible
14748# library. NOTE: Keep the precedence of listed libraries synchronised
14749# with setup.py.
14750py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14752$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014753for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014754 if test -z "$py_libtermcap"; then
14755 READLINE_LIBS="-lreadline"
14756 else
14757 READLINE_LIBS="-lreadline -l$py_libtermcap"
14758 fi
14759 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014761/* end confdefs.h. */
14762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763/* Override any GCC internal prototype to avoid an error.
14764 Use char because int might match the return type of a GCC
14765 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014766#ifdef __cplusplus
14767extern "C"
14768#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014769char readline ();
14770int
14771main ()
14772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014774 ;
14775 return 0;
14776}
14777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014778if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014779 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014781rm -f core conftest.err conftest.$ac_objext \
14782 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014783 if test $py_cv_lib_readline = yes; then
14784 break
14785 fi
14786done
14787# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14788#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014789if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14791$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014792else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14794$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014795
Matthias Kloseb9621712010-04-24 17:59:49 +000014796$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014797
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014798fi
14799
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014800# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14802$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014803if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014805else
14806 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014807LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014809/* end confdefs.h. */
14810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811/* Override any GCC internal prototype to avoid an error.
14812 Use char because int might match the return type of a GCC
14813 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014814#ifdef __cplusplus
14815extern "C"
14816#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014817char rl_callback_handler_install ();
14818int
14819main ()
14820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014822 ;
14823 return 0;
14824}
14825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014826if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014827 ac_cv_lib_readline_rl_callback_handler_install=yes
14828else
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014831rm -f core conftest.err conftest.$ac_objext \
14832 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014833LIBS=$ac_check_lib_save_LIBS
14834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14836$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014837if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014838
Matthias Kloseb9621712010-04-24 17:59:49 +000014839$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014840
14841fi
14842
14843
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014844# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014846/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014847#include <readline/readline.h>
14848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014849if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014850 have_readline=yes
14851else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014852 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014853
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014854fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014855rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014856if test $have_readline = yes
14857then
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014859/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014860#include <readline/readline.h>
14861
14862_ACEOF
14863if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014864 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014867
14868fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014869rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014870
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014872/* end confdefs.h. */
14873#include <readline/readline.h>
14874
14875_ACEOF
14876if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014878
Matthias Kloseb9621712010-04-24 17:59:49 +000014879$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014880
14881fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014882rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014883
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014884fi
14885
Martin v. Löwis0daad592001-09-30 21:09:59 +000014886# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14888$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014889if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014891else
Martin v. Löwis11437992002-04-12 09:54:03 +000014892 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014893LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897/* Override any GCC internal prototype to avoid an error.
14898 Use char because int might match the return type of a GCC
14899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014900#ifdef __cplusplus
14901extern "C"
14902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014903char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014904int
14905main ()
14906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 ;
14909 return 0;
14910}
14911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014913 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014914else
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014917rm -f core conftest.err conftest.$ac_objext \
14918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014919LIBS=$ac_check_lib_save_LIBS
14920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14922$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014923if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014926
Martin v. Löwis0daad592001-09-30 21:09:59 +000014927fi
14928
Michael W. Hudson54241132001-12-07 15:38:26 +000014929
Thomas Wouters89d996e2007-09-08 17:39:28 +000014930# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14932$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014933if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014935else
14936 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014937LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014939/* end confdefs.h. */
14940
14941/* Override any GCC internal prototype to avoid an error.
14942 Use char because int might match the return type of a GCC
14943 builtin and then its argument prototype would still apply. */
14944#ifdef __cplusplus
14945extern "C"
14946#endif
14947char rl_completion_display_matches_hook ();
14948int
14949main ()
14950{
14951return rl_completion_display_matches_hook ();
14952 ;
14953 return 0;
14954}
14955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014956if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014957 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14958else
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014961rm -f core conftest.err conftest.$ac_objext \
14962 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014963LIBS=$ac_check_lib_save_LIBS
14964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14966$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014967if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014968
Matthias Kloseb9621712010-04-24 17:59:49 +000014969$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014970
14971fi
14972
14973
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014974# also in 4.0, but not in editline
14975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14976$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14977if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14978 $as_echo_n "(cached) " >&6
14979else
14980 ac_check_lib_save_LIBS=$LIBS
14981LIBS="-lreadline $READLINE_LIBS $LIBS"
14982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14983/* end confdefs.h. */
14984
14985/* Override any GCC internal prototype to avoid an error.
14986 Use char because int might match the return type of a GCC
14987 builtin and then its argument prototype would still apply. */
14988#ifdef __cplusplus
14989extern "C"
14990#endif
14991char rl_resize_terminal ();
14992int
14993main ()
14994{
14995return rl_resize_terminal ();
14996 ;
14997 return 0;
14998}
14999_ACEOF
15000if ac_fn_c_try_link "$LINENO"; then :
15001 ac_cv_lib_readline_rl_resize_terminal=yes
15002else
15003 ac_cv_lib_readline_rl_resize_terminal=no
15004fi
15005rm -f core conftest.err conftest.$ac_objext \
15006 conftest$ac_exeext conftest.$ac_ext
15007LIBS=$ac_check_lib_save_LIBS
15008fi
15009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15010$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15011if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15012
15013$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15014
15015fi
15016
15017
Martin v. Löwis0daad592001-09-30 21:09:59 +000015018# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15020$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015021if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015023else
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015025LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029/* Override any GCC internal prototype to avoid an error.
15030 Use char because int might match the return type of a GCC
15031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015032#ifdef __cplusplus
15033extern "C"
15034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015035char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015036int
15037main ()
15038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 ;
15041 return 0;
15042}
15043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015044if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015046else
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015049rm -f core conftest.err conftest.$ac_objext \
15050 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015051LIBS=$ac_check_lib_save_LIBS
15052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15054$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015055if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015058
Guido van Rossum353ae582001-07-10 16:45:32 +000015059fi
15060
Jack Jansendd19cf82001-12-06 22:36:17 +000015061
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015062# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015064/* end confdefs.h. */
15065#include <readline/readline.h>
15066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015067if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015068 have_readline=yes
15069else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015070 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015071
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015072fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015073rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015074if test $have_readline = yes
15075then
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015077/* end confdefs.h. */
15078#include <readline/readline.h>
15079
15080_ACEOF
15081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015083
Matthias Kloseb9621712010-04-24 17:59:49 +000015084$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015085
15086fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015087rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015088
15089fi
15090
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15092$as_echo_n "checking for append_history in -lreadline... " >&6; }
15093if ${ac_cv_lib_readline_append_history+:} false; then :
15094 $as_echo_n "(cached) " >&6
15095else
15096 ac_check_lib_save_LIBS=$LIBS
15097LIBS="-lreadline $READLINE_LIBS $LIBS"
15098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15099/* end confdefs.h. */
15100
15101/* Override any GCC internal prototype to avoid an error.
15102 Use char because int might match the return type of a GCC
15103 builtin and then its argument prototype would still apply. */
15104#ifdef __cplusplus
15105extern "C"
15106#endif
15107char append_history ();
15108int
15109main ()
15110{
15111return append_history ();
15112 ;
15113 return 0;
15114}
15115_ACEOF
15116if ac_fn_c_try_link "$LINENO"; then :
15117 ac_cv_lib_readline_append_history=yes
15118else
15119 ac_cv_lib_readline_append_history=no
15120fi
15121rm -f core conftest.err conftest.$ac_objext \
15122 conftest$ac_exeext conftest.$ac_ext
15123LIBS=$ac_check_lib_save_LIBS
15124fi
15125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15126$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15127if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15128
15129$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15130
15131fi
15132
15133
Martin v. Löwis82bca632006-02-10 20:49:30 +000015134# End of readline checks: restore LIBS
15135LIBS=$LIBS_no_readline
15136
Matthias Kloseb9621712010-04-24 17:59:49 +000015137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15138$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015139if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015141else
Martin v. Löwis11437992002-04-12 09:54:03 +000015142
Matthias Kloseb9621712010-04-24 17:59:49 +000015143if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015144 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015145else
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015147/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015148
15149int main()
15150{
15151 int val1 = nice(1);
15152 if (val1 != -1 && val1 == nice(2))
15153 exit(0);
15154 exit(1);
15155}
15156
Martin v. Löwis11437992002-04-12 09:54:03 +000015157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015158if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015159 ac_cv_broken_nice=yes
15160else
Matthias Kloseb9621712010-04-24 17:59:49 +000015161 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15164 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015165fi
15166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015167fi
15168
Matthias Kloseb9621712010-04-24 17:59:49 +000015169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15170$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015171if test "$ac_cv_broken_nice" = yes
15172then
Martin v. Löwis11437992002-04-12 09:54:03 +000015173
Matthias Kloseb9621712010-04-24 17:59:49 +000015174$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015175
15176fi
15177
Matthias Kloseb9621712010-04-24 17:59:49 +000015178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15179$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015180if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015182else
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015184 ac_cv_broken_poll=no
15185else
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015187/* end confdefs.h. */
15188
15189#include <poll.h>
15190
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015191int main()
15192{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015193 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015194 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015195
15196 close (42);
15197
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015198 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015199 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015200 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015201 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015202 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015203 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015204 return 1;
15205}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015206
15207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015208if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015209 ac_cv_broken_poll=yes
15210else
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15214 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015217fi
15218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15220$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015221if test "$ac_cv_broken_poll" = yes
15222then
15223
Matthias Kloseb9621712010-04-24 17:59:49 +000015224$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015225
15226fi
15227
Brett Cannon43802422005-02-10 20:48:03 +000015228# 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 +000015229# (which is not required by ISO C or UNIX spec) and/or if we support
15230# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015231ac_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 +000015232#include <$ac_cv_struct_tm>
15233
Matthias Kloseb9621712010-04-24 17:59:49 +000015234"
Victor Stinnere0be4232011-10-25 13:06:09 +020015235if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015236
15237cat >>confdefs.h <<_ACEOF
15238#define HAVE_STRUCT_TM_TM_ZONE 1
15239_ACEOF
15240
15241
15242fi
15243
15244if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015247
15248else
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15250"
Victor Stinnere0be4232011-10-25 13:06:09 +020015251if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253else
Matthias Kloseb9621712010-04-24 17:59:49 +000015254 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255fi
15256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015257cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015258#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259_ACEOF
15260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15262$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015263if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265else
Matthias Kloseb9621712010-04-24 17:59:49 +000015266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015267/* end confdefs.h. */
15268#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269#if !HAVE_DECL_TZNAME
15270extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015271#endif
15272
15273int
15274main ()
15275{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015276return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015277 ;
15278 return 0;
15279}
15280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015281if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015282 ac_cv_var_tzname=yes
15283else
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015286rm -f core conftest.err conftest.$ac_objext \
15287 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15290$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015291 if test $ac_cv_var_tzname = yes; then
15292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015294
15295 fi
15296fi
15297
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015298
Martin v. Löwis1d459062005-03-14 21:23:33 +000015299# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15301$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015302if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015304else
15305
Matthias Kloseb9621712010-04-24 17:59:49 +000015306if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015307 ac_cv_working_tzset=no
15308else
Matthias Kloseb9621712010-04-24 17:59:49 +000015309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015310/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015311
15312#include <stdlib.h>
15313#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015314#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015315
15316#if HAVE_TZNAME
15317extern char *tzname[];
15318#endif
15319
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015320int main()
15321{
Brett Cannon18367812003-09-19 00:59:16 +000015322 /* Note that we need to ensure that not only does tzset(3)
15323 do 'something' with localtime, but it works as documented
15324 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015325 This includes making sure that tzname is set properly if
15326 tm->tm_zone does not exist since it is the alternative way
15327 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015328
15329 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015330 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015331 */
15332
Martin v. Löwis1d459062005-03-14 21:23:33 +000015333 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015334 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15335
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015336 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015337 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015338 if (localtime(&groundhogday)->tm_hour != 0)
15339 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015340#if HAVE_TZNAME
15341 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15342 if (strcmp(tzname[0], "UTC") ||
15343 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15344 exit(1);
15345#endif
Brett Cannon18367812003-09-19 00:59:16 +000015346
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015347 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015348 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015349 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015350 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015351#if HAVE_TZNAME
15352 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15353 exit(1);
15354#endif
Brett Cannon18367812003-09-19 00:59:16 +000015355
15356 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15357 tzset();
15358 if (localtime(&groundhogday)->tm_hour != 11)
15359 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015360#if HAVE_TZNAME
15361 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15362 exit(1);
15363#endif
15364
15365#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015366 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15367 exit(1);
15368 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15369 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015370#endif
Brett Cannon18367812003-09-19 00:59:16 +000015371
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015372 exit(0);
15373}
15374
15375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015376if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015377 ac_cv_working_tzset=yes
15378else
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15382 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015383fi
15384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015385fi
15386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15388$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015389if test "$ac_cv_working_tzset" = yes
15390then
15391
Matthias Kloseb9621712010-04-24 17:59:49 +000015392$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015393
15394fi
15395
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015396# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15398$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015399if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015401else
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015403/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015404#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015405int
15406main ()
15407{
15408
15409struct stat st;
15410st.st_mtim.tv_nsec = 1;
15411
15412 ;
15413 return 0;
15414}
15415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015416if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015417 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015418else
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15422fi
15423
Matthias Kloseb9621712010-04-24 17:59:49 +000015424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15425$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015426if test "$ac_cv_stat_tv_nsec" = yes
15427then
15428
Matthias Kloseb9621712010-04-24 17:59:49 +000015429$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015430
15431fi
15432
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015433# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15435$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015436if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015437 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015438else
Matthias Kloseb9621712010-04-24 17:59:49 +000015439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015440/* end confdefs.h. */
15441#include <sys/stat.h>
15442int
15443main ()
15444{
15445
15446struct stat st;
15447st.st_mtimespec.tv_nsec = 1;
15448
15449 ;
15450 return 0;
15451}
15452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015454 ac_cv_stat_tv_nsec2=yes
15455else
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15459fi
15460
Matthias Kloseb9621712010-04-24 17:59:49 +000015461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15462$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015463if test "$ac_cv_stat_tv_nsec2" = yes
15464then
15465
Matthias Kloseb9621712010-04-24 17:59:49 +000015466$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015467
15468fi
15469
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015470# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015471ac_save_cppflags="$CPPFLAGS"
15472CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015473
15474for ac_header in curses.h ncurses.h
15475do :
15476 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15477ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15478if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15479 cat >>confdefs.h <<_ACEOF
15480#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15481_ACEOF
15482
15483fi
15484
15485done
15486
15487
15488# On Solaris, term.h requires curses.h
15489for ac_header in term.h
15490do :
15491 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15492#ifdef HAVE_CURSES_H
15493#include <curses.h>
15494#endif
15495
15496"
15497if test "x$ac_cv_header_term_h" = xyes; then :
15498 cat >>confdefs.h <<_ACEOF
15499#define HAVE_TERM_H 1
15500_ACEOF
15501
15502fi
15503
15504done
15505
15506
Jack Jansen666b1e72001-10-31 12:11:48 +000015507# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15509$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015510if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015511 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015512else
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015515#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015516int
15517main ()
15518{
Jack Jansen666b1e72001-10-31 12:11:48 +000015519
15520 int rtn;
15521 rtn = mvwdelch(0,0,0);
15522
Martin v. Löwis11437992002-04-12 09:54:03 +000015523 ;
15524 return 0;
15525}
15526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015527if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015528 ac_cv_mvwdelch_is_expression=yes
15529else
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15533fi
15534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15536$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015537
15538if test "$ac_cv_mvwdelch_is_expression" = yes
15539then
Martin v. Löwis11437992002-04-12 09:54:03 +000015540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015542
15543fi
15544
Matthias Kloseb9621712010-04-24 17:59:49 +000015545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15546$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015547if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015549else
Matthias Kloseb9621712010-04-24 17:59:49 +000015550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015551/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015552#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015553int
15554main ()
15555{
Jack Jansen666b1e72001-10-31 12:11:48 +000015556
15557 WINDOW *w;
15558 w->_flags = 0;
15559
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 ;
15561 return 0;
15562}
15563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015564if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015565 ac_cv_window_has_flags=yes
15566else
Matthias Kloseb9621712010-04-24 17:59:49 +000015567 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15570fi
15571
Matthias Kloseb9621712010-04-24 17:59:49 +000015572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15573$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015574
Jack Jansen666b1e72001-10-31 12:11:48 +000015575
15576if test "$ac_cv_window_has_flags" = yes
15577then
Martin v. Löwis11437992002-04-12 09:54:03 +000015578
Matthias Kloseb9621712010-04-24 17:59:49 +000015579$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015580
15581fi
15582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15584$as_echo_n "checking for is_term_resized... " >&6; }
15585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015586/* end confdefs.h. */
15587#include <curses.h>
15588int
15589main ()
15590{
15591void *x=is_term_resized
15592 ;
15593 return 0;
15594}
15595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015599
Matthias Kloseb159a552010-04-25 21:00:44 +000015600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015601$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015602else
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15604$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015605
15606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15608
Matthias Kloseb9621712010-04-24 17:59:49 +000015609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15610$as_echo_n "checking for resize_term... " >&6; }
15611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015612/* end confdefs.h. */
15613#include <curses.h>
15614int
15615main ()
15616{
15617void *x=resize_term
15618 ;
15619 return 0;
15620}
15621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015622if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015623
Matthias Kloseb9621712010-04-24 17:59:49 +000015624$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015625
Matthias Kloseb159a552010-04-25 21:00:44 +000015626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015627$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015628else
Matthias Kloseb9621712010-04-24 17:59:49 +000015629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15630$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015631
15632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15634
Matthias Kloseb9621712010-04-24 17:59:49 +000015635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15636$as_echo_n "checking for resizeterm... " >&6; }
15637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015638/* end confdefs.h. */
15639#include <curses.h>
15640int
15641main ()
15642{
15643void *x=resizeterm
15644 ;
15645 return 0;
15646}
15647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015648if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015649
Matthias Kloseb9621712010-04-24 17:59:49 +000015650$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015651
Matthias Kloseb159a552010-04-25 21:00:44 +000015652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015653$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15656$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015657
15658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015660# last curses configure check
15661CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015662
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15664$as_echo "$as_me: checking for device files" >&6;}
15665
15666if test "x$cross_compiling" = xyes; then
15667 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15669$as_echo_n "checking for /dev/ptmx... " >&6; }
15670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15671$as_echo "not set" >&6; }
15672 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15673 fi
15674 if test "${ac_cv_file__dev_ptc+set}" != set; then
15675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15676$as_echo_n "checking for /dev/ptc... " >&6; }
15677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15678$as_echo "not set" >&6; }
15679 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15680 fi
15681fi
15682
Matthias Kloseb9621712010-04-24 17:59:49 +000015683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15684$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015685if ${ac_cv_file__dev_ptmx+:} false; then :
15686 $as_echo_n "(cached) " >&6
15687else
15688 test "$cross_compiling" = yes &&
15689 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15690if test -r "/dev/ptmx"; then
15691 ac_cv_file__dev_ptmx=yes
15692else
15693 ac_cv_file__dev_ptmx=no
15694fi
15695fi
15696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15697$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15698if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015699
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015700fi
15701
15702if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015703
Matthias Kloseb9621712010-04-24 17:59:49 +000015704$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015705
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15708$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015709if ${ac_cv_file__dev_ptc+:} false; then :
15710 $as_echo_n "(cached) " >&6
15711else
15712 test "$cross_compiling" = yes &&
15713 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15714if test -r "/dev/ptc"; then
15715 ac_cv_file__dev_ptc=yes
15716else
15717 ac_cv_file__dev_ptc=no
15718fi
15719fi
15720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15721$as_echo "$ac_cv_file__dev_ptc" >&6; }
15722if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015723
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015724fi
15725
15726if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015727
Matthias Kloseb9621712010-04-24 17:59:49 +000015728$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015729
Neal Norwitz865400f2003-03-21 01:42:58 +000015730fi
15731
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015733$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015734if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015735 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015736else
Matthias Kloseb9621712010-04-24 17:59:49 +000015737 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015738 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015739if test x$GCC = xyes; then
15740save_CFLAGS=$CFLAGS
15741CFLAGS="$CFLAGS -Werror -Wformat"
15742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015743/* end confdefs.h. */
15744
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015745#include <stdio.h>
15746#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015747
15748int
15749main ()
15750{
15751
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015752char *buffer;
15753sprintf(buffer, "%lld", (long long)123);
15754sprintf(buffer, "%lld", (long long)-123);
15755sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015756
15757 ;
15758 return 0;
15759}
15760_ACEOF
15761if ac_fn_c_try_compile "$LINENO"; then :
15762 ac_cv_have_long_long_format=yes
15763
15764fi
15765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015766CFLAGS=$save_CFLAGS
15767fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015768else
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015770/* end confdefs.h. */
15771
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015772#include <stdio.h>
15773#include <stddef.h>
15774#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015775
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015776#ifdef HAVE_SYS_TYPES_H
15777#include <sys/types.h>
15778#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015779
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015780int main()
15781{
15782char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015783
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015784if (sprintf(buffer, "%lld", (long long)123) < 0)
15785return 1;
15786if (strcmp(buffer, "123"))
15787return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015788
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015789if (sprintf(buffer, "%lld", (long long)-123) < 0)
15790return 1;
15791if (strcmp(buffer, "-123"))
15792return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015793
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015794if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15795return 1;
15796if (strcmp(buffer, "123"))
15797return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015798
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015799return 0;
15800}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015801
15802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015803if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015804 ac_cv_have_long_long_format=yes
15805else
Matthias Kloseb9621712010-04-24 17:59:49 +000015806 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015810fi
15811
15812
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015813fi
15814
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015816$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015817
Mark Dickinson89d7d412009-12-31 20:50:59 +000015818if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015819then
15820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015822
15823fi
15824
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015825if test $ac_sys_system = Darwin
15826then
15827 LIBS="$LIBS -framework CoreFoundation"
15828fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015829
Matthias Kloseb9621712010-04-24 17:59:49 +000015830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15831$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015832if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015834else
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015836 ac_cv_have_size_t_format="cross -- assuming yes"
15837
Thomas Wouters477c8d52006-05-27 19:21:47 +000015838else
Matthias Kloseb9621712010-04-24 17:59:49 +000015839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015840/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015841
Thomas Wouters477c8d52006-05-27 19:21:47 +000015842#include <stdio.h>
15843#include <stddef.h>
15844#include <string.h>
15845
Christian Heimes2c181612007-12-17 20:04:13 +000015846#ifdef HAVE_SYS_TYPES_H
15847#include <sys/types.h>
15848#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015849
15850#ifdef HAVE_SSIZE_T
15851typedef ssize_t Py_ssize_t;
15852#elif SIZEOF_VOID_P == SIZEOF_LONG
15853typedef long Py_ssize_t;
15854#else
15855typedef int Py_ssize_t;
15856#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015857
Christian Heimes2c181612007-12-17 20:04:13 +000015858int main()
15859{
15860 char buffer[256];
15861
Thomas Wouters477c8d52006-05-27 19:21:47 +000015862 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15863 return 1;
15864
Thomas Wouters89f507f2006-12-13 04:49:30 +000015865 if (strcmp(buffer, "123"))
15866 return 1;
15867
15868 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15869 return 1;
15870
15871 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015872 return 1;
15873
15874 return 0;
15875}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015876
Thomas Wouters477c8d52006-05-27 19:21:47 +000015877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015878if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015879 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015880else
Matthias Kloseb9621712010-04-24 17:59:49 +000015881 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015885fi
15886
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15889$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015890if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015893
15894fi
15895
Matthias Kloseb9621712010-04-24 17:59:49 +000015896ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015897#ifdef HAVE_SYS_TYPES_H
15898#include <sys/types.h>
15899#endif
15900#ifdef HAVE_SYS_SOCKET_H
15901#include <sys/socket.h>
15902#endif
15903
Matthias Kloseb9621712010-04-24 17:59:49 +000015904"
Victor Stinnere0be4232011-10-25 13:06:09 +020015905if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015906
Martin v. Löwis11437992002-04-12 09:54:03 +000015907else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015908
Matthias Kloseb9621712010-04-24 17:59:49 +000015909$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015910
15911fi
15912
Michael W. Hudson54241132001-12-07 15:38:26 +000015913
Matthias Kloseb9621712010-04-24 17:59:49 +000015914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15915$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015916if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015918else
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015920 ac_cv_broken_mbstowcs=no
15921else
Matthias Kloseb9621712010-04-24 17:59:49 +000015922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015923/* end confdefs.h. */
15924
Stefan Krah19c21392012-11-22 23:47:32 +010015925#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015926#include<stdlib.h>
15927int main() {
15928 size_t len = -1;
15929 const char *str = "text";
15930 len = mbstowcs(NULL, str, 0);
15931 return (len != 4);
15932}
15933
15934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015935if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015936 ac_cv_broken_mbstowcs=no
15937else
Matthias Kloseb9621712010-04-24 17:59:49 +000015938 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15941 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015942fi
15943
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015944fi
15945
Matthias Kloseb9621712010-04-24 17:59:49 +000015946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15947$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015948if test "$ac_cv_broken_mbstowcs" = yes
15949then
15950
Matthias Kloseb9621712010-04-24 17:59:49 +000015951$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015952
15953fi
15954
Antoine Pitroub52ec782009-01-25 16:34:23 +000015955# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15957$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015958
15959# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015960if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015961 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015962if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015963then
15964
Matthias Kloseb9621712010-04-24 17:59:49 +000015965$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015966
Matthias Kloseb9621712010-04-24 17:59:49 +000015967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15968$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015969fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015970if test "$withval" = no
15971then
15972
15973$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15974
Matthias Kloseb9621712010-04-24 17:59:49 +000015975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15976$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015977fi
15978
Antoine Pitrou042b1282010-08-13 21:15:58 +000015979else
15980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15981$as_echo "no value specified" >&6; }
15982fi
15983
Antoine Pitroub52ec782009-01-25 16:34:23 +000015984
Matthias Kloseb17289e2012-03-15 19:51:34 +010015985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15986$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15987if ${ac_cv_computed_gotos+:} false; then :
15988 $as_echo_n "(cached) " >&6
15989else
15990 if test "$cross_compiling" = yes; then :
15991 if test "${with_computed_gotos+set}" = set; then
15992 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15993 else
15994 ac_cv_computed_gotos=no
15995 fi
15996else
15997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15998/* end confdefs.h. */
15999
16000int main(int argc, char **argv)
16001{
16002 static void *targets[1] = { &&LABEL1 };
16003 goto LABEL2;
16004LABEL1:
16005 return 0;
16006LABEL2:
16007 goto *targets[0];
16008 return 1;
16009}
16010
16011_ACEOF
16012if ac_fn_c_try_run "$LINENO"; then :
16013 ac_cv_computed_gotos=yes
16014else
16015 ac_cv_computed_gotos=no
16016fi
16017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16018 conftest.$ac_objext conftest.beam conftest.$ac_ext
16019fi
16020
16021fi
16022
16023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16024$as_echo "$ac_cv_computed_gotos" >&6; }
16025case "$ac_cv_computed_gotos" in yes*)
16026
16027$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16028
16029esac
16030
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016031case $ac_sys_system in
16032AIX*)
16033
16034$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16035 ;;
16036esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016037
Michael W. Hudson54241132001-12-07 15:38:26 +000016038
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016039
16040
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016041for h in `(cd $srcdir;echo Python/thread_*.h)`
16042do
16043 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16044done
16045
Michael W. Hudson54241132001-12-07 15:38:26 +000016046
Ned Deily0db50cf2014-07-25 12:41:31 -070016047SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16049$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016050for dir in $SRCDIRS; do
16051 if test ! -d $dir; then
16052 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016053 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016054done
Matthias Kloseb9621712010-04-24 17:59:49 +000016055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16056$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016057
Stefan Krah1919b7e2012-03-21 18:25:23 +010016058# Availability of -O2:
16059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16060$as_echo_n "checking for -O2... " >&6; }
16061saved_cflags="$CFLAGS"
16062CFLAGS="-O2"
16063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16064/* end confdefs.h. */
16065
16066int
16067main ()
16068{
16069
16070
16071 ;
16072 return 0;
16073}
16074_ACEOF
16075if ac_fn_c_try_compile "$LINENO"; then :
16076 have_O2=yes
16077else
16078 have_O2=no
16079fi
16080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16082$as_echo "$have_O2" >&6; }
16083CFLAGS="$saved_cflags"
16084
16085# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16086# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16088$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16089saved_cflags="$CFLAGS"
16090CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16091if test "$have_O2" = no; then
16092 CFLAGS=""
16093fi
16094if test "$cross_compiling" = yes; then :
16095 have_glibc_memmove_bug=undefined
16096else
16097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16098/* end confdefs.h. */
16099
16100#include <stdio.h>
16101#include <stdlib.h>
16102#include <string.h>
16103void foo(void *p, void *q) { memmove(p, q, 19); }
16104int main() {
16105 char a[32] = "123456789000000000";
16106 foo(&a[9], a);
16107 if (strcmp(a, "123456789123456789000000000") != 0)
16108 return 1;
16109 foo(a, &a[9]);
16110 if (strcmp(a, "123456789000000000") != 0)
16111 return 1;
16112 return 0;
16113}
16114
16115_ACEOF
16116if ac_fn_c_try_run "$LINENO"; then :
16117 have_glibc_memmove_bug=no
16118else
16119 have_glibc_memmove_bug=yes
16120fi
16121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16122 conftest.$ac_objext conftest.beam conftest.$ac_ext
16123fi
16124
16125CFLAGS="$saved_cflags"
16126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16127$as_echo "$have_glibc_memmove_bug" >&6; }
16128if test "$have_glibc_memmove_bug" = yes; then
16129
16130$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16131
16132fi
16133
16134if test "$have_gcc_asm_for_x87" = yes; then
16135 # Some versions of gcc miscompile inline asm:
16136 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16137 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16138 case $CC in
16139 *gcc*)
16140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16141$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16142 saved_cflags="$CFLAGS"
16143 CFLAGS="-O2"
16144 if test "$cross_compiling" = yes; then :
16145 have_ipa_pure_const_bug=undefined
16146else
16147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16148/* end confdefs.h. */
16149
16150 __attribute__((noinline)) int
16151 foo(int *p) {
16152 int r;
16153 asm ( "movl \$6, (%1)\n\t"
16154 "xorl %0, %0\n\t"
16155 : "=r" (r) : "r" (p) : "memory"
16156 );
16157 return r;
16158 }
16159 int main() {
16160 int p = 8;
16161 if ((foo(&p) ? : p) != 6)
16162 return 1;
16163 return 0;
16164 }
16165
16166_ACEOF
16167if ac_fn_c_try_run "$LINENO"; then :
16168 have_ipa_pure_const_bug=no
16169else
16170 have_ipa_pure_const_bug=yes
16171fi
16172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16173 conftest.$ac_objext conftest.beam conftest.$ac_ext
16174fi
16175
16176 CFLAGS="$saved_cflags"
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16178$as_echo "$have_ipa_pure_const_bug" >&6; }
16179 if test "$have_ipa_pure_const_bug" = yes; then
16180
16181$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16182
16183 fi
16184 ;;
16185 esac
16186fi
16187
Victor Stinner4f5366e2015-01-09 02:13:19 +010016188# Check for stdatomic.h
16189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16190$as_echo_n "checking for stdatomic.h... " >&6; }
16191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16192/* end confdefs.h. */
16193
16194
16195 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016196 atomic_int value = ATOMIC_VAR_INIT(1);
16197 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016198 int main() {
16199 int loaded_value = atomic_load(&value);
16200 return 0;
16201 }
16202
16203
16204_ACEOF
16205if ac_fn_c_try_link "$LINENO"; then :
16206 have_stdatomic_h=yes
16207else
16208 have_stdatomic_h=no
16209fi
16210rm -f core conftest.err conftest.$ac_objext \
16211 conftest$ac_exeext conftest.$ac_ext
16212
16213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16214$as_echo "$have_stdatomic_h" >&6; }
16215
16216if test "$have_stdatomic_h" = yes; then
16217
16218$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16219
16220fi
16221
16222# Check for GCC >= 4.7 __atomic builtins
16223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16224$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16226/* end confdefs.h. */
16227
16228
16229 volatile int val = 1;
16230 int main() {
16231 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16232 return 0;
16233 }
16234
16235
16236_ACEOF
16237if ac_fn_c_try_link "$LINENO"; then :
16238 have_builtin_atomic=yes
16239else
16240 have_builtin_atomic=no
16241fi
16242rm -f core conftest.err conftest.$ac_objext \
16243 conftest$ac_exeext conftest.$ac_ext
16244
16245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16246$as_echo "$have_builtin_atomic" >&6; }
16247
16248if test "$have_builtin_atomic" = yes; then
16249
16250$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16251
16252fi
16253
Ned Deily322f5ba2013-11-21 23:01:59 -080016254# ensurepip option
16255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16256$as_echo_n "checking for ensurepip... " >&6; }
16257
16258# Check whether --with-ensurepip was given.
16259if test "${with_ensurepip+set}" = set; then :
16260 withval=$with_ensurepip;
16261else
16262 with_ensurepip=upgrade
16263fi
16264
16265case $with_ensurepip in #(
16266 yes|upgrade) :
16267 ENSUREPIP=upgrade ;; #(
16268 install) :
16269 ENSUREPIP=install ;; #(
16270 no) :
16271 ENSUREPIP=no ;; #(
16272 *) :
16273 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16274esac
16275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16276$as_echo "$ENSUREPIP" >&6; }
16277
16278
Victor Stinner35a97c02015-03-08 02:59:09 +010016279# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16281$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16283/* end confdefs.h. */
16284
16285
16286 #include <dirent.h>
16287
16288 int main() {
16289 struct dirent entry;
16290 return entry.d_type == DT_UNKNOWN;
16291 }
16292
16293
16294_ACEOF
16295if ac_fn_c_try_link "$LINENO"; then :
16296 have_dirent_d_type=yes
16297else
16298 have_dirent_d_type=no
16299fi
16300rm -f core conftest.err conftest.$ac_objext \
16301 conftest$ac_exeext conftest.$ac_ext
16302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16303$as_echo "$have_dirent_d_type" >&6; }
16304
16305if test "$have_dirent_d_type" = yes; then
16306
16307$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16308
16309fi
16310
Victor Stinner9eb57c52015-03-19 22:21:49 +010016311# check if the Linux getrandom() syscall is available
16312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16313$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16315/* end confdefs.h. */
16316
16317
Victor Stinner1b80b242016-04-12 22:34:58 +020016318 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016319 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016320 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016321
16322 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016323 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016324 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016325 const int flags = GRND_NONBLOCK;
16326 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016327 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016328 return 0;
16329 }
16330
16331
16332_ACEOF
16333if ac_fn_c_try_link "$LINENO"; then :
16334 have_getrandom_syscall=yes
16335else
16336 have_getrandom_syscall=no
16337fi
16338rm -f core conftest.err conftest.$ac_objext \
16339 conftest$ac_exeext conftest.$ac_ext
16340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16341$as_echo "$have_getrandom_syscall" >&6; }
16342
16343if test "$have_getrandom_syscall" = yes; then
16344
16345$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16346
16347fi
16348
Victor Stinner3abf44e2015-09-18 15:38:37 +020016349# check if the getrandom() function is available
16350# the test was written for the Solaris function of <sys/random.h>
16351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16352$as_echo_n "checking for the getrandom() function... " >&6; }
16353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16354/* end confdefs.h. */
16355
16356
16357 #include <sys/random.h>
16358
16359 int main() {
16360 char buffer[1];
16361 const size_t buflen = sizeof(buffer);
16362 const int flags = 0;
16363 /* ignore the result, Python checks for ENOSYS at runtime */
16364 (void)getrandom(buffer, buflen, flags);
16365 return 0;
16366 }
16367
16368
16369_ACEOF
16370if ac_fn_c_try_link "$LINENO"; then :
16371 have_getrandom=yes
16372else
16373 have_getrandom=no
16374fi
16375rm -f core conftest.err conftest.$ac_objext \
16376 conftest$ac_exeext conftest.$ac_ext
16377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16378$as_echo "$have_getrandom" >&6; }
16379
16380if test "$have_getrandom" = yes; then
16381
16382$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16383
16384fi
16385
Guido van Rossum627b2d71993-12-24 10:39:16 +000016386# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016387ac_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 +000016388
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016389ac_config_files="$ac_config_files Modules/ld_so_aix"
16390
Martin v. Löwis11437992002-04-12 09:54:03 +000016391cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016392# This file is a shell script that caches the results of configure
16393# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016394# scripts and configure runs, see configure's option --config-cache.
16395# It is not useful on other systems. If it contains results you don't
16396# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016397#
Martin v. Löwis11437992002-04-12 09:54:03 +000016398# config.status only pays attention to the cache file if you give it
16399# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016400#
Skip Montanaro6dead952003-09-25 14:50:04 +000016401# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016402# loading this file, other *unset* `ac_cv_foo' will be assigned the
16403# following values.
16404
16405_ACEOF
16406
Guido van Rossumf78abae1997-01-21 22:02:36 +000016407# The following way of writing the cache mishandles newlines in values,
16408# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016410# Ultrix sh set writes to stderr and can't be redirected directly,
16411# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412(
16413 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16414 eval ac_val=\$$ac_var
16415 case $ac_val in #(
16416 *${as_nl}*)
16417 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016418 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16419$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016420 esac
16421 case $ac_var in #(
16422 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016423 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16424 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425 esac ;;
16426 esac
16427 done
16428
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16431 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016432 # `set' does not quote correctly, so add quotes: double-quote
16433 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016434 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016435 "s/'/'\\\\''/g;
16436 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016437 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 *)
16439 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016440 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016441 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442 esac |
16443 sort
16444) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016448 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016449 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16450 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016451 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16452 :end' >>confcache
16453if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16454 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016455 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016456 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16457$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016458 if test ! -f "$cache_file" || test -h "$cache_file"; then
16459 cat confcache >"$cache_file"
16460 else
16461 case $cache_file in #(
16462 */* | ?:*)
16463 mv -f confcache "$cache_file"$$ &&
16464 mv -f "$cache_file"$$ "$cache_file" ;; #(
16465 *)
16466 mv -f confcache "$cache_file" ;;
16467 esac
16468 fi
16469 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016470 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016471 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16472$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016473 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016474fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016475rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016476
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016477test "x$prefix" = xNONE && prefix=$ac_default_prefix
16478# Let make expand exec_prefix.
16479test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016480
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016481DEFS=-DHAVE_CONFIG_H
16482
Skip Montanaro6dead952003-09-25 14:50:04 +000016483ac_libobjs=
16484ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016485U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016486for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16487 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016488 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016489 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016490 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16491 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016492 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16493 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016494done
16495LIBOBJS=$ac_libobjs
16496
16497LTLIBOBJS=$ac_ltlibobjs
16498
16499
Martin v. Löwis11437992002-04-12 09:54:03 +000016500
Matthias Kloseb9621712010-04-24 17:59:49 +000016501
Victor Stinnere0be4232011-10-25 13:06:09 +020016502: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016503ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016504ac_clean_files_save=$ac_clean_files
16505ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016506{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16507$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16508as_write_fail=0
16509cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016510#! $SHELL
16511# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016512# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016513# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016514# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016515
Martin v. Löwis11437992002-04-12 09:54:03 +000016516debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016517ac_cs_recheck=false
16518ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016519
Matthias Kloseb9621712010-04-24 17:59:49 +000016520SHELL=\${CONFIG_SHELL-$SHELL}
16521export SHELL
16522_ASEOF
16523cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16524## -------------------- ##
16525## M4sh Initialization. ##
16526## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528# Be more Bourne compatible
16529DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016530if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016531 emulate sh
16532 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016533 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016534 # is contrary to our usage. Disable this feature.
16535 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016536 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016537else
Matthias Kloseb9621712010-04-24 17:59:49 +000016538 case `(set -o) 2>/dev/null` in #(
16539 *posix*) :
16540 set -o posix ;; #(
16541 *) :
16542 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016544fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016545
16546
Matthias Kloseb9621712010-04-24 17:59:49 +000016547as_nl='
16548'
16549export as_nl
16550# Printing a long string crashes Solaris 7 /usr/bin/printf.
16551as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16552as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16553as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16554# Prefer a ksh shell builtin over an external printf program on Solaris,
16555# but without wasting forks for bash or zsh.
16556if test -z "$BASH_VERSION$ZSH_VERSION" \
16557 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16558 as_echo='print -r --'
16559 as_echo_n='print -rn --'
16560elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16561 as_echo='printf %s\n'
16562 as_echo_n='printf %s'
16563else
16564 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16565 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16566 as_echo_n='/usr/ucb/echo -n'
16567 else
16568 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16569 as_echo_n_body='eval
16570 arg=$1;
16571 case $arg in #(
16572 *"$as_nl"*)
16573 expr "X$arg" : "X\\(.*\\)$as_nl";
16574 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16575 esac;
16576 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16577 '
16578 export as_echo_n_body
16579 as_echo_n='sh -c $as_echo_n_body as_echo'
16580 fi
16581 export as_echo_body
16582 as_echo='sh -c $as_echo_body as_echo'
16583fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016584
16585# The user is always right.
16586if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016587 PATH_SEPARATOR=:
16588 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16589 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16590 PATH_SEPARATOR=';'
16591 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594
16595# IFS
16596# We need space, tab and new line, in precisely that order. Quoting is
16597# there to prevent editors from complaining about space-tab.
16598# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16599# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016600IFS=" "" $as_nl"
16601
16602# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016603as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016604case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605 *[\\/]* ) as_myself=$0 ;;
16606 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016607for as_dir in $PATH
16608do
16609 IFS=$as_save_IFS
16610 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016611 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16612 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615 ;;
16616esac
16617# We did not find ourselves, most probably we were run as `sh COMMAND'
16618# in which case we are not to be found in the path.
16619if test "x$as_myself" = x; then
16620 as_myself=$0
16621fi
16622if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016623 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16624 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625fi
16626
Matthias Kloseb9621712010-04-24 17:59:49 +000016627# Unset variables that we do not need and which cause bugs (e.g. in
16628# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16629# suppresses any "Segmentation fault" message there. '((' could
16630# trigger a bug in pdksh 5.2.14.
16631for as_var in BASH_ENV ENV MAIL MAILPATH
16632do eval test x\${$as_var+set} = xset \
16633 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634done
16635PS1='$ '
16636PS2='> '
16637PS4='+ '
16638
16639# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016640LC_ALL=C
16641export LC_ALL
16642LANGUAGE=C
16643export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644
Matthias Kloseb9621712010-04-24 17:59:49 +000016645# CDPATH.
16646(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16647
16648
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016649# as_fn_error STATUS ERROR [LINENO LOG_FD]
16650# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016651# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16652# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016653# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016654as_fn_error ()
16655{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016656 as_status=$1; test $as_status -eq 0 && as_status=1
16657 if test "$4"; then
16658 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16659 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016660 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016661 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016662 as_fn_exit $as_status
16663} # as_fn_error
16664
16665
16666# as_fn_set_status STATUS
16667# -----------------------
16668# Set $? to STATUS, without forking.
16669as_fn_set_status ()
16670{
16671 return $1
16672} # as_fn_set_status
16673
16674# as_fn_exit STATUS
16675# -----------------
16676# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16677as_fn_exit ()
16678{
16679 set +e
16680 as_fn_set_status $1
16681 exit $1
16682} # as_fn_exit
16683
16684# as_fn_unset VAR
16685# ---------------
16686# Portably unset VAR.
16687as_fn_unset ()
16688{
16689 { eval $1=; unset $1;}
16690}
16691as_unset=as_fn_unset
16692# as_fn_append VAR VALUE
16693# ----------------------
16694# Append the text in VALUE to the end of the definition contained in VAR. Take
16695# advantage of any shell optimizations that allow amortized linear growth over
16696# repeated appends, instead of the typical quadratic growth present in naive
16697# implementations.
16698if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16699 eval 'as_fn_append ()
16700 {
16701 eval $1+=\$2
16702 }'
16703else
16704 as_fn_append ()
16705 {
16706 eval $1=\$$1\$2
16707 }
16708fi # as_fn_append
16709
16710# as_fn_arith ARG...
16711# ------------------
16712# Perform arithmetic evaluation on the ARGs, and store the result in the
16713# global $as_val. Take advantage of shells that can avoid forks. The arguments
16714# must be portable across $(()) and expr.
16715if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16716 eval 'as_fn_arith ()
16717 {
16718 as_val=$(( $* ))
16719 }'
16720else
16721 as_fn_arith ()
16722 {
16723 as_val=`expr "$@" || test $? -eq 1`
16724 }
16725fi # as_fn_arith
16726
16727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728if expr a : '\(a\)' >/dev/null 2>&1 &&
16729 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16730 as_expr=expr
16731else
16732 as_expr=false
16733fi
16734
16735if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16736 as_basename=basename
16737else
16738 as_basename=false
16739fi
16740
Matthias Kloseb9621712010-04-24 17:59:49 +000016741if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16742 as_dirname=dirname
16743else
16744 as_dirname=false
16745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747as_me=`$as_basename -- "$0" ||
16748$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16749 X"$0" : 'X\(//\)$' \| \
16750 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016751$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752 sed '/^.*\/\([^/][^/]*\)\/*$/{
16753 s//\1/
16754 q
16755 }
16756 /^X\/\(\/\/\)$/{
16757 s//\1/
16758 q
16759 }
16760 /^X\/\(\/\).*/{
16761 s//\1/
16762 q
16763 }
16764 s/.*/./; q'`
16765
Matthias Kloseb9621712010-04-24 17:59:49 +000016766# Avoid depending upon Character Ranges.
16767as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16768as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16769as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16770as_cr_digits='0123456789'
16771as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016772
16773ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016774case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016775-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016776 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016777 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016778 xy) ECHO_C='\c';;
16779 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16780 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016781 esac;;
16782*)
16783 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016784esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016785
Martin v. Löwis11437992002-04-12 09:54:03 +000016786rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787if test -d conf$$.dir; then
16788 rm -f conf$$.dir/conf$$.file
16789else
16790 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016791 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016793if (echo >conf$$.file) 2>/dev/null; then
16794 if ln -s conf$$.file conf$$ 2>/dev/null; then
16795 as_ln_s='ln -s'
16796 # ... but there are two gotchas:
16797 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16798 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016799 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016800 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016801 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016802 elif ln conf$$.file conf$$ 2>/dev/null; then
16803 as_ln_s=ln
16804 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016805 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016807else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016808 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016810rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16811rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016812
Matthias Kloseb9621712010-04-24 17:59:49 +000016813
16814# as_fn_mkdir_p
16815# -------------
16816# Create "$as_dir" as a directory, including parents if necessary.
16817as_fn_mkdir_p ()
16818{
16819
16820 case $as_dir in #(
16821 -*) as_dir=./$as_dir;;
16822 esac
16823 test -d "$as_dir" || eval $as_mkdir_p || {
16824 as_dirs=
16825 while :; do
16826 case $as_dir in #(
16827 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16828 *) as_qdir=$as_dir;;
16829 esac
16830 as_dirs="'$as_qdir' $as_dirs"
16831 as_dir=`$as_dirname -- "$as_dir" ||
16832$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16833 X"$as_dir" : 'X\(//\)[^/]' \| \
16834 X"$as_dir" : 'X\(//\)$' \| \
16835 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16836$as_echo X"$as_dir" |
16837 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16838 s//\1/
16839 q
16840 }
16841 /^X\(\/\/\)[^/].*/{
16842 s//\1/
16843 q
16844 }
16845 /^X\(\/\/\)$/{
16846 s//\1/
16847 q
16848 }
16849 /^X\(\/\).*/{
16850 s//\1/
16851 q
16852 }
16853 s/.*/./; q'`
16854 test -d "$as_dir" && break
16855 done
16856 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016857 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016858
16859
16860} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016861if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016862 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016863else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016864 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016865 as_mkdir_p=false
16866fi
16867
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016868
16869# as_fn_executable_p FILE
16870# -----------------------
16871# Test if FILE is an executable regular file.
16872as_fn_executable_p ()
16873{
16874 test -f "$1" && test -x "$1"
16875} # as_fn_executable_p
16876as_test_x='test -x'
16877as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016878
16879# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016880as_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 +000016881
16882# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016883as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016884
16885
Martin v. Löwis11437992002-04-12 09:54:03 +000016886exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016887## ----------------------------------- ##
16888## Main body of $CONFIG_STATUS script. ##
16889## ----------------------------------- ##
16890_ASEOF
16891test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016892
Matthias Kloseb9621712010-04-24 17:59:49 +000016893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16894# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016895# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896# values after options handling.
16897ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016898This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016899generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016900
16901 CONFIG_FILES = $CONFIG_FILES
16902 CONFIG_HEADERS = $CONFIG_HEADERS
16903 CONFIG_LINKS = $CONFIG_LINKS
16904 CONFIG_COMMANDS = $CONFIG_COMMANDS
16905 $ $0 $@
16906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907on `(hostname || uname -n) 2>/dev/null | sed 1q`
16908"
16909
Martin v. Löwis11437992002-04-12 09:54:03 +000016910_ACEOF
16911
Matthias Kloseb9621712010-04-24 17:59:49 +000016912case $ac_config_files in *"
16913"*) set x $ac_config_files; shift; ac_config_files=$*;;
16914esac
16915
16916case $ac_config_headers in *"
16917"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16918esac
16919
16920
16921cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016922# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016923config_files="$ac_config_files"
16924config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016926_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016927
Matthias Kloseb9621712010-04-24 17:59:49 +000016928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016929ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016930\`$as_me' instantiates files and other configuration actions
16931from templates according to the current configuration. Unless the files
16932and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016933
Matthias Kloseb9621712010-04-24 17:59:49 +000016934Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016935
16936 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016937 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016938 --config print configuration, then exit
16939 -q, --quiet, --silent
16940 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016941 -d, --debug don't remove temporary files
16942 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016943 --file=FILE[:TEMPLATE]
16944 instantiate the configuration file FILE
16945 --header=FILE[:TEMPLATE]
16946 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016947
16948Configuration files:
16949$config_files
16950
16951Configuration headers:
16952$config_headers
16953
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016954Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16958ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016959ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016960python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016961configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016962 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016963
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016964Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016965This config.status script is free software; the Free Software Foundation
16966gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967
16968ac_pwd='$ac_pwd'
16969srcdir='$srcdir'
16970INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016971MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016972test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016973_ACEOF
16974
Matthias Kloseb9621712010-04-24 17:59:49 +000016975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16976# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016977ac_need_defaults=:
16978while test $# != 0
16979do
16980 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016981 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16983 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016984 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016985 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016986 --*=)
16987 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16988 ac_optarg=
16989 ac_shift=:
16990 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016992 ac_option=$1
16993 ac_optarg=$2
16994 ac_shift=shift
16995 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016996 esac
16997
Skip Montanaro6dead952003-09-25 14:50:04 +000016998 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016999 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017000 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17001 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017003 $as_echo "$ac_cs_version"; exit ;;
17004 --config | --confi | --conf | --con | --co | --c )
17005 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 debug=: ;;
17008 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017009 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017010 case $ac_optarg in
17011 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017012 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017013 esac
17014 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017015 ac_need_defaults=false;;
17016 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017017 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017018 case $ac_optarg in
17019 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17020 esac
17021 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017022 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023 --he | --h)
17024 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017025 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017026Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017028 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017029 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17030 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17031 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017032
17033 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017034 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017035Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017036
Matthias Kloseb9621712010-04-24 17:59:49 +000017037 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017039
17040 esac
17041 shift
17042done
17043
Skip Montanaro6dead952003-09-25 14:50:04 +000017044ac_configure_extra_args=
17045
17046if $ac_cs_silent; then
17047 exec 6>/dev/null
17048 ac_configure_extra_args="$ac_configure_extra_args --silent"
17049fi
17050
17051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017053if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017054 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017055 shift
17056 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17057 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017059 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017060fi
17061
Martin v. Löwis11437992002-04-12 09:54:03 +000017062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017063cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064exec 5>>config.log
17065{
17066 echo
17067 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17068## Running $as_me. ##
17069_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017070 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017071} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017076
Matthias Kloseb9621712010-04-24 17:59:49 +000017077cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017078
17079# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017080for ac_config_target in $ac_config_targets
17081do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082 case $ac_config_target in
17083 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17084 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17085 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017086 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17087 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17089 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017090 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017091 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017092 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093
Victor Stinnere0be4232011-10-25 13:06:09 +020017094 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 esac
17096done
17097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098
Martin v. Löwis11437992002-04-12 09:54:03 +000017099# If the user did not use the arguments to specify the items to instantiate,
17100# then the envvar interface is used. Set only those that are not.
17101# We use the long form for the default assignment because of an extremely
17102# bizarre bug on SunOS 4.1.3.
17103if $ac_need_defaults; then
17104 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17105 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17106fi
17107
Skip Montanaro6dead952003-09-25 14:50:04 +000017108# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017110# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017111# Hook for its removal unless debugging.
17112# Note that there is a small window in which the directory will not be cleaned:
17113# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017114$debug ||
17115{
Victor Stinnere0be4232011-10-25 13:06:09 +020017116 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017117 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017118 : "${ac_tmp:=$tmp}"
17119 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017121 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017122}
Martin v. Löwis11437992002-04-12 09:54:03 +000017123# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017124
Martin v. Löwis11437992002-04-12 09:54:03 +000017125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017127 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017128} ||
17129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017130 tmp=./conf$$-$RANDOM
17131 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017132} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017133ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135# Set up the scripts for CONFIG_FILES section.
17136# No need to generate them if there are no CONFIG_FILES.
17137# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017139
Matthias Kloseb9621712010-04-24 17:59:49 +000017140
17141ac_cr=`echo X | tr X '\015'`
17142# On cygwin, bash can eat \r inside `` if the user requested igncr.
17143# But we know of no other shell where ac_cr would be empty at this
17144# point, so we can use a bashism as a fallback.
17145if test "x$ac_cr" = x; then
17146 eval ac_cr=\$\'\\r\'
17147fi
17148ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17149if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017150 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017151else
17152 ac_cs_awk_cr=$ac_cr
17153fi
17154
Victor Stinnere0be4232011-10-25 13:06:09 +020017155echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017156_ACEOF
17157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017158
Matthias Kloseb9621712010-04-24 17:59:49 +000017159{
17160 echo "cat >conf$$subs.awk <<_ACEOF" &&
17161 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17162 echo "_ACEOF"
17163} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017164 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17165ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166ac_delim='%!_!# '
17167for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017168 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017169 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170
Matthias Kloseb9621712010-04-24 17:59:49 +000017171 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17172 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173 break
17174 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017175 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176 else
17177 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017178 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017179done
Matthias Kloseb9621712010-04-24 17:59:49 +000017180rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017181
Matthias Kloseb9621712010-04-24 17:59:49 +000017182cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017183cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017185sed -n '
17186h
17187s/^/S["/; s/!.*/"]=/
17188p
17189g
17190s/^[^!]*!//
17191:repl
17192t repl
17193s/'"$ac_delim"'$//
17194t delim
17195:nl
17196h
17197s/\(.\{148\}\)..*/\1/
17198t more1
17199s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17200p
17201n
17202b repl
17203:more1
17204s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17205p
17206g
17207s/.\{148\}//
17208t nl
17209:delim
17210h
17211s/\(.\{148\}\)..*/\1/
17212t more2
17213s/["\\]/\\&/g; s/^/"/; s/$/"/
17214p
17215b
17216:more2
17217s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17218p
17219g
17220s/.\{148\}//
17221t delim
17222' <conf$$subs.awk | sed '
17223/^[^""]/{
17224 N
17225 s/\n//
17226}
17227' >>$CONFIG_STATUS || ac_write_fail=1
17228rm -f conf$$subs.awk
17229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17230_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017231cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017232 for (key in S) S_is_set[key] = 1
17233 FS = ""
17234
17235}
17236{
17237 line = $ 0
17238 nfields = split(line, field, "@")
17239 substed = 0
17240 len = length(field[1])
17241 for (i = 2; i < nfields; i++) {
17242 key = field[i]
17243 keylen = length(key)
17244 if (S_is_set[key]) {
17245 value = S[key]
17246 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17247 len += length(value) + length(field[++i])
17248 substed = 1
17249 } else
17250 len += 1 + keylen
17251 }
17252
17253 print line
17254}
17255
17256_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17259if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17260 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17261else
17262 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017263fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017264 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017265_ACEOF
17266
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017267# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17268# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017269# trailing colons and then remove the whole line if VPATH becomes empty
17270# (actually we leave an empty line to preserve line numbers).
17271if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017272 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17273h
17274s///
17275s/^/:/
17276s/[ ]*$/:/
17277s/:\$(srcdir):/:/g
17278s/:\${srcdir}:/:/g
17279s/:@srcdir@:/:/g
17280s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017282x
17283s/\(=[ ]*\).*/\1/
17284G
17285s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286s/^[^=]*=[ ]*$//
17287}'
17288fi
17289
Matthias Kloseb9621712010-04-24 17:59:49 +000017290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017291fi # test -n "$CONFIG_FILES"
17292
Matthias Kloseb9621712010-04-24 17:59:49 +000017293# Set up the scripts for CONFIG_HEADERS section.
17294# No need to generate them if there are no CONFIG_HEADERS.
17295# This happens for instance with `./config.status Makefile'.
17296if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017297cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017298BEGIN {
17299_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017300
Matthias Kloseb9621712010-04-24 17:59:49 +000017301# Transform confdefs.h into an awk script `defines.awk', embedded as
17302# here-document in config.status, that substitutes the proper values into
17303# config.h.in to produce config.h.
17304
17305# Create a delimiter string that does not exist in confdefs.h, to ease
17306# handling of long lines.
17307ac_delim='%!_!# '
17308for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017309 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17310 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017311 break
17312 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017313 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017314 else
17315 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17316 fi
17317done
17318
17319# For the awk script, D is an array of macro values keyed by name,
17320# likewise P contains macro parameters if any. Preserve backslash
17321# newline sequences.
17322
17323ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17324sed -n '
17325s/.\{148\}/&'"$ac_delim"'/g
17326t rset
17327:rset
17328s/^[ ]*#[ ]*define[ ][ ]*/ /
17329t def
17330d
17331:def
17332s/\\$//
17333t bsnl
17334s/["\\]/\\&/g
17335s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17336D["\1"]=" \3"/p
17337s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17338d
17339:bsnl
17340s/["\\]/\\&/g
17341s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17342D["\1"]=" \3\\\\\\n"\\/p
17343t cont
17344s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17345t cont
17346d
17347:cont
17348n
17349s/.\{148\}/&'"$ac_delim"'/g
17350t clear
17351:clear
17352s/\\$//
17353t bsnlc
17354s/["\\]/\\&/g; s/^/"/; s/$/"/p
17355d
17356:bsnlc
17357s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17358b cont
17359' <confdefs.h | sed '
17360s/'"$ac_delim"'/"\\\
17361"/g' >>$CONFIG_STATUS || ac_write_fail=1
17362
17363cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17364 for (key in D) D_is_set[key] = 1
17365 FS = ""
17366}
17367/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17368 line = \$ 0
17369 split(line, arg, " ")
17370 if (arg[1] == "#") {
17371 defundef = arg[2]
17372 mac1 = arg[3]
17373 } else {
17374 defundef = substr(arg[1], 2)
17375 mac1 = arg[2]
17376 }
17377 split(mac1, mac2, "(") #)
17378 macro = mac2[1]
17379 prefix = substr(line, 1, index(line, defundef) - 1)
17380 if (D_is_set[macro]) {
17381 # Preserve the white space surrounding the "#".
17382 print prefix "define", macro P[macro] D[macro]
17383 next
17384 } else {
17385 # Replace #undef with comments. This is necessary, for example,
17386 # in the case of _POSIX_SOURCE, which is predefined and required
17387 # on some systems where configure will not decide to define it.
17388 if (defundef == "undef") {
17389 print "/*", prefix defundef, macro, "*/"
17390 next
17391 }
17392 }
17393}
17394{ print }
17395_ACAWK
17396_ACEOF
17397cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017398 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017399fi # test -n "$CONFIG_HEADERS"
17400
17401
17402eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17403shift
17404for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405do
17406 case $ac_tag in
17407 :[FHLC]) ac_mode=$ac_tag; continue;;
17408 esac
17409 case $ac_mode$ac_tag in
17410 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017411 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412 :[FH]-) ac_tag=-:-;;
17413 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17414 esac
17415 ac_save_IFS=$IFS
17416 IFS=:
17417 set x $ac_tag
17418 IFS=$ac_save_IFS
17419 shift
17420 ac_file=$1
17421 shift
17422
17423 case $ac_mode in
17424 :L) ac_source=$1;;
17425 :[FH])
17426 ac_file_inputs=
17427 for ac_f
17428 do
17429 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017430 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431 *) # Look for the file first in the build tree, then in the source tree
17432 # (if the path is not absolute). The absolute path cannot be DOS-style,
17433 # because $ac_f cannot contain `:'.
17434 test -f "$ac_f" ||
17435 case $ac_f in
17436 [\\/$]*) false;;
17437 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17438 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017439 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017441 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17442 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017443 done
17444
17445 # Let's still pretend it is `configure' which instantiates (i.e., don't
17446 # use $as_me), people would be surprised to read:
17447 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017448 configure_input='Generated from '`
17449 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17450 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451 if test x"$ac_file" != x-; then
17452 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017453 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17454$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017456 # Neutralize special characters interpreted by sed in replacement strings.
17457 case $configure_input in #(
17458 *\&* | *\|* | *\\* )
17459 ac_sed_conf_input=`$as_echo "$configure_input" |
17460 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17461 *) ac_sed_conf_input=$configure_input;;
17462 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463
17464 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017465 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17466 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467 esac
17468 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 esac
17470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017472$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017473 X"$ac_file" : 'X\(//\)[^/]' \| \
17474 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017476$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17478 s//\1/
17479 q
17480 }
17481 /^X\(\/\/\)[^/].*/{
17482 s//\1/
17483 q
17484 }
17485 /^X\(\/\/\)$/{
17486 s//\1/
17487 q
17488 }
17489 /^X\(\/\).*/{
17490 s//\1/
17491 q
17492 }
17493 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017494 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017495 ac_builddir=.
17496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017497case "$ac_dir" in
17498.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17499*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017500 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017502 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503 case $ac_top_builddir_sub in
17504 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17505 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17506 esac ;;
17507esac
17508ac_abs_top_builddir=$ac_pwd
17509ac_abs_builddir=$ac_pwd$ac_dir_suffix
17510# for backward compatibility:
17511ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017512
17513case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017515 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516 ac_top_srcdir=$ac_top_builddir_sub
17517 ac_abs_top_srcdir=$ac_pwd ;;
17518 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017519 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520 ac_top_srcdir=$srcdir
17521 ac_abs_top_srcdir=$srcdir ;;
17522 *) # Relative name.
17523 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17524 ac_top_srcdir=$ac_top_build_prefix$srcdir
17525 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017526esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017528
Martin v. Löwis11437992002-04-12 09:54:03 +000017529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530 case $ac_mode in
17531 :F)
17532 #
17533 # CONFIG_FILE
17534 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017535
17536 case $INSTALL in
17537 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017539 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017540 ac_MKDIR_P=$MKDIR_P
17541 case $MKDIR_P in
17542 [\\/$]* | ?:[\\/]* ) ;;
17543 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17544 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017545_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017546
Matthias Kloseb9621712010-04-24 17:59:49 +000017547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548# If the template does not know about datarootdir, expand it.
17549# FIXME: This hack should be removed a few years after 2.60.
17550ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017551ac_sed_dataroot='
17552/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553 p
17554 q
17555}
17556/@datadir@/p
17557/@docdir@/p
17558/@infodir@/p
17559/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017560/@mandir@/p'
17561case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562*datarootdir*) ac_datarootdir_seen=yes;;
17563*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17565$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017567cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568 ac_datarootdir_hack='
17569 s&@datadir@&$datadir&g
17570 s&@docdir@&$docdir&g
17571 s&@infodir@&$infodir&g
17572 s&@localedir@&$localedir&g
17573 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017574 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575esac
17576_ACEOF
17577
17578# Neutralize VPATH when `$srcdir' = `.'.
17579# Shell code in configure.ac might set extrasub.
17580# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017581cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17582ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017583$extrasub
17584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017585cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017586:t
17587/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017588s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017590s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591s&@srcdir@&$ac_srcdir&;t t
17592s&@abs_srcdir@&$ac_abs_srcdir&;t t
17593s&@top_srcdir@&$ac_top_srcdir&;t t
17594s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17595s&@builddir@&$ac_builddir&;t t
17596s&@abs_builddir@&$ac_abs_builddir&;t t
17597s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17598s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017599s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017600$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017601"
Victor Stinnere0be4232011-10-25 13:06:09 +020017602eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17603 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017606 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17607 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17608 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017610which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017611$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017612which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017613
Victor Stinnere0be4232011-10-25 13:06:09 +020017614 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017615 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017616 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17617 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017618 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017619 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620 ;;
17621 :H)
17622 #
17623 # CONFIG_HEADER
17624 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017625 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017626 {
17627 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017628 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17629 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017630 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017631 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017632 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17633$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017635 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017636 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017637 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 fi
17639 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017640 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017641 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017642 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646
17647 esac
17648
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017649
17650 case $ac_file$ac_mode in
17651 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17652
17653 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654done # for ac_tag
17655
Guido van Rossum627b2d71993-12-24 10:39:16 +000017656
Matthias Kloseb9621712010-04-24 17:59:49 +000017657as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017658_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017659ac_clean_files=$ac_clean_files_save
17660
Matthias Kloseb9621712010-04-24 17:59:49 +000017661test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017662 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017663
Martin v. Löwis11437992002-04-12 09:54:03 +000017664
17665# configure is writing to config.log, and then calls config.status.
17666# config.status does its own redirection, appending to config.log.
17667# Unfortunately, on DOS this fails, as config.log is still kept open
17668# by configure, so config.status won't be able to write to it; its
17669# output is simply discarded. So we exec the FD to /dev/null,
17670# effectively closing config.log, so it can be properly (re)opened and
17671# appended to by config.status. When coming back to configure, we
17672# need to make the FD available again.
17673if test "$no_create" != yes; then
17674 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017675 ac_config_status_args=
17676 test "$silent" = yes &&
17677 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017678 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017679 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017680 exec 5>>config.log
17681 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17682 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017683 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017684fi
17685if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17687$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017688fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017689
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017690
Christian Heimes75ed8902013-11-20 01:11:18 +010017691echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017692if test ! -f Modules/Setup
17693then
17694 cp $srcdir/Modules/Setup.dist Modules/Setup
17695fi
17696
Christian Heimes75ed8902013-11-20 01:11:18 +010017697echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017698if test ! -f Modules/Setup.local
17699then
17700 echo "# Edit this file for local setup changes" >Modules/Setup.local
17701fi
17702
Christian Heimes75ed8902013-11-20 01:11:18 +010017703echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017704$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17705 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017706 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017707mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017708
17709if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17710 echo "" >&6
17711 echo "" >&6
17712 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17713 echo "please run ./configure --with-optimizations" >&6
17714 echo "" >&6
17715 echo "" >&6
17716fi
17717