blob: 7671ca4a596e92174a2e9103aab0275587b0ce12 [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.
Yury Selivanov7aa53412015-05-30 10:57:56 -04003# Generated by GNU Autoconf 2.69 for python 3.5.
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'
Yury Selivanov7aa53412015-05-30 10:57:56 -0400583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
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
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Brett Cannon8c94f972016-09-06 17:15:21 -0700677DEF_MAKE_RULE
678DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000679ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000680LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100681MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000682INSTALL_DATA
683INSTALL_SCRIPT
684INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200685ac_ct_READELF
686READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000687ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200688ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000689AR
690RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000691USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000692GNULD
693LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000694LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000695RUNSHARED
696INSTSONAME
697LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000698PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000699BLDLIBRARY
700DLLLIBRARY
701LDLIBRARY
702LIBRARY
703BUILDEXEEXT
704EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200705NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200706PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200707PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200708MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200709ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000710MAINCC
711CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200712GREP
713CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000714OBJEXT
715EXEEXT
716ac_ct_CC
717CPPFLAGS
718LDFLAGS
719CFLAGS
720CC
721EXPORT_MACOSX_DEPLOYMENT_TARGET
722CONFIGURE_MACOSX_DEPLOYMENT_TARGET
723SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200724_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000725MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000726FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000727FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800728FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000729FRAMEWORKALTINSTALLLAST
730FRAMEWORKALTINSTALLFIRST
731FRAMEWORKINSTALLLAST
732FRAMEWORKINSTALLFIRST
733PYTHONFRAMEWORKINSTALLDIR
734PYTHONFRAMEWORKPREFIX
735PYTHONFRAMEWORKDIR
736PYTHONFRAMEWORKIDENTIFIER
737PYTHONFRAMEWORK
738LIPO_32BIT_FLAGS
739ARCH_RUN_32BIT
740UNIVERSALSDK
741CONFIG_ARGS
742SOVERSION
743VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000744GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200745PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200746PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100747host_os
748host_vendor
749host_cpu
750host
751build_os
752build_vendor
753build_cpu
754build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500755HAS_HG
756HGBRANCH
757HGTAG
758HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400759BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000760target_alias
761host_alias
762build_alias
763LIBS
764ECHO_T
765ECHO_N
766ECHO_C
767DEFS
768mandir
769localedir
770libdir
771psdir
772pdfdir
773dvidir
774htmldir
775infodir
776docdir
777oldincludedir
778includedir
779localstatedir
780sharedstatedir
781sysconfdir
782datadir
783datarootdir
784libexecdir
785sbindir
786bindir
787program_transform_name
788prefix
789exec_prefix
790PACKAGE_URL
791PACKAGE_BUGREPORT
792PACKAGE_STRING
793PACKAGE_VERSION
794PACKAGE_TARNAME
795PACKAGE_NAME
796PATH_SEPARATOR
797SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000798ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000799ac_user_opts='
800enable_option_checking
801enable_universalsdk
802with_universal_archs
803with_framework_name
804enable_framework
805with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600806with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_cxx_main
808with_suffix
809enable_shared
810enable_profiling
811with_pydebug
Brett Cannon8c94f972016-09-06 17:15:21 -0700812with_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700813with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100814with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100815with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_libs
817with_system_expat
818with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100819with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000820enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700821with_tcltk_includes
822with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_dbmliborder
824with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_threads
826with_thread
827enable_ipv6
828with_doc_strings
829with_tsc
830with_pymalloc
831with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_fpectl
833with_libm
834with_libc
835enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800837with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000838'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 ac_precious_vars='build_alias
840host_alias
841target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100842MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843CC
844CFLAGS
845LDFLAGS
846LIBS
847CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100848CPP
849PKG_CONFIG
850PKG_CONFIG_PATH
851PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852
Guido van Rossum627b2d71993-12-24 10:39:16 +0000853
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000855ac_init_help=
856ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000857ac_unrecognized_opts=
858ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859# The variables have the same names as the options, with
860# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000861cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864no_recursion=
865prefix=NONE
866program_prefix=NONE
867program_suffix=NONE
868program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873x_includes=NONE
874x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000875
876# Installation directory options.
877# These are left unexpanded so users can "make install exec_prefix=/foo"
878# and all the variables that are supposed to be based on exec_prefix
879# by default will actually change.
880# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882bindir='${exec_prefix}/bin'
883sbindir='${exec_prefix}/sbin'
884libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885datarootdir='${prefix}/share'
886datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887sysconfdir='${prefix}/etc'
888sharedstatedir='${prefix}/com'
889localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890includedir='${prefix}/include'
891oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
893infodir='${datarootdir}/info'
894htmldir='${docdir}'
895dvidir='${docdir}'
896pdfdir='${docdir}'
897psdir='${docdir}'
898libdir='${exec_prefix}/lib'
899localedir='${datarootdir}/locale'
900mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 # If the previous option needs an argument, assign it.
907 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 ac_prev=
910 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200914 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
915 *=) ac_optarg= ;;
916 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 # Accept the important Cygnus configure options, so we can diagnose typos.
920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_dashdash$ac_option in
922 --)
923 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -bindir | --bindir | --bindi | --bind | --bin | --bi)
926 ac_prev=bindir ;;
927 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
930 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 -cache-file | --cache-file | --cache-fil | --cache-fi \
936 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
937 ac_prev=cache_file ;;
938 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
939 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 cache_file=$ac_optarg ;;
941
942 --config-cache | -C)
943 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
951 | --dataroo | --dataro | --datar)
952 ac_prev=datarootdir ;;
953 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
954 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
955 datarootdir=$ac_optarg ;;
956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200961 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt_orig=$ac_useropt
963 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
964 case $ac_user_opts in
965 *"
966"enable_$ac_useropt"
967"*) ;;
968 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
969 ac_unrecognized_sep=', ';;
970 esac
971 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972
973 -docdir | --docdir | --docdi | --doc | --do)
974 ac_prev=docdir ;;
975 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
976 docdir=$ac_optarg ;;
977
978 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
979 ac_prev=dvidir ;;
980 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
981 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1000 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1001 | --exec | --exe | --ex)
1002 ac_prev=exec_prefix ;;
1003 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1004 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1005 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 # Obsolete; use --with-gas.
1010 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 -help | --help | --hel | --he | -h)
1013 ac_init_help=long ;;
1014 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1015 ac_init_help=recursive ;;
1016 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1017 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001024 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1025 ac_prev=htmldir ;;
1026 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1027 | --ht=*)
1028 htmldir=$ac_optarg ;;
1029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -includedir | --includedir | --includedi | --included | --include \
1031 | --includ | --inclu | --incl | --inc)
1032 ac_prev=includedir ;;
1033 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1034 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -infodir | --infodir | --infodi | --infod | --info | --inf)
1038 ac_prev=infodir ;;
1039 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libdir | --libdir | --libdi | --libd)
1043 ac_prev=libdir ;;
1044 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1048 | --libexe | --libex | --libe)
1049 ac_prev=libexecdir ;;
1050 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1051 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -localedir | --localedir | --localedi | --localed | --locale)
1055 ac_prev=localedir ;;
1056 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1057 localedir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 ac_prev=localstatedir ;;
1062 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1067 ac_prev=mandir ;;
1068 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 # Obsolete; use --without-fp.
1073 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 no_create=yes ;;
1078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1080 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1081 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1084 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1085 | --oldin | --oldi | --old | --ol | --o)
1086 ac_prev=oldincludedir ;;
1087 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1088 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1089 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1093 ac_prev=prefix ;;
1094 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1098 | --program-pre | --program-pr | --program-p)
1099 ac_prev=program_prefix ;;
1100 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1101 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1105 | --program-suf | --program-su | --program-s)
1106 ac_prev=program_suffix ;;
1107 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1108 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-transform-name | --program-transform-name \
1112 | --program-transform-nam | --program-transform-na \
1113 | --program-transform-n | --program-transform- \
1114 | --program-transform | --program-transfor \
1115 | --program-transfo | --program-transf \
1116 | --program-trans | --program-tran \
1117 | --progr-tra | --program-tr | --program-t)
1118 ac_prev=program_transform_name ;;
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=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001128 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1129 ac_prev=pdfdir ;;
1130 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1131 pdfdir=$ac_optarg ;;
1132
1133 -psdir | --psdir | --psdi | --psd | --ps)
1134 ac_prev=psdir ;;
1135 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1136 psdir=$ac_optarg ;;
1137
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139 | -silent | --silent | --silen | --sile | --sil)
1140 silent=yes ;;
1141
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001142 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1143 ac_prev=sbindir ;;
1144 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1145 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147
1148 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1149 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1150 | --sharedst | --shareds | --shared | --share | --shar \
1151 | --sha | --sh)
1152 ac_prev=sharedstatedir ;;
1153 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1154 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1155 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1156 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001159 -site | --site | --sit)
1160 ac_prev=site ;;
1161 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001163
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1165 ac_prev=srcdir ;;
1166 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1170 | --syscon | --sysco | --sysc | --sys | --sy)
1171 ac_prev=sysconfdir ;;
1172 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1173 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
1181 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1182 verbose=yes ;;
1183
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 -version | --version | --versio | --versi | --vers | -V)
1185 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
1187 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001191 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 ac_useropt_orig=$ac_useropt
1193 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1194 case $ac_user_opts in
1195 *"
1196"with_$ac_useropt"
1197"*) ;;
1198 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1199 ac_unrecognized_sep=', ';;
1200 esac
1201 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
1203 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001207 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt_orig=$ac_useropt
1209 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1210 case $ac_user_opts in
1211 *"
1212"with_$ac_useropt"
1213"*) ;;
1214 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1215 ac_unrecognized_sep=', ';;
1216 esac
1217 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219 --x)
1220 # Obsolete; use --with-x.
1221 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
1223 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1224 | --x-incl | --x-inc | --x-in | --x-i)
1225 ac_prev=x_includes ;;
1226 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1227 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
1230 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1231 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1232 ac_prev=x_libraries ;;
1233 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1234 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1238Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239 ;;
1240
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 *=*)
1242 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1243 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 case $ac_envvar in #(
1245 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001247 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 export $ac_envvar ;;
1250
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001251 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001256 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 ;;
1258
1259 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001260done
1261
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265fi
1266
Matthias Kloseb9621712010-04-24 17:59:49 +00001267if test -n "$ac_unrecognized_opts"; then
1268 case $enable_option_checking in
1269 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001270 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1272 esac
1273fi
1274
1275# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1277 datadir sysconfdir sharedstatedir localstatedir includedir \
1278 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Brett Cannon8c94f972016-09-06 17:15:21 -07001279 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001282 # Remove trailing slashes.
1283 case $ac_val in
1284 */ )
1285 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1286 eval $ac_var=\$ac_val;;
1287 esac
1288 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001289 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 [\\/$]* | ?:[\\/]* ) continue;;
1291 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001292 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001293 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001294done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295
Martin v. Löwis11437992002-04-12 09:54:03 +00001296# There might be people who depend on the old broken behavior: `$host'
1297# used to hold the argument of --host etc.
1298# FIXME: To remove some day.
1299build=$build_alias
1300host=$host_alias
1301target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303# FIXME: To remove some day.
1304if test "x$host_alias" != x; then
1305 if test "x$build_alias" = x; then
1306 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001307 elif test "x$build_alias" != "x$host_alias"; then
1308 cross_compiling=yes
1309 fi
1310fi
1311
1312ac_tool_prefix=
1313test -n "$host_alias" && ac_tool_prefix=$host_alias-
1314
1315test "$silent" = yes && exec 6>/dev/null
1316
Guido van Rossum627b2d71993-12-24 10:39:16 +00001317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318ac_pwd=`pwd` && test -n "$ac_pwd" &&
1319ac_ls_di=`ls -di .` &&
1320ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001321 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001323 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326# Find the source files, if location was not specified.
1327if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001330 ac_confdir=`$as_dirname -- "$as_myself" ||
1331$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1332 X"$as_myself" : 'X\(//\)[^/]' \| \
1333 X"$as_myself" : 'X\(//\)$' \| \
1334 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1335$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1337 s//\1/
1338 q
1339 }
1340 /^X\(\/\/\)[^/].*/{
1341 s//\1/
1342 q
1343 }
1344 /^X\(\/\/\)$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\).*/{
1349 s//\1/
1350 q
1351 }
1352 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001353 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001355 srcdir=..
1356 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001357else
1358 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001360if test ! -r "$srcdir/$ac_unique_file"; then
1361 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001362 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1365ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001366 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367 pwd)`
1368# When building in place, set srcdir=.
1369if test "$ac_abs_confdir" = "$ac_pwd"; then
1370 srcdir=.
1371fi
1372# Remove unnecessary trailing slashes from srcdir.
1373# Double slashes in file names in object file debugging info
1374# mess up M-x gdb in Emacs.
1375case $srcdir in
1376*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1377esac
1378for ac_var in $ac_precious_vars; do
1379 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1380 eval ac_env_${ac_var}_value=\$${ac_var}
1381 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1382 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1383done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001384
Martin v. Löwis11437992002-04-12 09:54:03 +00001385#
1386# Report the --help message.
1387#
1388if test "$ac_init_help" = "long"; then
1389 # Omit some internal or obsolete options to make the list less imposing.
1390 # This message is too long to be a string in the A/UX 3.1 sh.
1391 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001392\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001393
1394Usage: $0 [OPTION]... [VAR=VALUE]...
1395
1396To assign environment variables (e.g., CC, CFLAGS...), specify them as
1397VAR=VALUE. See below for descriptions of some of the useful variables.
1398
1399Defaults for the options are specified in brackets.
1400
1401Configuration:
1402 -h, --help display this help and exit
1403 --help=short display options specific to this package
1404 --help=recursive display the short help of all the included packages
1405 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001406 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001407 --cache-file=FILE cache test results in FILE [disabled]
1408 -C, --config-cache alias for \`--cache-file=config.cache'
1409 -n, --no-create do not create output files
1410 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1411
Martin v. Löwis11437992002-04-12 09:54:03 +00001412Installation directories:
1413 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001414 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001416 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001417
1418By default, \`make install' will install all the files in
1419\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1420an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1421for instance \`--prefix=\$HOME'.
1422
1423For better control, use the options below.
1424
1425Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 --bindir=DIR user executables [EPREFIX/bin]
1427 --sbindir=DIR system admin executables [EPREFIX/sbin]
1428 --libexecdir=DIR program executables [EPREFIX/libexec]
1429 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1430 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1431 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1432 --libdir=DIR object code libraries [EPREFIX/lib]
1433 --includedir=DIR C header files [PREFIX/include]
1434 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1435 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1436 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1437 --infodir=DIR info documentation [DATAROOTDIR/info]
1438 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1439 --mandir=DIR man documentation [DATAROOTDIR/man]
1440 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1441 --htmldir=DIR html documentation [DOCDIR]
1442 --dvidir=DIR dvi documentation [DOCDIR]
1443 --pdfdir=DIR pdf documentation [DOCDIR]
1444 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001445_ACEOF
1446
1447 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001448
1449System types:
1450 --build=BUILD configure for building on BUILD [guessed]
1451 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453fi
1454
1455if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001456 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001457 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001458 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001459 cat <<\_ACEOF
1460
1461Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001462 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001463 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1464 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001465 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001466 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --enable-framework[=INSTALLDIR]
1468 Build (MacOSX|Darwin) framework
1469 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001470 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001471 --enable-loadable-sqlite-extensions
1472 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --enable-ipv6 Enable ipv6 (with ipv4) support
1474 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001475 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001477
1478Optional Packages:
1479 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1480 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001481 --with-universal-archs=ARCH
1482 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001483 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001484 --with-framework-name=FRAMEWORK
1485 specify an alternate name of the framework built
1486 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001488 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001489 --with-cxx-main=<compiler>
1490 compile main() and link python executable with C++
1491 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-suffix=.exe set executable suffix
1493 --with-pydebug build with Py_DEBUG defined
Brett Cannon8c94f972016-09-06 17:15:21 -07001494 --with-optimizations Enable all optimizations when available (LTO, PGO,
1495 etc). Disabled by default.
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001496 --with-lto Enable Link Time Optimization in PGO builds.
1497 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001498 --with-hash-algorithm=[fnv|siphash24]
1499 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001500 --with-address-sanitizer
1501 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001503 --with-system-expat build pyexpat module using an installed expat
1504 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001505 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001506 --with-system-libmpdec build _decimal module using an installed libmpdec
1507 library
Ned Deilyd819b932013-09-06 01:07:05 -07001508 --with-tcltk-includes='-I...'
1509 override search for Tcl and Tk include files
1510 --with-tcltk-libs='-L...'
1511 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001512 --with-dbmliborder=db1:db2:...
1513 order to check db backends for dbm. Valid value is a
1514 colon separated string with the backend names
1515 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with(out)-threads[=DIRECTORY]
1518 disable/enable thread support
1519 --with(out)-thread[=DIRECTORY]
1520 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001522 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001523 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001524 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with-fpectl enable SIGFPE catching
1526 --with-libm=STRING math library
1527 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001528 --with(out)-computed-gotos
1529 Use computed gotos in evaluation loop (enabled by
1530 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001531 --with(out)-ensurepip=[=upgrade]
1532 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001533
1534Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001535 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 CC C compiler command
1537 CFLAGS C compiler flags
1538 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1539 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001541 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001544 PKG_CONFIG path to pkg-config utility
1545 PKG_CONFIG_PATH
1546 directories to add to pkg-config's search path
1547 PKG_CONFIG_LIBDIR
1548 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001549
1550Use these variables to override the choices made by `configure' or to help
1551it to find libraries and programs with nonstandard names/locations.
1552
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001553Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001554_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001556fi
1557
1558if test "$ac_init_help" = "recursive"; then
1559 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 test -d "$ac_dir" ||
1562 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1563 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001564 ac_builddir=.
1565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566case "$ac_dir" in
1567.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1568*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001571 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572 case $ac_top_builddir_sub in
1573 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1574 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1575 esac ;;
1576esac
1577ac_abs_top_builddir=$ac_pwd
1578ac_abs_builddir=$ac_pwd$ac_dir_suffix
1579# for backward compatibility:
1580ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001581
1582case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 ac_top_srcdir=$ac_top_builddir_sub
1586 ac_abs_top_srcdir=$ac_pwd ;;
1587 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 ac_top_srcdir=$srcdir
1590 ac_abs_top_srcdir=$srcdir ;;
1591 *) # Relative name.
1592 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1593 ac_top_srcdir=$ac_top_build_prefix$srcdir
1594 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001595esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 cd "$ac_dir" || { ac_status=$?; continue; }
1599 # Check for guested configure.
1600 if test -f "$ac_srcdir/configure.gnu"; then
1601 echo &&
1602 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1603 elif test -f "$ac_srcdir/configure"; then
1604 echo &&
1605 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001607 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 fi || ac_status=$?
1609 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 done
1611fi
1612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001614if $ac_init_version; then
1615 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001616python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001617generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001618
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001619Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001620This configure script is free software; the Free Software Foundation
1621gives unlimited permission to copy, distribute and modify it.
1622_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001625
1626## ------------------------ ##
1627## Autoconf initialization. ##
1628## ------------------------ ##
1629
1630# ac_fn_c_try_compile LINENO
1631# --------------------------
1632# Try to compile conftest.$ac_ext, and return whether this succeeded.
1633ac_fn_c_try_compile ()
1634{
1635 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1636 rm -f conftest.$ac_objext
1637 if { { ac_try="$ac_compile"
1638case "(($ac_try" in
1639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1640 *) ac_try_echo=$ac_try;;
1641esac
1642eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1643$as_echo "$ac_try_echo"; } >&5
1644 (eval "$ac_compile") 2>conftest.err
1645 ac_status=$?
1646 if test -s conftest.err; then
1647 grep -v '^ *+' conftest.err >conftest.er1
1648 cat conftest.er1 >&5
1649 mv -f conftest.er1 conftest.err
1650 fi
1651 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1652 test $ac_status = 0; } && {
1653 test -z "$ac_c_werror_flag" ||
1654 test ! -s conftest.err
1655 } && test -s conftest.$ac_objext; then :
1656 ac_retval=0
1657else
1658 $as_echo "$as_me: failed program was:" >&5
1659sed 's/^/| /' conftest.$ac_ext >&5
1660
1661 ac_retval=1
1662fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001663 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001664 as_fn_set_status $ac_retval
1665
1666} # ac_fn_c_try_compile
1667
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001668# ac_fn_c_try_cpp LINENO
1669# ----------------------
1670# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1671ac_fn_c_try_cpp ()
1672{
1673 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1674 if { { ac_try="$ac_cpp conftest.$ac_ext"
1675case "(($ac_try" in
1676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1677 *) ac_try_echo=$ac_try;;
1678esac
1679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1680$as_echo "$ac_try_echo"; } >&5
1681 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1682 ac_status=$?
1683 if test -s conftest.err; then
1684 grep -v '^ *+' conftest.err >conftest.er1
1685 cat conftest.er1 >&5
1686 mv -f conftest.er1 conftest.err
1687 fi
1688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1689 test $ac_status = 0; } > conftest.i && {
1690 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1691 test ! -s conftest.err
1692 }; then :
1693 ac_retval=0
1694else
1695 $as_echo "$as_me: failed program was:" >&5
1696sed 's/^/| /' conftest.$ac_ext >&5
1697
1698 ac_retval=1
1699fi
1700 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1701 as_fn_set_status $ac_retval
1702
1703} # ac_fn_c_try_cpp
1704
Matthias Kloseb9621712010-04-24 17:59:49 +00001705# ac_fn_c_try_link LINENO
1706# -----------------------
1707# Try to link conftest.$ac_ext, and return whether this succeeded.
1708ac_fn_c_try_link ()
1709{
1710 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1711 rm -f conftest.$ac_objext conftest$ac_exeext
1712 if { { ac_try="$ac_link"
1713case "(($ac_try" in
1714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1715 *) ac_try_echo=$ac_try;;
1716esac
1717eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1718$as_echo "$ac_try_echo"; } >&5
1719 (eval "$ac_link") 2>conftest.err
1720 ac_status=$?
1721 if test -s conftest.err; then
1722 grep -v '^ *+' conftest.err >conftest.er1
1723 cat conftest.er1 >&5
1724 mv -f conftest.er1 conftest.err
1725 fi
1726 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1727 test $ac_status = 0; } && {
1728 test -z "$ac_c_werror_flag" ||
1729 test ! -s conftest.err
1730 } && test -s conftest$ac_exeext && {
1731 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001732 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001733 }; then :
1734 ac_retval=0
1735else
1736 $as_echo "$as_me: failed program was:" >&5
1737sed 's/^/| /' conftest.$ac_ext >&5
1738
1739 ac_retval=1
1740fi
1741 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1742 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1743 # interfere with the next link command; also delete a directory that is
1744 # left behind by Apple's compiler. We do this before executing the actions.
1745 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001746 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 as_fn_set_status $ac_retval
1748
1749} # ac_fn_c_try_link
1750
Matthias Kloseb9621712010-04-24 17:59:49 +00001751# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1752# -------------------------------------------------------
1753# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1754# the include files in INCLUDES and setting the cache variable VAR
1755# accordingly.
1756ac_fn_c_check_header_mongrel ()
1757{
1758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001759 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1761$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001762if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001763 $as_echo_n "(cached) " >&6
1764fi
1765eval ac_res=\$$3
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1767$as_echo "$ac_res" >&6; }
1768else
1769 # Is the header compilable?
1770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1771$as_echo_n "checking $2 usability... " >&6; }
1772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1773/* end confdefs.h. */
1774$4
1775#include <$2>
1776_ACEOF
1777if ac_fn_c_try_compile "$LINENO"; then :
1778 ac_header_compiler=yes
1779else
1780 ac_header_compiler=no
1781fi
1782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1784$as_echo "$ac_header_compiler" >&6; }
1785
1786# Is the header present?
1787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1788$as_echo_n "checking $2 presence... " >&6; }
1789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1790/* end confdefs.h. */
1791#include <$2>
1792_ACEOF
1793if ac_fn_c_try_cpp "$LINENO"; then :
1794 ac_header_preproc=yes
1795else
1796 ac_header_preproc=no
1797fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001798rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1800$as_echo "$ac_header_preproc" >&6; }
1801
1802# So? What about this header?
1803case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1804 yes:no: )
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1806$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1808$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1809 ;;
1810 no:yes:* )
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1812$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1814$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1816$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1818$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1820$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001821( $as_echo "## --------------------------------------- ##
1822## Report this to https://bugs.python.org/ ##
1823## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001824 ) | sed "s/^/$as_me: WARNING: /" >&2
1825 ;;
1826esac
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1828$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001829if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001830 $as_echo_n "(cached) " >&6
1831else
1832 eval "$3=\$ac_header_compiler"
1833fi
1834eval ac_res=\$$3
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1836$as_echo "$ac_res" >&6; }
1837fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001839
1840} # ac_fn_c_check_header_mongrel
1841
1842# ac_fn_c_try_run LINENO
1843# ----------------------
1844# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1845# that executables *can* be run.
1846ac_fn_c_try_run ()
1847{
1848 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849 if { { ac_try="$ac_link"
1850case "(($ac_try" in
1851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1852 *) ac_try_echo=$ac_try;;
1853esac
1854eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1855$as_echo "$ac_try_echo"; } >&5
1856 (eval "$ac_link") 2>&5
1857 ac_status=$?
1858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1859 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1860 { { case "(($ac_try" in
1861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1862 *) ac_try_echo=$ac_try;;
1863esac
1864eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1865$as_echo "$ac_try_echo"; } >&5
1866 (eval "$ac_try") 2>&5
1867 ac_status=$?
1868 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1869 test $ac_status = 0; }; }; then :
1870 ac_retval=0
1871else
1872 $as_echo "$as_me: program exited with status $ac_status" >&5
1873 $as_echo "$as_me: failed program was:" >&5
1874sed 's/^/| /' conftest.$ac_ext >&5
1875
1876 ac_retval=$ac_status
1877fi
1878 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001879 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001880 as_fn_set_status $ac_retval
1881
1882} # ac_fn_c_try_run
1883
1884# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1885# -------------------------------------------------------
1886# Tests whether HEADER exists and can be compiled using the include files in
1887# INCLUDES, setting the cache variable VAR accordingly.
1888ac_fn_c_check_header_compile ()
1889{
1890 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1892$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001893if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001894 $as_echo_n "(cached) " >&6
1895else
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h. */
1898$4
1899#include <$2>
1900_ACEOF
1901if ac_fn_c_try_compile "$LINENO"; then :
1902 eval "$3=yes"
1903else
1904 eval "$3=no"
1905fi
1906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907fi
1908eval ac_res=\$$3
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1910$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001912
1913} # ac_fn_c_check_header_compile
1914
Matthias Kloseb9621712010-04-24 17:59:49 +00001915# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1916# -------------------------------------------
1917# Tests whether TYPE exists after having included INCLUDES, setting cache
1918# variable VAR accordingly.
1919ac_fn_c_check_type ()
1920{
1921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1923$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001925 $as_echo_n "(cached) " >&6
1926else
1927 eval "$3=no"
1928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929/* end confdefs.h. */
1930$4
1931int
1932main ()
1933{
1934if (sizeof ($2))
1935 return 0;
1936 ;
1937 return 0;
1938}
1939_ACEOF
1940if ac_fn_c_try_compile "$LINENO"; then :
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944int
1945main ()
1946{
1947if (sizeof (($2)))
1948 return 0;
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954
1955else
1956 eval "$3=yes"
1957fi
1958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1959fi
1960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1961fi
1962eval ac_res=\$$3
1963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1964$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001965 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001966
1967} # ac_fn_c_check_type
1968
1969# ac_fn_c_find_uintX_t LINENO BITS VAR
1970# ------------------------------------
1971# Finds an unsigned integer type with width BITS, setting cache variable VAR
1972# accordingly.
1973ac_fn_c_find_uintX_t ()
1974{
1975 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1977$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001979 $as_echo_n "(cached) " >&6
1980else
1981 eval "$3=no"
1982 # Order is important - never check a type that is potentially smaller
1983 # than half of the expected target width.
1984 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1985 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$ac_includes_default
1989int
1990main ()
1991{
1992static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 case $ac_type in #(
2002 uint$2_t) :
2003 eval "$3=yes" ;; #(
2004 *) :
2005 eval "$3=\$ac_type" ;;
2006esac
2007fi
2008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002009 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002010
2011else
2012 break
2013fi
2014 done
2015fi
2016eval ac_res=\$$3
2017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2018$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002019 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021} # ac_fn_c_find_uintX_t
2022
2023# ac_fn_c_find_intX_t LINENO BITS VAR
2024# -----------------------------------
2025# Finds a signed integer type with width BITS, setting cache variable VAR
2026# accordingly.
2027ac_fn_c_find_intX_t ()
2028{
2029 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2031$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002032if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002033 $as_echo_n "(cached) " >&6
2034else
2035 eval "$3=no"
2036 # Order is important - never check a type that is potentially smaller
2037 # than half of the expected target width.
2038 for ac_type in int$2_t 'int' 'long int' \
2039 'long long int' 'short int' 'signed char'; do
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002043 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002044int
2045main ()
2046{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002047static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002059 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002060int
2061main ()
2062{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002063static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002064 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073
2074else
2075 case $ac_type in #(
2076 int$2_t) :
2077 eval "$3=yes" ;; #(
2078 *) :
2079 eval "$3=\$ac_type" ;;
2080esac
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002085 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002086
2087else
2088 break
2089fi
2090 done
2091fi
2092eval ac_res=\$$3
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2094$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002095 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097} # ac_fn_c_find_intX_t
2098
2099# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2100# --------------------------------------------
2101# Tries to find the compile-time value of EXPR in a program that includes
2102# INCLUDES, setting VAR accordingly. Returns whether the value could be
2103# computed
2104ac_fn_c_compute_int ()
2105{
2106 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107 if test "$cross_compiling" = yes; then
2108 # Depending upon the size, compute the lo and hi bounds.
2109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112int
2113main ()
2114{
2115static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002116test_array [0] = 0;
2117return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002118
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123if ac_fn_c_try_compile "$LINENO"; then :
2124 ac_lo=0 ac_mid=0
2125 while :; do
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129int
2130main ()
2131{
2132static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002133test_array [0] = 0;
2134return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002135
2136 ;
2137 return 0;
2138}
2139_ACEOF
2140if ac_fn_c_try_compile "$LINENO"; then :
2141 ac_hi=$ac_mid; break
2142else
2143 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2144 if test $ac_lo -le $ac_mid; then
2145 ac_lo= ac_hi=
2146 break
2147 fi
2148 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151 done
2152else
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154/* end confdefs.h. */
2155$4
2156int
2157main ()
2158{
2159static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002160test_array [0] = 0;
2161return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_hi=-1 ac_mid=-1
2169 while :; do
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172$4
2173int
2174main ()
2175{
2176static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002177test_array [0] = 0;
2178return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184if ac_fn_c_try_compile "$LINENO"; then :
2185 ac_lo=$ac_mid; break
2186else
2187 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2188 if test $ac_mid -le $ac_hi; then
2189 ac_lo= ac_hi=
2190 break
2191 fi
2192 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2193fi
2194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2195 done
2196else
2197 ac_lo= ac_hi=
2198fi
2199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200fi
2201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202# Binary search between lo and hi bounds.
2203while test "x$ac_lo" != "x$ac_hi"; do
2204 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2206/* end confdefs.h. */
2207$4
2208int
2209main ()
2210{
2211static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002212test_array [0] = 0;
2213return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002214
2215 ;
2216 return 0;
2217}
2218_ACEOF
2219if ac_fn_c_try_compile "$LINENO"; then :
2220 ac_hi=$ac_mid
2221else
2222 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2223fi
2224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2225done
2226case $ac_lo in #((
2227?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2228'') ac_retval=1 ;;
2229esac
2230 else
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h. */
2233$4
2234static long int longval () { return $2; }
2235static unsigned long int ulongval () { return $2; }
2236#include <stdio.h>
2237#include <stdlib.h>
2238int
2239main ()
2240{
2241
2242 FILE *f = fopen ("conftest.val", "w");
2243 if (! f)
2244 return 1;
2245 if (($2) < 0)
2246 {
2247 long int i = longval ();
2248 if (i != ($2))
2249 return 1;
2250 fprintf (f, "%ld", i);
2251 }
2252 else
2253 {
2254 unsigned long int i = ulongval ();
2255 if (i != ($2))
2256 return 1;
2257 fprintf (f, "%lu", i);
2258 }
2259 /* Do not output a trailing newline, as this causes \r\n confusion
2260 on some platforms. */
2261 return ferror (f) || fclose (f) != 0;
2262
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_run "$LINENO"; then :
2268 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2269else
2270 ac_retval=1
2271fi
2272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2273 conftest.$ac_objext conftest.beam conftest.$ac_ext
2274rm -f conftest.val
2275
2276 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002277 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002278 as_fn_set_status $ac_retval
2279
2280} # ac_fn_c_compute_int
2281
2282# ac_fn_c_check_func LINENO FUNC VAR
2283# ----------------------------------
2284# Tests whether FUNC exists, setting the cache variable VAR accordingly
2285ac_fn_c_check_func ()
2286{
2287 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2289$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002290if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002291 $as_echo_n "(cached) " >&6
2292else
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h. */
2295/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2296 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2297#define $2 innocuous_$2
2298
2299/* System header to define __stub macros and hopefully few prototypes,
2300 which can conflict with char $2 (); below.
2301 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2302 <limits.h> exists even on freestanding compilers. */
2303
2304#ifdef __STDC__
2305# include <limits.h>
2306#else
2307# include <assert.h>
2308#endif
2309
2310#undef $2
2311
2312/* Override any GCC internal prototype to avoid an error.
2313 Use char because int might match the return type of a GCC
2314 builtin and then its argument prototype would still apply. */
2315#ifdef __cplusplus
2316extern "C"
2317#endif
2318char $2 ();
2319/* The GNU C library defines this for functions which it implements
2320 to always fail with ENOSYS. Some functions are actually named
2321 something starting with __ and the normal name is an alias. */
2322#if defined __stub_$2 || defined __stub___$2
2323choke me
2324#endif
2325
2326int
2327main ()
2328{
2329return $2 ();
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_link "$LINENO"; then :
2335 eval "$3=yes"
2336else
2337 eval "$3=no"
2338fi
2339rm -f core conftest.err conftest.$ac_objext \
2340 conftest$ac_exeext conftest.$ac_ext
2341fi
2342eval ac_res=\$$3
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002346
2347} # ac_fn_c_check_func
2348
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002349# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2350# ---------------------------------------------
2351# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2352# accordingly.
2353ac_fn_c_check_decl ()
2354{
2355 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356 as_decl_name=`echo $2|sed 's/ *(.*//'`
2357 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2359$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2360if eval \${$3+:} false; then :
2361 $as_echo_n "(cached) " >&6
2362else
2363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h. */
2365$4
2366int
2367main ()
2368{
2369#ifndef $as_decl_name
2370#ifdef __cplusplus
2371 (void) $as_decl_use;
2372#else
2373 (void) $as_decl_name;
2374#endif
2375#endif
2376
2377 ;
2378 return 0;
2379}
2380_ACEOF
2381if ac_fn_c_try_compile "$LINENO"; then :
2382 eval "$3=yes"
2383else
2384 eval "$3=no"
2385fi
2386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387fi
2388eval ac_res=\$$3
2389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2390$as_echo "$ac_res" >&6; }
2391 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2392
2393} # ac_fn_c_check_decl
2394
Matthias Kloseb9621712010-04-24 17:59:49 +00002395# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2396# ----------------------------------------------------
2397# Tries to find if the field MEMBER exists in type AGGR, after including
2398# INCLUDES, setting cache variable VAR accordingly.
2399ac_fn_c_check_member ()
2400{
2401 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2403$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002404if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 $as_echo_n "(cached) " >&6
2406else
2407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408/* end confdefs.h. */
2409$5
2410int
2411main ()
2412{
2413static $2 ac_aggr;
2414if (ac_aggr.$3)
2415return 0;
2416 ;
2417 return 0;
2418}
2419_ACEOF
2420if ac_fn_c_try_compile "$LINENO"; then :
2421 eval "$4=yes"
2422else
2423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2424/* end confdefs.h. */
2425$5
2426int
2427main ()
2428{
2429static $2 ac_aggr;
2430if (sizeof ac_aggr.$3)
2431return 0;
2432 ;
2433 return 0;
2434}
2435_ACEOF
2436if ac_fn_c_try_compile "$LINENO"; then :
2437 eval "$4=yes"
2438else
2439 eval "$4=no"
2440fi
2441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2442fi
2443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2444fi
2445eval ac_res=\$$4
2446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2447$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002448 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002449
2450} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002452This file contains any messages produced by compilers while
2453running configure, to aid debugging if configure makes a mistake.
2454
Yury Selivanov7aa53412015-05-30 10:57:56 -04002455It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002456generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002457
2458 $ $0 $@
2459
2460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002462{
2463cat <<_ASUNAME
2464## --------- ##
2465## Platform. ##
2466## --------- ##
2467
2468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2469uname -m = `(uname -m) 2>/dev/null || echo unknown`
2470uname -r = `(uname -r) 2>/dev/null || echo unknown`
2471uname -s = `(uname -s) 2>/dev/null || echo unknown`
2472uname -v = `(uname -v) 2>/dev/null || echo unknown`
2473
2474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2476
2477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2484
2485_ASUNAME
2486
2487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2488for as_dir in $PATH
2489do
2490 IFS=$as_save_IFS
2491 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002492 $as_echo "PATH: $as_dir"
2493 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002495
2496} >&5
2497
2498cat >&5 <<_ACEOF
2499
2500
2501## ----------- ##
2502## Core tests. ##
2503## ----------- ##
2504
2505_ACEOF
2506
2507
2508# Keep a trace of the command line.
2509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002514ac_configure_args0=
2515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002516ac_must_keep_next=false
2517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002518do
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 for ac_arg
2520 do
2521 case $ac_arg in
2522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2524 | -silent | --silent | --silen | --sile | --sil)
2525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 esac
2529 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002536 case $ac_arg in
2537 *=* | --config-cache | -C | -disable-* | --disable-* \
2538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2540 | -with-* | --with-* | -without-* | --without-* | --x)
2541 case "$ac_configure_args0 " in
2542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2543 esac
2544 ;;
2545 -* ) ac_must_keep_next=true ;;
2546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002547 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002549 ;;
2550 esac
2551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002552done
Matthias Kloseb9621712010-04-24 17:59:49 +00002553{ ac_configure_args0=; unset ac_configure_args0;}
2554{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002555
2556# When interrupted or exit'd, cleanup temporary files, and complete
2557# config.log. We remove comments because anyway the quotes in there
2558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559# WARNING: Use '\'' to represent an apostrophe within the trap.
2560# 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 +00002561trap 'exit_status=$?
2562 # Save into config.log some information that might help in debugging.
2563 {
2564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002565
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002566 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002567## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 echo
2570 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571(
2572 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2573 eval ac_val=\$$ac_var
2574 case $ac_val in #(
2575 *${as_nl}*)
2576 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2578$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 esac
2580 case $ac_var in #(
2581 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2583 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584 esac ;;
2585 esac
2586 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2589 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 "s/'\''/'\''\\\\'\'''\''/g;
2592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2593 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002594 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002596 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 esac |
2598 sort
2599)
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002601
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002602 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002603## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002604## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002605 echo
2606 for ac_var in $ac_subst_vars
2607 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 eval ac_val=\$$ac_var
2609 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002610 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002613 done | sort
2614 echo
2615
2616 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002617 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002619## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002620 echo
2621 for ac_var in $ac_subst_files
2622 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 eval ac_val=\$$ac_var
2624 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002628 done | sort
2629 echo
2630 fi
2631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002633 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002634## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002635## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 echo
2639 fi
2640 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 $as_echo "$as_me: caught signal $ac_signal"
2642 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644 rm -f core *.core core.conftest.* &&
2645 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002648for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002650done
2651ac_signal=0
2652
2653# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002655
Matthias Kloseb9621712010-04-24 17:59:49 +00002656$as_echo "/* confdefs.h */" > confdefs.h
2657
Martin v. Löwis11437992002-04-12 09:54:03 +00002658# Predefined preprocessor variables.
2659
2660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_NAME "$PACKAGE_NAME"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_VERSION "$PACKAGE_VERSION"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_STRING "$PACKAGE_STRING"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2678_ACEOF
2679
Matthias Kloseb9621712010-04-24 17:59:49 +00002680cat >>confdefs.h <<_ACEOF
2681#define PACKAGE_URL "$PACKAGE_URL"
2682_ACEOF
2683
Martin v. Löwis11437992002-04-12 09:54:03 +00002684
2685# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002686# Prefer an explicitly selected file to automatically selected ones.
2687ac_site_file1=NONE
2688ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002690 # We do not want a PATH search for config.site.
2691 case $CONFIG_SITE in #((
2692 -*) ac_site_file1=./$CONFIG_SITE;;
2693 */*) ac_site_file1=$CONFIG_SITE;;
2694 *) ac_site_file1=./$CONFIG_SITE;;
2695 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 ac_site_file1=$prefix/share/config.site
2698 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699else
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 ac_site_file1=$ac_default_prefix/share/config.site
2701 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002703for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704do
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 test "x$ac_site_file" = xNONE && continue
2706 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2708$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002710 . "$ac_site_file" \
2711 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2713as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002714See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002715 fi
2716done
2717
2718if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002719 # Some versions of bash will fail to source /dev/null (special files
2720 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2721 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2723$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2726 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 esac
2728 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002729else
Matthias Kloseb9621712010-04-24 17:59:49 +00002730 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2731$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 >$cache_file
2733fi
2734
2735# Check that the precious variables saved in the cache have kept the same
2736# value.
2737ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2740 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002741 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2742 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 case $ac_old_set,$ac_new_set in
2744 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2746$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 +00002747 ac_cache_corrupted=: ;;
2748 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2750$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 ac_cache_corrupted=: ;;
2752 ,);;
2753 *)
2754 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002755 # differences in whitespace do not lead to failure.
2756 ac_old_val_w=`echo x $ac_old_val`
2757 ac_new_val_w=`echo x $ac_new_val`
2758 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2760$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2761 ac_cache_corrupted=:
2762 else
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2764$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2765 eval $ac_var=\$ac_old_val
2766 fi
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2768$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2770$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 fi;;
2772 esac
2773 # Pass precious variables to config.status.
2774 if test "$ac_new_set" = set; then
2775 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002776 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 *) ac_arg=$ac_var=$ac_new_val ;;
2778 esac
2779 case " $ac_configure_args " in
2780 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002781 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 esac
2783 fi
2784done
2785if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002786 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2789$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002790 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002792## -------------------- ##
2793## Main body of script. ##
2794## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002795
Guido van Rossum7f43da71994-08-01 12:15:30 +00002796ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2800ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801
Guido van Rossum627b2d71993-12-24 10:39:16 +00002802
Michael W. Hudson54241132001-12-07 15:38:26 +00002803
Trent Nelson4d4ec652012-10-16 08:51:24 -04002804
Trent Nelson5595ab52012-10-17 04:47:31 -04002805if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002806 # If we're building out-of-tree, we need to make sure the following
2807 # resources get picked up before their $srcdir counterparts.
2808 # Objects/ -> typeslots.inc
2809 # Include/ -> Python-ast.h, graminit.h
2810 # Python/ -> importlib.h
2811 # (A side effect of this is that these resources will automatically be
2812 # regenerated when building out-of-tree, regardless of whether or not
2813 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2814 # off.)
2815 BASECPPFLAGS="-IObjects -IInclude -IPython"
2816else
2817 BASECPPFLAGS=""
2818fi
2819
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002820
2821
2822
2823
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002824if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002825then
2826# Extract the first word of "hg", so it can be a program name with args.
2827set dummy hg; ac_word=$2
2828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2829$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002830if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002831 $as_echo_n "(cached) " >&6
2832else
2833 if test -n "$HAS_HG"; then
2834 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2835else
2836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2837for as_dir in $PATH
2838do
2839 IFS=$as_save_IFS
2840 test -z "$as_dir" && as_dir=.
2841 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002843 ac_cv_prog_HAS_HG="found"
2844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2845 break 2
2846 fi
2847done
2848 done
2849IFS=$as_save_IFS
2850
2851 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2852fi
2853fi
2854HAS_HG=$ac_cv_prog_HAS_HG
2855if test -n "$HAS_HG"; then
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2857$as_echo "$HAS_HG" >&6; }
2858else
2859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2860$as_echo "no" >&6; }
2861fi
2862
2863
2864else
2865HAS_HG=no-repository
2866fi
2867if test $HAS_HG = found
2868then
2869 HGVERSION="hg id -i \$(srcdir)"
2870 HGTAG="hg id -t \$(srcdir)"
2871 HGBRANCH="hg id -b \$(srcdir)"
2872else
2873 HGVERSION=""
2874 HGTAG=""
2875 HGBRANCH=""
2876fi
2877
2878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002879ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002880
2881
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002882ac_aux_dir=
2883for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2884 if test -f "$ac_dir/install-sh"; then
2885 ac_aux_dir=$ac_dir
2886 ac_install_sh="$ac_aux_dir/install-sh -c"
2887 break
2888 elif test -f "$ac_dir/install.sh"; then
2889 ac_aux_dir=$ac_dir
2890 ac_install_sh="$ac_aux_dir/install.sh -c"
2891 break
2892 elif test -f "$ac_dir/shtool"; then
2893 ac_aux_dir=$ac_dir
2894 ac_install_sh="$ac_aux_dir/shtool install -c"
2895 break
2896 fi
2897done
2898if test -z "$ac_aux_dir"; then
2899 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2900fi
2901
2902# These three variables are undocumented and unsupported,
2903# and are intended to be withdrawn in a future Autoconf release.
2904# They can cause serious problems if a builder's source tree is in a directory
2905# whose full name contains unusual characters.
2906ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2907ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2908ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2909
2910
2911# Make sure we can run config.sub.
2912$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2913 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2914
2915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2916$as_echo_n "checking build system type... " >&6; }
2917if ${ac_cv_build+:} false; then :
2918 $as_echo_n "(cached) " >&6
2919else
2920 ac_build_alias=$build_alias
2921test "x$ac_build_alias" = x &&
2922 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2923test "x$ac_build_alias" = x &&
2924 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2925ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2926 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2927
2928fi
2929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2930$as_echo "$ac_cv_build" >&6; }
2931case $ac_cv_build in
2932*-*-*) ;;
2933*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2934esac
2935build=$ac_cv_build
2936ac_save_IFS=$IFS; IFS='-'
2937set x $ac_cv_build
2938shift
2939build_cpu=$1
2940build_vendor=$2
2941shift; shift
2942# Remember, the first character of IFS is used to create $*,
2943# except with old shells:
2944build_os=$*
2945IFS=$ac_save_IFS
2946case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2947
2948
2949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2950$as_echo_n "checking host system type... " >&6; }
2951if ${ac_cv_host+:} false; then :
2952 $as_echo_n "(cached) " >&6
2953else
2954 if test "x$host_alias" = x; then
2955 ac_cv_host=$ac_cv_build
2956else
2957 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2958 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2959fi
2960
2961fi
2962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2963$as_echo "$ac_cv_host" >&6; }
2964case $ac_cv_host in
2965*-*-*) ;;
2966*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2967esac
2968host=$ac_cv_host
2969ac_save_IFS=$IFS; IFS='-'
2970set x $ac_cv_host
2971shift
2972host_cpu=$1
2973host_vendor=$2
2974shift; shift
2975# Remember, the first character of IFS is used to create $*,
2976# except with old shells:
2977host_os=$*
2978IFS=$ac_save_IFS
2979case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2980
2981
2982
doko@python.orga10e4a92013-01-25 18:45:12 +01002983
2984
Ned Deilyfcbc2462014-08-22 13:32:49 -07002985# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2986rm -f pybuilddir.txt
2987
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002988for ac_prog in python$PACKAGE_VERSION python3 python
2989do
2990 # Extract the first word of "$ac_prog", so it can be a program name with args.
2991set dummy $ac_prog; ac_word=$2
2992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2993$as_echo_n "checking for $ac_word... " >&6; }
2994if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2995 $as_echo_n "(cached) " >&6
2996else
2997 if test -n "$PYTHON_FOR_GEN"; then
2998 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2999else
3000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3001for as_dir in $PATH
3002do
3003 IFS=$as_save_IFS
3004 test -z "$as_dir" && as_dir=.
3005 for ac_exec_ext in '' $ac_executable_extensions; do
3006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3007 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3009 break 2
3010 fi
3011done
3012 done
3013IFS=$as_save_IFS
3014
3015fi
3016fi
3017PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3018if test -n "$PYTHON_FOR_GEN"; then
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3020$as_echo "$PYTHON_FOR_GEN" >&6; }
3021else
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3023$as_echo "no" >&6; }
3024fi
3025
3026
3027 test -n "$PYTHON_FOR_GEN" && break
3028done
3029test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3030
3031if test "$PYTHON_FOR_GEN" = not-found; then
3032 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3033 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3034 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3035fi
3036
3037
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003038if test "$cross_compiling" = yes; then
3039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3040$as_echo_n "checking for python interpreter for cross build... " >&6; }
3041 if test -z "$PYTHON_FOR_BUILD"; then
3042 for interp in python$PACKAGE_VERSION python3 python; do
3043 which $interp >/dev/null 2>&1 || continue
3044 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
3045 break
3046 fi
3047 interp=
3048 done
3049 if test x$interp = x; then
3050 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3051 fi
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3053$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003054 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 +02003055 fi
Martin Panter43a94a72016-07-29 05:52:32 +00003056 # Used to comment out stuff for rebuilding generated files
3057 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01003058elif test "$cross_compiling" = maybe; then
3059 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003060else
3061 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00003062 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003063fi
3064
3065
Martin v. Löwis11437992002-04-12 09:54:03 +00003066
Martin Pantereac67be2016-07-28 01:28:27 +00003067
Benjamin Petersond23f8222009-04-05 19:13:16 +00003068if test "$prefix" != "/"; then
3069 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3070fi
3071
3072
Martin v. Löwis11437992002-04-12 09:54:03 +00003073
3074
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003075# We don't use PACKAGE_ variables, and they cause conflicts
3076# with other autoconf-based packages that include Python.h
3077grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3078rm confdefs.h
3079mv confdefs.h.new confdefs.h
3080
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003081
Yury Selivanov7aa53412015-05-30 10:57:56 -04003082VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003083
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003084# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003085
3086SOVERSION=1.0
3087
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003088# The later defininition of _XOPEN_SOURCE disables certain features
3089# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003092
3093
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003094# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3095# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3096# them.
3097
Matthias Kloseb9621712010-04-24 17:59:49 +00003098$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003099
3100
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003101# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3102# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3103# them.
3104
Matthias Kloseb9621712010-04-24 17:59:49 +00003105$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003106
3107
Martin v. Löwisd6320502004-08-12 13:45:08 +00003108# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3109# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3110
Matthias Kloseb9621712010-04-24 17:59:49 +00003111$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003112
3113
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3115# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3116# them.
3117
Matthias Kloseb9621712010-04-24 17:59:49 +00003118$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003119
3120
3121
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003122define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003123
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003124# Arguments passed to configure.
3125
3126CONFIG_ARGS="$ac_configure_args"
3127
Matthias Kloseb9621712010-04-24 17:59:49 +00003128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3129$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003130# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003131if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003132 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133 case $enableval in
3134 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003135 # Locate the best usable SDK, see Mac/README.txt for more
3136 # information
3137 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003138 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003139 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003140 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3141 if test ! -d "${enableval}"
3142 then
3143 enableval=/
3144 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003145 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003146 ;;
3147 esac
3148 case $enableval in
3149 no)
3150 UNIVERSALSDK=
3151 enable_universalsdk=
3152 ;;
3153 *)
3154 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003155 if test ! -d "${UNIVERSALSDK}"
3156 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003157 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003158 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003159 ;;
3160 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003161
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003162
Thomas Wouters477c8d52006-05-27 19:21:47 +00003163else
3164
3165 UNIVERSALSDK=
3166 enable_universalsdk=
3167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003169
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003170if test -n "${UNIVERSALSDK}"
3171then
Matthias Kloseb9621712010-04-24 17:59:49 +00003172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3173$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003174else
Matthias Kloseb9621712010-04-24 17:59:49 +00003175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3176$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003177fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003180
Ned Deily87adb6e2013-10-18 21:09:56 -07003181ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003182
Ned Deilycbfb9a52012-06-23 16:02:19 -07003183# For backward compatibility reasons we prefer to select '32-bit' if available,
3184# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003185UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003186if test "`uname -s`" = "Darwin"
3187then
3188 if test -n "${UNIVERSALSDK}"
3189 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003190 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003191 then
3192 UNIVERSAL_ARCHS="intel"
3193 fi
3194 fi
3195fi
3196
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003197
Matthias Kloseb9621712010-04-24 17:59:49 +00003198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3199$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003200
3201# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003202if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003203 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003204 UNIVERSAL_ARCHS="$withval"
3205
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003206fi
3207
Ned Deily87adb6e2013-10-18 21:09:56 -07003208if test -n "${UNIVERSALSDK}"
3209then
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3211$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3212else
3213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3214$as_echo "no" >&6; }
3215fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003216
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003217
3218# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003219if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003220 withval=$with_framework_name;
3221 PYTHONFRAMEWORK=${withval}
3222 PYTHONFRAMEWORKDIR=${withval}.framework
3223 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3224
3225else
3226
3227 PYTHONFRAMEWORK=Python
3228 PYTHONFRAMEWORKDIR=Python.framework
3229 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3230
3231fi
3232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003234if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003235 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003236 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003237 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003238 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003239 esac
3240 case $enableval in
3241 no)
3242 PYTHONFRAMEWORK=
3243 PYTHONFRAMEWORKDIR=no-framework
3244 PYTHONFRAMEWORKPREFIX=
3245 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246 FRAMEWORKINSTALLFIRST=
3247 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248 FRAMEWORKALTINSTALLFIRST=
3249 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003250 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003251 if test "x${prefix}" = "xNONE"; then
3252 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3253 else
3254 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3255 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003256 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003257 ;;
3258 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003259 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003260 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003261 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003262 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003263 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3264 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003265 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003266 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003267
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003268 if test "x${prefix}" = "xNONE" ; then
3269 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003270
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003271 else
3272 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3273 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003274
3275 case "${enableval}" in
3276 /System*)
3277 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3278 if test "${prefix}" = "NONE" ; then
3279 # See below
3280 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3281 fi
3282 ;;
3283
3284 /Library*)
3285 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3286 ;;
3287
3288 */Library/Frameworks)
3289 MDIR="`dirname "${enableval}"`"
3290 MDIR="`dirname "${MDIR}"`"
3291 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3292
3293 if test "${prefix}" = "NONE"; then
3294 # User hasn't specified the
3295 # --prefix option, but wants to install
3296 # the framework in a non-default location,
3297 # ensure that the compatibility links get
3298 # installed relative to that prefix as well
3299 # instead of in /usr/local.
3300 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3301 fi
3302 ;;
3303
3304 *)
3305 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3306 ;;
3307 esac
3308
Jack Jansen127e56e2001-09-11 14:41:54 +00003309 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003310
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003311 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003312 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003313 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003315 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003316
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003317 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3318
3319 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3320
Jack Jansene578a632001-08-15 01:27:14 +00003321 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003322
Guido van Rossum563e7081996-09-10 18:20:48 +00003323else
Martin v. Löwis11437992002-04-12 09:54:03 +00003324
Jack Jansene578a632001-08-15 01:27:14 +00003325 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003326 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003327 PYTHONFRAMEWORKPREFIX=
3328 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003329 FRAMEWORKINSTALLFIRST=
3330 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003331 FRAMEWORKALTINSTALLFIRST=
3332 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003333 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003334 if test "x${prefix}" = "xNONE" ; then
3335 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3336 else
3337 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3338 fi
Jack Jansene578a632001-08-15 01:27:14 +00003339 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003340
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003341
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342fi
3343
Thomas Wouters477c8d52006-05-27 19:21:47 +00003344
3345
Michael W. Hudson54241132001-12-07 15:38:26 +00003346
3347
3348
3349
Jack Jansene578a632001-08-15 01:27:14 +00003350
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003351
3352
3353
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003354
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003355
Ned Deilyb8f944f2013-11-21 22:42:25 -08003356
Jack Jansene578a632001-08-15 01:27:14 +00003357##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003358## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003359## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003360##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003361# Set name for machine-dependent library files
3362
Matthias Kloseb9621712010-04-24 17:59:49 +00003363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3364$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003365if test -z "$MACHDEP"
3366then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003367 # avoid using uname for cross builds
3368 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003369 # ac_sys_system and ac_sys_release are used for setting
3370 # a lot of different things including 'define_xopen_source'
3371 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003372 case "$host" in
3373 *-*-linux*)
3374 ac_sys_system=Linux
3375 ;;
3376 *-*-cygwin*)
3377 ac_sys_system=Cygwin
3378 ;;
3379 *)
3380 # for now, limit cross builds to known configurations
3381 MACHDEP="unknown"
3382 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3383 esac
3384 ac_sys_release=
3385 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003386 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003387 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003388 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003389 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003390 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003391 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003392 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003393 fi
3394 ac_md_system=`echo $ac_sys_system |
3395 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3396 ac_md_release=`echo $ac_sys_release |
3397 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3398 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003399
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003400 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003401 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003402 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003403 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003404 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003405 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003406 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003407fi
Guido van Rossum91922671997-10-09 20:24:13 +00003408
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003409
3410if test "$cross_compiling" = yes; then
3411 case "$host" in
3412 *-*-linux*)
3413 case "$host_cpu" in
3414 arm*)
3415 _host_cpu=arm
3416 ;;
3417 *)
3418 _host_cpu=$host_cpu
3419 esac
3420 ;;
3421 *-*-cygwin*)
3422 _host_cpu=
3423 ;;
3424 *)
3425 # for now, limit cross builds to known configurations
3426 MACHDEP="unknown"
3427 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3428 esac
3429 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3430fi
3431
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003432# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3433# disable features if it is defined, without any means to access these
3434# features as extensions. For these systems, we skip the definition of
3435# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3436# some feature, make sure there is no alternative way to access this
3437# feature. Also, when using wildcards, make sure you have verified the
3438# need for not defining _XOPEN_SOURCE on all systems matching the
3439# wildcard, and that the wildcard does not include future systems
3440# (which may remove their limitations).
3441case $ac_sys_system/$ac_sys_release in
3442 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3443 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003444 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003445 # In addition, Stefan Krah confirms that issue #1244610 exists through
3446 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003447 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003448 define_xopen_source=no
3449 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3450 # also defined. This can be overridden by defining _BSD_SOURCE
3451 # As this has a different meaning on Linux, only define it on OpenBSD
3452
Matthias Kloseb9621712010-04-24 17:59:49 +00003453$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003454
3455 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003456 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003457 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3458 # also defined. This can be overridden by defining _BSD_SOURCE
3459 # As this has a different meaning on Linux, only define it on OpenBSD
3460
Matthias Kloseb9621712010-04-24 17:59:49 +00003461$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003462
3463 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003464 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3465 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3466 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003467 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 +00003468 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003469 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3470 # request to enable features supported by the standard as a request
3471 # to disable features not supported by the standard. The best way
3472 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3473 # entirely and define __EXTENSIONS__ instead.
3474 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003475 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003476 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3477 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003478 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003479 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003480 define_xopen_source=no;;
3481 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003482 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003483 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003484 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003485 # On FreeBSD 4, the math functions C89 does not cover are never defined
3486 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3487 FreeBSD/4.*)
3488 define_xopen_source=no;;
3489 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3490 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3491 # identifies itself as Darwin/7.*
3492 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3493 # disables platform specific features beyond repair.
3494 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3495 # has no effect, don't bother defining them
3496 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003497 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003498 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003499 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003500 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3501 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3502 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003503 AIX/4)
3504 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003505 AIX/5)
3506 if test `uname -r` -eq 1; then
3507 define_xopen_source=no
3508 fi
3509 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003510 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3511 # defining NI_NUMERICHOST.
3512 QNX/6.3.2)
3513 define_xopen_source=no
3514 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003515
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003516esac
3517
3518if test $define_xopen_source = yes
3519then
Victor Stinner14d098d2011-09-07 22:29:43 +02003520 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003521
Victor Stinner14d098d2011-09-07 22:29:43 +02003522$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003523
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003524
3525 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3526 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3527 # several APIs are not declared. Since this is also needed in some
3528 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003529
Matthias Kloseb9621712010-04-24 17:59:49 +00003530$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003531
3532
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003533
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003534$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003535
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003536fi
3537
Christian Heimes647cd872013-12-07 23:39:33 +01003538# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3539case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003540 hp*|HP*)
3541 define_stdc_a1=yes;;
3542 *)
3543 define_stdc_a1=no;;
3544esac
3545
3546if test $define_stdc_a1 = yes
3547then
Christian Heimes647cd872013-12-07 23:39:33 +01003548
3549$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3550
Christian Heimesb02bcae2013-12-08 15:21:08 +01003551fi
Christian Heimes647cd872013-12-07 23:39:33 +01003552
Guido van Rossum91922671997-10-09 20:24:13 +00003553#
3554# SGI compilers allow the specification of the both the ABI and the
3555# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003556# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003557#
3558# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3559# thus supply support for various ABI/ISA combinations. The MACHDEP
3560# variable is also adjusted.
3561#
3562
3563if test ! -z "$SGI_ABI"
3564then
3565 CC="cc $SGI_ABI"
3566 LDFLAGS="$SGI_ABI $LDFLAGS"
3567 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3570$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003571
Jack Jansen6b08a402004-06-03 12:41:45 +00003572# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3573# it may influence the way we can build extensions, so distutils
3574# needs to check it
3575
Thomas Wouters477c8d52006-05-27 19:21:47 +00003576
Jack Jansen6b08a402004-06-03 12:41:45 +00003577CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003578EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003579
Guido van Rossum627b2d71993-12-24 10:39:16 +00003580# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003581
3582# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3583# for debug/optimization stuff. BASECFLAGS is for flags that are required
3584# just to get things to compile and link. Users are free to override OPT
3585# when running configure or make. The build should not break if they do.
3586# BASECFLAGS should generally not be messed with, however.
3587
3588# XXX shouldn't some/most/all of this code be merged with the stuff later
3589# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3591$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003596 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003597 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003598 without_gcc=yes;;
3599 yes) CC=gcc
3600 without_gcc=no;;
3601 *) CC=$withval
3602 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003603 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003604else
Martin v. Löwis11437992002-04-12 09:54:03 +00003605
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003606 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003607 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003608 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003609 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003610 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611fi
3612
Matthias Kloseb9621712010-04-24 17:59:49 +00003613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3614$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003615
Zachary Ware5af85642015-12-21 12:09:17 -06003616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3617$as_echo_n "checking for --with-icc... " >&6; }
3618
3619# Check whether --with-icc was given.
3620if test "${with_icc+set}" = set; then :
3621 withval=$with_icc;
3622 case $withval in
3623 no) CC=${CC:-cc}
3624 with_icc=no;;
3625 yes) CC=icc
3626 CXX=icpc
3627 with_icc=yes;;
3628 *) CC=$withval
3629 with_icc=$withval;;
3630 esac
3631else
3632
3633 with_icc=no
3634fi
3635
3636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3637$as_echo "$with_icc" >&6; }
3638
Guido van Rossum8b131c51995-03-09 14:10:13 +00003639# If the user switches compilers, we can't believe the cache
3640if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3641then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003642 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003643(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003644fi
3645
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003646# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3647# when the compiler supports them, but we don't always want -O2, and
3648# we set -g later.
3649if test -z "$CFLAGS"; then
3650 CFLAGS=
3651fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003652
3653if test "$ac_sys_system" = "Darwin"
3654then
3655 # Compiler selection on MacOSX is more complicated than
3656 # AC_PROG_CC can handle, see Mac/README.txt for more
3657 # information
3658 if test -z "${CC}"
3659 then
3660 found_gcc=
3661 found_clang=
3662 as_save_IFS=$IFS; IFS=:
3663 for as_dir in $PATH
3664 do
3665 IFS=$as_save_IFS
3666 if test -x $as_dir/gcc; then
3667 if test -z "${found_gcc}"; then
3668 found_gcc=$as_dir/gcc
3669 fi
3670 fi
3671 if test -x $as_dir/clang; then
3672 if test -z "${found_clang}"; then
3673 found_clang=$as_dir/clang
3674 fi
3675 fi
3676 done
3677 IFS=$as_save_IFS
3678
3679 if test -n "$found_gcc" -a -n "$found_clang"
3680 then
3681 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3682 then
3683 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3684$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3685 CC="$found_clang"
3686 CXX="$found_clang++"
3687 fi
3688
3689
3690 elif test -z "$found_gcc" -a -n "$found_clang"
3691 then
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3693$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3694 CC="$found_clang"
3695 CXX="$found_clang++"
3696
3697 elif test -z "$found_gcc" -a -z "$found_clang"
3698 then
3699 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3700 if test -n "${found_clang}"
3701 then
3702 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3703$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3704 CC="${found_clang}"
3705 CXX="`/usr/bin/xcrun -find clang++`"
3706
3707 # else: use default behaviour
3708 fi
3709 fi
3710 fi
3711fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003712ac_ext=c
3713ac_cpp='$CPP $CPPFLAGS'
3714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3716ac_compiler_gnu=$ac_cv_c_compiler_gnu
3717if test -n "$ac_tool_prefix"; then
3718 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3719set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3721$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003722if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003724else
3725 if test -n "$CC"; then
3726 ac_cv_prog_CC="$CC" # Let the user override the test.
3727else
Martin v. Löwis11437992002-04-12 09:54:03 +00003728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731 IFS=$as_save_IFS
3732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $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 +00003737 break 2
3738 fi
3739done
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
Jack Jansendd19cf82001-12-06 22:36:17 +00003743fi
3744fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003745CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003746if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003749else
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755fi
3756if test -z "$ac_cv_prog_CC"; then
3757 ac_ct_CC=$CC
3758 # Extract the first word of "gcc", so it can be a program name with args.
3759set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3761$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003762if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
3765 if test -n "$ac_ct_CC"; then
3766 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3767else
3768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3769for as_dir in $PATH
3770do
3771 IFS=$as_save_IFS
3772 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 $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 +00003777 break 2
3778 fi
3779done
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003781IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003782
3783fi
3784fi
3785ac_ct_CC=$ac_cv_prog_ac_ct_CC
3786if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3788$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003789else
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3791$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003792fi
3793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794 if test "x$ac_ct_CC" = x; then
3795 CC=""
3796 else
3797 case $cross_compiling:$ac_tool_warned in
3798yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801ac_tool_warned=yes ;;
3802esac
3803 CC=$ac_ct_CC
3804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805else
3806 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003807fi
3808
Jack Jansendd19cf82001-12-06 22:36:17 +00003809if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 if test -n "$ac_tool_prefix"; then
3811 # 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 +00003812set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3814$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003815if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003817else
3818 if test -n "$CC"; then
3819 ac_cv_prog_CC="$CC" # Let the user override the test.
3820else
Martin v. Löwis11437992002-04-12 09:54:03 +00003821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3822for as_dir in $PATH
3823do
3824 IFS=$as_save_IFS
3825 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 break 2
3831 fi
3832done
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
3836fi
3837fi
3838CC=$ac_cv_prog_CC
3839if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3841$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842else
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3844$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850if test -z "$CC"; then
3851 # Extract the first word of "cc", so it can be a program name with args.
3852set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3854$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003855if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003857else
3858 if test -n "$CC"; then
3859 ac_cv_prog_CC="$CC" # Let the user override the test.
3860else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003861 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3863for as_dir in $PATH
3864do
3865 IFS=$as_save_IFS
3866 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3870 ac_prog_rejected=yes
3871 continue
3872 fi
3873 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 $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 +00003875 break 2
3876 fi
3877done
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003880
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003881if test $ac_prog_rejected = yes; then
3882 # We found a bogon in the path, so make sure we never use it.
3883 set dummy $ac_cv_prog_CC
3884 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003886 # We chose a different compiler from the bogus one.
3887 # However, it has the same basename, so the bogon will be chosen
3888 # first if we set CC to just the basename; use the full file name.
3889 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003890 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003891 fi
3892fi
3893fi
3894fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003895CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003896if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3898$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003899else
Matthias Kloseb9621712010-04-24 17:59:49 +00003900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003902fi
3903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904
Martin v. Löwis11437992002-04-12 09:54:03 +00003905fi
3906if test -z "$CC"; then
3907 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 do
3910 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3911set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3913$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003914if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003916else
3917 if test -n "$CC"; then
3918 ac_cv_prog_CC="$CC" # Let the user override the test.
3919else
Martin v. Löwis11437992002-04-12 09:54:03 +00003920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3921for as_dir in $PATH
3922do
3923 IFS=$as_save_IFS
3924 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003927 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 $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 +00003929 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003930 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003931done
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003934
3935fi
3936fi
3937CC=$ac_cv_prog_CC
3938if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3940$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003941else
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3943$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003944fi
3945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946
Martin v. Löwis11437992002-04-12 09:54:03 +00003947 test -n "$CC" && break
3948 done
3949fi
3950if test -z "$CC"; then
3951 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003953do
3954 # Extract the first word of "$ac_prog", so it can be a program name with args.
3955set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3957$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003958if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003960else
3961 if test -n "$ac_ct_CC"; then
3962 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3963else
3964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3965for as_dir in $PATH
3966do
3967 IFS=$as_save_IFS
3968 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003970 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 $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 +00003973 break 2
3974 fi
3975done
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003978
Martin v. Löwis11437992002-04-12 09:54:03 +00003979fi
3980fi
3981ac_ct_CC=$ac_cv_prog_ac_ct_CC
3982if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3984$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003985else
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3987$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003988fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990
Martin v. Löwis11437992002-04-12 09:54:03 +00003991 test -n "$ac_ct_CC" && break
3992done
Michael W. Hudson54241132001-12-07 15:38:26 +00003993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 if test "x$ac_ct_CC" = x; then
3995 CC=""
3996 else
3997 case $cross_compiling:$ac_tool_warned in
3998yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4000$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001ac_tool_warned=yes ;;
4002esac
4003 CC=$ac_ct_CC
4004 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004005fi
4006
4007fi
4008
4009
Matthias Kloseb9621712010-04-24 17:59:49 +00004010test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004012as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004013See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004014
4015# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004016$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4017set X $ac_compile
4018ac_compiler=$2
4019for ac_option in --version -v -V -qversion; do
4020 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026$as_echo "$ac_try_echo"; } >&5
4027 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004028 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 if test -s conftest.err; then
4030 sed '10a\
4031... rest of stderr output deleted ...
4032 10q' conftest.err >conftest.er1
4033 cat conftest.er1 >&5
4034 fi
4035 rm -f conftest.er1 conftest.err
4036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4037 test $ac_status = 0; }
4038done
Martin v. Löwis11437992002-04-12 09:54:03 +00004039
Matthias Kloseb9621712010-04-24 17:59:49 +00004040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004041/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004042
Martin v. Löwis11437992002-04-12 09:54:03 +00004043int
4044main ()
4045{
4046
4047 ;
4048 return 0;
4049}
4050_ACEOF
4051ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004052ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004053# Try to create an executable without -o first, disregard a.out.
4054# It will help us diagnose broken compilers, and finding out an intuition
4055# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4057$as_echo_n "checking whether the C compiler works... " >&6; }
4058ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4059
4060# The possible output files:
4061ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004063ac_rmfiles=
4064for ac_file in $ac_files
4065do
4066 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004068 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4069 esac
4070done
4071rm -f $ac_rmfiles
4072
Matthias Kloseb9621712010-04-24 17:59:49 +00004073if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074case "(($ac_try" in
4075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076 *) ac_try_echo=$ac_try;;
4077esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004081 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4085# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4086# in a Makefile. We should not override ac_cv_exeext if it was cached,
4087# so that the user can short-circuit this test for compilers unknown to
4088# Autoconf.
4089for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004090do
4091 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094 ;;
4095 [ab].out )
4096 # We found the default executable, but exeext='' is most
4097 # certainly right.
4098 break;;
4099 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101 then :; else
4102 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4103 fi
4104 # We set ac_cv_exeext here because the later test for it is not
4105 # safe: cross compilers may not add the suffix if given an `-o'
4106 # argument, so we may need to know it at that point already.
4107 # Even if this section looks crufty: it has the advantage of
4108 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004109 break;;
4110 * )
4111 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004112 esac
4113done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114test "$ac_cv_exeext" = no && ac_cv_exeext=
4115
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004116else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117 ac_file=''
4118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004119if test -z "$ac_file"; then :
4120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4121$as_echo "no" >&6; }
4122$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004123sed 's/^/| /' conftest.$ac_ext >&5
4124
Matthias Kloseb9621712010-04-24 17:59:49 +00004125{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004127as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004128See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004129else
4130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4131$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4134$as_echo_n "checking for C compiler default output file name... " >&6; }
4135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4136$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004137ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004138
Matthias Kloseb9621712010-04-24 17:59:49 +00004139rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004140ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4142$as_echo_n "checking for suffix of executables... " >&6; }
4143if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144case "(($ac_try" in
4145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4146 *) ac_try_echo=$ac_try;;
4147esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4149$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4153 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004154 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4155# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4156# work properly (i.e., refer to `conftest.exe'), while it won't with
4157# `rm'.
4158for ac_file in conftest.exe conftest conftest.*; do
4159 test -f "$ac_file" || continue
4160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4163 break;;
4164 * ) break;;
4165 esac
4166done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167else
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 executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004171See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004173rm -f conftest conftest$ac_cv_exeext
4174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4175$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004176
4177rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004178EXEEXT=$ac_cv_exeext
4179ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4181/* end confdefs.h. */
4182#include <stdio.h>
4183int
4184main ()
4185{
4186FILE *f = fopen ("conftest.out", "w");
4187 return ferror (f) || fclose (f) != 0;
4188
4189 ;
4190 return 0;
4191}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004193ac_clean_files="$ac_clean_files conftest.out"
4194# Check that the compiler produces executables we can run. If not, either
4195# the compiler is broken, or we cross compile.
4196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4197$as_echo_n "checking whether we are cross compiling... " >&6; }
4198if test "$cross_compiling" != yes; then
4199 { { ac_try="$ac_link"
4200case "(($ac_try" in
4201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4202 *) ac_try_echo=$ac_try;;
4203esac
4204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4205$as_echo "$ac_try_echo"; } >&5
4206 (eval "$ac_link") 2>&5
4207 ac_status=$?
4208 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4209 test $ac_status = 0; }
4210 if { ac_try='./conftest$ac_cv_exeext'
4211 { { case "(($ac_try" in
4212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4213 *) ac_try_echo=$ac_try;;
4214esac
4215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4216$as_echo "$ac_try_echo"; } >&5
4217 (eval "$ac_try") 2>&5
4218 ac_status=$?
4219 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4220 test $ac_status = 0; }; }; then
4221 cross_compiling=no
4222 else
4223 if test "$cross_compiling" = maybe; then
4224 cross_compiling=yes
4225 else
4226 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4227$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004228as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004229If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004230See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 fi
4232 fi
4233fi
4234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4235$as_echo "$cross_compiling" >&6; }
4236
4237rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4238ac_clean_files=$ac_clean_files_save
4239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4240$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004241if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 $as_echo_n "(cached) " >&6
4243else
4244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004245/* end confdefs.h. */
4246
4247int
4248main ()
4249{
4250
4251 ;
4252 return 0;
4253}
4254_ACEOF
4255rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257case "(($ac_try" in
4258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4259 *) ac_try_echo=$ac_try;;
4260esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004261eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4262$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004265 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4266 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 for ac_file in conftest.o conftest.obj conftest.*; do
4268 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004270 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4272 break;;
4273 esac
4274done
4275else
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004277sed 's/^/| /' conftest.$ac_ext >&5
4278
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4280$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004281as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004282See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004283fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004284rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4287$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004288OBJEXT=$ac_cv_objext
4289ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4291$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004292if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004294else
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004297
Martin v. Löwis11437992002-04-12 09:54:03 +00004298int
4299main ()
4300{
4301#ifndef __GNUC__
4302 choke me
4303#endif
4304
4305 ;
4306 return 0;
4307}
4308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004310 ac_compiler_gnu=yes
4311else
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004315ac_cv_c_compiler_gnu=$ac_compiler_gnu
4316
4317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4319$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4320if test $ac_compiler_gnu = yes; then
4321 GCC=yes
4322else
4323 GCC=
4324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004325ac_test_CFLAGS=${CFLAGS+set}
4326ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4328$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004329if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004331else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 ac_save_c_werror_flag=$ac_c_werror_flag
4333 ac_c_werror_flag=yes
4334 ac_cv_prog_cc_g=no
4335 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004338
Martin v. Löwis11437992002-04-12 09:54:03 +00004339int
4340main ()
4341{
4342
4343 ;
4344 return 0;
4345}
4346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004347if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004348 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004349else
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 CFLAGS=""
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352/* end confdefs.h. */
4353
4354int
4355main ()
4356{
4357
4358 ;
4359 return 0;
4360}
4361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004362if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363
Matthias Kloseb9621712010-04-24 17:59:49 +00004364else
4365 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368/* end confdefs.h. */
4369
4370int
4371main ()
4372{
4373
4374 ;
4375 return 0;
4376}
4377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004378if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4386 ac_c_werror_flag=$ac_save_c_werror_flag
4387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4389$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004390if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004391 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004392elif test $ac_cv_prog_cc_g = yes; then
4393 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004394 CFLAGS="-g -O2"
4395 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004396 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004397 fi
4398else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004399 if test "$GCC" = yes; then
4400 CFLAGS="-O2"
4401 else
4402 CFLAGS=
4403 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4406$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004407if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004408 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004409else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004411ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004413/* end confdefs.h. */
4414#include <stdarg.h>
4415#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004416struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004417/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4418struct buf { int x; };
4419FILE * (*rcsopen) (struct buf *, struct stat *, int);
4420static char *e (p, i)
4421 char **p;
4422 int i;
4423{
4424 return p[i];
4425}
4426static char *f (char * (*g) (char **, int), char **p, ...)
4427{
4428 char *s;
4429 va_list v;
4430 va_start (v,p);
4431 s = g (p, va_arg (v,int));
4432 va_end (v);
4433 return s;
4434}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004435
4436/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4437 function prototypes and stuff, but not '\xHH' hex character constants.
4438 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004440 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4441 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004442 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004443int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004445/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4446 inside strings and character constants. */
4447#define FOO(x) 'x'
4448int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4449
Skip Montanaro6dead952003-09-25 14:50:04 +00004450int test (int i, double x);
4451struct s1 {int (*f) (int a);};
4452struct s2 {int (*f) (double a);};
4453int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4454int argc;
4455char **argv;
4456int
4457main ()
4458{
4459return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4460 ;
4461 return 0;
4462}
4463_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004464for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4465 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004466do
4467 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004468 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004469 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471rm -f core conftest.err conftest.$ac_objext
4472 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004473done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004475CC=$ac_save_CC
4476
4477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004478# AC_CACHE_VAL
4479case "x$ac_cv_prog_cc_c89" in
4480 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4482$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004483 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4485$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004486 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004487 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4489$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004490esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004491if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004492
Matthias Kloseb9621712010-04-24 17:59:49 +00004493fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004494
Martin v. Löwis11437992002-04-12 09:54:03 +00004495ac_ext=c
4496ac_cpp='$CPP $CPPFLAGS'
4497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4499ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004500
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004501ac_ext=c
4502ac_cpp='$CPP $CPPFLAGS'
4503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4505ac_compiler_gnu=$ac_cv_c_compiler_gnu
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4507$as_echo_n "checking how to run the C preprocessor... " >&6; }
4508# On Suns, sometimes $CPP names a directory.
4509if test -n "$CPP" && test -d "$CPP"; then
4510 CPP=
4511fi
4512if test -z "$CPP"; then
4513 if ${ac_cv_prog_CPP+:} false; then :
4514 $as_echo_n "(cached) " >&6
4515else
4516 # Double quotes because CPP needs to be expanded
4517 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4518 do
4519 ac_preproc_ok=false
4520for ac_c_preproc_warn_flag in '' yes
4521do
4522 # Use a header file that comes with gcc, so configuring glibc
4523 # with a fresh cross-compiler works.
4524 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4525 # <limits.h> exists even on freestanding compilers.
4526 # On the NeXT, cc -E runs the code through the compiler's parser,
4527 # not just through cpp. "Syntax error" is here to catch this case.
4528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4529/* end confdefs.h. */
4530#ifdef __STDC__
4531# include <limits.h>
4532#else
4533# include <assert.h>
4534#endif
4535 Syntax error
4536_ACEOF
4537if ac_fn_c_try_cpp "$LINENO"; then :
4538
4539else
4540 # Broken: fails on valid input.
4541continue
4542fi
4543rm -f conftest.err conftest.i conftest.$ac_ext
4544
4545 # OK, works on sane cases. Now check whether nonexistent headers
4546 # can be detected and how.
4547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4548/* end confdefs.h. */
4549#include <ac_nonexistent.h>
4550_ACEOF
4551if ac_fn_c_try_cpp "$LINENO"; then :
4552 # Broken: success on invalid input.
4553continue
4554else
4555 # Passes both tests.
4556ac_preproc_ok=:
4557break
4558fi
4559rm -f conftest.err conftest.i conftest.$ac_ext
4560
4561done
4562# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4563rm -f conftest.i conftest.err conftest.$ac_ext
4564if $ac_preproc_ok; then :
4565 break
4566fi
4567
4568 done
4569 ac_cv_prog_CPP=$CPP
4570
4571fi
4572 CPP=$ac_cv_prog_CPP
4573else
4574 ac_cv_prog_CPP=$CPP
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4577$as_echo "$CPP" >&6; }
4578ac_preproc_ok=false
4579for ac_c_preproc_warn_flag in '' yes
4580do
4581 # Use a header file that comes with gcc, so configuring glibc
4582 # with a fresh cross-compiler works.
4583 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4584 # <limits.h> exists even on freestanding compilers.
4585 # On the NeXT, cc -E runs the code through the compiler's parser,
4586 # not just through cpp. "Syntax error" is here to catch this case.
4587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588/* end confdefs.h. */
4589#ifdef __STDC__
4590# include <limits.h>
4591#else
4592# include <assert.h>
4593#endif
4594 Syntax error
4595_ACEOF
4596if ac_fn_c_try_cpp "$LINENO"; then :
4597
4598else
4599 # Broken: fails on valid input.
4600continue
4601fi
4602rm -f conftest.err conftest.i conftest.$ac_ext
4603
4604 # OK, works on sane cases. Now check whether nonexistent headers
4605 # can be detected and how.
4606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4607/* end confdefs.h. */
4608#include <ac_nonexistent.h>
4609_ACEOF
4610if ac_fn_c_try_cpp "$LINENO"; then :
4611 # Broken: success on invalid input.
4612continue
4613else
4614 # Passes both tests.
4615ac_preproc_ok=:
4616break
4617fi
4618rm -f conftest.err conftest.i conftest.$ac_ext
4619
4620done
4621# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4622rm -f conftest.i conftest.err conftest.$ac_ext
4623if $ac_preproc_ok; then :
4624
4625else
4626 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4628as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4629See \`config.log' for more details" "$LINENO" 5; }
4630fi
4631
4632ac_ext=c
4633ac_cpp='$CPP $CPPFLAGS'
4634ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4635ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4636ac_compiler_gnu=$ac_cv_c_compiler_gnu
4637
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4639$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4640if ${ac_cv_path_GREP+:} false; then :
4641 $as_echo_n "(cached) " >&6
4642else
4643 if test -z "$GREP"; then
4644 ac_path_GREP_found=false
4645 # Loop through the user's path and test for each of PROGNAME-LIST
4646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4647for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4648do
4649 IFS=$as_save_IFS
4650 test -z "$as_dir" && as_dir=.
4651 for ac_prog in grep ggrep; do
4652 for ac_exec_ext in '' $ac_executable_extensions; do
4653 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4654 as_fn_executable_p "$ac_path_GREP" || continue
4655# Check for GNU ac_path_GREP and select it if it is found.
4656 # Check for GNU $ac_path_GREP
4657case `"$ac_path_GREP" --version 2>&1` in
4658*GNU*)
4659 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4660*)
4661 ac_count=0
4662 $as_echo_n 0123456789 >"conftest.in"
4663 while :
4664 do
4665 cat "conftest.in" "conftest.in" >"conftest.tmp"
4666 mv "conftest.tmp" "conftest.in"
4667 cp "conftest.in" "conftest.nl"
4668 $as_echo 'GREP' >> "conftest.nl"
4669 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4670 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4671 as_fn_arith $ac_count + 1 && ac_count=$as_val
4672 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4673 # Best one so far, save it but keep looking for a better one
4674 ac_cv_path_GREP="$ac_path_GREP"
4675 ac_path_GREP_max=$ac_count
4676 fi
4677 # 10*(2^10) chars as input seems more than enough
4678 test $ac_count -gt 10 && break
4679 done
4680 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4681esac
4682
4683 $ac_path_GREP_found && break 3
4684 done
4685 done
4686 done
4687IFS=$as_save_IFS
4688 if test -z "$ac_cv_path_GREP"; then
4689 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4690 fi
4691else
4692 ac_cv_path_GREP=$GREP
4693fi
4694
4695fi
4696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4697$as_echo "$ac_cv_path_GREP" >&6; }
4698 GREP="$ac_cv_path_GREP"
4699
4700
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004701
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004702
4703
Matthias Kloseb9621712010-04-24 17:59:49 +00004704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4705$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004707# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004708if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004709 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710
4711 case $withval in
4712 no) with_cxx_main=no
4713 MAINCC='$(CC)';;
4714 yes) with_cxx_main=yes
4715 MAINCC='$(CXX)';;
4716 *) with_cxx_main=yes
4717 MAINCC=$withval
4718 if test -z "$CXX"
4719 then
4720 CXX=$withval
4721 fi;;
4722 esac
4723else
4724
4725 with_cxx_main=no
4726 MAINCC='$(CC)'
4727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004728fi
4729
Matthias Kloseb9621712010-04-24 17:59:49 +00004730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4731$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004732
4733preset_cxx="$CXX"
4734if test -z "$CXX"
4735then
4736 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004737 gcc) if test -n "$ac_tool_prefix"; then
4738 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4739set dummy ${ac_tool_prefix}g++; ac_word=$2
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
4742if ${ac_cv_path_CXX+:} false; then :
4743 $as_echo_n "(cached) " >&6
4744else
4745 case $CXX in
4746 [\\/]* | ?:[\\/]*)
4747 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4748 ;;
4749 *)
4750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in notfound
4752do
4753 IFS=$as_save_IFS
4754 test -z "$as_dir" && as_dir=.
4755 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004757 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759 break 2
4760 fi
4761done
4762 done
4763IFS=$as_save_IFS
4764
4765 ;;
4766esac
4767fi
4768CXX=$ac_cv_path_CXX
4769if test -n "$CXX"; then
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4771$as_echo "$CXX" >&6; }
4772else
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
4775fi
4776
4777
4778fi
4779if test -z "$ac_cv_path_CXX"; then
4780 ac_pt_CXX=$CXX
4781 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4784$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004785if ${ac_cv_path_ac_pt_CXX+:} false; then :
4786 $as_echo_n "(cached) " >&6
4787else
4788 case $ac_pt_CXX in
4789 [\\/]* | ?:[\\/]*)
4790 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4791 ;;
4792 *)
4793 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4794for as_dir in notfound
4795do
4796 IFS=$as_save_IFS
4797 test -z "$as_dir" && as_dir=.
4798 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004799 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004800 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4802 break 2
4803 fi
4804done
4805 done
4806IFS=$as_save_IFS
4807
4808 ;;
4809esac
4810fi
4811ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4812if test -n "$ac_pt_CXX"; then
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4814$as_echo "$ac_pt_CXX" >&6; }
4815else
4816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4817$as_echo "no" >&6; }
4818fi
4819
4820 if test "x$ac_pt_CXX" = x; then
4821 CXX="g++"
4822 else
4823 case $cross_compiling:$ac_tool_warned in
4824yes:)
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4827ac_tool_warned=yes ;;
4828esac
4829 CXX=$ac_pt_CXX
4830 fi
4831else
4832 CXX="$ac_cv_path_CXX"
4833fi
4834 ;;
4835 cc) if test -n "$ac_tool_prefix"; then
4836 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4837set dummy ${ac_tool_prefix}c++; ac_word=$2
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4839$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004840if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842else
4843 case $CXX in
4844 [\\/]* | ?:[\\/]*)
4845 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4846 ;;
4847 *)
4848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4849for as_dir in notfound
4850do
4851 IFS=$as_save_IFS
4852 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004855 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 break 2
4858 fi
4859done
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004861IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
4864esac
4865fi
4866CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004867if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4869$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004870else
Matthias Kloseb9621712010-04-24 17:59:49 +00004871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004874
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875
4876fi
4877if test -z "$ac_cv_path_CXX"; then
4878 ac_pt_CXX=$CXX
4879 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004880set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4882$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004883if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004884 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004885else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004886 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004887 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004888 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 +00004889 ;;
4890 *)
4891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4892for as_dir in notfound
4893do
4894 IFS=$as_save_IFS
4895 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004896 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004898 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004900 break 2
4901 fi
4902done
Matthias Kloseb9621712010-04-24 17:59:49 +00004903 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004904IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004905
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004906 ;;
4907esac
4908fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004909ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4910if test -n "$ac_pt_CXX"; then
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4912$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004913else
Matthias Kloseb9621712010-04-24 17:59:49 +00004914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4915$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004917
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004918 if test "x$ac_pt_CXX" = x; then
4919 CXX="c++"
4920 else
4921 case $cross_compiling:$ac_tool_warned in
4922yes:)
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4924$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4925ac_tool_warned=yes ;;
4926esac
4927 CXX=$ac_pt_CXX
4928 fi
4929else
4930 CXX="$ac_cv_path_CXX"
4931fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004932 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004933 clang|*/clang) if test -n "$ac_tool_prefix"; then
4934 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4935set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if ${ac_cv_path_CXX+:} false; then :
4939 $as_echo_n "(cached) " >&6
4940else
4941 case $CXX in
4942 [\\/]* | ?:[\\/]*)
4943 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4944 ;;
4945 *)
4946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947for as_dir in notfound
4948do
4949 IFS=$as_save_IFS
4950 test -z "$as_dir" && as_dir=.
4951 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004953 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4955 break 2
4956 fi
4957done
4958 done
4959IFS=$as_save_IFS
4960
Ned Deilycbfb9a52012-06-23 16:02:19 -07004961 ;;
4962esac
4963fi
4964CXX=$ac_cv_path_CXX
4965if test -n "$CXX"; then
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4967$as_echo "$CXX" >&6; }
4968else
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970$as_echo "no" >&6; }
4971fi
4972
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004973
4974fi
4975if test -z "$ac_cv_path_CXX"; then
4976 ac_pt_CXX=$CXX
4977 # Extract the first word of "clang++", so it can be a program name with args.
4978set dummy clang++; ac_word=$2
4979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4980$as_echo_n "checking for $ac_word... " >&6; }
4981if ${ac_cv_path_ac_pt_CXX+:} false; then :
4982 $as_echo_n "(cached) " >&6
4983else
4984 case $ac_pt_CXX in
4985 [\\/]* | ?:[\\/]*)
4986 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4987 ;;
4988 *)
4989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990for as_dir in notfound
4991do
4992 IFS=$as_save_IFS
4993 test -z "$as_dir" && as_dir=.
4994 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004996 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4998 break 2
4999 fi
5000done
5001 done
5002IFS=$as_save_IFS
5003
5004 ;;
5005esac
5006fi
5007ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5008if test -n "$ac_pt_CXX"; then
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5010$as_echo "$ac_pt_CXX" >&6; }
5011else
5012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013$as_echo "no" >&6; }
5014fi
5015
5016 if test "x$ac_pt_CXX" = x; then
5017 CXX="clang++"
5018 else
5019 case $cross_compiling:$ac_tool_warned in
5020yes:)
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5023ac_tool_warned=yes ;;
5024esac
5025 CXX=$ac_pt_CXX
5026 fi
5027else
5028 CXX="$ac_cv_path_CXX"
5029fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005030 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005031 icc|*/icc) if test -n "$ac_tool_prefix"; then
5032 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5033set dummy ${ac_tool_prefix}icpc; ac_word=$2
5034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
5036if ${ac_cv_path_CXX+:} false; then :
5037 $as_echo_n "(cached) " >&6
5038else
5039 case $CXX in
5040 [\\/]* | ?:[\\/]*)
5041 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5042 ;;
5043 *)
5044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in notfound
5046do
5047 IFS=$as_save_IFS
5048 test -z "$as_dir" && as_dir=.
5049 for ac_exec_ext in '' $ac_executable_extensions; do
5050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5051 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5053 break 2
5054 fi
5055done
5056 done
5057IFS=$as_save_IFS
5058
5059 ;;
5060esac
5061fi
5062CXX=$ac_cv_path_CXX
5063if test -n "$CXX"; then
5064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5065$as_echo "$CXX" >&6; }
5066else
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068$as_echo "no" >&6; }
5069fi
5070
5071
5072fi
5073if test -z "$ac_cv_path_CXX"; then
5074 ac_pt_CXX=$CXX
5075 # Extract the first word of "icpc", so it can be a program name with args.
5076set dummy icpc; ac_word=$2
5077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5078$as_echo_n "checking for $ac_word... " >&6; }
5079if ${ac_cv_path_ac_pt_CXX+:} false; then :
5080 $as_echo_n "(cached) " >&6
5081else
5082 case $ac_pt_CXX in
5083 [\\/]* | ?:[\\/]*)
5084 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5085 ;;
5086 *)
5087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5088for as_dir in notfound
5089do
5090 IFS=$as_save_IFS
5091 test -z "$as_dir" && as_dir=.
5092 for ac_exec_ext in '' $ac_executable_extensions; do
5093 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5094 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5096 break 2
5097 fi
5098done
5099 done
5100IFS=$as_save_IFS
5101
5102 ;;
5103esac
5104fi
5105ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5106if test -n "$ac_pt_CXX"; then
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5108$as_echo "$ac_pt_CXX" >&6; }
5109else
5110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5111$as_echo "no" >&6; }
5112fi
5113
5114 if test "x$ac_pt_CXX" = x; then
5115 CXX="icpc"
5116 else
5117 case $cross_compiling:$ac_tool_warned in
5118yes:)
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5121ac_tool_warned=yes ;;
5122esac
5123 CXX=$ac_pt_CXX
5124 fi
5125else
5126 CXX="$ac_cv_path_CXX"
5127fi
5128 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005129 esac
5130 if test "$CXX" = "notfound"
5131 then
5132 CXX=""
5133 fi
5134fi
5135if test -z "$CXX"
5136then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 if test -n "$ac_tool_prefix"; then
5138 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5139 do
5140 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5141set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005144if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005145 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005146else
5147 if test -n "$CXX"; then
5148 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5149else
5150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151for as_dir in $PATH
5152do
5153 IFS=$as_save_IFS
5154 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005155 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005156 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005157 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005159 break 2
5160 fi
5161done
Matthias Kloseb9621712010-04-24 17:59:49 +00005162 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005163IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005164
5165fi
5166fi
5167CXX=$ac_cv_prog_CXX
5168if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5170$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005171else
Matthias Kloseb9621712010-04-24 17:59:49 +00005172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005174fi
5175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005176
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005177 test -n "$CXX" && break
5178 done
5179fi
5180if test -z "$CXX"; then
5181 ac_ct_CXX=$CXX
5182 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5183do
5184 # Extract the first word of "$ac_prog", so it can be a program name with args.
5185set dummy $ac_prog; ac_word=$2
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5187$as_echo_n "checking for $ac_word... " >&6; }
5188if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5189 $as_echo_n "(cached) " >&6
5190else
5191 if test -n "$ac_ct_CXX"; then
5192 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5193else
5194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5195for as_dir in $PATH
5196do
5197 IFS=$as_save_IFS
5198 test -z "$as_dir" && as_dir=.
5199 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005200 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005201 ac_cv_prog_ac_ct_CXX="$ac_prog"
5202 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5203 break 2
5204 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005205done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005206 done
5207IFS=$as_save_IFS
5208
5209fi
5210fi
5211ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5212if test -n "$ac_ct_CXX"; then
5213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5214$as_echo "$ac_ct_CXX" >&6; }
5215else
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5217$as_echo "no" >&6; }
5218fi
5219
5220
5221 test -n "$ac_ct_CXX" && break
5222done
5223
5224 if test "x$ac_ct_CXX" = x; then
5225 CXX="notfound"
5226 else
5227 case $cross_compiling:$ac_tool_warned in
5228yes:)
5229{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5230$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5231ac_tool_warned=yes ;;
5232esac
5233 CXX=$ac_ct_CXX
5234 fi
5235fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005236
5237 if test "$CXX" = "notfound"
5238 then
5239 CXX=""
5240 fi
5241fi
5242if test "$preset_cxx" != "$CXX"
5243then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005244 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005245
5246 By default, distutils will build C++ extension modules with \"$CXX\".
5247 If this is not intended, then set CXX on the configure command line.
5248 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005249$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005250
5251 By default, distutils will build C++ extension modules with \"$CXX\".
5252 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005253 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005254fi
5255
5256
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005257MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5258
5259
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5261$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5262cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005263#undef bfin
5264#undef cris
5265#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005266#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005267#undef hppa
5268#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005269#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005270#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005271#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005272#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005273#undef unix
5274#if defined(__linux__)
5275# if defined(__x86_64__) && defined(__LP64__)
5276 x86_64-linux-gnu
5277# elif defined(__x86_64__) && defined(__ILP32__)
5278 x86_64-linux-gnux32
5279# elif defined(__i386__)
5280 i386-linux-gnu
5281# elif defined(__aarch64__) && defined(__AARCH64EL__)
5282# if defined(__ILP32__)
5283 aarch64_ilp32-linux-gnu
5284# else
5285 aarch64-linux-gnu
5286# endif
5287# elif defined(__aarch64__) && defined(__AARCH64EB__)
5288# if defined(__ILP32__)
5289 aarch64_be_ilp32-linux-gnu
5290# else
5291 aarch64_be-linux-gnu
5292# endif
5293# elif defined(__alpha__)
5294 alpha-linux-gnu
5295# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5296# if defined(__ARMEL__)
5297 arm-linux-gnueabihf
5298# else
5299 armeb-linux-gnueabihf
5300# endif
5301# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5302# if defined(__ARMEL__)
5303 arm-linux-gnueabi
5304# else
5305 armeb-linux-gnueabi
5306# endif
5307# elif defined(__hppa__)
5308 hppa-linux-gnu
5309# elif defined(__ia64__)
5310 ia64-linux-gnu
5311# elif defined(__m68k__) && !defined(__mcoldfire__)
5312 m68k-linux-gnu
5313# elif defined(__mips_hard_float) && defined(_MIPSEL)
5314# if _MIPS_SIM == _ABIO32
5315 mipsel-linux-gnu
5316# elif _MIPS_SIM == _ABIN32
5317 mips64el-linux-gnuabin32
5318# elif _MIPS_SIM == _ABI64
5319 mips64el-linux-gnuabi64
5320# else
5321# error unknown platform triplet
5322# endif
5323# elif defined(__mips_hard_float)
5324# if _MIPS_SIM == _ABIO32
5325 mips-linux-gnu
5326# elif _MIPS_SIM == _ABIN32
5327 mips64-linux-gnuabin32
5328# elif _MIPS_SIM == _ABI64
5329 mips64-linux-gnuabi64
5330# else
5331# error unknown platform triplet
5332# endif
5333# elif defined(__or1k__)
5334 or1k-linux-gnu
5335# elif defined(__powerpc__) && defined(__SPE__)
5336 powerpc-linux-gnuspe
5337# elif defined(__powerpc64__)
5338# if defined(__LITTLE_ENDIAN__)
5339 powerpc64le-linux-gnu
5340# else
5341 powerpc64-linux-gnu
5342# endif
5343# elif defined(__powerpc__)
5344 powerpc-linux-gnu
5345# elif defined(__s390x__)
5346 s390x-linux-gnu
5347# elif defined(__s390__)
5348 s390-linux-gnu
5349# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5350 sh4-linux-gnu
5351# elif defined(__sparc__) && defined(__arch64__)
5352 sparc64-linux-gnu
5353# elif defined(__sparc__)
5354 sparc-linux-gnu
5355# else
5356# error unknown platform triplet
5357# endif
5358#elif defined(__FreeBSD_kernel__)
5359# if defined(__LP64__)
5360 x86_64-kfreebsd-gnu
5361# elif defined(__i386__)
5362 i386-kfreebsd-gnu
5363# else
5364# error unknown platform triplet
5365# endif
5366#elif defined(__gnu_hurd__)
5367 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005368#elif defined(__APPLE__)
5369 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005370#else
5371# error unknown platform triplet
5372#endif
5373
5374EOF
5375
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005376if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005377 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5379$as_echo "$PLATFORM_TRIPLET" >&6; }
5380else
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5382$as_echo "none" >&6; }
5383fi
5384rm -f conftest.c conftest.out
5385
5386if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5387 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5388 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5389 fi
5390fi
5391PLATDIR=plat-$MACHDEP
5392
5393
5394
5395
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5397$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5398save_LDFLAGS="$LDFLAGS"
5399LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005400
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5402/* end confdefs.h. */
5403
5404int
5405main ()
5406{
5407
5408 ;
5409 return 0;
5410}
5411_ACEOF
5412if ac_fn_c_try_link "$LINENO"; then :
5413 NO_AS_NEEDED="-Wl,--no-as-needed"
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5415$as_echo "yes" >&6; }
5416else
5417 NO_AS_NEEDED=""
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5419$as_echo "no" >&6; }
5420fi
5421rm -f core conftest.err conftest.$ac_objext \
5422 conftest$ac_exeext conftest.$ac_ext
5423LDFLAGS="$save_LDFLAGS"
5424
5425
5426
5427# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5430$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005431if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433else
5434 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5435 then ac_cv_path_EGREP="$GREP -E"
5436 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005438 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005439 # Loop through the user's path and test for each of PROGNAME-LIST
5440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5442do
5443 IFS=$as_save_IFS
5444 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 for ac_prog in egrep; do
5446 for ac_exec_ext in '' $ac_executable_extensions; do
5447 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005448 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005449# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005450 # Check for GNU $ac_path_EGREP
5451case `"$ac_path_EGREP" --version 2>&1` in
5452*GNU*)
5453 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5454*)
5455 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457 while :
5458 do
5459 cat "conftest.in" "conftest.in" >"conftest.tmp"
5460 mv "conftest.tmp" "conftest.in"
5461 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005463 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5464 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005466 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5467 # Best one so far, save it but keep looking for a better one
5468 ac_cv_path_EGREP="$ac_path_EGREP"
5469 ac_path_EGREP_max=$ac_count
5470 fi
5471 # 10*(2^10) chars as input seems more than enough
5472 test $ac_count -gt 10 && break
5473 done
5474 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5475esac
5476
Matthias Kloseb9621712010-04-24 17:59:49 +00005477 $ac_path_EGREP_found && break 3
5478 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005479 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005480 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005481IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005483 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 +00005484 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005485else
5486 ac_cv_path_EGREP=$EGREP
5487fi
5488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005489 fi
5490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5492$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005493 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005494
5495
Matthias Kloseb9621712010-04-24 17:59:49 +00005496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5497$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005498if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 $as_echo_n "(cached) " >&6
5500else
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005502/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005503#include <stdlib.h>
5504#include <stdarg.h>
5505#include <string.h>
5506#include <float.h>
5507
5508int
5509main ()
5510{
5511
5512 ;
5513 return 0;
5514}
5515_ACEOF
5516if ac_fn_c_try_compile "$LINENO"; then :
5517 ac_cv_header_stdc=yes
5518else
5519 ac_cv_header_stdc=no
5520fi
5521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5522
5523if test $ac_cv_header_stdc = yes; then
5524 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5526/* end confdefs.h. */
5527#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005528
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005529_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005531 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005533else
Matthias Kloseb9621712010-04-24 17:59:49 +00005534 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005535fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005536rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537
Matthias Kloseb9621712010-04-24 17:59:49 +00005538fi
5539
5540if test $ac_cv_header_stdc = yes; then
5541 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5543/* end confdefs.h. */
5544#include <stdlib.h>
5545
5546_ACEOF
5547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5548 $EGREP "free" >/dev/null 2>&1; then :
5549
5550else
5551 ac_cv_header_stdc=no
5552fi
5553rm -f conftest*
5554
5555fi
5556
5557if test $ac_cv_header_stdc = yes; then
5558 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5559 if test "$cross_compiling" = yes; then :
5560 :
5561else
5562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5563/* end confdefs.h. */
5564#include <ctype.h>
5565#include <stdlib.h>
5566#if ((' ' & 0x0FF) == 0x020)
5567# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5568# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5569#else
5570# define ISLOWER(c) \
5571 (('a' <= (c) && (c) <= 'i') \
5572 || ('j' <= (c) && (c) <= 'r') \
5573 || ('s' <= (c) && (c) <= 'z'))
5574# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5575#endif
5576
5577#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5578int
5579main ()
5580{
5581 int i;
5582 for (i = 0; i < 256; i++)
5583 if (XOR (islower (i), ISLOWER (i))
5584 || toupper (i) != TOUPPER (i))
5585 return 2;
5586 return 0;
5587}
5588_ACEOF
5589if ac_fn_c_try_run "$LINENO"; then :
5590
5591else
5592 ac_cv_header_stdc=no
5593fi
5594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5595 conftest.$ac_objext conftest.beam conftest.$ac_ext
5596fi
5597
5598fi
5599fi
5600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5601$as_echo "$ac_cv_header_stdc" >&6; }
5602if test $ac_cv_header_stdc = yes; then
5603
5604$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5605
5606fi
5607
5608# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5609for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5610 inttypes.h stdint.h unistd.h
5611do :
5612 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5613ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5614"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005615if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 cat >>confdefs.h <<_ACEOF
5617#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5618_ACEOF
5619
5620fi
5621
5622done
5623
5624
5625
5626 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 +02005627if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005628 MINIX=yes
5629else
5630 MINIX=
5631fi
5632
5633
5634 if test "$MINIX" = yes; then
5635
5636$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5637
5638
5639$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5640
5641
5642$as_echo "#define _MINIX 1" >>confdefs.h
5643
5644 fi
5645
5646
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5648$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005649if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005650 $as_echo_n "(cached) " >&6
5651else
5652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5653/* end confdefs.h. */
5654
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005655# define __EXTENSIONS__ 1
5656 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005657int
5658main ()
5659{
5660
5661 ;
5662 return 0;
5663}
5664_ACEOF
5665if ac_fn_c_try_compile "$LINENO"; then :
5666 ac_cv_safe_to_define___extensions__=yes
5667else
5668 ac_cv_safe_to_define___extensions__=no
5669fi
5670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5671fi
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5673$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5674 test $ac_cv_safe_to_define___extensions__ = yes &&
5675 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5676
5677 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5678
5679 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5680
5681 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5682
5683 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5684
5685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687# Check for unsupported systems
5688case $ac_sys_system/$ac_sys_release in
5689atheos*|Linux*/1*)
5690 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5691 echo See README for details.
5692 exit 1;;
5693esac
5694
5695
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5697$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
5699# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005700if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701 withval=$with_suffix;
5702 case $withval in
5703 no) EXEEXT=;;
5704 yes) EXEEXT=.exe;;
5705 *) EXEEXT=$withval;;
5706 esac
5707fi
5708
Matthias Kloseb9621712010-04-24 17:59:49 +00005709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5710$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
5712# Test whether we're running on a non-case-sensitive system, in which
5713# case we give a warning if no ext is given
5714
Matthias Kloseb9621712010-04-24 17:59:49 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5716$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717if test ! -d CaseSensitiveTestDir; then
5718mkdir CaseSensitiveTestDir
5719fi
5720
5721if test -d casesensitivetestdir
5722then
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5724$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 BUILDEXEEXT=.exe
5726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729 BUILDEXEEXT=$EXEEXT
5730fi
5731rmdir CaseSensitiveTestDir
5732
5733case $MACHDEP in
5734bsdos*)
5735 case $CC in
5736 gcc) CC="$CC -D_HAVE_BSDI";;
5737 esac;;
5738esac
5739
5740case $ac_sys_system in
5741hp*|HP*)
5742 case $CC in
5743 cc|*/cc) CC="$CC -Ae";;
5744 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745esac
5746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5749$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750if test -z "$LIBRARY"
5751then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005752 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5755$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
5757# LDLIBRARY is the name of the library to link against (as opposed to the
5758# name of the library into which to insert object files). BLDLIBRARY is also
5759# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5760# is blank as the main program is not linked directly against LDLIBRARY.
5761# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5762# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5763# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5764# DLLLIBRARY is the shared (i.e., DLL) library.
5765#
5766# RUNSHARED is used to run shared python without installed libraries
5767#
5768# INSTSONAME is the name of the shared library that will be use to install
5769# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005770#
5771# LDVERSION is the shared library version number, normally the Python version
5772# with the ABI build flags appended.
5773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
5775
5776
5777
5778
5779
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781LDLIBRARY="$LIBRARY"
5782BLDLIBRARY='$(LDLIBRARY)'
5783INSTSONAME='$(LDLIBRARY)'
5784DLLLIBRARY=''
5785LDLIBRARYDIR=''
5786RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005787LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788
5789# LINKCC is the command that links the python executable -- default is $(CC).
5790# If CXX is set, and if it is needed to link a main function that was
5791# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5792# python might then depend on the C++ runtime
5793# This is altered for AIX in order to build the export list before
5794# linking.
5795
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5797$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798if test -z "$LINKCC"
5799then
5800 LINKCC='$(PURIFY) $(MAINCC)'
5801 case $ac_sys_system in
5802 AIX*)
5803 exp_extra="\"\""
5804 if test $ac_sys_release -ge 5 -o \
5805 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5806 exp_extra="."
5807 fi
5808 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 QNX*)
5810 # qcc must be used because the other compilers do not
5811 # support -N.
5812 LINKCC=qcc;;
5813 esac
5814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5816$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817
5818# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5819# make sure we default having it set to "no": this is used by
5820# distutils.unixccompiler to know if it should add --enable-new-dtags
5821# to linker command lines, and failing to detect GNU ld simply results
5822# in the same bahaviour as before.
5823
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5825$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826ac_prog=ld
5827if test "$GCC" = yes; then
5828 ac_prog=`$CC -print-prog-name=ld`
5829fi
5830case `"$ac_prog" -V 2>&1 < /dev/null` in
5831 *GNU*)
5832 GNULD=yes;;
5833 *)
5834 GNULD=no;;
5835esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5837$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5840$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005841if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005842 $as_echo_n "(cached) " >&6
5843else
5844 ac_cv_c_inline=no
5845for ac_kw in inline __inline__ __inline; do
5846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5847/* end confdefs.h. */
5848#ifndef __cplusplus
5849typedef int foo_t;
5850static $ac_kw foo_t static_foo () {return 0; }
5851$ac_kw foo_t foo () {return 0; }
5852#endif
5853
5854_ACEOF
5855if ac_fn_c_try_compile "$LINENO"; then :
5856 ac_cv_c_inline=$ac_kw
5857fi
5858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5859 test "$ac_cv_c_inline" != no && break
5860done
5861
5862fi
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5864$as_echo "$ac_cv_c_inline" >&6; }
5865
5866case $ac_cv_c_inline in
5867 inline | yes) ;;
5868 *)
5869 case $ac_cv_c_inline in
5870 no) ac_val=;;
5871 *) ac_val=$ac_cv_c_inline;;
5872 esac
5873 cat >>confdefs.h <<_ACEOF
5874#ifndef __cplusplus
5875#define inline $ac_val
5876#endif
5877_ACEOF
5878 ;;
5879esac
5880
5881if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005882
5883$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005884
5885
5886fi
5887
5888
Matthias Kloseb9621712010-04-24 17:59:49 +00005889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5890$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005892if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 enableval=$enable_shared;
5894fi
5895
5896
5897if test -z "$enable_shared"
5898then
5899 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005900 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 enable_shared="yes";;
5902 *)
5903 enable_shared="no";;
5904 esac
5905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5907$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
Matthias Kloseb9621712010-04-24 17:59:49 +00005909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5910$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005912if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005913 enableval=$enable_profiling;
5914fi
5915
5916if test "x$enable_profiling" = xyes; then
5917 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005918 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920/* end confdefs.h. */
5921int main() { return 0; }
5922_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005923if ac_fn_c_try_link "$LINENO"; then :
5924
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005926 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005928rm -f core conftest.err conftest.$ac_objext \
5929 conftest$ac_exeext conftest.$ac_ext
5930 CC="$ac_save_cc"
5931else
5932 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5935$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936
doko@ubuntu.comba015832012-06-30 16:52:05 +02005937if test "x$enable_profiling" = xyes; then
5938 BASECFLAGS="-pg $BASECFLAGS"
5939 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940fi
5941
Matthias Kloseb9621712010-04-24 17:59:49 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5943$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944
5945# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5946# library that we build, but we do not want to link against it (we
5947# will find it with a -framework option). For this reason there is an
5948# extra variable BLDLIBRARY against which Python and the extension
5949# modules are linked, BLDLIBRARY. This is normally the same as
5950# LDLIBRARY, but empty for MacOSX framework builds.
5951if test "$enable_framework"
5952then
5953 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005954 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 BLDLIBRARY=''
5956else
5957 BLDLIBRARY='$(LDLIBRARY)'
5958fi
5959
5960# Other platforms follow
5961if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005962 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963
Matthias Kloseb9621712010-04-24 17:59:49 +00005964$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965
5966 case $ac_sys_system in
5967 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).dll.a'
5969 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 ;;
5971 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 LDLIBRARY='libpython$(LDVERSION).so'
5973 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005974 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005976 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005977 then
5978 PY3LIBRARY=libpython3.so
5979 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005981 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005982 LDLIBRARY='libpython$(LDVERSION).so'
5983 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005984 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005986 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005987 then
5988 PY3LIBRARY=libpython3.so
5989 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 ;;
5991 hp*|HP*)
5992 case `uname -m` in
5993 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005994 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995 ;;
5996 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005997 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 ;;
5999 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006000 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006001 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006004 LDLIBRARY='libpython$(LDVERSION).dylib'
6005 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006006 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006008 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006009 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006010 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006011 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012
6013 esac
6014else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006015 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016 case $ac_sys_system in
6017 CYGWIN*)
6018 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006019 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020 ;;
6021 esac
6022fi
6023
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006024if test "$cross_compiling" = yes; then
6025 RUNSHARED=
6026fi
6027
Matthias Kloseb9621712010-04-24 17:59:49 +00006028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6029$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030
6031if test -n "$ac_tool_prefix"; then
6032 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6033set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6035$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006036if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038else
6039 if test -n "$RANLIB"; then
6040 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6041else
6042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH
6044do
6045 IFS=$as_save_IFS
6046 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006047 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051 break 2
6052 fi
6053done
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055IFS=$as_save_IFS
6056
6057fi
6058fi
6059RANLIB=$ac_cv_prog_RANLIB
6060if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6062$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063else
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066fi
6067
6068
6069fi
6070if test -z "$ac_cv_prog_RANLIB"; then
6071 ac_ct_RANLIB=$RANLIB
6072 # Extract the first word of "ranlib", so it can be a program name with args.
6073set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6075$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006076if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078else
6079 if test -n "$ac_ct_RANLIB"; then
6080 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6081else
6082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH
6084do
6085 IFS=$as_save_IFS
6086 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091 break 2
6092 fi
6093done
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095IFS=$as_save_IFS
6096
6097fi
6098fi
6099ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6100if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6102$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103else
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6105$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106fi
6107
6108 if test "x$ac_ct_RANLIB" = x; then
6109 RANLIB=":"
6110 else
6111 case $cross_compiling:$ac_tool_warned in
6112yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006113{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6114$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115ac_tool_warned=yes ;;
6116esac
6117 RANLIB=$ac_ct_RANLIB
6118 fi
6119else
6120 RANLIB="$ac_cv_prog_RANLIB"
6121fi
6122
6123
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006124if test -n "$ac_tool_prefix"; then
6125 for ac_prog in ar aal
6126 do
6127 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6128set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6130$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006131if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006132 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133else
6134 if test -n "$AR"; then
6135 ac_cv_prog_AR="$AR" # Let the user override the test.
6136else
6137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140 IFS=$as_save_IFS
6141 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006142 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006144 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146 break 2
6147 fi
6148done
Matthias Kloseb9621712010-04-24 17:59:49 +00006149 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150IFS=$as_save_IFS
6151
6152fi
6153fi
6154AR=$ac_cv_prog_AR
6155if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6157$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158else
Matthias Kloseb9621712010-04-24 17:59:49 +00006159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6160$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161fi
6162
6163
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006164 test -n "$AR" && break
6165 done
6166fi
6167if test -z "$AR"; then
6168 ac_ct_AR=$AR
6169 for ac_prog in ar aal
6170do
6171 # Extract the first word of "$ac_prog", so it can be a program name with args.
6172set dummy $ac_prog; ac_word=$2
6173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6174$as_echo_n "checking for $ac_word... " >&6; }
6175if ${ac_cv_prog_ac_ct_AR+:} false; then :
6176 $as_echo_n "(cached) " >&6
6177else
6178 if test -n "$ac_ct_AR"; then
6179 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6180else
6181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182for as_dir in $PATH
6183do
6184 IFS=$as_save_IFS
6185 test -z "$as_dir" && as_dir=.
6186 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006188 ac_cv_prog_ac_ct_AR="$ac_prog"
6189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6190 break 2
6191 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006193 done
6194IFS=$as_save_IFS
6195
6196fi
6197fi
6198ac_ct_AR=$ac_cv_prog_ac_ct_AR
6199if test -n "$ac_ct_AR"; then
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6201$as_echo "$ac_ct_AR" >&6; }
6202else
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6204$as_echo "no" >&6; }
6205fi
6206
6207
6208 test -n "$ac_ct_AR" && break
6209done
6210
6211 if test "x$ac_ct_AR" = x; then
6212 AR="ar"
6213 else
6214 case $cross_compiling:$ac_tool_warned in
6215yes:)
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6217$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6218ac_tool_warned=yes ;;
6219esac
6220 AR=$ac_ct_AR
6221 fi
6222fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223
6224
6225# tweak ARFLAGS only if the user didn't set it on the command line
6226
6227if test -z "$ARFLAGS"
6228then
6229 ARFLAGS="rc"
6230fi
6231
doko@ubuntu.com58844492012-06-30 18:25:32 +02006232if test -n "$ac_tool_prefix"; then
6233 for ac_prog in readelf
6234 do
6235 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6236set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6238$as_echo_n "checking for $ac_word... " >&6; }
6239if ${ac_cv_prog_READELF+:} false; then :
6240 $as_echo_n "(cached) " >&6
6241else
6242 if test -n "$READELF"; then
6243 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6244else
6245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6246for as_dir in $PATH
6247do
6248 IFS=$as_save_IFS
6249 test -z "$as_dir" && as_dir=.
6250 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006251 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006252 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6253 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6254 break 2
6255 fi
6256done
6257 done
6258IFS=$as_save_IFS
6259
6260fi
6261fi
6262READELF=$ac_cv_prog_READELF
6263if test -n "$READELF"; then
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6265$as_echo "$READELF" >&6; }
6266else
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6268$as_echo "no" >&6; }
6269fi
6270
6271
6272 test -n "$READELF" && break
6273 done
6274fi
6275if test -z "$READELF"; then
6276 ac_ct_READELF=$READELF
6277 for ac_prog in readelf
6278do
6279 # Extract the first word of "$ac_prog", so it can be a program name with args.
6280set dummy $ac_prog; ac_word=$2
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6282$as_echo_n "checking for $ac_word... " >&6; }
6283if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6284 $as_echo_n "(cached) " >&6
6285else
6286 if test -n "$ac_ct_READELF"; then
6287 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6288else
6289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6290for as_dir in $PATH
6291do
6292 IFS=$as_save_IFS
6293 test -z "$as_dir" && as_dir=.
6294 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006295 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006296 ac_cv_prog_ac_ct_READELF="$ac_prog"
6297 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6298 break 2
6299 fi
6300done
6301 done
6302IFS=$as_save_IFS
6303
6304fi
6305fi
6306ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6307if test -n "$ac_ct_READELF"; then
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6309$as_echo "$ac_ct_READELF" >&6; }
6310else
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6312$as_echo "no" >&6; }
6313fi
6314
6315
6316 test -n "$ac_ct_READELF" && break
6317done
6318
6319 if test "x$ac_ct_READELF" = x; then
6320 READELF=":"
6321 else
6322 case $cross_compiling:$ac_tool_warned in
6323yes:)
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6326ac_tool_warned=yes ;;
6327esac
6328 READELF=$ac_ct_READELF
6329 fi
6330fi
6331
6332if test "$cross_compiling" = yes; then
6333 case "$READELF" in
6334 readelf|:)
6335 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6336 ;;
6337 esac
6338fi
6339
6340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342case $MACHDEP in
6343bsdos*|hp*|HP*)
6344 # install -d does not work on BSDI or HP-UX
6345 if test -z "$INSTALL"
6346 then
6347 INSTALL="${srcdir}/install-sh -c"
6348 fi
6349esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350# Find a good install program. We prefer a C program (faster),
6351# so one script is as good as another. But avoid the broken or
6352# incompatible versions:
6353# SysV /etc/install, /usr/sbin/install
6354# SunOS /usr/etc/install
6355# IRIX /sbin/install
6356# AIX /bin/install
6357# AmigaOS /C/install, which installs bootblocks on floppy discs
6358# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6359# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6360# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6361# OS/2's system install, which has a completely different semantic
6362# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006363# Reject install programs that cannot install multiple files.
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6365$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006367if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006368 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369else
6370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6371for as_dir in $PATH
6372do
6373 IFS=$as_save_IFS
6374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006375 # Account for people who put trailing slashes in PATH elements.
6376case $as_dir/ in #((
6377 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006379 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380 /usr/ucb/* ) ;;
6381 *)
6382 # OSF1 and SCO ODT 3.0 have their own names for install.
6383 # Don't use installbsd from OSF since it installs stuff as root
6384 # by default.
6385 for ac_prog in ginstall scoinst install; do
6386 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006387 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388 if test $ac_prog = install &&
6389 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6390 # AIX install. It has an incompatible calling convention.
6391 :
6392 elif test $ac_prog = install &&
6393 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6394 # program-specific install script used by HP pwplus--don't use.
6395 :
6396 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006397 rm -rf conftest.one conftest.two conftest.dir
6398 echo one > conftest.one
6399 echo two > conftest.two
6400 mkdir conftest.dir
6401 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6402 test -s conftest.one && test -s conftest.two &&
6403 test -s conftest.dir/conftest.one &&
6404 test -s conftest.dir/conftest.two
6405 then
6406 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6407 break 3
6408 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409 fi
6410 fi
6411 done
6412 done
6413 ;;
6414esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006415
6416 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417IFS=$as_save_IFS
6418
Matthias Kloseb9621712010-04-24 17:59:49 +00006419rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420
6421fi
6422 if test "${ac_cv_path_install+set}" = set; then
6423 INSTALL=$ac_cv_path_install
6424 else
6425 # As a last resort, use the slow shell script. Don't cache a
6426 # value for INSTALL within a source directory, because that will
6427 # break other packages using the cache if that directory is
6428 # removed, or if the value is a relative name.
6429 INSTALL=$ac_install_sh
6430 fi
6431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6433$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434
6435# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6436# It thinks the first close brace ends the variable substitution.
6437test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6438
6439test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6440
6441test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6442
Matthias Klose93a0ef12012-03-15 18:08:34 +01006443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6444$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6445if test -z "$MKDIR_P"; then
6446 if ${ac_cv_path_mkdir+:} false; then :
6447 $as_echo_n "(cached) " >&6
6448else
6449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6451do
6452 IFS=$as_save_IFS
6453 test -z "$as_dir" && as_dir=.
6454 for ac_prog in mkdir gmkdir; do
6455 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006456 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006457 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6458 'mkdir (GNU coreutils) '* | \
6459 'mkdir (coreutils) '* | \
6460 'mkdir (fileutils) '4.1*)
6461 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6462 break 3;;
6463 esac
6464 done
6465 done
6466 done
6467IFS=$as_save_IFS
6468
6469fi
6470
6471 test -d ./--version && rmdir ./--version
6472 if test "${ac_cv_path_mkdir+set}" = set; then
6473 MKDIR_P="$ac_cv_path_mkdir -p"
6474 else
6475 # As a last resort, use the slow shell script. Don't cache a
6476 # value for MKDIR_P within a source directory, because that will
6477 # break other packages using the cache if that directory is
6478 # removed, or if the value is a relative name.
6479 MKDIR_P="$ac_install_sh -d"
6480 fi
6481fi
6482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6483$as_echo "$MKDIR_P" >&6; }
6484
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006485
6486# Not every filesystem supports hard links
6487
6488if test -z "$LN" ; then
6489 case $ac_sys_system in
6490 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006491 *) LN=ln;;
6492 esac
6493fi
6494
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006495# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006496
6497ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006498
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006499# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6501$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006502
6503# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006504if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505 withval=$with_pydebug;
6506if test "$withval" != no
6507then
6508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006510
Matthias Kloseb9621712010-04-24 17:59:49 +00006511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6512$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006514 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006515else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6516$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006517fi
6518else
Matthias Kloseb9621712010-04-24 17:59:49 +00006519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6520$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006521fi
6522
6523
Brett Cannon8c94f972016-09-06 17:15:21 -07006524# Enable optimization flags
6525
6526
6527Py_OPT='false'
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6529$as_echo_n "checking for --with-optimizations... " >&6; }
6530
6531# Check whether --with-optimizations was given.
6532if test "${with_optimizations+set}" = set; then :
6533 withval=$with_optimizations;
6534if test "$withval" != no
6535then
6536 Py_OPT='true'
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6538$as_echo "yes" >&6; };
6539else
6540 Py_OPT='false'
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6542$as_echo "no" >&6; };
6543fi
6544else
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546$as_echo "no" >&6; }
6547fi
6548
6549if test "$Py_OPT" = 'true' ; then
6550 Py_LTO='true'
6551 case $ac_sys_system in
6552 Darwin*)
6553 # At least on macOS El Capitan, LTO does not work with PGO.
6554 Py_LTO='false'
6555 ;;
6556 esac
6557 DEF_MAKE_ALL_RULE="profile-opt"
6558 DEF_MAKE_RULE="build_all"
6559else
6560 DEF_MAKE_ALL_RULE="build_all"
6561 DEF_MAKE_RULE="all"
6562fi
6563
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006564# Enable LTO flags
6565
6566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6567$as_echo_n "checking for --with-lto... " >&6; }
6568
6569# Check whether --with-lto was given.
6570if test "${with_lto+set}" = set; then :
6571 withval=$with_lto;
6572if test "$withval" != no
6573then
6574 Py_LTO='true'
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6576$as_echo "yes" >&6; };
6577else
6578 Py_LTO='false'
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6580$as_echo "no" >&6; };
6581fi
6582else
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; }
6585fi
6586
6587if test "$Py_LTO" = 'true' ; then
6588 case $CC in
6589 *clang*)
6590 # Any changes made here should be reflected in the GCC+Darwin case below
6591 LTOFLAGS="-flto"
6592 ;;
6593 *gcc*)
6594 case $ac_sys_system in
6595 Darwin*)
6596 LTOFLAGS="-flto"
6597 ;;
6598 *)
6599 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6600 ;;
6601 esac
6602 ;;
6603 esac
6604fi
6605
Brett Cannon7188a3e2015-09-18 15:13:44 -07006606# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006607
6608
6609
6610
6611
6612
Brett Cannon7188a3e2015-09-18 15:13:44 -07006613# Extract the first word of "llvm-profdata", so it can be a program name with args.
6614set dummy llvm-profdata; ac_word=$2
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6618 $as_echo_n "(cached) " >&6
6619else
6620 if test -n "$LLVM_PROF_FOUND"; then
6621 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6622else
6623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6624for as_dir in $PATH
6625do
6626 IFS=$as_save_IFS
6627 test -z "$as_dir" && as_dir=.
6628 for ac_exec_ext in '' $ac_executable_extensions; do
6629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6630 ac_cv_prog_LLVM_PROF_FOUND="found"
6631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6632 break 2
6633 fi
6634done
6635 done
6636IFS=$as_save_IFS
6637
6638 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6639fi
6640fi
6641LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6642if test -n "$LLVM_PROF_FOUND"; then
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6644$as_echo "$LLVM_PROF_FOUND" >&6; }
6645else
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6647$as_echo "no" >&6; }
6648fi
6649
6650
6651LLVM_PROF_ERR=no
6652case $CC in
6653 *clang*)
6654 # Any changes made here should be reflected in the GCC+Darwin case below
6655 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6656 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6657 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6658 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6659 if test $LLVM_PROF_FOUND = not-found
6660 then
6661 LLVM_PROF_ERR=yes
6662 fi
6663 ;;
6664 *gcc*)
6665 case $ac_sys_system in
6666 Darwin*)
6667 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6668 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6669 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6670 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6671 if test $LLVM_PROF_FOUND = not-found
6672 then
6673 LLVM_PROF_ERR=yes
6674 fi
6675 ;;
6676 *)
6677 PGO_PROF_GEN_FLAG="-fprofile-generate"
6678 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6679 LLVM_PROF_MERGER="true"
6680 LLVM_PROF_FILE=""
6681 ;;
6682 esac
6683 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006684 *icc*)
6685 PGO_PROF_GEN_FLAG="-prof-gen"
6686 PGO_PROF_USE_FLAG="-prof-use"
6687 LLVM_PROF_MERGER="true"
6688 LLVM_PROF_FILE=""
6689 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006690esac
6691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6693# merged with this chunk of code?
6694
6695# Optimizer/debugger flags
6696# ------------------------
6697# (The following bit of code is complicated enough - please keep things
6698# indented properly. Just pretend you're editing Python code. ;-)
6699
6700# There are two parallel sets of case statements below, one that checks to
6701# see if OPT was set and one that does BASECFLAGS setting based upon
6702# compiler and platform. BASECFLAGS tweaks need to be made even if the
6703# user set OPT.
6704
6705# tweak OPT based on compiler and platform, only if the user didn't set
6706# it on the command line
6707
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006708if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709then
6710 case $GCC in
6711 yes)
6712 if test "$CC" != 'g++' ; then
6713 STRICT_PROTO="-Wstrict-prototypes"
6714 fi
6715 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6716 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6717 WRAP="-fwrapv"
6718 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006719
6720 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006721 case $CC in
6722 *clang*) WRAP="-fwrapv"
6723 ;;
6724 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726 case $ac_cv_prog_cc_g in
6727 yes)
6728 if test "$Py_DEBUG" = 'true' ; then
6729 # Optimization messes up debuggers, so turn it off for
6730 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006731 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6732 OPT="-g -Og -Wall $STRICT_PROTO"
6733 else
6734 OPT="-g -O0 -Wall $STRICT_PROTO"
6735 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736 else
6737 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6738 fi
6739 ;;
6740 *)
6741 OPT="-O3 -Wall $STRICT_PROTO"
6742 ;;
6743 esac
6744 case $ac_sys_system in
6745 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6746 ;;
6747 esac
6748 ;;
6749
6750 *)
6751 OPT="-O"
6752 ;;
6753 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754fi
6755
6756
6757
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006758
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759# The -arch flags for universal builds on OSX
6760UNIVERSAL_ARCH_FLAGS=
6761
6762
6763# tweak BASECFLAGS based on compiler and platform
6764case $GCC in
6765yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006766 # Python doesn't violate C99 aliasing rules, but older versions of
6767 # GCC produce warnings for legal Python code. Enable
6768 # -fno-strict-aliasing on versions of GCC that support but produce
6769 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6771$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006772 ac_save_cc="$CC"
6773 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006774 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006775 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006776 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006777else
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006780
Matthias Kloseb159a552010-04-25 21:00:44 +00006781
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006782int
6783main ()
6784{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006785
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006786 ;
6787 return 0;
6788}
Matthias Kloseb159a552010-04-25 21:00:44 +00006789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006791if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006792
6793 CC="$ac_save_cc -fstrict-aliasing"
6794 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006796/* end confdefs.h. */
6797
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006798 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006799int
6800main ()
6801{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006802double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006803 ;
6804 return 0;
6805}
Matthias Kloseb159a552010-04-25 21:00:44 +00006806
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006808if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006809
6810 ac_cv_no_strict_aliasing=no
6811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812else
Matthias Kloseb159a552010-04-25 21:00:44 +00006813
6814 ac_cv_no_strict_aliasing=yes
6815
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006816fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006818
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006819else
Matthias Kloseb159a552010-04-25 21:00:44 +00006820
6821 ac_cv_no_strict_aliasing=no
6822
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006825fi
6826
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006827 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6830$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006831 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832 then
6833 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6834 fi
6835
Zachary Ware5af85642015-12-21 12:09:17 -06006836 # ICC doesn't recognize the option, but only emits a warning
6837 ## XXX does it emit an unused result warning and can it be disabled?
6838 case "$CC" in
6839 *icc*)
6840 ac_cv_disable_unused_result_warning=no
6841 ;;
6842 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6844$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6845 ac_save_cc="$CC"
6846 CC="$CC -Wunused-result -Werror"
6847 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006848 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006849 $as_echo_n "(cached) " >&6
6850else
6851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6852/* end confdefs.h. */
6853
6854
6855int
6856main ()
6857{
6858
6859 ;
6860 return 0;
6861}
6862
6863_ACEOF
6864if ac_fn_c_try_compile "$LINENO"; then :
6865
6866 ac_cv_disable_unused_result_warning=yes
6867
6868else
6869
6870 ac_cv_disable_unused_result_warning=no
6871
6872fi
6873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6874fi
6875
6876 CFLAGS="$save_CFLAGS"
6877 CC="$ac_save_cc"
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6879$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006880 ;;
6881 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006882
6883 if test $ac_cv_disable_unused_result_warning = yes
6884 then
6885 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6886 fi
6887
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6889$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6890 ac_save_cc="$CC"
6891 CC="$CC -Werror=declaration-after-statement"
6892 save_CFLAGS="$CFLAGS"
6893 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6894 $as_echo_n "(cached) " >&6
6895else
6896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6897/* end confdefs.h. */
6898
6899
6900int
6901main ()
6902{
6903
6904 ;
6905 return 0;
6906}
6907
6908_ACEOF
6909if ac_fn_c_try_compile "$LINENO"; then :
6910
6911 ac_cv_declaration_after_statement_warning=yes
6912
6913else
6914
6915 ac_cv_declaration_after_statement_warning=no
6916
6917fi
6918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6919fi
6920
6921 CFLAGS="$save_CFLAGS"
6922 CC="$ac_save_cc"
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6924$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6925
6926 if test $ac_cv_declaration_after_statement_warning = yes
6927 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006928 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006929 fi
6930
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6932$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6933 ac_save_cc="$CC"
6934 CC="$CC -Wsign-compare"
6935 save_CFLAGS="$CFLAGS"
6936 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6937 $as_echo_n "(cached) " >&6
6938else
6939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6940/* end confdefs.h. */
6941
6942
6943int
6944main ()
6945{
6946
6947 ;
6948 return 0;
6949}
6950
6951_ACEOF
6952if ac_fn_c_try_compile "$LINENO"; then :
6953
6954 ac_cv_enable_sign_compare_warning=yes
6955
6956else
6957
6958 ac_cv_enable_sign_compare_warning=no
6959
6960fi
6961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6962fi
6963
6964 CFLAGS="$save_CFLAGS"
6965 CC="$ac_save_cc"
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6967$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6968
6969 if test $ac_cv_enable_sign_compare_warning = yes
6970 then
6971 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6972 fi
6973
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6975$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6976 ac_save_cc="$CC"
6977 CC="$CC -Wunreachable-code"
6978 save_CFLAGS="$CFLAGS"
6979 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6980 $as_echo_n "(cached) " >&6
6981else
6982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6983/* end confdefs.h. */
6984
6985
6986int
6987main ()
6988{
6989
6990 ;
6991 return 0;
6992}
6993
6994_ACEOF
6995if ac_fn_c_try_compile "$LINENO"; then :
6996
6997 ac_cv_enable_unreachable_code_warning=yes
6998
6999else
7000
7001 ac_cv_enable_unreachable_code_warning=no
7002
7003fi
7004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7005fi
7006
7007 CFLAGS="$save_CFLAGS"
7008 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007009
7010 # Don't enable unreachable code warning in debug mode, since it usually
7011 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007012 # Issue #24324: Unfortunately, the unreachable code warning does not work
7013 # correctly on gcc and has been silently removed from the compiler.
7014 # It is supported on clang but on OS X systems gcc may be an alias
7015 # for clang. Try to determine if the compiler is not really gcc and,
7016 # if so, only then enable the warning.
7017 if test $ac_cv_enable_unreachable_code_warning = yes && \
7018 test "$Py_DEBUG" != "true" && \
7019 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007020 then
7021 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007022 else
7023 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007024 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7026$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007027
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7029 # support. Without this, treatment of subnormals doesn't follow
7030 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007031 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007032 alpha*)
7033 BASECFLAGS="$BASECFLAGS -mieee"
7034 ;;
7035 esac
7036
7037 case $ac_sys_system in
7038 SCO_SV*)
7039 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7040 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007041
7042 # is there any other compiler on Darwin besides gcc?
7043 Darwin*)
7044 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7045 # used to be here, but non-Apple gcc doesn't accept them.
7046 if test "${CC}" = gcc
7047 then
7048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007049$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007050 case "${UNIVERSALSDK}" in
7051 */MacOSX10.4u.sdk)
7052 # Build using 10.4 SDK, force usage of gcc when the
7053 # compiler is gcc, otherwise the user will get very
7054 # confusing error messages when building on OSX 10.6
7055 CC=gcc-4.0
7056 CPP=cpp-4.0
7057 ;;
7058 esac
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007060$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007061 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007062
Ned Deily87adb6e2013-10-18 21:09:56 -07007063 if test "${enable_universalsdk}"
7064 then
7065 case "$UNIVERSAL_ARCHS" in
7066 32-bit)
7067 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7068 LIPO_32BIT_FLAGS=""
7069 ARCH_RUN_32BIT=""
7070 ;;
7071 64-bit)
7072 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7073 LIPO_32BIT_FLAGS=""
7074 ARCH_RUN_32BIT="true"
7075 ;;
7076 all)
7077 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7078 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7079 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7080 ;;
7081 intel)
7082 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7083 LIPO_32BIT_FLAGS="-extract i386"
7084 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7085 ;;
7086 intel-32)
7087 UNIVERSAL_ARCH_FLAGS="-arch i386"
7088 LIPO_32BIT_FLAGS=""
7089 ARCH_RUN_32BIT=""
7090 ;;
7091 3-way)
7092 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7093 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7094 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7095 ;;
7096 *)
7097 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7098 ;;
7099 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007100
Ned Deily87adb6e2013-10-18 21:09:56 -07007101 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7102 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7103 if test "${UNIVERSALSDK}" != "/"
7104 then
7105 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7106 fi
7107 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007108
Ned Deily87adb6e2013-10-18 21:09:56 -07007109 # Calculate an appropriate deployment target for this build:
7110 # The deployment target value is used explicitly to enable certain
7111 # features are enabled (such as builtin libedit support for readline)
7112 # through the use of Apple's Availabiliy Macros and is used as a
7113 # component of the string returned by distutils.get_platform().
7114 #
7115 # Use the value from:
7116 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7117 # 2. the operating system version of the build machine if >= 10.6
7118 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7119 # below to pick either 10.3, 10.4, or 10.5 as the target.
7120 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007121
Ned Deily87adb6e2013-10-18 21:09:56 -07007122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7123$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007124 cur_target_major=`sw_vers -productVersion | \
7125 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7126 cur_target_minor=`sw_vers -productVersion | \
7127 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7128 cur_target="${cur_target_major}.${cur_target_minor}"
7129 if test ${cur_target_major} -eq 10 && \
7130 test ${cur_target_minor} -ge 3 && \
7131 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007132 then
Ned Deily36820b62014-06-25 13:44:22 -07007133 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007134 cur_target=10.3
7135 if test ${enable_universalsdk}
7136 then
7137 case "$UNIVERSAL_ARCHS" in
7138 all|3-way|intel|64-bit)
7139 # These configurations were first supported in 10.5
7140 cur_target='10.5'
7141 ;;
7142 esac
7143 else
7144 if test `/usr/bin/arch` = "i386"
7145 then
7146 # 10.4 was the first release to support Intel archs
7147 cur_target="10.4"
7148 fi
7149 fi
7150 fi
7151 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007152
Ned Deily87adb6e2013-10-18 21:09:56 -07007153 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7154 # environment with a value that is the same as what we'll use
7155 # in the Makefile to ensure that we'll get the same compiler
7156 # environment during configure and build time.
7157 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7158 export MACOSX_DEPLOYMENT_TARGET
7159 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7161$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007162
Ned Deily87adb6e2013-10-18 21:09:56 -07007163 # end of Darwin* tests
7164 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007165 esac
7166 ;;
7167
7168*)
7169 case $ac_sys_system in
7170 OpenUNIX*|UnixWare*)
7171 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7172 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007173 SCO_SV*)
7174 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7175 ;;
7176 esac
7177 ;;
7178esac
7179
Zachary Ware5af85642015-12-21 12:09:17 -06007180# ICC needs -fp-model strict or floats behave badly
7181case "$CC" in
7182*icc*)
7183 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7184 ;;
7185esac
7186
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007187if test "$Py_DEBUG" = 'true'; then
7188 :
7189else
7190 OPT="-DNDEBUG $OPT"
7191fi
7192
7193if test "$ac_arch_flags"
7194then
7195 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7196fi
7197
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007198# On some compilers, pthreads are available without further options
7199# (e.g. MacOS X). On some of these systems, the compiler will not
7200# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7201# So we have to see first whether pthreads are available without
7202# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7204$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007205if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007206 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007207else
Matthias Kloseb9621712010-04-24 17:59:49 +00007208 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007209 ac_cv_pthread_is_default=no
7210else
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007212/* end confdefs.h. */
7213
Stefan Krah7dba5942012-11-22 22:49:11 +01007214#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215#include <pthread.h>
7216
7217void* routine(void* p){return NULL;}
7218
7219int main(){
7220 pthread_t p;
7221 if(pthread_create(&p,NULL,routine,NULL)!=0)
7222 return 1;
7223 (void)pthread_detach(p);
7224 return 0;
7225}
7226
7227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007228if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007229
7230 ac_cv_pthread_is_default=yes
7231 ac_cv_kthread=no
7232 ac_cv_pthread=no
7233
7234else
Matthias Kloseb9621712010-04-24 17:59:49 +00007235 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7238 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007239fi
7240
7241
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242fi
7243
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7245$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007246
7247
7248if test $ac_cv_pthread_is_default = yes
7249then
7250 ac_cv_kpthread=no
7251else
7252# -Kpthread, if available, provides the right #defines
7253# and linker options to make pthread_create available
7254# Some compilers won't report that they do not support -Kpthread,
7255# so we need to run a program to see whether it really made the
7256# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7258$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007259if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007261else
7262 ac_save_cc="$CC"
7263CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007264if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265 ac_cv_kpthread=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 ac_cv_kpthread=yes
7286else
Matthias Kloseb9621712010-04-24 17:59:49 +00007287 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7290 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291fi
7292
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293CC="$ac_save_cc"
7294fi
7295
Matthias Kloseb9621712010-04-24 17:59:49 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7297$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298fi
7299
7300if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7301then
7302# -Kthread, if available, provides the right #defines
7303# and linker options to make pthread_create available
7304# Some compilers won't report that they do not support -Kthread,
7305# so we need to run a program to see whether it really made the
7306# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7308$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007309if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007310 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007311else
7312 ac_save_cc="$CC"
7313CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007314if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007315 ac_cv_kthread=no
7316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318/* end confdefs.h. */
7319
Stefan Krah7dba5942012-11-22 22:49:11 +01007320#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007321#include <pthread.h>
7322
7323void* routine(void* p){return NULL;}
7324
7325int main(){
7326 pthread_t p;
7327 if(pthread_create(&p,NULL,routine,NULL)!=0)
7328 return 1;
7329 (void)pthread_detach(p);
7330 return 0;
7331}
7332
7333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007334if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335 ac_cv_kthread=yes
7336else
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341fi
7342
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343CC="$ac_save_cc"
7344fi
7345
Matthias Kloseb9621712010-04-24 17:59:49 +00007346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7347$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348fi
7349
7350if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7351then
7352# -pthread, if available, provides the right #defines
7353# and linker options to make pthread_create available
7354# Some compilers won't report that they do not support -pthread,
7355# so we need to run a program to see whether it really made the
7356# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7358$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007359if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007361else
7362 ac_save_cc="$CC"
7363CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007364if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365 ac_cv_pthread=no
7366else
Matthias Kloseb9621712010-04-24 17:59:49 +00007367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368/* end confdefs.h. */
7369
Stefan Krah7dba5942012-11-22 22:49:11 +01007370#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007371#include <pthread.h>
7372
7373void* routine(void* p){return NULL;}
7374
7375int main(){
7376 pthread_t p;
7377 if(pthread_create(&p,NULL,routine,NULL)!=0)
7378 return 1;
7379 (void)pthread_detach(p);
7380 return 0;
7381}
7382
7383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007384if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007385 ac_cv_pthread=yes
7386else
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391fi
7392
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393CC="$ac_save_cc"
7394fi
7395
Matthias Kloseb9621712010-04-24 17:59:49 +00007396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7397$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398fi
7399
7400# If we have set a CC compiler flag for thread support then
7401# check if it works for CXX, too.
7402ac_cv_cxx_thread=no
7403if test ! -z "$CXX"
7404then
Matthias Kloseb9621712010-04-24 17:59:49 +00007405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7406$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407ac_save_cxx="$CXX"
7408
7409if test "$ac_cv_kpthread" = "yes"
7410then
7411 CXX="$CXX -Kpthread"
7412 ac_cv_cxx_thread=yes
7413elif test "$ac_cv_kthread" = "yes"
7414then
7415 CXX="$CXX -Kthread"
7416 ac_cv_cxx_thread=yes
7417elif test "$ac_cv_pthread" = "yes"
7418then
7419 CXX="$CXX -pthread"
7420 ac_cv_cxx_thread=yes
7421fi
7422
7423if test $ac_cv_cxx_thread = yes
7424then
7425 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7426 $CXX -c conftest.$ac_ext 2>&5
7427 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7428 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7429 then
7430 ac_cv_cxx_thread=yes
7431 else
7432 ac_cv_cxx_thread=no
7433 fi
7434 rm -fr conftest*
7435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7437$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438fi
7439CXX="$ac_save_cxx"
7440
7441
7442# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7444$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007445if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447else
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449/* end confdefs.h. */
7450#include <stdlib.h>
7451#include <stdarg.h>
7452#include <string.h>
7453#include <float.h>
7454
7455int
7456main ()
7457{
7458
7459 ;
7460 return 0;
7461}
7462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007463if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464 ac_cv_header_stdc=yes
7465else
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7469
7470if test $ac_cv_header_stdc = yes; then
7471 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473/* end confdefs.h. */
7474#include <string.h>
7475
7476_ACEOF
7477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 $EGREP "memchr" >/dev/null 2>&1; then :
7479
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480else
7481 ac_cv_header_stdc=no
7482fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007483rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484
7485fi
7486
7487if test $ac_cv_header_stdc = yes; then
7488 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490/* end confdefs.h. */
7491#include <stdlib.h>
7492
7493_ACEOF
7494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 $EGREP "free" >/dev/null 2>&1; then :
7496
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497else
7498 ac_cv_header_stdc=no
7499fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007500rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501
7502fi
7503
7504if test $ac_cv_header_stdc = yes; then
7505 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507 :
7508else
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510/* end confdefs.h. */
7511#include <ctype.h>
7512#include <stdlib.h>
7513#if ((' ' & 0x0FF) == 0x020)
7514# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7515# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7516#else
7517# define ISLOWER(c) \
7518 (('a' <= (c) && (c) <= 'i') \
7519 || ('j' <= (c) && (c) <= 'r') \
7520 || ('s' <= (c) && (c) <= 'z'))
7521# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7522#endif
7523
7524#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7525int
7526main ()
7527{
7528 int i;
7529 for (i = 0; i < 256; i++)
7530 if (XOR (islower (i), ISLOWER (i))
7531 || toupper (i) != TOUPPER (i))
7532 return 2;
7533 return 0;
7534}
7535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007536if ac_fn_c_try_run "$LINENO"; then :
7537
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538else
Matthias Kloseb9621712010-04-24 17:59:49 +00007539 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7542 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543fi
7544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545fi
7546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7548$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549if test $ac_cv_header_stdc = yes; then
7550
Matthias Kloseb9621712010-04-24 17:59:49 +00007551$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552
7553fi
7554
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007555for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007556fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007557ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007558sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007559unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007560poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007561sys/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 +01007562sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007563sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007564sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007565sys/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 -07007566libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007567bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007568sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007569do :
7570 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7571ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007572if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007573 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007574#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007575_ACEOF
7576
7577fi
7578
Guido van Rossum627b2d71993-12-24 10:39:16 +00007579done
7580
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007581ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007582for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7585$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007586if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007588else
Matthias Kloseb9621712010-04-24 17:59:49 +00007589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007591#include <sys/types.h>
7592#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007593
Martin v. Löwis11437992002-04-12 09:54:03 +00007594int
7595main ()
7596{
7597if ((DIR *) 0)
7598return 0;
7599 ;
7600 return 0;
7601}
7602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007605else
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007610eval ac_res=\$$as_ac_Header
7611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7612$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007613if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007615#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007616_ACEOF
7617
7618ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007619fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007620
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007621done
7622# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7623if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7625$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007626if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007628else
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633/* Override any GCC internal prototype to avoid an error.
7634 Use char because int might match the return type of a GCC
7635 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007636#ifdef __cplusplus
7637extern "C"
7638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007639char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007640int
7641main ()
7642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007643return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007644 ;
7645 return 0;
7646}
7647_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648for ac_lib in '' dir; do
7649 if test -z "$ac_lib"; then
7650 ac_res="none required"
7651 else
7652 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007653 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007654 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658rm -f core conftest.err conftest.$ac_objext \
7659 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007660 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007663done
Victor Stinnere0be4232011-10-25 13:06:09 +02007664if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666else
7667 ac_cv_search_opendir=no
7668fi
7669rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007670LIBS=$ac_func_search_save_LIBS
7671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7673$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007675if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007677
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007678fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007679
Michael W. Hudson54241132001-12-07 15:38:26 +00007680else
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7682$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007683if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007685else
7686 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690/* Override any GCC internal prototype to avoid an error.
7691 Use char because int might match the return type of a GCC
7692 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007693#ifdef __cplusplus
7694extern "C"
7695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007696char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007697int
7698main ()
7699{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007701 ;
7702 return 0;
7703}
7704_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705for ac_lib in '' x; do
7706 if test -z "$ac_lib"; then
7707 ac_res="none required"
7708 else
7709 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007710 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007713 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715rm -f core conftest.err conftest.$ac_objext \
7716 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007717 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007720done
Victor Stinnere0be4232011-10-25 13:06:09 +02007721if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723else
7724 ac_cv_search_opendir=no
7725fi
7726rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007727LIBS=$ac_func_search_save_LIBS
7728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7730$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007732if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007733 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007734
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007735fi
7736
7737fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007738
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7740$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007741if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007743else
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007745/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007746#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007747int
7748main ()
7749{
7750return makedev(0, 0);
7751 ;
7752 return 0;
7753}
7754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007755if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007756 ac_cv_header_sys_types_h_makedev=yes
7757else
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007760rm -f core conftest.err conftest.$ac_objext \
7761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007762
7763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7765$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007766
7767if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007768ac_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 +02007769if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007770
Matthias Kloseb9621712010-04-24 17:59:49 +00007771$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007772
7773fi
7774
7775
7776
7777 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007778 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 +02007779if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007780
Matthias Kloseb9621712010-04-24 17:59:49 +00007781$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007782
7783fi
7784
7785
7786 fi
7787fi
7788
Michael W. Hudson54241132001-12-07 15:38:26 +00007789
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007790# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7791for ac_header in net/if.h
7792do :
7793 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7794#ifdef STDC_HEADERS
7795# include <stdlib.h>
7796# include <stddef.h>
7797#else
7798# ifdef HAVE_STDLIB_H
7799# include <stdlib.h>
7800# endif
7801#endif
7802#ifdef HAVE_SYS_SOCKET_H
7803# include <sys/socket.h>
7804#endif
7805
7806"
Victor Stinnere0be4232011-10-25 13:06:09 +02007807if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007808 cat >>confdefs.h <<_ACEOF
7809#define HAVE_NET_IF_H 1
7810_ACEOF
7811
7812fi
7813
7814done
7815
7816
Martin v. Löwis11017b12006-01-14 18:12:57 +00007817# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007818for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007819do :
7820 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 +00007821#ifdef HAVE_ASM_TYPES_H
7822#include <asm/types.h>
7823#endif
7824#ifdef HAVE_SYS_SOCKET_H
7825#include <sys/socket.h>
7826#endif
7827
Matthias Kloseb9621712010-04-24 17:59:49 +00007828"
Victor Stinnere0be4232011-10-25 13:06:09 +02007829if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007830 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007831#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007832_ACEOF
7833
7834fi
7835
7836done
7837
7838
Charles-François Natali47413c12011-10-06 19:47:44 +02007839# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007840for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007841do :
7842 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7843ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7844#ifdef HAVE_SYS_SOCKET_H
7845#include <sys/socket.h>
7846#endif
7847
7848"
7849if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7850 cat >>confdefs.h <<_ACEOF
7851#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7852_ACEOF
7853
7854fi
7855
7856done
7857
7858
Guido van Rossum627b2d71993-12-24 10:39:16 +00007859# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007860was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7862$as_echo_n "checking for clock_t in time.h... " >&6; }
7863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007864/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007865#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
7867_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007870 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007871else
Martin v. Löwis11437992002-04-12 09:54:03 +00007872
7873
Matthias Kloseb9621712010-04-24 17:59:49 +00007874$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007875
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007876
Guido van Rossum627b2d71993-12-24 10:39:16 +00007877fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007878rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007879
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7881$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007882
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7884$as_echo_n "checking for makedev... " >&6; }
7885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007886/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007887
Jesus Cea740f53a2010-04-28 11:35:30 +00007888#if defined(MAJOR_IN_MKDEV)
7889#include <sys/mkdev.h>
7890#elif defined(MAJOR_IN_SYSMACROS)
7891#include <sys/sysmacros.h>
7892#else
7893#include <sys/types.h>
7894#endif
7895
Neal Norwitz11690112002-07-30 01:08:28 +00007896int
7897main ()
7898{
Jesus Cea740f53a2010-04-28 11:35:30 +00007899
7900 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007901 ;
7902 return 0;
7903}
Matthias Kloseb159a552010-04-25 21:00:44 +00007904
Neal Norwitz11690112002-07-30 01:08:28 +00007905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007906if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007907 ac_cv_has_makedev=yes
7908else
Matthias Kloseb9621712010-04-24 17:59:49 +00007909 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911rm -f core conftest.err conftest.$ac_objext \
7912 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7914$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007915if test "$ac_cv_has_makedev" = "yes"; then
7916
Matthias Kloseb9621712010-04-24 17:59:49 +00007917$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007918
7919fi
7920
Christian Heimes985ecdc2013-11-20 11:46:18 +01007921# byte swapping
7922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7923$as_echo_n "checking for le64toh... " >&6; }
7924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7925/* end confdefs.h. */
7926
7927#ifdef HAVE_ENDIAN_H
7928#include <endian.h>
7929#elif defined(HAVE_SYS_ENDIAN_H)
7930#include <sys/endian.h>
7931#endif
7932
7933int
7934main ()
7935{
7936
7937 le64toh(1)
7938 ;
7939 return 0;
7940}
7941
7942_ACEOF
7943if ac_fn_c_try_link "$LINENO"; then :
7944 ac_cv_has_le64toh=yes
7945else
7946 ac_cv_has_le64toh=no
7947fi
7948rm -f core conftest.err conftest.$ac_objext \
7949 conftest$ac_exeext conftest.$ac_ext
7950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7951$as_echo "$ac_cv_has_le64toh" >&6; }
7952if test "$ac_cv_has_le64toh" = "yes"; then
7953
7954$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7955
7956fi
7957
Martin v. Löwis399a6892002-10-04 10:22:02 +00007958# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7959# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7960# defined, but the compiler does not support pragma redefine_extname,
7961# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7962# structures (such as rlimit64) without declaring them. As a
7963# work-around, disable LFS on such configurations
7964
7965use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7967$as_echo_n "checking Solaris LFS bug... " >&6; }
7968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007969/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007970
7971#define _LARGEFILE_SOURCE 1
7972#define _FILE_OFFSET_BITS 64
7973#include <sys/resource.h>
7974
Martin v. Löwis399a6892002-10-04 10:22:02 +00007975int
7976main ()
7977{
7978struct rlimit foo;
7979 ;
7980 return 0;
7981}
7982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007984 sol_lfs_bug=no
7985else
Matthias Kloseb9621712010-04-24 17:59:49 +00007986 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7990$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007991if test "$sol_lfs_bug" = "yes"; then
7992 use_lfs=no
7993fi
7994
7995if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007996# Two defines needed to enable largefile support on various platforms
7997# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007998case $ac_sys_system/$ac_sys_release in
7999AIX*)
8000
8001$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8002
8003 ;;
8004esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008005
Matthias Kloseb9621712010-04-24 17:59:49 +00008006$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008007
8008
Matthias Kloseb9621712010-04-24 17:59:49 +00008009$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008010
Martin v. Löwis399a6892002-10-04 10:22:02 +00008011fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008012
Guido van Rossum84e7b241996-08-19 21:59:00 +00008013# Add some code to confdefs.h so that the test for off_t works on SCO
8014cat >> confdefs.h <<\EOF
8015#if defined(SCO_DS)
8016#undef _OFF_T
8017#endif
8018EOF
8019
Guido van Rossumef2255b2000-03-10 22:30:29 +00008020# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008021ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008022if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008024else
Martin v. Löwis11437992002-04-12 09:54:03 +00008025
8026cat >>confdefs.h <<_ACEOF
8027#define mode_t int
8028_ACEOF
8029
8030fi
8031
Matthias Kloseb9621712010-04-24 17:59:49 +00008032ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008033if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008035else
Martin v. Löwis11437992002-04-12 09:54:03 +00008036
8037cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008039_ACEOF
8040
8041fi
8042
Matthias Kloseb9621712010-04-24 17:59:49 +00008043ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008046else
Martin v. Löwis11437992002-04-12 09:54:03 +00008047
8048cat >>confdefs.h <<_ACEOF
8049#define pid_t int
8050_ACEOF
8051
8052fi
8053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008054
Martin v. Löwis11437992002-04-12 09:54:03 +00008055cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008056#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008057_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008058
Matthias Kloseb9621712010-04-24 17:59:49 +00008059ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008060if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008062else
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
8064cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008066_ACEOF
8067
8068fi
8069
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8071$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008072if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008074else
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008076/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008077#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008078
8079_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008082 ac_cv_type_uid_t=yes
8083else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008084 ac_cv_type_uid_t=no
8085fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008086rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8090$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008091if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008094
8095
Matthias Kloseb9621712010-04-24 17:59:49 +00008096$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008097
8098fi
8099
Mark Dickinson983bc162012-12-02 12:11:38 +00008100
8101# There are two separate checks for each of the exact-width integer types we
8102# need. First we check whether the type is available using the usual
8103# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8104# and <stdint.h> where available). We then also use the special type checks of
8105# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8106# directly, #define's uint32_t to be a suitable type.
8107
8108ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8109if test "x$ac_cv_type_uint32_t" = xyes; then :
8110
8111$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8112
8113fi
8114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8116case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008117 no|yes) ;; #(
8118 *)
8119
Matthias Kloseb9621712010-04-24 17:59:49 +00008120$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008121
8122
8123cat >>confdefs.h <<_ACEOF
8124#define uint32_t $ac_cv_c_uint32_t
8125_ACEOF
8126;;
8127 esac
8128
Mark Dickinson983bc162012-12-02 12:11:38 +00008129
8130ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8131if test "x$ac_cv_type_uint64_t" = xyes; then :
8132
8133$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8134
8135fi
8136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8138case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008139 no|yes) ;; #(
8140 *)
8141
Matthias Kloseb9621712010-04-24 17:59:49 +00008142$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008143
8144
8145cat >>confdefs.h <<_ACEOF
8146#define uint64_t $ac_cv_c_uint64_t
8147_ACEOF
8148;;
8149 esac
8150
Mark Dickinson983bc162012-12-02 12:11:38 +00008151
8152ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8153if test "x$ac_cv_type_int32_t" = xyes; then :
8154
8155$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8156
8157fi
8158
Matthias Kloseb9621712010-04-24 17:59:49 +00008159ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8160case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008161 no|yes) ;; #(
8162 *)
8163
8164cat >>confdefs.h <<_ACEOF
8165#define int32_t $ac_cv_c_int32_t
8166_ACEOF
8167;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008168esac
8169
Mark Dickinson983bc162012-12-02 12:11:38 +00008170
8171ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8172if test "x$ac_cv_type_int64_t" = xyes; then :
8173
8174$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8175
8176fi
8177
Matthias Kloseb9621712010-04-24 17:59:49 +00008178ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8179case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008180 no|yes) ;; #(
8181 *)
8182
8183cat >>confdefs.h <<_ACEOF
8184#define int64_t $ac_cv_c_int64_t
8185_ACEOF
8186;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008187esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008188
Mark Dickinson983bc162012-12-02 12:11:38 +00008189
Matthias Kloseb9621712010-04-24 17:59:49 +00008190ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008191if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008194
8195fi
8196
Stefan Krah1919b7e2012-03-21 18:25:23 +01008197ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8198if test "x$ac_cv_type___uint128_t" = xyes; then :
8199
8200$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8201
8202fi
8203
Jack Jansendd19cf82001-12-06 22:36:17 +00008204
Michael W. Hudson54241132001-12-07 15:38:26 +00008205# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008206# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207# The cast to long int works around a bug in the HP C Compiler
8208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8210# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8212$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008213if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008215else
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 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 +00008217
Martin v. Löwis11437992002-04-12 09:54:03 +00008218else
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 if test "$ac_cv_type_int" = yes; then
8220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008222as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008223See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224 else
8225 ac_cv_sizeof_int=0
8226 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008228
Martin v. Löwis11437992002-04-12 09:54:03 +00008229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8231$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232
8233
8234
Martin v. Löwis11437992002-04-12 09:54:03 +00008235cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008236#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008237_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008238
8239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240# The cast to long int works around a bug in the HP C Compiler
8241# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8242# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8243# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8245$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008246if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008248else
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 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 +00008250
Martin v. Löwis11437992002-04-12 09:54:03 +00008251else
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 if test "$ac_cv_type_long" = yes; then
8253 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8254$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008255as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008256See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257 else
8258 ac_cv_sizeof_long=0
8259 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261
Martin v. Löwis11437992002-04-12 09:54:03 +00008262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8264$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265
8266
8267
Martin v. Löwis11437992002-04-12 09:54:03 +00008268cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008269#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008270_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008271
8272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273# The cast to long int works around a bug in the HP C Compiler
8274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8276# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8278$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008279if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008281else
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 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 +00008283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 if test "$ac_cv_type_void_p" = yes; then
8286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008288as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008289See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 else
8291 ac_cv_sizeof_void_p=0
8292 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008294
Martin v. Löwis11437992002-04-12 09:54:03 +00008295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8297$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298
8299
8300
Martin v. Löwis11437992002-04-12 09:54:03 +00008301cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008302#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008303_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008304
8305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008306# The cast to long int works around a bug in the HP C Compiler
8307# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8308# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8309# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8311$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008312if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 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 +00008316
Martin v. Löwis11437992002-04-12 09:54:03 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 if test "$ac_cv_type_short" = yes; then
8319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008321as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008322See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008323 else
8324 ac_cv_sizeof_short=0
8325 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008327
Martin v. Löwis11437992002-04-12 09:54:03 +00008328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8330$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331
8332
8333
Martin v. Löwis11437992002-04-12 09:54:03 +00008334cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008335#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008336_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008337
8338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008339# The cast to long int works around a bug in the HP C Compiler
8340# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8341# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8342# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8344$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008345if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008347else
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 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 +00008349
Martin v. Löwis11437992002-04-12 09:54:03 +00008350else
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 if test "$ac_cv_type_float" = yes; then
8352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008354as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008355See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356 else
8357 ac_cv_sizeof_float=0
8358 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008360
Martin v. Löwis11437992002-04-12 09:54:03 +00008361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8363$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364
8365
8366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008368#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008369_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008370
8371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372# The cast to long int works around a bug in the HP C Compiler
8373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8375# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8377$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008378if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008380else
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 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 +00008382
Martin v. Löwis11437992002-04-12 09:54:03 +00008383else
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 if test "$ac_cv_type_double" = yes; then
8385 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008387as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008388See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389 else
8390 ac_cv_sizeof_double=0
8391 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8396$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008397
8398
8399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008401#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008402_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008403
8404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405# The cast to long int works around a bug in the HP C Compiler
8406# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8407# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8408# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8410$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008411if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008413else
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 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 +00008415
Martin v. Löwis11437992002-04-12 09:54:03 +00008416else
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 if test "$ac_cv_type_fpos_t" = yes; then
8418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008420as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008421See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422 else
8423 ac_cv_sizeof_fpos_t=0
8424 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008426
Martin v. Löwis11437992002-04-12 09:54:03 +00008427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8429$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430
8431
8432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008434#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008435_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008436
Michael W. Hudson54241132001-12-07 15:38:26 +00008437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438# The cast to long int works around a bug in the HP C Compiler
8439# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8440# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8441# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8443$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008444if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 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 +00008448
Martin v. Löwis18e16552006-02-15 17:27:45 +00008449else
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 if test "$ac_cv_type_size_t" = yes; then
8451 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008453as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008454See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455 else
8456 ac_cv_sizeof_size_t=0
8457 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008458fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008459
Martin v. Löwis18e16552006-02-15 17:27:45 +00008460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8462$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463
8464
8465
Martin v. Löwis18e16552006-02-15 17:27:45 +00008466cat >>confdefs.h <<_ACEOF
8467#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8468_ACEOF
8469
8470
Christian Heimes400adb02008-02-01 08:12:03 +00008471# The cast to long int works around a bug in the HP C Compiler
8472# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8473# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8474# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8476$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008477if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008479else
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 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 +00008481
Christian Heimes400adb02008-02-01 08:12:03 +00008482else
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 if test "$ac_cv_type_pid_t" = yes; then
8484 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008486as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008487See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008488 else
8489 ac_cv_sizeof_pid_t=0
8490 fi
8491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008492
Christian Heimes400adb02008-02-01 08:12:03 +00008493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8495$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008496
8497
8498
8499cat >>confdefs.h <<_ACEOF
8500#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8501_ACEOF
8502
8503
Michael W. Hudson54241132001-12-07 15:38:26 +00008504
Matthias Kloseb9621712010-04-24 17:59:49 +00008505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8506$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008507have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008509/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511int
8512main ()
8513{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008514long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ;
8516 return 0;
8517}
8518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008520
8521
Matthias Kloseb9621712010-04-24 17:59:49 +00008522$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008523
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008524 have_long_long=yes
8525
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8529$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008530if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531# The cast to long int works around a bug in the HP C Compiler
8532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8534# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8536$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008537if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008539else
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008541
Martin v. Löwis11437992002-04-12 09:54:03 +00008542else
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 if test "$ac_cv_type_long_long" = yes; then
8544 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008546as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008547See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548 else
8549 ac_cv_sizeof_long_long=0
8550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8555$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556
8557
8558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008560#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008561_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008562
Michael W. Hudson54241132001-12-07 15:38:26 +00008563
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008564fi
8565
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8567$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008568have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008570/* end confdefs.h. */
8571
8572int
8573main ()
8574{
8575long double x; x = (long double)0;
8576 ;
8577 return 0;
8578}
8579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008580if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008581
8582
Matthias Kloseb9621712010-04-24 17:59:49 +00008583$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008584
8585 have_long_double=yes
8586
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008587fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8590$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008591if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008592# The cast to long int works around a bug in the HP C Compiler
8593# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8594# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8595# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8597$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008598if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 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 +00008602
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008603else
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 if test "$ac_cv_type_long_double" = yes; then
8605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008607as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008608See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008609 else
8610 ac_cv_sizeof_long_double=0
8611 fi
8612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008613
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8616$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008617
8618
8619
8620cat >>confdefs.h <<_ACEOF
8621#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8622_ACEOF
8623
8624
8625fi
8626
8627
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8629$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008630have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008632/* end confdefs.h. */
8633
8634int
8635main ()
8636{
8637_Bool x; x = (_Bool)0;
8638 ;
8639 return 0;
8640}
8641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008642if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008643
8644
Matthias Kloseb9621712010-04-24 17:59:49 +00008645$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008646
8647 have_c99_bool=yes
8648
Thomas Woutersb2137042007-02-01 18:02:27 +00008649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8652$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008653if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654# The cast to long int works around a bug in the HP C Compiler
8655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8657# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8659$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008660if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 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 +00008664
Thomas Woutersb2137042007-02-01 18:02:27 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 if test "$ac_cv_type__Bool" = yes; then
8667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008669as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008670See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671 else
8672 ac_cv_sizeof__Bool=0
8673 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675
Thomas Woutersb2137042007-02-01 18:02:27 +00008676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8678$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679
8680
8681
Thomas Woutersb2137042007-02-01 18:02:27 +00008682cat >>confdefs.h <<_ACEOF
8683#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8684_ACEOF
8685
8686
8687fi
8688
Matthias Kloseb9621712010-04-24 17:59:49 +00008689ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008690 #include <stdint.h>
8691 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008692 #ifdef HAVE_INTTYPES_H
8693 #include <inttypes.h>
8694 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008695"
Victor Stinnere0be4232011-10-25 13:06:09 +02008696if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008697
8698cat >>confdefs.h <<_ACEOF
8699#define HAVE_UINTPTR_T 1
8700_ACEOF
8701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702# The cast to long int works around a bug in the HP C Compiler
8703# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8704# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8705# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8707$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008708if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008712
Martin v. Löwis11437992002-04-12 09:54:03 +00008713else
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 if test "$ac_cv_type_uintptr_t" = yes; then
8715 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008717as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008718See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719 else
8720 ac_cv_sizeof_uintptr_t=0
8721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723
Martin v. Löwis11437992002-04-12 09:54:03 +00008724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8726$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008727
8728
8729
Martin v. Löwis11437992002-04-12 09:54:03 +00008730cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008731#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008732_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008733
Michael W. Hudson54241132001-12-07 15:38:26 +00008734
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008735fi
8736
Thomas Wouters89f507f2006-12-13 04:49:30 +00008737
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008738# The cast to long int works around a bug in the HP C Compiler
8739# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8740# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8741# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8743$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008744if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008746else
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008748#ifdef HAVE_SYS_TYPES_H
8749#include <sys/types.h>
8750#endif
8751
Matthias Kloseb9621712010-04-24 17:59:49 +00008752"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008754else
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 if test "$ac_cv_type_off_t" = yes; then
8756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008758as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008759See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008760 else
8761 ac_cv_sizeof_off_t=0
8762 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008764
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8767$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008768
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008769
8770
Martin v. Löwis11437992002-04-12 09:54:03 +00008771cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008772#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008773_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008774
Michael W. Hudson54241132001-12-07 15:38:26 +00008775
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008776
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8778$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008779if test "$have_long_long" = yes
8780then
8781if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008782 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008783
Matthias Kloseb9621712010-04-24 17:59:49 +00008784$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008785
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8787$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008788else
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8790$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008791fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008792else
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008795fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008796
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008797# The cast to long int works around a bug in the HP C Compiler
8798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8800# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8802$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008803if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008805else
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008807#ifdef HAVE_SYS_TYPES_H
8808#include <sys/types.h>
8809#endif
8810#ifdef HAVE_TIME_H
8811#include <time.h>
8812#endif
8813
Matthias Kloseb9621712010-04-24 17:59:49 +00008814"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008815
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008816else
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 if test "$ac_cv_type_time_t" = yes; then
8818 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008820as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008821See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008822 else
8823 ac_cv_sizeof_time_t=0
8824 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8829$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008830
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008831
8832
Martin v. Löwis11437992002-04-12 09:54:03 +00008833cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008834#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008835_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008836
Michael W. Hudson54241132001-12-07 15:38:26 +00008837
8838
Trent Mick635f6fb2000-08-23 21:33:05 +00008839# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008840ac_save_cc="$CC"
8841if test "$ac_cv_kpthread" = "yes"
8842then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008843elif test "$ac_cv_kthread" = "yes"
8844then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008845elif test "$ac_cv_pthread" = "yes"
8846then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008847fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8850$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008851have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008853/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008854
8855 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008856int
8857main ()
8858{
Guido van Rossum12580492000-09-24 16:47:19 +00008859pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008860 ;
8861 return 0;
8862}
Matthias Kloseb159a552010-04-25 21:00:44 +00008863
Martin v. Löwis11437992002-04-12 09:54:03 +00008864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008865if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008866 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8870$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008871if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008873# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8874# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8875# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8877$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008878if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880else
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008882#ifdef HAVE_PTHREAD_H
8883#include <pthread.h>
8884#endif
8885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008887
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888else
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 if test "$ac_cv_type_pthread_t" = yes; then
8890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008892as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008893See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008894 else
8895 ac_cv_sizeof_pthread_t=0
8896 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008898
Trent Mick635f6fb2000-08-23 21:33:05 +00008899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8901$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008902
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008903
8904
Martin v. Löwis11437992002-04-12 09:54:03 +00008905cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008906#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008907_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008909
Trent Mick635f6fb2000-08-23 21:33:05 +00008910fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008911CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008912
Michael W. Hudson54241132001-12-07 15:38:26 +00008913
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008914case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008915 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008916 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8917 ;;
8918 Darwin/*)
8919 OTHER_LIBTOOL_OPT=""
8920 ;;
8921esac
8922
8923
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008924
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008925case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008926 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008927 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8928 if test "${enable_universalsdk}"; then
8929 :
8930 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008931 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008932 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008933 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008934 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008935 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008936 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008937 if test ${gcc_version} '<' 4.0
8938 then
8939 LIBTOOL_CRUFT="-lcc_dynamic"
8940 else
8941 LIBTOOL_CRUFT=""
8942 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008944 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008945else
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008947/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008948
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008949 #include <unistd.h>
8950 int main(int argc, char*argv[])
8951 {
8952 if (sizeof(long) == 4) {
8953 return 0;
8954 } else {
8955 return 1;
8956 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008957 }
8958
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008960if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008961 ac_osx_32bit=yes
8962else
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8966 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008967fi
8968
8969
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008970 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008971 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008972 i386)
8973 MACOSX_DEFAULT_ARCH="i386"
8974 ;;
8975 ppc)
8976 MACOSX_DEFAULT_ARCH="ppc"
8977 ;;
8978 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008979 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008980 ;;
8981 esac
8982 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008983 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008984 i386)
8985 MACOSX_DEFAULT_ARCH="x86_64"
8986 ;;
8987 ppc)
8988 MACOSX_DEFAULT_ARCH="ppc64"
8989 ;;
8990 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008991 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008992 ;;
8993 esac
8994
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008995 fi
8996
8997 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008998 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008999 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009000esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9002$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009003if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009004then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009005 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009007 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009008
Matthias Kloseb9621712010-04-24 17:59:49 +00009009$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009010
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9012$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009013 if test $enable_shared = "yes"
9014 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009015 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 +00009016 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009017else
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9019$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009020fi
9021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9023$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009024case $ac_sys_system/$ac_sys_release in
9025 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009026
Matthias Kloseb9621712010-04-24 17:59:49 +00009027$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9030$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009031 ;;
9032 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9034$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009035 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009036esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009037
Guido van Rossum0a516c91994-09-12 10:58:40 +00009038# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009039
Michael W. Hudson54241132001-12-07 15:38:26 +00009040
9041
9042
9043
Benjamin Peterson99f03762010-04-11 22:15:28 +00009044
Thomas Wouters477c8d52006-05-27 19:21:47 +00009045
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009046# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9047# -- usually .so, .sl on HP-UX, .dll on Cygwin
9048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9049$as_echo_n "checking the extension of shared libraries... " >&6; }
9050if test -z "$SHLIB_SUFFIX"; then
9051 case $ac_sys_system in
9052 hp*|HP*)
9053 case `uname -m` in
9054 ia64) SHLIB_SUFFIX=.so;;
9055 *) SHLIB_SUFFIX=.sl;;
9056 esac
9057 ;;
9058 CYGWIN*) SHLIB_SUFFIX=.dll;;
9059 *) SHLIB_SUFFIX=.so;;
9060 esac
9061fi
9062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9063$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009064
Guido van Rossum0a516c91994-09-12 10:58:40 +00009065# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009066# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009067# (Shared libraries in this instance are shared modules to be loaded into
9068# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9070$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009071if test -z "$LDSHARED"
9072then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009073 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009074 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009075 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009076 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009077 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009078 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009079 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009081 if test "$GCC" = "yes" ; then
9082 LDSHARED='$(CC) -shared'
9083 LDCXXSHARED='$(CXX) -shared'
9084 else
9085 LDSHARED='$(CC) -G'
9086 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009087 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009088 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009089 if test "$GCC" = "yes" ; then
9090 LDSHARED='$(CC) -shared'
9091 LDCXXSHARED='$(CXX) -shared'
9092 else
9093 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009094 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009095 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009096 LDSHARED='$(CC) -bundle'
9097 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009098 if test "$enable_framework" ; then
9099 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009100 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9101 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009102 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009103 else
9104 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009105 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009106 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009107 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009108 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009109 LDSHARED='$(CC) -bundle'
9110 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009111 if test "$enable_framework" ; then
9112 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009113 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9114 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009115 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009116 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009117 # No framework, use the Python app as bundle-loader
9118 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009119 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009120 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009121 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009122 Darwin/*)
9123 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9124 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009125
Ned Deily36820b62014-06-25 13:44:22 -07009126 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9127 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9128 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9129 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9130 if test ${dep_target_major} -eq 10 && \
9131 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009132 then
Ned Deily36820b62014-06-25 13:44:22 -07009133 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009134 LDSHARED='$(CC) -bundle'
9135 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009136 if test "$enable_framework" ; then
9137 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009138 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9139 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009140 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009141 else
9142 # No framework, use the Python app as bundle-loader
9143 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9144 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009145 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009146 fi
Ned Deily36820b62014-06-25 13:44:22 -07009147 else
9148 # building for OS X 10.3 and later
9149 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9150 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9151 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009152 fi
9153 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009154 Linux*|GNU*|QNX*)
9155 LDSHARED='$(CC) -shared'
9156 LDCXXSHARED='$(CXX) -shared';;
9157 BSD/OS*/4*)
9158 LDSHARED="gcc -shared"
9159 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009160 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009161 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009162 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009163 LDSHARED='$(CC) -shared'
9164 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009165 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009166 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009167 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009168 OpenBSD*)
9169 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9170 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009171 LDSHARED='$(CC) -shared $(CCSHARED)'
9172 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009173 else
9174 case `uname -r` in
9175 [01].* | 2.[0-7] | 2.[0-7].*)
9176 LDSHARED="ld -Bshareable ${LDFLAGS}"
9177 ;;
9178 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009179 LDSHARED='$(CC) -shared $(CCSHARED)'
9180 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009181 ;;
9182 esac
9183 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009184 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009185 LDSHARED='$(CC) -shared'
9186 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009187 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009188 if test "$GCC" = "yes" ; then
9189 LDSHARED='$(CC) -shared'
9190 LDCXXSHARED='$(CXX) -shared'
9191 else
9192 LDSHARED='$(CC) -G'
9193 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009194 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009195 SCO_SV*)
9196 LDSHARED='$(CC) -Wl,-G,-Bexport'
9197 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9198 CYGWIN*)
9199 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9200 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009201 *) LDSHARED="ld";;
9202 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9205$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009206LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009207BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009208# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009209# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9211$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009212if test -z "$CCSHARED"
9213then
Guido van Rossum07397971997-04-29 21:49:50 +00009214 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009215 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009216 then CCSHARED="-fPIC";
9217 elif test `uname -p` = sparc;
9218 then CCSHARED="-xcode=pic32";
9219 else CCSHARED="-Kpic";
9220 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009221 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009222 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009223 else CCSHARED="+z";
9224 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009225 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009226 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009227 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009228 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009229 if test "$GCC" = "yes"
9230 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009231 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009232 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009233 SCO_SV*)
9234 if test "$GCC" = "yes"
9235 then CCSHARED="-fPIC"
9236 else CCSHARED="-Kpic -belf"
9237 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009238 IRIX*/6*) case $CC in
9239 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009240 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009241 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009242 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9245$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009246# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009247# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9249$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009250if test -z "$LINKFORSHARED"
9251then
Guido van Rossum07397971997-04-29 21:49:50 +00009252 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009253 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009254 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009255 LINKFORSHARED="-Wl,-E -Wl,+s";;
9256# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009257 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009258 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009259 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009261 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009262
9263 # Issue #18075: the default maximum stack size (8MBytes) is too
9264 # small for the default recursion limit. Increase the stack size
9265 # to ensure that tests don't crash
9266 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9267
Jack Jansene578a632001-08-15 01:27:14 +00009268 if test "$enable_framework"
9269 then
Jack Jansenda49e192005-01-07 13:08:22 +00009270 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009271 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009272 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009273 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009274 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009275 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009276 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009277 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9278 then
9279 LINKFORSHARED="-Wl,--export-dynamic"
9280 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009281 SunOS/5*) case $CC in
9282 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009283 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009284 then
9285 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009286 fi;;
9287 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009288 CYGWIN*)
9289 if test $enable_shared = "no"
9290 then
9291 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9292 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009293 QNX*)
9294 # -Wl,-E causes the symbols to be added to the dynamic
9295 # symbol table so that they can be found when a module
9296 # is loaded. -N 2048K causes the stack size to be set
9297 # to 2048 kilobytes so that the stack doesn't overflow
9298 # when running test_compile.py.
9299 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009300 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9303$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009304
Michael W. Hudson54241132001-12-07 15:38:26 +00009305
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009306
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9308$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009309if test ! "$LIBRARY" = "$LDLIBRARY"
9310then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009311 case $ac_sys_system in
9312 CYGWIN*)
9313 # Cygwin needs CCSHARED when building extension DLLs
9314 # but not when building the interpreter DLL.
9315 CFLAGSFORSHARED='';;
9316 *)
9317 CFLAGSFORSHARED='$(CCSHARED)'
9318 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9321$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009322
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009323# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9324# library (with --enable-shared).
9325# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009326# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9327# if it is not required, since it creates a dependency of the shared library
9328# to LIBS. This, in turn, means that applications linking the shared libpython
9329# don't need to link LIBS explicitly. The default should be only changed
9330# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009331
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9333$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009334case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009335 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009336 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009337esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9339$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009340
9341
Guido van Rossum627b2d71993-12-24 10:39:16 +00009342# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9344$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009345if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009346 $as_echo_n "(cached) " >&6
9347else
9348 ac_check_lib_save_LIBS=$LIBS
9349LIBS="-lsendfile $LIBS"
9350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9351/* end confdefs.h. */
9352
9353/* Override any GCC internal prototype to avoid an error.
9354 Use char because int might match the return type of a GCC
9355 builtin and then its argument prototype would still apply. */
9356#ifdef __cplusplus
9357extern "C"
9358#endif
9359char sendfile ();
9360int
9361main ()
9362{
9363return sendfile ();
9364 ;
9365 return 0;
9366}
9367_ACEOF
9368if ac_fn_c_try_link "$LINENO"; then :
9369 ac_cv_lib_sendfile_sendfile=yes
9370else
9371 ac_cv_lib_sendfile_sendfile=no
9372fi
9373rm -f core conftest.err conftest.$ac_objext \
9374 conftest$ac_exeext conftest.$ac_ext
9375LIBS=$ac_check_lib_save_LIBS
9376fi
9377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9378$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009379if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009380 cat >>confdefs.h <<_ACEOF
9381#define HAVE_LIBSENDFILE 1
9382_ACEOF
9383
9384 LIBS="-lsendfile $LIBS"
9385
9386fi
9387
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9389$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009390if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009391 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009392else
Martin v. Löwis11437992002-04-12 09:54:03 +00009393 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009394LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009398/* Override any GCC internal prototype to avoid an error.
9399 Use char because int might match the return type of a GCC
9400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009401#ifdef __cplusplus
9402extern "C"
9403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009404char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009405int
9406main ()
9407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 ;
9410 return 0;
9411}
9412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009413if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009415else
Matthias Kloseb9621712010-04-24 17:59:49 +00009416 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009418rm -f core conftest.err conftest.$ac_objext \
9419 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009420LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9423$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009424if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 cat >>confdefs.h <<_ACEOF
9426#define HAVE_LIBDL 1
9427_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009428
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009429 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009430
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009431fi
9432 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9434$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009435if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009436 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009437else
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009439LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443/* Override any GCC internal prototype to avoid an error.
9444 Use char because int might match the return type of a GCC
9445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009446#ifdef __cplusplus
9447extern "C"
9448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009449char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009450int
9451main ()
9452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 ;
9455 return 0;
9456}
9457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009460else
Matthias Kloseb9621712010-04-24 17:59:49 +00009461 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009463rm -f core conftest.err conftest.$ac_objext \
9464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009465LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9468$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009469if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 cat >>confdefs.h <<_ACEOF
9471#define HAVE_LIBDLD 1
9472_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009473
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009474 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009475
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009476fi
9477 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009478
Georg Brandlb1441c72009-01-03 22:33:39 +00009479# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009480if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9482$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009483if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009485else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009486 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490/* Override any GCC internal prototype to avoid an error.
9491 Use char because int might match the return type of a GCC
9492 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009493#ifdef __cplusplus
9494extern "C"
9495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009496char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009497int
9498main ()
9499{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009500return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 ;
9502 return 0;
9503}
9504_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505for ac_lib in '' pthread rt posix4; do
9506 if test -z "$ac_lib"; then
9507 ac_res="none required"
9508 else
9509 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009510 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009512 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009515rm -f core conftest.err conftest.$ac_objext \
9516 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009517 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520done
Victor Stinnere0be4232011-10-25 13:06:09 +02009521if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523else
9524 ac_cv_search_sem_init=no
9525fi
9526rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009527LIBS=$ac_func_search_save_LIBS
9528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9530$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009532if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009534
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009535fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009536 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009537 # posix4 on Solaris 2.6
9538 # pthread (first!) on Linux
9539fi
9540
Martin v. Löwis19d17342003-06-14 21:03:05 +00009541# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9543$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009544if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009545 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009546else
9547 ac_check_lib_save_LIBS=$LIBS
9548LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009552/* Override any GCC internal prototype to avoid an error.
9553 Use char because int might match the return type of a GCC
9554 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009555#ifdef __cplusplus
9556extern "C"
9557#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009558char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009559int
9560main ()
9561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009563 ;
9564 return 0;
9565}
9566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009568 ac_cv_lib_intl_textdomain=yes
9569else
Matthias Kloseb9621712010-04-24 17:59:49 +00009570 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572rm -f core conftest.err conftest.$ac_objext \
9573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009574LIBS=$ac_check_lib_save_LIBS
9575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9577$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009578if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009579
Matthias Kloseb9621712010-04-24 17:59:49 +00009580$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009581
Brett Cannonc6d936e2009-06-07 20:09:53 +00009582 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009583fi
9584
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009585
9586# checks for system dependent C++ extensions support
9587case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009588 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9589$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009591/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009592
Georg Brandl59e87bd2011-02-15 19:48:59 +00009593 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009594int
9595main ()
9596{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009597loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 ;
9599 return 0;
9600}
Matthias Kloseb159a552010-04-25 21:00:44 +00009601
Martin v. Löwis11437992002-04-12 09:54:03 +00009602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009603if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009604
Matthias Kloseb159a552010-04-25 21:00:44 +00009605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009607
Matthias Kloseb159a552010-04-25 21:00:44 +00009608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009609$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009610
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009611else
Matthias Kloseb159a552010-04-25 21:00:44 +00009612
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009614$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009615
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009617rm -f core conftest.err conftest.$ac_objext \
9618 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009619 *) ;;
9620esac
9621
Christian Heimes985ecdc2013-11-20 11:46:18 +01009622# check for systems that require aligned memory access
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9624$as_echo_n "checking aligned memory access is required... " >&6; }
9625if test "$cross_compiling" = yes; then :
9626 aligned_required=yes
9627else
9628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9629/* end confdefs.h. */
9630
9631int main()
9632{
9633 char s[16];
9634 int i, *p1, *p2;
9635 for (i=0; i < 16; i++)
9636 s[i] = i;
9637 p1 = (int*)(s+1);
9638 p2 = (int*)(s+2);
9639 if (*p1 == *p2)
9640 return 1;
9641 return 0;
9642}
9643
9644_ACEOF
9645if ac_fn_c_try_run "$LINENO"; then :
9646 aligned_required=no
9647else
9648 aligned_required=yes
9649fi
9650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9651 conftest.$ac_objext conftest.beam conftest.$ac_ext
9652fi
9653
9654
9655if test "$aligned_required" = yes ; then
9656
9657$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9658
9659fi
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9661$as_echo "$aligned_required" >&6; }
9662
9663
9664# str, bytes and memoryview hash algorithm
9665
9666
9667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9668$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9669
9670# Check whether --with-hash_algorithm was given.
9671if test "${with_hash_algorithm+set}" = set; then :
9672 withval=$with_hash_algorithm;
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9674$as_echo "$withval" >&6; }
9675case "$withval" in
9676 siphash24)
9677 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9678
9679 ;;
9680 fnv)
9681 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9682
9683 ;;
9684 *)
9685 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9686 ;;
9687esac
9688
9689else
9690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9691$as_echo "default" >&6; }
9692fi
9693
9694
Charles-François Natalid30b0222014-05-08 23:08:51 +01009695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9696$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9697
9698# Check whether --with-address_sanitizer was given.
9699if test "${with_address_sanitizer+set}" = set; then :
9700 withval=$with_address_sanitizer;
9701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9702$as_echo "$withval" >&6; }
9703BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9704LDFLAGS="-fsanitize=address $LDFLAGS"
9705
9706else
9707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9708$as_echo "no" >&6; }
9709fi
9710
9711
Guido van Rossum70c7f481998-03-26 18:44:10 +00009712# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9714$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009715if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009717else
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009719LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723/* Override any GCC internal prototype to avoid an error.
9724 Use char because int might match the return type of a GCC
9725 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009726#ifdef __cplusplus
9727extern "C"
9728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009729char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009730int
9731main ()
9732{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009733return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ;
9735 return 0;
9736}
9737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009738if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009740else
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009743rm -f core conftest.err conftest.$ac_objext \
9744 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009745LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9748$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009749if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009750 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009751fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009752 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9754$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009755if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009757else
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009759LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763/* Override any GCC internal prototype to avoid an error.
9764 Use char because int might match the return type of a GCC
9765 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009766#ifdef __cplusplus
9767extern "C"
9768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009769char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009770int
9771main ()
9772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 ;
9775 return 0;
9776}
9777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009778if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009780else
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009783rm -f core conftest.err conftest.$ac_objext \
9784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009785LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9788$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009789if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009790 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009791fi
9792 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009793
Matthias Kloseb9621712010-04-24 17:59:49 +00009794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9795$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009798if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9801$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009802LIBS="$withval $LIBS"
9803
9804else
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009807fi
9808
Guido van Rossum7f43da71994-08-01 12:15:30 +00009809
Victor Stinner8291b5e2015-03-20 16:03:14 +01009810
9811
9812
9813
9814
9815
9816
9817if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9818 if test -n "$ac_tool_prefix"; then
9819 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9820set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9822$as_echo_n "checking for $ac_word... " >&6; }
9823if ${ac_cv_path_PKG_CONFIG+:} false; then :
9824 $as_echo_n "(cached) " >&6
9825else
9826 case $PKG_CONFIG in
9827 [\\/]* | ?:[\\/]*)
9828 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9829 ;;
9830 *)
9831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9832for as_dir in $PATH
9833do
9834 IFS=$as_save_IFS
9835 test -z "$as_dir" && as_dir=.
9836 for ac_exec_ext in '' $ac_executable_extensions; do
9837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9838 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9840 break 2
9841 fi
9842done
9843 done
9844IFS=$as_save_IFS
9845
9846 ;;
9847esac
9848fi
9849PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9850if test -n "$PKG_CONFIG"; then
9851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9852$as_echo "$PKG_CONFIG" >&6; }
9853else
9854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9855$as_echo "no" >&6; }
9856fi
9857
9858
9859fi
9860if test -z "$ac_cv_path_PKG_CONFIG"; then
9861 ac_pt_PKG_CONFIG=$PKG_CONFIG
9862 # Extract the first word of "pkg-config", so it can be a program name with args.
9863set dummy pkg-config; ac_word=$2
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9865$as_echo_n "checking for $ac_word... " >&6; }
9866if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9867 $as_echo_n "(cached) " >&6
9868else
9869 case $ac_pt_PKG_CONFIG in
9870 [\\/]* | ?:[\\/]*)
9871 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9872 ;;
9873 *)
9874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9875for as_dir in $PATH
9876do
9877 IFS=$as_save_IFS
9878 test -z "$as_dir" && as_dir=.
9879 for ac_exec_ext in '' $ac_executable_extensions; do
9880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9881 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9883 break 2
9884 fi
9885done
9886 done
9887IFS=$as_save_IFS
9888
9889 ;;
9890esac
9891fi
9892ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9893if test -n "$ac_pt_PKG_CONFIG"; then
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9895$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9896else
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9898$as_echo "no" >&6; }
9899fi
9900
9901 if test "x$ac_pt_PKG_CONFIG" = x; then
9902 PKG_CONFIG=""
9903 else
9904 case $cross_compiling:$ac_tool_warned in
9905yes:)
9906{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9907$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9908ac_tool_warned=yes ;;
9909esac
9910 PKG_CONFIG=$ac_pt_PKG_CONFIG
9911 fi
9912else
9913 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9914fi
9915
9916fi
9917if test -n "$PKG_CONFIG"; then
9918 _pkg_min_version=0.9.0
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9920$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9921 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9923$as_echo "yes" >&6; }
9924 else
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
9927 PKG_CONFIG=""
9928 fi
9929fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009930
9931# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9933$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009934
9935# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009936if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009937 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009938else
9939 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009940fi
9941
9942
Matthias Kloseb9621712010-04-24 17:59:49 +00009943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9944$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009945
9946# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9948$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009949
9950# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009951if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009952 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009953else
9954 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009955fi
9956
9957
9958if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009959 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9960else
9961 LIBFFI_INCLUDEDIR=""
9962fi
9963
9964
Matthias Kloseb9621712010-04-24 17:59:49 +00009965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9966$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009967
Stefan Krah60187b52012-03-23 19:06:27 +01009968# Check for use of the system libmpdec library
9969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9970$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9971
9972# Check whether --with-system_libmpdec was given.
9973if test "${with_system_libmpdec+set}" = set; then :
9974 withval=$with_system_libmpdec;
9975else
9976 with_system_libmpdec="no"
9977fi
9978
9979
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9981$as_echo "$with_system_libmpdec" >&6; }
9982
Benjamin Peterson076ed002010-10-31 17:11:02 +00009983# Check for support for loadable sqlite extensions
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9985$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9986# Check whether --enable-loadable-sqlite-extensions was given.
9987if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9988 enableval=$enable_loadable_sqlite_extensions;
9989else
9990 enable_loadable_sqlite_extensions="no"
9991fi
9992
9993
9994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9995$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9996
Ned Deilyd819b932013-09-06 01:07:05 -07009997# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9998
9999
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10001$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10002
10003# Check whether --with-tcltk-includes was given.
10004if test "${with_tcltk_includes+set}" = set; then :
10005 withval=$with_tcltk_includes;
10006else
10007 with_tcltk_includes="default"
10008fi
10009
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10011$as_echo "$with_tcltk_includes" >&6; }
10012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10013$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10014
10015# Check whether --with-tcltk-libs was given.
10016if test "${with_tcltk_libs+set}" = set; then :
10017 withval=$with_tcltk_libs;
10018else
10019 with_tcltk_libs="default"
10020fi
10021
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10023$as_echo "$with_tcltk_libs" >&6; }
10024if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10025then
10026 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10027 then
10028 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10029 fi
10030 TCLTK_INCLUDES=""
10031 TCLTK_LIBS=""
10032else
10033 TCLTK_INCLUDES="$with_tcltk_includes"
10034 TCLTK_LIBS="$with_tcltk_libs"
10035fi
10036
Matthias Klose55708cc2009-04-30 08:06:49 +000010037# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10039$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010040
10041# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010042if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010043 withval=$with_dbmliborder;
10044if test x$with_dbmliborder = xyes
10045then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010046as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010047else
10048 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10049 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10050 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010051 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010052 fi
10053 done
10054fi
10055fi
10056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10058$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010059
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010060# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010061
10062
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10064$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068 withval=$with_signal_module;
10069fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010070
10071
10072if test -z "$with_signal_module"
10073then with_signal_module="yes"
10074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10076$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010077
10078if test "${with_signal_module}" = "yes"; then
10079 USE_SIGNAL_MODULE=""
10080 SIGNAL_OBJS=""
10081else
10082 USE_SIGNAL_MODULE="#"
10083 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10084fi
10085
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010086# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010087
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010088USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090
Martin v. Löwis11437992002-04-12 09:54:03 +000010091
10092# Templates for things AC_DEFINEd more than once.
10093# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010094
10095
Martin v. Löwis11437992002-04-12 09:54:03 +000010096
Matthias Kloseb9621712010-04-24 17:59:49 +000010097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10098$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010101if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102 withval=$with_threads;
10103fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010104
10105
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010106# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010109if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110 withval=$with_thread; with_threads=$with_thread
10111fi
10112
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010113
10114if test -z "$with_threads"
10115then with_threads="yes"
10116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10118$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010119
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010120
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010121if test "$with_threads" = "no"
10122then
10123 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010124elif test "$ac_cv_pthread_is_default" = yes
10125then
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010127
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010128 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010130
10131 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010133elif test "$ac_cv_kpthread" = "yes"
10134then
10135 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010136 if test "$ac_cv_cxx_thread" = "yes"; then
10137 CXX="$CXX -Kpthread"
10138 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010140
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010141 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010142 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010143elif test "$ac_cv_kthread" = "yes"
10144then
10145 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010146 if test "$ac_cv_cxx_thread" = "yes"; then
10147 CXX="$CXX -Kthread"
10148 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010150
10151 posix_threads=yes
10152 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010153elif test "$ac_cv_pthread" = "yes"
10154then
10155 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010156 if test "$ac_cv_cxx_thread" = "yes"; then
10157 CXX="$CXX -pthread"
10158 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010160
10161 posix_threads=yes
10162 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010163else
10164 if test ! -z "$with_threads" -a -d "$with_threads"
10165 then LDFLAGS="$LDFLAGS -L$with_threads"
10166 fi
10167 if test ! -z "$withval" -a -d "$withval"
10168 then LDFLAGS="$LDFLAGS -L$withval"
10169 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010170
10171 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010172 # define _POSIX_THREADS in unistd.h. Some apparently don't
10173 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10175$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010177/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010178
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010179#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010180#ifdef _POSIX_THREADS
10181yes
10182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010183
10184_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010187 unistd_defines_pthreads=yes
10188else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010189 unistd_defines_pthreads=no
10190fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010191rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010192
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10194$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010195
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010197
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010198 # Just looking for pthread_create in libpthread is not enough:
10199 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10200 # So we really have to include pthread.h, and then link.
10201 _libs=$LIBS
10202 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10204$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010206/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010207
10208#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010209#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010210
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010211void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010212int
10213main ()
10214{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010215
10216pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ;
10218 return 0;
10219}
10220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010222
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10224$as_echo "yes" >&6; }
10225 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010226
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010227 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010228 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010229else
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010231 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010233if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010235
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010236 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010237 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010238else
Guido van Rossumad678af1998-10-02 14:42:15 +000010239
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10241$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010242if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010244else
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010246LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250/* Override any GCC internal prototype to avoid an error.
10251 Use char because int might match the return type of a GCC
10252 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010253#ifdef __cplusplus
10254extern "C"
10255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010256char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010257int
10258main ()
10259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ;
10262 return 0;
10263}
10264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010265if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010267else
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010270rm -f core conftest.err conftest.$ac_objext \
10271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010272LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10275$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010276if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010278
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010279 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010280 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010281 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010282else
Greg Steinadf63d62000-07-05 10:38:09 +000010283
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10285$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010286if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010288else
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010290LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294/* Override any GCC internal prototype to avoid an error.
10295 Use char because int might match the return type of a GCC
10296 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010297#ifdef __cplusplus
10298extern "C"
10299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010300char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010301int
10302main ()
10303{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ;
10306 return 0;
10307}
10308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010309if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010311else
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010314rm -f core conftest.err conftest.$ac_objext \
10315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010316LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10319$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010320if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010322
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010323 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010324 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010325 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010326else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010327
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10329$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010330if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010332else
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010334LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338/* Override any GCC internal prototype to avoid an error.
10339 Use char because int might match the return type of a GCC
10340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010341#ifdef __cplusplus
10342extern "C"
10343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010344char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010345int
10346main ()
10347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ;
10350 return 0;
10351}
10352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010355else
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358rm -f core conftest.err conftest.$ac_objext \
10359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010360LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10363$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010364if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010367 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010368 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010369 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010370else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010371
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10373$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010374if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010376else
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010378LIBS="-lcma $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 pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010389int
10390main ()
10391{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010392return pthread_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_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010399else
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +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 Rossumb93a8621998-05-07 13:27:32 +000010405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10407$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010408if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010410
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010411 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010412 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010413 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010414else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010415
Martin v. Löwis130fb172001-07-19 11:00:41 +000010416 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010417fi
10418
Guido van Rossum627b2d71993-12-24 10:39:16 +000010419
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010420fi
10421
Guido van Rossum0be3e491997-05-22 20:33:33 +000010422fi
10423
Guido van Rossum49545951997-12-02 19:28:29 +000010424fi
10425
Guido van Rossumb93a8621998-05-07 13:27:32 +000010426fi
10427
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010429rm -f core conftest.err conftest.$ac_objext \
10430 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010431
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10433$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010434if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010436else
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010438LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442/* Override any GCC internal prototype to avoid an error.
10443 Use char because int might match the return type of a GCC
10444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010445#ifdef __cplusplus
10446extern "C"
10447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010448char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010449int
10450main ()
10451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 ;
10454 return 0;
10455}
10456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010459else
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010462rm -f core conftest.err conftest.$ac_objext \
10463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010464LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10467$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010468if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010469 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010470
Martin v. Löwis130fb172001-07-19 11:00:41 +000010471 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010472 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010473 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010474fi
10475
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010476
Neal Norwitza978ab02002-11-02 16:58:05 +000010477 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10479$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010480if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010482else
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010484LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488/* Override any GCC internal prototype to avoid an error.
10489 Use char because int might match the return type of a GCC
10490 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010491#ifdef __cplusplus
10492extern "C"
10493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010494char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010495int
10496main ()
10497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 ;
10500 return 0;
10501}
10502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010504 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010505else
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010508rm -f core conftest.err conftest.$ac_objext \
10509 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010510LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10513$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010514if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010516
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010517 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010518 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010519 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010520fi
10521
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010522 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010523fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010524
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010525if test "$posix_threads" = "yes"; then
10526 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010529
10530 fi
10531
10532 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10533 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010534 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010535$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010536
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010537 ;;
10538 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010539$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010540
10541 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010542 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010543$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010544
10545 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010546 esac
10547
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10549$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010550 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552else
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554 ac_cv_pthread_system_supported=no
10555else
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010557/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010558
10559 #include <stdio.h>
10560 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010561 void *foo(void *parm) {
10562 return NULL;
10563 }
10564 main() {
10565 pthread_attr_t attr;
10566 pthread_t id;
10567 if (pthread_attr_init(&attr)) exit(-1);
10568 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10569 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10570 exit(0);
10571 }
10572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010573if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010574 ac_cv_pthread_system_supported=yes
10575else
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010580fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582
Guido van Rossum627b2d71993-12-24 10:39:16 +000010583fi
10584
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10586$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010587 if test "$ac_cv_pthread_system_supported" = "yes"; then
10588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010590
10591 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 for ac_func in pthread_sigmask
10593do :
10594 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010595if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010597#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010598_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010599 case $ac_sys_system in
10600 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601
Matthias Kloseb9621712010-04-24 17:59:49 +000010602$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010603
10604 ;;
10605 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010606fi
10607done
10608
Christian Heimesf77b4b22013-08-21 13:26:05 +020010609 for ac_func in pthread_atfork
10610do :
10611 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10612if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10613 cat >>confdefs.h <<_ACEOF
10614#define HAVE_PTHREAD_ATFORK 1
10615_ACEOF
10616
10617fi
10618done
10619
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620fi
10621
10622
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010623# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010624
Matthias Kloseb9621712010-04-24 17:59:49 +000010625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10626$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010628if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010630 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010633 ipv6=no
10634 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10636$as_echo "yes" >&6; }
10637 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638
10639 ipv6=yes
10640 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010642else
Martin v. Löwis11437992002-04-12 09:54:03 +000010643
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010645/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646 /* AF_INET6 available check */
10647#include <sys/types.h>
10648#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010649int
10650main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010651{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010652int domain = AF_INET6;
10653 ;
10654 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010655}
Martin v. Löwis11437992002-04-12 09:54:03 +000010656_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010657if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10660$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010661 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010662
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010663else
Matthias Kloseb159a552010-04-25 21:00:44 +000010664
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10666$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010667 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010668
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010671
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010672if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10674$as_echo_n "checking if RFC2553 API is available... " >&6; }
10675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010676/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010677
10678 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010679#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010680int
10681main ()
10682{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010683struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010684 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010685 ;
10686 return 0;
10687}
Matthias Kloseb159a552010-04-25 21:00:44 +000010688
Martin v. Löwis11437992002-04-12 09:54:03 +000010689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010690if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010691
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010693$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010694 ipv6=yes
10695
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010696else
Matthias Kloseb159a552010-04-25 21:00:44 +000010697
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010700 ipv6=no
10701
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010704fi
10705
10706if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010708
10709fi
10710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711fi
10712
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010713
10714ipv6type=unknown
10715ipv6lib=none
10716ipv6trylibc=no
10717
10718if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10720$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010721 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10722 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723 case $i in
10724 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010726/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728#include <netinet/in.h>
10729#ifdef IPV6_INRIA_VERSION
10730yes
10731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010732_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010735 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010736fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010737rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738
10739 ;;
10740 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010743
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744#include <netinet/in.h>
10745#ifdef __KAME__
10746yes
10747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010749if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751 ipv6type=$i;
10752 ipv6lib=inet6
10753 ipv6libdir=/usr/local/v6/lib
10754 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010756rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757
10758 ;;
10759 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010761/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010762
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763#include <features.h>
10764#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10765yes
10766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010767_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770 ipv6type=$i;
10771 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010773rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774
10775 ;;
10776 linux-inet6)
10777 if test -d /usr/inet6; then
10778 ipv6type=$i
10779 ipv6lib=inet6
10780 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010781 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782 fi
10783 ;;
10784 solaris)
10785 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010786 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787 ipv6type=$i
10788 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789 fi
10790 fi
10791 ;;
10792 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010794/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010795
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796#include <sys/param.h>
10797#ifdef _TOSHIBA_INET6
10798yes
10799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010800_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803 ipv6type=$i;
10804 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010805 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010807rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808
10809 ;;
10810 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010812/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010813
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814#include </usr/local/v6/include/sys/v6config.h>
10815#ifdef __V6D__
10816yes
10817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010818_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821 ipv6type=$i;
10822 ipv6lib=v6;
10823 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010824 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010826rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827
10828 ;;
10829 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010831/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010832
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833#include <sys/param.h>
10834#ifdef _ZETA_MINAMI_INET6
10835yes
10836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010837_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840 ipv6type=$i;
10841 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010842 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010844rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010845
10846 ;;
10847 esac
10848 if test "$ipv6type" != "unknown"; then
10849 break
10850 fi
10851 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10853$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854fi
10855
10856if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10857 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10858 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10859 echo "using lib$ipv6lib"
10860 else
10861 if test $ipv6trylibc = "yes"; then
10862 echo "using libc"
10863 else
10864 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10865 echo "You need to fetch lib$ipv6lib.a from appropriate"
10866 echo 'ipv6 kit and compile beforehand.'
10867 exit 1
10868 fi
10869 fi
10870fi
10871
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10873$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10875/* end confdefs.h. */
10876 /* CAN_RAW_FD_FRAMES available check */
10877#include <linux/can/raw.h>
10878int
10879main ()
10880{
10881int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10882 ;
10883 return 0;
10884}
10885_ACEOF
10886if ac_fn_c_try_compile "$LINENO"; then :
10887
10888
10889$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10890
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10892$as_echo "yes" >&6; }
10893
10894else
10895
10896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10897$as_echo "no" >&6; }
10898
10899fi
10900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10903$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010905/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010906
10907 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010908int
10909main ()
10910{
10911FSIORefNum fRef = 0
10912 ;
10913 return 0;
10914}
Matthias Kloseb159a552010-04-25 21:00:44 +000010915
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010917if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010918
Matthias Kloseb159a552010-04-25 21:00:44 +000010919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10923$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010924
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010925else
Matthias Kloseb159a552010-04-25 21:00:44 +000010926
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10928$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010929
10930fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10932
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010933# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10935$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010938if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010939 withval=$with_doc_strings;
10940fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010941
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010942
10943if test -z "$with_doc_strings"
10944then with_doc_strings="yes"
10945fi
10946if test "$with_doc_strings" != "no"
10947then
10948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010950
10951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10953$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010954
Antoine Pitrou042b1282010-08-13 21:15:58 +000010955# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10957$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010960if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010962if test "$withval" != no
10963then
10964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10968$as_echo "yes" >&6; }
10969else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010971fi
10972else
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10974$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975fi
10976
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010977
10978# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10980$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010983if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984 withval=$with_pymalloc;
10985fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010986
Neil Schemenauera35c6882001-02-27 04:45:05 +000010987
Neil Schemenauer16c22972002-03-22 15:34:49 +000010988if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010989then
10990 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010991fi
10992if test "$with_pymalloc" != "no"
10993then
Martin v. Löwis11437992002-04-12 09:54:03 +000010994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010996
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010997 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11000$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011001
Benjamin Peterson05159c42009-12-03 03:01:27 +000011002# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11004$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011005
11006# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011007if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011008 withval=$with_valgrind;
11009else
11010 with_valgrind=no
11011fi
11012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11014$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011015if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 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 +020011017if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011020
11021else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011022 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011023
11024fi
11025
11026
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011027 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011028fi
11029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011030# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011031
Guido van Rossum98935bf2001-09-05 19:13:16 +000011032DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011033
Guido van Rossume97ee181999-12-20 21:27:22 +000011034# the dlopen() function means we might want to use dynload_shlib.o. some
11035# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011036for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011037do :
11038 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011039if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011040 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011041#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011042_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011043
Guido van Rossume97ee181999-12-20 21:27:22 +000011044fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011045done
Guido van Rossume97ee181999-12-20 21:27:22 +000011046
Michael W. Hudson54241132001-12-07 15:38:26 +000011047
Guido van Rossume97ee181999-12-20 21:27:22 +000011048# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11049# loading of modules.
11050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11052$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011053if test -z "$DYNLOADFILE"
11054then
11055 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011056 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11057 if test "$ac_cv_func_dlopen" = yes
11058 then DYNLOADFILE="dynload_shlib.o"
11059 else DYNLOADFILE="dynload_aix.o"
11060 fi
11061 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011062 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011063 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11064 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011065 *)
11066 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11067 # out any dynamic loading
11068 if test "$ac_cv_func_dlopen" = yes
11069 then DYNLOADFILE="dynload_shlib.o"
11070 else DYNLOADFILE="dynload_stub.o"
11071 fi
11072 ;;
11073 esac
11074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11076$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011077if test "$DYNLOADFILE" != "dynload_stub.o"
11078then
Martin v. Löwis11437992002-04-12 09:54:03 +000011079
Matthias Kloseb9621712010-04-24 17:59:49 +000011080$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011081
11082fi
11083
Neil Schemenauer4e425612001-06-19 15:44:15 +000011084# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11085
Michael W. Hudson54241132001-12-07 15:38:26 +000011086
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11088$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011089if test -z "$MACHDEP_OBJS"
11090then
Jack Jansene578a632001-08-15 01:27:14 +000011091 MACHDEP_OBJS=$extra_machdep_objs
11092else
11093 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011094fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011095if test -z "$MACHDEP_OBJS"; then
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11097$as_echo "none" >&6; }
11098else
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11100$as_echo "$MACHDEP_OBJS" >&6; }
11101fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011102
Guido van Rossum627b2d71993-12-24 10:39:16 +000011103# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011104for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011105 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011106 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011107 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011108 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011109 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011110 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011111 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11112 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011113 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011114 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011115 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011116 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011117 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011118 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011119 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11120 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011121 sigaction sigaltstack siginterrupt sigpending sigrelse \
11122 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011123 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011124 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011125 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011126do :
11127 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11128ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011129if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011132_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011133
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011134fi
11135done
11136
Michael W. Hudson54241132001-12-07 15:38:26 +000011137
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011138ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11139 #include <dirent.h>
11140"
11141if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11142
11143$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11144
11145fi
11146
11147
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011148# For some functions, having a definition is not sufficient, since
11149# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11151$as_echo_n "checking for chroot... " >&6; }
11152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011153/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011154#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011155int
11156main ()
11157{
11158void *x=chroot
11159 ;
11160 return 0;
11161}
11162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011164
Matthias Kloseb9621712010-04-24 17:59:49 +000011165$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011166
Matthias Kloseb159a552010-04-25 21:00:44 +000011167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011168$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011169else
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011172
11173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11176$as_echo_n "checking for link... " >&6; }
11177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011178/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011179#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011180int
11181main ()
11182{
11183void *x=link
11184 ;
11185 return 0;
11186}
11187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011191
Matthias Kloseb159a552010-04-25 21:00:44 +000011192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011193$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011194else
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11196$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011197
11198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11201$as_echo_n "checking for symlink... " >&6; }
11202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011203/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011204#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011205int
11206main ()
11207{
11208void *x=symlink
11209 ;
11210 return 0;
11211}
11212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011213if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011214
Matthias Kloseb9621712010-04-24 17:59:49 +000011215$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011216
Matthias Kloseb159a552010-04-25 21:00:44 +000011217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011218$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011219else
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11221$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011222
11223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11226$as_echo_n "checking for fchdir... " >&6; }
11227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011228/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011229#include <unistd.h>
11230int
11231main ()
11232{
11233void *x=fchdir
11234 ;
11235 return 0;
11236}
11237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011238if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011241
Matthias Kloseb159a552010-04-25 21:00:44 +000011242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011243$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011244else
Matthias Kloseb9621712010-04-24 17:59:49 +000011245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11246$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011247
11248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11251$as_echo_n "checking for fsync... " >&6; }
11252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011253/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011254#include <unistd.h>
11255int
11256main ()
11257{
11258void *x=fsync
11259 ;
11260 return 0;
11261}
11262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011263if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011264
Matthias Kloseb9621712010-04-24 17:59:49 +000011265$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011266
Matthias Kloseb159a552010-04-25 21:00:44 +000011267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011268$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011269else
Matthias Kloseb9621712010-04-24 17:59:49 +000011270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11271$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011272
11273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11276$as_echo_n "checking for fdatasync... " >&6; }
11277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011278/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011279#include <unistd.h>
11280int
11281main ()
11282{
11283void *x=fdatasync
11284 ;
11285 return 0;
11286}
11287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011289
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011291
Matthias Kloseb159a552010-04-25 21:00:44 +000011292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011293$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011294else
Matthias Kloseb9621712010-04-24 17:59:49 +000011295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011297
11298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11301$as_echo_n "checking for epoll... " >&6; }
11302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011303/* end confdefs.h. */
11304#include <sys/epoll.h>
11305int
11306main ()
11307{
11308void *x=epoll_create
11309 ;
11310 return 0;
11311}
11312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011316
Matthias Kloseb159a552010-04-25 21:00:44 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011318$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011319else
Matthias Kloseb9621712010-04-24 17:59:49 +000011320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011322
11323fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11326$as_echo_n "checking for epoll_create1... " >&6; }
11327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11328/* end confdefs.h. */
11329#include <sys/epoll.h>
11330int
11331main ()
11332{
11333void *x=epoll_create1
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338if ac_fn_c_try_compile "$LINENO"; then :
11339
11340$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11341
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11343$as_echo "yes" >&6; }
11344else
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
11347
11348fi
11349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11351$as_echo_n "checking for kqueue... " >&6; }
11352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011353/* end confdefs.h. */
11354
11355#include <sys/types.h>
11356#include <sys/event.h>
11357
11358int
11359main ()
11360{
11361int x=kqueue()
11362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011367
Matthias Kloseb9621712010-04-24 17:59:49 +000011368$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011369
Matthias Kloseb159a552010-04-25 21:00:44 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011371$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011372else
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11374$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011375
11376fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11379$as_echo_n "checking for prlimit... " >&6; }
11380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11381/* end confdefs.h. */
11382
11383#include <sys/time.h>
11384#include <sys/resource.h>
11385
11386int
11387main ()
11388{
11389void *x=prlimit
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394if ac_fn_c_try_compile "$LINENO"; then :
11395
11396$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11397
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11399$as_echo "yes" >&6; }
11400else
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402$as_echo "no" >&6; }
11403
11404fi
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11406
Martin v. Löwisd5843682002-11-21 20:41:28 +000011407# On some systems (eg. FreeBSD 5), we would find a definition of the
11408# functions ctermid_r, setgroups in the library, but no prototype
11409# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11410# address to avoid compiler warnings and potential miscompilations
11411# because of the missing prototypes.
11412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11414$as_echo_n "checking for ctermid_r... " >&6; }
11415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011417
Martin v. Löwisd5843682002-11-21 20:41:28 +000011418#include <stdio.h>
11419
Martin v. Löwisd5843682002-11-21 20:41:28 +000011420int
11421main ()
11422{
11423void* p = ctermid_r
11424 ;
11425 return 0;
11426}
11427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011429
Matthias Kloseb9621712010-04-24 17:59:49 +000011430$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011431
Matthias Kloseb159a552010-04-25 21:00:44 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011434else
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011437
11438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11440
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11442$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011443if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011444 $as_echo_n "(cached) " >&6
11445else
11446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011447/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011448#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011449int
11450main ()
11451{
11452void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011453
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011454 ;
11455 return 0;
11456}
11457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011458if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011459 ac_cv_flock_decl=yes
11460else
11461 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011462
11463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011465
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011466fi
11467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11468$as_echo "$ac_cv_flock_decl" >&6; }
11469if test "x${ac_cv_flock_decl}" = xyes; then
11470 for ac_func in flock
11471do :
11472 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011473if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011474 cat >>confdefs.h <<_ACEOF
11475#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011476_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011477
Antoine Pitroua3000072010-09-07 14:52:42 +000011478else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011480$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011481if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011482 $as_echo_n "(cached) " >&6
11483else
11484 ac_check_lib_save_LIBS=$LIBS
11485LIBS="-lbsd $LIBS"
11486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487/* end confdefs.h. */
11488
11489/* Override any GCC internal prototype to avoid an error.
11490 Use char because int might match the return type of a GCC
11491 builtin and then its argument prototype would still apply. */
11492#ifdef __cplusplus
11493extern "C"
11494#endif
11495char flock ();
11496int
11497main ()
11498{
11499return flock ();
11500 ;
11501 return 0;
11502}
11503_ACEOF
11504if ac_fn_c_try_link "$LINENO"; then :
11505 ac_cv_lib_bsd_flock=yes
11506else
11507 ac_cv_lib_bsd_flock=no
11508fi
11509rm -f core conftest.err conftest.$ac_objext \
11510 conftest$ac_exeext conftest.$ac_ext
11511LIBS=$ac_check_lib_save_LIBS
11512fi
11513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11514$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011515if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011516 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011517
11518
11519$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11520
11521
11522fi
11523
11524
11525fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011526done
11527
Antoine Pitroua3000072010-09-07 14:52:42 +000011528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529
Matthias Kloseb9621712010-04-24 17:59:49 +000011530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11531$as_echo_n "checking for getpagesize... " >&6; }
11532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011533/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011534
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011535#include <unistd.h>
11536
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011537int
11538main ()
11539{
11540void* p = getpagesize
11541 ;
11542 return 0;
11543}
11544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011548
Matthias Kloseb159a552010-04-25 21:00:44 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011550$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011551else
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11553$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011554
11555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011557
Victor Stinner984890f2011-11-24 13:53:38 +010011558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11559$as_echo_n "checking for broken unsetenv... " >&6; }
11560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11561/* end confdefs.h. */
11562
11563#include <stdlib.h>
11564
11565int
11566main ()
11567{
11568int res = unsetenv("DUMMY")
11569 ;
11570 return 0;
11571}
11572_ACEOF
11573if ac_fn_c_try_compile "$LINENO"; then :
11574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
11576else
11577
11578$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11579
11580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11581$as_echo "yes" >&6; }
11582
11583fi
11584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11585
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011586for ac_prog in true
11587do
11588 # Extract the first word of "$ac_prog", so it can be a program name with args.
11589set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11591$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011592if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011593 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011594else
11595 if test -n "$TRUE"; then
11596 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11597else
11598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11599for as_dir in $PATH
11600do
11601 IFS=$as_save_IFS
11602 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011605 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011606 $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 +000011607 break 2
11608 fi
11609done
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011611IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011612
11613fi
11614fi
11615TRUE=$ac_cv_prog_TRUE
11616if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11618$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011619else
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11621$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011622fi
11623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011625 test -n "$TRUE" && break
11626done
11627test -n "$TRUE" || TRUE="/bin/true"
11628
11629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11631$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011632if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011634else
11635 ac_check_lib_save_LIBS=$LIBS
11636LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011638/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640/* Override any GCC internal prototype to avoid an error.
11641 Use char because int might match the return type of a GCC
11642 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011643#ifdef __cplusplus
11644extern "C"
11645#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011646char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011647int
11648main ()
11649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011650return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011651 ;
11652 return 0;
11653}
11654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011656 ac_cv_lib_c_inet_aton=yes
11657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011660rm -f core conftest.err conftest.$ac_objext \
11661 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011662LIBS=$ac_check_lib_save_LIBS
11663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11665$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011666if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011667 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011668else
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11670$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011671if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011673else
11674 ac_check_lib_save_LIBS=$LIBS
11675LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011677/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679/* Override any GCC internal prototype to avoid an error.
11680 Use char because int might match the return type of a GCC
11681 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011682#ifdef __cplusplus
11683extern "C"
11684#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011685char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011686int
11687main ()
11688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011690 ;
11691 return 0;
11692}
11693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011695 ac_cv_lib_resolv_inet_aton=yes
11696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011699rm -f core conftest.err conftest.$ac_objext \
11700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011701LIBS=$ac_check_lib_save_LIBS
11702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11704$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011705if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011706 cat >>confdefs.h <<_ACEOF
11707#define HAVE_LIBRESOLV 1
11708_ACEOF
11709
11710 LIBS="-lresolv $LIBS"
11711
11712fi
11713
11714
11715fi
11716
11717
Christian Heimesd0764e22007-12-04 15:00:33 +000011718# On Tru64, chflags seems to be present, but calling it will
11719# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11721$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011722if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011726 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011727else
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011729/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011730
Christian Heimesd0764e22007-12-04 15:00:33 +000011731#include <sys/stat.h>
11732#include <unistd.h>
11733int main(int argc, char*argv[])
11734{
11735 if(chflags(argv[0], 0) != 0)
11736 return 1;
11737 return 0;
11738}
Ned Deily3eb67d52011-06-28 00:00:28 -070011739
Christian Heimesd0764e22007-12-04 15:00:33 +000011740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011741if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011742 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011748fi
11749
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011750
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11753$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011754if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011756if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011757 ac_cv_have_chflags="yes"
11758else
11759 ac_cv_have_chflags="no"
11760fi
11761
11762fi
11763if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011764
Matthias Kloseb9621712010-04-24 17:59:49 +000011765$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011766
11767fi
11768
Matthias Kloseb9621712010-04-24 17:59:49 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11770$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011771if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011775 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011776else
Matthias Kloseb9621712010-04-24 17:59:49 +000011777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011778/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011779
Christian Heimesd0764e22007-12-04 15:00:33 +000011780#include <sys/stat.h>
11781#include <unistd.h>
11782int main(int argc, char*argv[])
11783{
11784 if(lchflags(argv[0], 0) != 0)
11785 return 1;
11786 return 0;
11787}
Ned Deily3eb67d52011-06-28 00:00:28 -070011788
Christian Heimesd0764e22007-12-04 15:00:33 +000011789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011790if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011791 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011797fi
11798
11799
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11802$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011803if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011805if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011806 ac_cv_have_lchflags="yes"
11807else
11808 ac_cv_have_lchflags="no"
11809fi
11810
11811fi
11812if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011815
11816fi
11817
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011818case $ac_sys_system/$ac_sys_release in
11819Darwin/*)
11820 _CUR_CFLAGS="${CFLAGS}"
11821 _CUR_LDFLAGS="${LDFLAGS}"
11822 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11823 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11824 ;;
11825esac
11826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11828$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011829if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011831else
11832 ac_check_lib_save_LIBS=$LIBS
11833LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011835/* end confdefs.h. */
11836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837/* Override any GCC internal prototype to avoid an error.
11838 Use char because int might match the return type of a GCC
11839 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011840#ifdef __cplusplus
11841extern "C"
11842#endif
11843char inflateCopy ();
11844int
11845main ()
11846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011848 ;
11849 return 0;
11850}
11851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011852if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011853 ac_cv_lib_z_inflateCopy=yes
11854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011857rm -f core conftest.err conftest.$ac_objext \
11858 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011859LIBS=$ac_check_lib_save_LIBS
11860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11862$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011866
11867fi
11868
11869
11870case $ac_sys_system/$ac_sys_release in
11871Darwin/*)
11872 CFLAGS="${_CUR_CFLAGS}"
11873 LDFLAGS="${_CUR_LDFLAGS}"
11874 ;;
11875esac
11876
Matthias Kloseb9621712010-04-24 17:59:49 +000011877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11878$as_echo_n "checking for hstrerror... " >&6; }
11879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011880/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011881
Martin v. Löwise9416172003-05-03 10:12:45 +000011882#include <netdb.h>
11883
Martin v. Löwise9416172003-05-03 10:12:45 +000011884int
11885main ()
11886{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011887void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011888 ;
11889 return 0;
11890}
11891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011892if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011893
Matthias Kloseb9621712010-04-24 17:59:49 +000011894$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011895
Matthias Kloseb159a552010-04-25 21:00:44 +000011896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011897$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11900$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011901
11902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011903rm -f core conftest.err conftest.$ac_objext \
11904 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11907$as_echo_n "checking for inet_aton... " >&6; }
11908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011909/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011910
Martin v. Löwis86d66262006-02-17 08:40:11 +000011911#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011912#include <sys/socket.h>
11913#include <netinet/in.h>
11914#include <arpa/inet.h>
11915
Martin v. Löwise9416172003-05-03 10:12:45 +000011916int
11917main ()
11918{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011919void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011927
Matthias Kloseb159a552010-04-25 21:00:44 +000011928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011929$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011930else
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11932$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011933
11934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011935rm -f core conftest.err conftest.$ac_objext \
11936 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011937
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11939$as_echo_n "checking for inet_pton... " >&6; }
11940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011941/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011942
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011943#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011944#include <sys/socket.h>
11945#include <netinet/in.h>
11946#include <arpa/inet.h>
11947
Martin v. Löwise9416172003-05-03 10:12:45 +000011948int
11949main ()
11950{
11951void* p = inet_pton
11952 ;
11953 return 0;
11954}
11955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011959
Matthias Kloseb159a552010-04-25 21:00:44 +000011960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011961$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11964$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011965
11966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011968
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011969# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11971$as_echo_n "checking for setgroups... " >&6; }
11972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011973/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011974
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011975#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011976#ifdef HAVE_GRP_H
11977#include <grp.h>
11978#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011979
Martin v. Löwisd5843682002-11-21 20:41:28 +000011980int
11981main ()
11982{
11983void* p = setgroups
11984 ;
11985 return 0;
11986}
11987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011991
Matthias Kloseb159a552010-04-25 21:00:44 +000011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011993$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011997
11998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012001# check for openpty and forkpty
12002
12003for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012004do :
12005 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012006if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012008#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012009_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012010
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012011else
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12013$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012014if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012016else
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012018LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012022/* Override any GCC internal prototype to avoid an error.
12023 Use char because int might match the return type of a GCC
12024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012025#ifdef __cplusplus
12026extern "C"
12027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012028char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012029int
12030main ()
12031{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012032return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 ;
12034 return 0;
12035}
12036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012037if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012038 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012042rm -f core conftest.err conftest.$ac_objext \
12043 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012044LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12047$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012048if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012050 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012051else
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12053$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012054if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012056else
12057 ac_check_lib_save_LIBS=$LIBS
12058LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012060/* end confdefs.h. */
12061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062/* Override any GCC internal prototype to avoid an error.
12063 Use char because int might match the return type of a GCC
12064 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012065#ifdef __cplusplus
12066extern "C"
12067#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012068char openpty ();
12069int
12070main ()
12071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012073 ;
12074 return 0;
12075}
12076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012078 ac_cv_lib_bsd_openpty=yes
12079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012082rm -f core conftest.err conftest.$ac_objext \
12083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012084LIBS=$ac_check_lib_save_LIBS
12085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12087$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012088if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012090 LIBS="$LIBS -lbsd"
12091fi
12092
12093
12094fi
12095
Fred Drake8cef4cf2000-06-28 16:40:38 +000012096
12097fi
12098done
12099
12100for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012101do :
12102 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012103if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012105#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012106_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012107
Fred Drake8cef4cf2000-06-28 16:40:38 +000012108else
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12110$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012111if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012113else
Martin v. Löwis11437992002-04-12 09:54:03 +000012114 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012115LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012119/* Override any GCC internal prototype to avoid an error.
12120 Use char because int might match the return type of a GCC
12121 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012122#ifdef __cplusplus
12123extern "C"
12124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012125char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012126int
12127main ()
12128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 ;
12131 return 0;
12132}
12133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012134if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012136else
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012139rm -f core conftest.err conftest.$ac_objext \
12140 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012141LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12144$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012145if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012147 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12150$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012151if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012153else
12154 ac_check_lib_save_LIBS=$LIBS
12155LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012157/* end confdefs.h. */
12158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159/* Override any GCC internal prototype to avoid an error.
12160 Use char because int might match the return type of a GCC
12161 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012162#ifdef __cplusplus
12163extern "C"
12164#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012165char forkpty ();
12166int
12167main ()
12168{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012169return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012170 ;
12171 return 0;
12172}
12173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012174if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012175 ac_cv_lib_bsd_forkpty=yes
12176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012179rm -f core conftest.err conftest.$ac_objext \
12180 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012181LIBS=$ac_check_lib_save_LIBS
12182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12184$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012185if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012187 LIBS="$LIBS -lbsd"
12188fi
12189
12190
12191fi
12192
Fred Drake8cef4cf2000-06-28 16:40:38 +000012193
12194fi
12195done
12196
Jack Jansendd19cf82001-12-06 22:36:17 +000012197
Christian Heimesb186d002008-03-18 15:15:01 +000012198# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012199for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012200do :
12201 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012202if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012203 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012204#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012205_ACEOF
12206
12207fi
12208done
12209
12210
Michael W. Hudson54241132001-12-07 15:38:26 +000012211# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012212for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012213do :
12214 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12215ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012216if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012218#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012219_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012220
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012221fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012222done
12223
Michael W. Hudson54241132001-12-07 15:38:26 +000012224
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012225ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012226if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012227 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012228
Martin v. Löwis1142de32002-03-29 16:28:31 +000012229else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012231 *" dup2.$ac_objext "* ) ;;
12232 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012234esac
12235
Martin v. Löwis1142de32002-03-29 16:28:31 +000012236fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012237
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012238ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012239if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012240 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12241
12242else
12243 case " $LIBOBJS " in
12244 *" strdup.$ac_objext "* ) ;;
12245 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12246 ;;
12247esac
12248
12249fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012250
12251
12252for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012253do :
12254 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012255if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012260/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012261#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012262int
12263main ()
12264{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012265getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 ;
12267 return 0;
12268}
12269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012270if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012271
Matthias Kloseb9621712010-04-24 17:59:49 +000012272$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012273
Guido van Rossum627b2d71993-12-24 10:39:16 +000012274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012276
Guido van Rossum627b2d71993-12-24 10:39:16 +000012277fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012278done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012279
Jack Jansen150753c2003-03-29 22:07:47 +000012280for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012281do :
12282 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012283if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012284 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012285#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012288/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012289#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012290int
12291main ()
12292{
12293setpgrp(0,0);
12294 ;
12295 return 0;
12296}
12297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012299
Matthias Kloseb9621712010-04-24 17:59:49 +000012300$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012301
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012304
12305fi
12306done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012307
Thomas Wouters3a584202000-08-05 23:28:51 +000012308for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012309do :
12310 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012311if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012316/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012317#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012318int
12319main ()
12320{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012321gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012322 ;
12323 return 0;
12324}
12325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012326if ac_fn_c_try_compile "$LINENO"; then :
12327
Guido van Rossum627b2d71993-12-24 10:39:16 +000012328else
Skip Montanaro6dead952003-09-25 14:50:04 +000012329
Matthias Kloseb9621712010-04-24 17:59:49 +000012330$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012331
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Guido van Rossum627b2d71993-12-24 10:39:16 +000012333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012335
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012336fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012337done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338
Michael W. Hudson54241132001-12-07 15:38:26 +000012339
Victor Stinnere0be4232011-10-25 13:06:09 +020012340for ac_func in clock_gettime
12341do :
12342 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12343if test "x$ac_cv_func_clock_gettime" = xyes; then :
12344 cat >>confdefs.h <<_ACEOF
12345#define HAVE_CLOCK_GETTIME 1
12346_ACEOF
12347
12348else
12349
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12351$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12352if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12353 $as_echo_n "(cached) " >&6
12354else
12355 ac_check_lib_save_LIBS=$LIBS
12356LIBS="-lrt $LIBS"
12357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12358/* end confdefs.h. */
12359
12360/* Override any GCC internal prototype to avoid an error.
12361 Use char because int might match the return type of a GCC
12362 builtin and then its argument prototype would still apply. */
12363#ifdef __cplusplus
12364extern "C"
12365#endif
12366char clock_gettime ();
12367int
12368main ()
12369{
12370return clock_gettime ();
12371 ;
12372 return 0;
12373}
12374_ACEOF
12375if ac_fn_c_try_link "$LINENO"; then :
12376 ac_cv_lib_rt_clock_gettime=yes
12377else
12378 ac_cv_lib_rt_clock_gettime=no
12379fi
12380rm -f core conftest.err conftest.$ac_objext \
12381 conftest$ac_exeext conftest.$ac_ext
12382LIBS=$ac_check_lib_save_LIBS
12383fi
12384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12385$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12386if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12387
Victor Stinner7efb8332014-08-29 15:41:08 +020012388 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012389 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12390
12391
12392$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12393
12394
12395fi
12396
12397
12398fi
12399done
12400
12401
12402for ac_func in clock_getres
12403do :
12404 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12405if test "x$ac_cv_func_clock_getres" = xyes; then :
12406 cat >>confdefs.h <<_ACEOF
12407#define HAVE_CLOCK_GETRES 1
12408_ACEOF
12409
12410else
12411
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12413$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12414if ${ac_cv_lib_rt_clock_getres+:} false; then :
12415 $as_echo_n "(cached) " >&6
12416else
12417 ac_check_lib_save_LIBS=$LIBS
12418LIBS="-lrt $LIBS"
12419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12420/* end confdefs.h. */
12421
12422/* Override any GCC internal prototype to avoid an error.
12423 Use char because int might match the return type of a GCC
12424 builtin and then its argument prototype would still apply. */
12425#ifdef __cplusplus
12426extern "C"
12427#endif
12428char clock_getres ();
12429int
12430main ()
12431{
12432return clock_getres ();
12433 ;
12434 return 0;
12435}
12436_ACEOF
12437if ac_fn_c_try_link "$LINENO"; then :
12438 ac_cv_lib_rt_clock_getres=yes
12439else
12440 ac_cv_lib_rt_clock_getres=no
12441fi
12442rm -f core conftest.err conftest.$ac_objext \
12443 conftest$ac_exeext conftest.$ac_ext
12444LIBS=$ac_check_lib_save_LIBS
12445fi
12446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12447$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12448if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12449
12450 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12451
12452
12453fi
12454
12455
12456fi
12457done
12458
12459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12461$as_echo_n "checking for major... " >&6; }
12462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012463/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012464
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012465#if defined(MAJOR_IN_MKDEV)
12466#include <sys/mkdev.h>
12467#elif defined(MAJOR_IN_SYSMACROS)
12468#include <sys/sysmacros.h>
12469#else
12470#include <sys/types.h>
12471#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012472
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012473int
12474main ()
12475{
12476
12477 makedev(major(0),minor(0));
12478
12479 ;
12480 return 0;
12481}
12482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012483if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012484
12485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12489$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012490
12491else
Skip Montanaro6dead952003-09-25 14:50:04 +000012492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12494$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012495
12496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012497rm -f core conftest.err conftest.$ac_objext \
12498 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012499
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012500# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012501# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12503$as_echo_n "checking for getaddrinfo... " >&6; }
12504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012505/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012506
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012507#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012508#include <sys/socket.h>
12509#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012510#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012511
Martin v. Löwis11437992002-04-12 09:54:03 +000012512int
12513main ()
12514{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012515getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 ;
12517 return 0;
12518}
12519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012520if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012521 have_getaddrinfo=yes
12522else
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012525rm -f core conftest.err conftest.$ac_objext \
12526 conftest$ac_exeext conftest.$ac_ext
12527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12528$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012529if test $have_getaddrinfo = yes
12530then
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12532$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012533 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012537
12538if test "${enable_ipv6+set}" = set; then
12539 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12540else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012541 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012542fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012543else
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012545/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012546
Stefan Krah19c21392012-11-22 23:47:32 +010012547#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012548#include <sys/types.h>
12549#include <netdb.h>
12550#include <string.h>
12551#include <sys/socket.h>
12552#include <netinet/in.h>
12553
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012554int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012555{
12556 int passive, gaierr, inet4 = 0, inet6 = 0;
12557 struct addrinfo hints, *ai, *aitop;
12558 char straddr[INET6_ADDRSTRLEN], strport[16];
12559
12560 for (passive = 0; passive <= 1; passive++) {
12561 memset(&hints, 0, sizeof(hints));
12562 hints.ai_family = AF_UNSPEC;
12563 hints.ai_flags = passive ? AI_PASSIVE : 0;
12564 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012565 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012566 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12567 (void)gai_strerror(gaierr);
12568 goto bad;
12569 }
12570 for (ai = aitop; ai; ai = ai->ai_next) {
12571 if (ai->ai_addr == NULL ||
12572 ai->ai_addrlen == 0 ||
12573 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12574 straddr, sizeof(straddr), strport, sizeof(strport),
12575 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12576 goto bad;
12577 }
12578 switch (ai->ai_family) {
12579 case AF_INET:
12580 if (strcmp(strport, "54321") != 0) {
12581 goto bad;
12582 }
12583 if (passive) {
12584 if (strcmp(straddr, "0.0.0.0") != 0) {
12585 goto bad;
12586 }
12587 } else {
12588 if (strcmp(straddr, "127.0.0.1") != 0) {
12589 goto bad;
12590 }
12591 }
12592 inet4++;
12593 break;
12594 case AF_INET6:
12595 if (strcmp(strport, "54321") != 0) {
12596 goto bad;
12597 }
12598 if (passive) {
12599 if (strcmp(straddr, "::") != 0) {
12600 goto bad;
12601 }
12602 } else {
12603 if (strcmp(straddr, "::1") != 0) {
12604 goto bad;
12605 }
12606 }
12607 inet6++;
12608 break;
12609 case AF_UNSPEC:
12610 goto bad;
12611 break;
12612 default:
12613 /* another family support? */
12614 break;
12615 }
12616 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012617 freeaddrinfo(aitop);
12618 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012619 }
12620
12621 if (!(inet4 == 0 || inet4 == 2))
12622 goto bad;
12623 if (!(inet6 == 0 || inet6 == 2))
12624 goto bad;
12625
12626 if (aitop)
12627 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012628 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012629
12630 bad:
12631 if (aitop)
12632 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012633 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012634}
12635
Martin v. Löwis11437992002-04-12 09:54:03 +000012636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012638 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012639else
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012646fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012647
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12651$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12652
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012653if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012654then
12655 if test $ipv6 = yes
12656 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012657 echo 'Fatal: You must get working getaddrinfo() function.'
12658 echo ' or you can specify "--disable-ipv6"'.
12659 exit 1
12660 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012661else
Martin v. Löwis11437992002-04-12 09:54:03 +000012662
Matthias Kloseb9621712010-04-24 17:59:49 +000012663$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012664
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012665fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012666
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012667for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012668do :
12669 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012670if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012671 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012672#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012673_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012674
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012675fi
12676done
12677
Michael W. Hudson54241132001-12-07 15:38:26 +000012678
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12681$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012682if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684else
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012686/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012687#include <sys/types.h>
12688#include <sys/time.h>
12689#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012690
Martin v. Löwis11437992002-04-12 09:54:03 +000012691int
12692main ()
12693{
12694if ((struct tm *) 0)
12695return 0;
12696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012701 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012702else
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12708$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012709if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712
12713fi
12714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12716$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012717if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719else
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722#include <sys/types.h>
12723#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
Martin v. Löwis11437992002-04-12 09:54:03 +000012725int
12726main ()
12727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728struct tm tm;
12729 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 ;
12732 return 0;
12733}
12734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012735if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012736 ac_cv_struct_tm=time.h
12737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12743$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012744if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012747
12748fi
12749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750ac_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 +000012751#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
Matthias Kloseb9621712010-04-24 17:59:49 +000012753"
Victor Stinnere0be4232011-10-25 13:06:09 +020012754if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
12756cat >>confdefs.h <<_ACEOF
12757#define HAVE_STRUCT_TM_TM_ZONE 1
12758_ACEOF
12759
12760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012761fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012762
Martin v. Löwis11437992002-04-12 09:54:03 +000012763if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012766
12767else
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12769"
Victor Stinnere0be4232011-10-25 13:06:09 +020012770if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772else
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774fi
12775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012777#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778_ACEOF
12779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12781$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012782if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012783 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784else
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012786/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012787#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788#if !HAVE_DECL_TZNAME
12789extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012791
Martin v. Löwis11437992002-04-12 09:54:03 +000012792int
12793main ()
12794{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 ;
12797 return 0;
12798}
12799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012800if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012801 ac_cv_var_tzname=yes
12802else
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012805rm -f core conftest.err conftest.$ac_objext \
12806 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12809$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012810 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012811
Matthias Kloseb9621712010-04-24 17:59:49 +000012812$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012813
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012814 fi
12815fi
12816
Matthias Kloseb9621712010-04-24 17:59:49 +000012817ac_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 +020012818if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012819
12820cat >>confdefs.h <<_ACEOF
12821#define HAVE_STRUCT_STAT_ST_RDEV 1
12822_ACEOF
12823
12824
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012825fi
12826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827ac_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 +020012828if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012829
Martin v. Löwis11437992002-04-12 09:54:03 +000012830cat >>confdefs.h <<_ACEOF
12831#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12832_ACEOF
12833
12834
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012835fi
12836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837ac_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 +020012838if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012839
12840cat >>confdefs.h <<_ACEOF
12841#define HAVE_STRUCT_STAT_ST_FLAGS 1
12842_ACEOF
12843
12844
12845fi
12846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847ac_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 +020012848if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012849
12850cat >>confdefs.h <<_ACEOF
12851#define HAVE_STRUCT_STAT_ST_GEN 1
12852_ACEOF
12853
12854
12855fi
12856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857ac_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 +020012858if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012859
12860cat >>confdefs.h <<_ACEOF
12861#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12862_ACEOF
12863
12864
12865fi
12866
Matthias Kloseb9621712010-04-24 17:59:49 +000012867ac_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 +020012868if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012869
Martin v. Löwis11437992002-04-12 09:54:03 +000012870cat >>confdefs.h <<_ACEOF
12871#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12872_ACEOF
12873
12874
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012875fi
12876
Michael W. Hudson54241132001-12-07 15:38:26 +000012877
Matthias Kloseb9621712010-04-24 17:59:49 +000012878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12879$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012880if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882else
Matthias Kloseb159a552010-04-25 21:00:44 +000012883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012885/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012886#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012887int
12888main ()
12889{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012890return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ;
12892 return 0;
12893}
12894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896 ac_cv_header_time_altzone=yes
12897else
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902fi
12903
Matthias Kloseb9621712010-04-24 17:59:49 +000012904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12905$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012909
12910fi
12911
Guido van Rossumda88dad1995-01-26 00:46:29 +000012912was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12914$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012916/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012917
12918#include <sys/types.h>
12919#include <sys/select.h>
12920#include <sys/time.h>
12921
Martin v. Löwis11437992002-04-12 09:54:03 +000012922int
12923main ()
12924{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925;
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 ;
12927 return 0;
12928}
12929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012930if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012931
12932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012934
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012935 was_it_defined=yes
12936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12940$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12943$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012944if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012948/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012949#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012950int
12951main ()
12952{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012953struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 ;
12955 return 0;
12956}
12957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012959 ac_cv_struct_addrinfo=yes
12960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12964fi
12965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12967$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012968if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012969
Matthias Kloseb9621712010-04-24 17:59:49 +000012970$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012971
12972fi
12973
Matthias Kloseb9621712010-04-24 17:59:49 +000012974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12975$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012976if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012978else
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012980/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012981
12982# include <sys/types.h>
12983# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012984int
12985main ()
12986{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012987struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ;
12989 return 0;
12990}
12991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012993 ac_cv_struct_sockaddr_storage=yes
12994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12998fi
12999
Matthias Kloseb9621712010-04-24 17:59:49 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13001$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013005
13006fi
13007
Guido van Rossum627b2d71993-12-24 10:39:16 +000013008# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13011$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013012if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013017$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013018int
13019main ()
13020{
13021static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013022test_array [0] = 0;
13023return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013024
13025 ;
13026 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013027}
Martin v. Löwis11437992002-04-12 09:54:03 +000013028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013029if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013030 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13037$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013038if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013040
13041fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13044$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013045if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013047else
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013049/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013050
Martin v. Löwis11437992002-04-12 09:54:03 +000013051int
13052main ()
13053{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013054
Martin v. Löwis11437992002-04-12 09:54:03 +000013055#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013056 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013058 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060 char const *const *pcpcc;
13061 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013062 /* NEC SVR4.0.2 mips cc rejects this. */
13063 struct point {int x, y;};
13064 static struct point const zero = {0,0};
13065 /* AIX XL C 1.02.0.0 rejects this.
13066 It does not let you subtract one const X* pointer from another in
13067 an arm of an if-expression whose if-part is not a constant
13068 expression */
13069 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072 ++pcpcc;
13073 ppc = (char**) pcpcc;
13074 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013075 { /* SCO 3.2v4 cc rejects this sort of thing. */
13076 char tx;
13077 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013079
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 }
13083 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13084 int x[] = {25, 17};
13085 const int *foo = &x[0];
13086 ++foo;
13087 }
13088 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13089 typedef const int *iptr;
13090 iptr p = 0;
13091 ++p;
13092 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013093 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013094 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013095 struct s { int j; const int *ap[3]; } bx;
13096 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 }
13098 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13099 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013100 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013101 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013102 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013103#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 ;
13106 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013107}
Martin v. Löwis11437992002-04-12 09:54:03 +000013108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013110 ac_cv_c_const=yes
13111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13117$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013118if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013121
13122fi
13123
Michael W. Hudson54241132001-12-07 15:38:26 +000013124
Guido van Rossumda88dad1995-01-26 00:46:29 +000013125works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13127$as_echo_n "checking for working volatile... " >&6; }
13128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013129/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013130
Martin v. Löwis11437992002-04-12 09:54:03 +000013131int
13132main ()
13133{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013134volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 ;
13136 return 0;
13137}
13138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013139if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013140 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013141else
Skip Montanaro6dead952003-09-25 14:50:04 +000013142
Matthias Kloseb9621712010-04-24 17:59:49 +000013143$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013144
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013145
Guido van Rossum627b2d71993-12-24 10:39:16 +000013146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13149$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013150
Guido van Rossumda88dad1995-01-26 00:46:29 +000013151works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13153$as_echo_n "checking for working signed char... " >&6; }
13154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013155/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013156
Martin v. Löwis11437992002-04-12 09:54:03 +000013157int
13158main ()
13159{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013160signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ;
13162 return 0;
13163}
13164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013166 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013167else
Skip Montanaro6dead952003-09-25 14:50:04 +000013168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013170
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013171
Guido van Rossum7f43da71994-08-01 12:15:30 +000013172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13175$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013176
Guido van Rossumda88dad1995-01-26 00:46:29 +000013177have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13179$as_echo_n "checking for prototypes... " >&6; }
13180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013181/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013182int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013183int
13184main ()
13185{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013186return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 ;
13188 return 0;
13189}
13190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
Matthias Kloseb159a552010-04-25 21:00:44 +000013195 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13199$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013200
Guido van Rossumda88dad1995-01-26 00:46:29 +000013201works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13203$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013205/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013206
13207#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013208int foo(int x, ...) {
13209 va_list va;
13210 va_start(va, x);
13211 va_arg(va, int);
13212 va_arg(va, char *);
13213 va_arg(va, double);
13214 return 0;
13215}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013216
Martin v. Löwis11437992002-04-12 09:54:03 +000013217int
13218main ()
13219{
Guido van Rossum90eea071996-08-30 20:58:57 +000013220return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 ;
13222 return 0;
13223}
13224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013226
13227
Matthias Kloseb9621712010-04-24 17:59:49 +000013228$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013229
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013230 works=yes
13231
Guido van Rossum627b2d71993-12-24 10:39:16 +000013232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13235$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013236
Martin v. Löwisd6320502004-08-12 13:45:08 +000013237# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13239$as_echo_n "checking for socketpair... " >&6; }
13240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013241/* end confdefs.h. */
13242
13243#include <sys/types.h>
13244#include <sys/socket.h>
13245
13246int
13247main ()
13248{
13249void *x=socketpair
13250 ;
13251 return 0;
13252}
13253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013254if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013257
Matthias Kloseb159a552010-04-25 21:00:44 +000013258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013260else
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13262$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013263
13264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013266
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13269$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013271/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013272#include <sys/types.h>
13273#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013274int
13275main ()
13276{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013277struct sockaddr x;
13278x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013279 ;
13280 return 0;
13281}
13282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013283if ac_fn_c_try_compile "$LINENO"; then :
13284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13285$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013288
13289else
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013292
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013295
Guido van Rossumda88dad1995-01-26 00:46:29 +000013296va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13298$as_echo_n "checking whether va_list is an array... " >&6; }
13299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013300/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013301
13302#ifdef HAVE_STDARG_PROTOTYPES
13303#include <stdarg.h>
13304#else
13305#include <varargs.h>
13306#endif
13307
Martin v. Löwis11437992002-04-12 09:54:03 +000013308int
13309main ()
13310{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 ;
13313 return 0;
13314}
13315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013316if ac_fn_c_try_compile "$LINENO"; then :
13317
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318else
Skip Montanaro6dead952003-09-25 14:50:04 +000013319
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013322
Guido van Rossumda88dad1995-01-26 00:46:29 +000013323 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013324
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13328$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013330# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013331
13332
Matthias Kloseb9621712010-04-24 17:59:49 +000013333ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013334if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13339$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013340 OLD_CFLAGS=$CFLAGS
13341 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013343/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013344
13345# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
Martin v. Löwis11437992002-04-12 09:54:03 +000013347int
13348main ()
13349{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013350
13351 char *name;
13352 struct hostent *he, *res;
13353 char buffer[2048];
13354 int buflen = 2048;
13355 int h_errnop;
13356
13357 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013358
13359 ;
13360 return 0;
13361}
13362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13371$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013372
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013373else
Skip Montanaro6dead952003-09-25 14:50:04 +000013374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13376$as_echo "no" >&6; }
13377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13378$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013380/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013381
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013382# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Martin v. Löwis11437992002-04-12 09:54:03 +000013384int
13385main ()
13386{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013387
13388 char *name;
13389 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013390 char buffer[2048];
13391 int buflen = 2048;
13392 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013393
Matthias Kloseb159a552010-04-25 21:00:44 +000013394 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013395
13396 ;
13397 return 0;
13398}
13399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404
Matthias Kloseb159a552010-04-25 21:00:44 +000013405$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13408$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013409
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013410else
Skip Montanaro6dead952003-09-25 14:50:04 +000013411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13413$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13415$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13417/* end confdefs.h. */
13418
13419# include <netdb.h>
13420
13421int
13422main ()
13423{
13424
13425 char *name;
13426 struct hostent *he;
13427 struct hostent_data data;
13428
13429 (void) gethostbyname_r(name, he, &data);
13430
13431 ;
13432 return 0;
13433}
13434_ACEOF
13435if ac_fn_c_try_compile "$LINENO"; then :
13436
13437 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13438
13439
13440$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13441
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13443$as_echo "yes" >&6; }
13444
13445else
13446
13447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13448$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013449
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013452
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013458 CFLAGS=$OLD_CFLAGS
13459
13460else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 for ac_func in gethostbyname
13463do :
13464 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013465if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013467#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013468_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013469
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013470fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013471done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013472
Michael W. Hudson54241132001-12-07 15:38:26 +000013473
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013474fi
13475
Michael W. Hudson54241132001-12-07 15:38:26 +000013476
13477
13478
13479
13480
13481
Guido van Rossum627b2d71993-12-24 10:39:16 +000013482# checks for system services
13483# (none yet)
13484
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013485# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013486ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013487if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013488
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013489else
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13491$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013492if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013494else
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013496LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013500/* Override any GCC internal prototype to avoid an error.
13501 Use char because int might match the return type of a GCC
13502 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013503#ifdef __cplusplus
13504extern "C"
13505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013506char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013507int
13508main ()
13509{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013510return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 ;
13512 return 0;
13513}
13514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013515if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013516 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013517else
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013520rm -f core conftest.err conftest.$ac_objext \
13521 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013522LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13525$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013526if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013527 cat >>confdefs.h <<_ACEOF
13528#define HAVE_LIBIEEE 1
13529_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013530
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013531 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013532
Guido van Rossum627b2d71993-12-24 10:39:16 +000013533fi
13534
Michael W. Hudson54241132001-12-07 15:38:26 +000013535
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013536fi
13537
Michael W. Hudson54241132001-12-07 15:38:26 +000013538
Guido van Rossum7f253911997-05-09 02:42:48 +000013539# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13541$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013544if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013546if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013547then
13548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13552$as_echo "yes" >&6; }
13553else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13554$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013555fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013556else
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13558$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013559fi
13560
Guido van Rossum7f253911997-05-09 02:42:48 +000013561
Guido van Rossum7f43da71994-08-01 12:15:30 +000013562# check for --with-libm=...
13563
Guido van Rossum563e7081996-09-10 18:20:48 +000013564case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013565Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013566*) LIBM=-lm
13567esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13569$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013571# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013572if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013573 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013574if test "$withval" = no
13575then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13577$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013578elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013579then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13581$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013582else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013583fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13586$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587fi
13588
Guido van Rossum7f43da71994-08-01 12:15:30 +000013589
13590# check for --with-libc=...
13591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13593$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013595# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013597 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013598if test "$withval" = no
13599then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13601$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013602elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013603then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13605$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013606else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013607fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013608else
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13610$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611fi
13612
Guido van Rossum7f43da71994-08-01 12:15:30 +000013613
Stefan Krah1919b7e2012-03-21 18:25:23 +010013614# **************************************
13615# * Check for gcc x64 inline assembler *
13616# **************************************
13617
13618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13619$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13621/* end confdefs.h. */
13622
13623int
13624main ()
13625{
13626
13627 __asm__ __volatile__ ("movq %rcx, %rax");
13628
13629 ;
13630 return 0;
13631}
13632_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013633if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013634 have_gcc_asm_for_x64=yes
13635else
13636 have_gcc_asm_for_x64=no
13637fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013638rm -f core conftest.err conftest.$ac_objext \
13639 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13641$as_echo "$have_gcc_asm_for_x64" >&6; }
13642if test "$have_gcc_asm_for_x64" = yes
13643then
13644
13645$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13646
13647fi
13648
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013649# **************************************************
13650# * Check for various properties of floating point *
13651# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13654$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013655if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013657else
13658
Matthias Kloseb9621712010-04-24 17:59:49 +000013659if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013660 ac_cv_little_endian_double=no
13661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013663/* end confdefs.h. */
13664
13665#include <string.h>
13666int main() {
13667 double x = 9006104071832581.0;
13668 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13669 return 0;
13670 else
13671 return 1;
13672}
13673
13674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013675if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013676 ac_cv_little_endian_double=yes
13677else
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013682fi
13683
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013684fi
13685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13687$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013688if test "$ac_cv_little_endian_double" = yes
13689then
13690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013692
13693fi
13694
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13696$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013697if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013699else
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013702 ac_cv_big_endian_double=no
13703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013705/* end confdefs.h. */
13706
13707#include <string.h>
13708int main() {
13709 double x = 9006104071832581.0;
13710 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13711 return 0;
13712 else
13713 return 1;
13714}
13715
13716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013717if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013718 ac_cv_big_endian_double=yes
13719else
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013724fi
13725
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013726fi
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13729$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013730if test "$ac_cv_big_endian_double" = yes
13731then
13732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013734
13735fi
13736
13737# Some ARM platforms use a mixed-endian representation for doubles.
13738# While Python doesn't currently have full support for these platforms
13739# (see e.g., issue 1762561), we can at least make sure that float <-> string
13740# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13742$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013743if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013745else
13746
Matthias Kloseb9621712010-04-24 17:59:49 +000013747if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013748 ac_cv_mixed_endian_double=no
13749else
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013751/* end confdefs.h. */
13752
13753#include <string.h>
13754int main() {
13755 double x = 9006104071832581.0;
13756 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13757 return 0;
13758 else
13759 return 1;
13760}
13761
13762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013763if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013764 ac_cv_mixed_endian_double=yes
13765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13769 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013770fi
13771
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013772fi
13773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13775$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013776if test "$ac_cv_mixed_endian_double" = yes
13777then
13778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013780
13781fi
13782
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013783# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013784# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013785# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013786# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013787# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013788# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013789
13790# This inline assembler syntax may also work for suncc and icc,
13791# so we try it on all platforms.
13792
Matthias Kloseb9621712010-04-24 17:59:49 +000013793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13794$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013796/* end confdefs.h. */
13797
13798int
13799main ()
13800{
13801
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013802 unsigned short cw;
13803 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13804 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013805
13806 ;
13807 return 0;
13808}
13809_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013810if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013811 have_gcc_asm_for_x87=yes
13812else
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013814fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013815rm -f core conftest.err conftest.$ac_objext \
13816 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13818$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013819if test "$have_gcc_asm_for_x87" = yes
13820then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013821
Matthias Kloseb9621712010-04-24 17:59:49 +000013822$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013823
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013824fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013825
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13827$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829/* end confdefs.h. */
13830
13831int
13832main ()
13833{
13834
13835 unsigned int fpcr;
13836 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13837 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13838
13839 ;
13840 return 0;
13841}
13842_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013843if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013844 have_gcc_asm_for_mc68881=yes
13845else
13846 have_gcc_asm_for_mc68881=no
13847fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013848rm -f core conftest.err conftest.$ac_objext \
13849 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13851$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13852if test "$have_gcc_asm_for_mc68881" = yes
13853then
13854
13855$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13856
13857fi
13858
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013859# Detect whether system arithmetic is subject to x87-style double
13860# rounding issues. The result of this test has little meaning on non
13861# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13862# mode is round-to-nearest and double rounding issues are present, and
13863# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13865$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013866# $BASECFLAGS may affect the result
13867ac_save_cc="$CC"
13868CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013869if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013870 ac_cv_x87_double_rounding=no
13871else
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013873/* end confdefs.h. */
13874
13875#include <stdlib.h>
13876#include <math.h>
13877int main() {
13878 volatile double x, y, z;
13879 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13880 x = 0.99999999999999989; /* 1-2**-53 */
13881 y = 1./x;
13882 if (y != 1.)
13883 exit(0);
13884 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13885 x = 1e16;
13886 y = 2.99999;
13887 z = x + y;
13888 if (z != 1e16+4.)
13889 exit(0);
13890 /* both tests show evidence of double rounding */
13891 exit(1);
13892}
13893
13894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013895if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013896 ac_cv_x87_double_rounding=no
13897else
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013902fi
13903
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013904CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13906$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013907if test "$ac_cv_x87_double_rounding" = yes
13908then
13909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013911
13912fi
13913
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013914# ************************************
13915# * Check for mathematical functions *
13916# ************************************
13917
13918LIBS_SAVE=$LIBS
13919LIBS="$LIBS $LIBM"
13920
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013921for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13922do :
13923 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13924ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013925if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013926 cat >>confdefs.h <<_ACEOF
13927#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13928_ACEOF
13929
13930fi
13931done
13932
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013933for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013934do :
13935 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13936ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013937if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013938 cat >>confdefs.h <<_ACEOF
13939#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13940_ACEOF
13941
13942fi
13943done
13944
13945ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13946"
Victor Stinnere0be4232011-10-25 13:06:09 +020013947if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013948 ac_have_decl=1
13949else
13950 ac_have_decl=0
13951fi
13952
13953cat >>confdefs.h <<_ACEOF
13954#define HAVE_DECL_ISINF $ac_have_decl
13955_ACEOF
13956ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13957"
Victor Stinnere0be4232011-10-25 13:06:09 +020013958if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013959 ac_have_decl=1
13960else
13961 ac_have_decl=0
13962fi
13963
13964cat >>confdefs.h <<_ACEOF
13965#define HAVE_DECL_ISNAN $ac_have_decl
13966_ACEOF
13967ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13968"
Victor Stinnere0be4232011-10-25 13:06:09 +020013969if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013970 ac_have_decl=1
13971else
13972 ac_have_decl=0
13973fi
13974
13975cat >>confdefs.h <<_ACEOF
13976#define HAVE_DECL_ISFINITE $ac_have_decl
13977_ACEOF
13978
13979
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013980# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13981# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13983$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013984if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013986else
13987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013989 ac_cv_tanh_preserves_zero_sign=no
13990else
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013992/* end confdefs.h. */
13993
13994#include <math.h>
13995#include <stdlib.h>
13996int main() {
13997 /* return 0 if either negative zeros don't exist
13998 on this platform or if negative zeros exist
13999 and tanh(-0.) == -0. */
14000 if (atan2(0., -1.) == atan2(-0., -1.) ||
14001 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14002 else exit(1);
14003}
14004
14005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014006if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014007 ac_cv_tanh_preserves_zero_sign=yes
14008else
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14012 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014013fi
14014
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014015fi
14016
Matthias Kloseb9621712010-04-24 17:59:49 +000014017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14018$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014019if test "$ac_cv_tanh_preserves_zero_sign" = yes
14020then
14021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014023
14024fi
14025
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014026if test "$ac_cv_func_log1p" = yes
14027then
14028 # On some versions of AIX, log1p(-0.) returns 0. instead of
14029 # -0. See issue #9920.
14030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14031$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014032 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014033 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014034else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014035
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014036 if test "$cross_compiling" = yes; then :
14037 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014038else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14040/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014041
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014042 #include <math.h>
14043 #include <stdlib.h>
14044 int main() {
14045 /* Fail if the signs of log1p(-0.) and -0. can be
14046 distinguished. */
14047 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14048 return 0;
14049 else
14050 return 1;
14051 }
14052
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014053_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014054if ac_fn_c_try_run "$LINENO"; then :
14055 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014056else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014057 ac_cv_log1p_drops_zero_sign=yes
14058fi
14059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014061fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014062
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014063fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014064
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14066$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14067fi
14068if test "$ac_cv_log1p_drops_zero_sign" = yes
14069then
14070
14071$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14072
14073fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014074
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014075LIBS=$LIBS_SAVE
14076
Mark Dickinsona614f042009-11-28 12:48:43 +000014077# For multiprocessing module, check that sem_open
14078# actually works. For FreeBSD versions <= 7.2,
14079# the kernel module that provides POSIX semaphores
14080# isn't loaded by default, so an attempt to call
14081# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14083$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014084if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014086else
Matthias Kloseb9621712010-04-24 17:59:49 +000014087 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014088 ac_cv_posix_semaphores_enabled=yes
14089else
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014091/* end confdefs.h. */
14092
14093#include <unistd.h>
14094#include <fcntl.h>
14095#include <stdio.h>
14096#include <semaphore.h>
14097#include <sys/stat.h>
14098
14099int main(void) {
14100 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14101 if (a == SEM_FAILED) {
14102 perror("sem_open");
14103 return 1;
14104 }
14105 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014106 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014107 return 0;
14108}
14109
14110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014111if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014112 ac_cv_posix_semaphores_enabled=yes
14113else
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14117 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014118fi
14119
14120
Mark Dickinsona614f042009-11-28 12:48:43 +000014121fi
14122
Matthias Kloseb9621712010-04-24 17:59:49 +000014123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14124$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014125if test $ac_cv_posix_semaphores_enabled = no
14126then
14127
Matthias Kloseb9621712010-04-24 17:59:49 +000014128$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014129
14130fi
14131
Mark Dickinson10683072009-04-18 21:18:19 +000014132# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14134$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014135if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014137else
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014139 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014140else
Matthias Kloseb9621712010-04-24 17:59:49 +000014141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014142/* end confdefs.h. */
14143
14144#include <unistd.h>
14145#include <fcntl.h>
14146#include <stdio.h>
14147#include <semaphore.h>
14148#include <sys/stat.h>
14149
14150int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014151 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014152 int count;
14153 int res;
14154 if(a==SEM_FAILED){
14155 perror("sem_open");
14156 return 1;
14157
14158 }
14159 res = sem_getvalue(a, &count);
14160 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014161 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014162 return res==-1 ? 1 : 0;
14163}
14164
Mark Dickinson10683072009-04-18 21:18:19 +000014165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014166if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014167 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14172 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014173fi
14174
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014176fi
14177
Matthias Kloseb9621712010-04-24 17:59:49 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14179$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014180if test $ac_cv_broken_sem_getvalue = yes
14181then
14182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184
14185fi
14186
Mark Dickinsonbd792642009-03-18 20:06:12 +000014187# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14189$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014190# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014191if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014192 enableval=$enable_big_digits; case $enable_big_digits in
14193yes)
14194 enable_big_digits=30 ;;
14195no)
14196 enable_big_digits=15 ;;
1419715|30)
14198 ;;
14199*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014200 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 +000014201esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14203$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014204
14205cat >>confdefs.h <<_ACEOF
14206#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14207_ACEOF
14208
14209
14210else
Matthias Kloseb9621712010-04-24 17:59:49 +000014211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14212$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014213fi
14214
14215
Guido van Rossumef2255b2000-03-10 22:30:29 +000014216# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014217ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014218if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014219
14220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014222
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014223 wchar_h="yes"
14224
Guido van Rossumef2255b2000-03-10 22:30:29 +000014225else
Martin v. Löwis11437992002-04-12 09:54:03 +000014226 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014227
14228fi
14229
Michael W. Hudson54241132001-12-07 15:38:26 +000014230
Martin v. Löwis11437992002-04-12 09:54:03 +000014231
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014232# determine wchar_t size
14233if test "$wchar_h" = yes
14234then
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14238# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14240$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014241if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014243else
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14245"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014246
Martin v. Löwis11437992002-04-12 09:54:03 +000014247else
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 if test "$ac_cv_type_wchar_t" = yes; then
14249 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014251as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014252See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253 else
14254 ac_cv_sizeof_wchar_t=0
14255 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014257
Martin v. Löwis11437992002-04-12 09:54:03 +000014258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14260$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261
14262
14263
Martin v. Löwis11437992002-04-12 09:54:03 +000014264cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014265#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014266_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014267
Michael W. Hudson54241132001-12-07 15:38:26 +000014268
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014269fi
14270
Matthias Kloseb9621712010-04-24 17:59:49 +000014271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14272$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014273have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014275/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014276
14277#include <tcl.h>
14278#if TCL_UTF_MAX != 6
14279# error "NOT UCS4_TCL"
14280#endif
14281int
14282main ()
14283{
14284
14285 ;
14286 return 0;
14287}
14288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014289if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014290
14291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014293
14294 have_ucs4_tcl=yes
14295
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14299$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014300
Skip Montanaro6dead952003-09-25 14:50:04 +000014301# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014302if test "$wchar_h" = yes
14303then
14304 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14306$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014307 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014309else
14310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014312 ac_cv_wchar_t_signed=yes
14313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014315/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014316
14317 #include <wchar.h>
14318 int main()
14319 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014320 /* Success: exit code 0 */
14321 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014322 }
14323
14324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014325if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014326 ac_cv_wchar_t_signed=yes
14327else
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14331 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014332fi
14333
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014334fi
14335
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14337$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338fi
14339
Georg Brandl52d168a2008-01-07 18:10:24 +000014340# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014341if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014342 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014343then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014344 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014345
Matthias Kloseb9621712010-04-24 17:59:49 +000014346$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014347
Georg Brandl52d168a2008-01-07 18:10:24 +000014348else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014349 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014350fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14352$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014353
14354# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14356$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014357if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014358 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014359else
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 ac_cv_c_bigendian=unknown
14361 # See if we're dealing with a universal compiler.
14362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14363/* end confdefs.h. */
14364#ifndef __APPLE_CC__
14365 not a universal capable compiler
14366 #endif
14367 typedef int dummy;
14368
Skip Montanaro6dead952003-09-25 14:50:04 +000014369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014370if ac_fn_c_try_compile "$LINENO"; then :
14371
14372 # Check for potential -arch flags. It is not universal unless
14373 # there are at least two -arch flags with different values.
14374 ac_arch=
14375 ac_prev=
14376 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14377 if test -n "$ac_prev"; then
14378 case $ac_word in
14379 i?86 | x86_64 | ppc | ppc64)
14380 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14381 ac_arch=$ac_word
14382 else
14383 ac_cv_c_bigendian=universal
14384 break
14385 fi
14386 ;;
14387 esac
14388 ac_prev=
14389 elif test "x$ac_word" = "x-arch"; then
14390 ac_prev=arch
14391 fi
14392 done
14393fi
14394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14395 if test $ac_cv_c_bigendian = unknown; then
14396 # See if sys/param.h defines the BYTE_ORDER macro.
14397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014398/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014399#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014401
Martin v. Löwis11437992002-04-12 09:54:03 +000014402int
14403main ()
14404{
Matthias Kloseb9621712010-04-24 17:59:49 +000014405#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14406 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14407 && LITTLE_ENDIAN)
14408 bogus endian macros
14409 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014410
14411 ;
14412 return 0;
14413}
14414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014415if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014416 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014418/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014419#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014421
Martin v. Löwis11437992002-04-12 09:54:03 +000014422int
14423main ()
14424{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014425#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 not big endian
14427 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014428
14429 ;
14430 return 0;
14431}
14432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014433if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014434 ac_cv_c_bigendian=yes
14435else
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014439fi
14440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14441 fi
14442 if test $ac_cv_c_bigendian = unknown; then
14443 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014445/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014446#include <limits.h>
14447
Martin v. Löwis11437992002-04-12 09:54:03 +000014448int
14449main ()
14450{
Matthias Kloseb9621712010-04-24 17:59:49 +000014451#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14452 bogus endian macros
14453 #endif
14454
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ;
14456 return 0;
14457}
14458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014459if ac_fn_c_try_compile "$LINENO"; then :
14460 # It does; now see whether it defined to _BIG_ENDIAN or not.
14461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14462/* end confdefs.h. */
14463#include <limits.h>
14464
14465int
14466main ()
14467{
14468#ifndef _BIG_ENDIAN
14469 not big endian
14470 #endif
14471
14472 ;
14473 return 0;
14474}
14475_ACEOF
14476if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014478else
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14482fi
14483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14484 fi
14485 if test $ac_cv_c_bigendian = unknown; then
14486 # Compile a test program.
14487 if test "$cross_compiling" = yes; then :
14488 # Try to guess by grepping values from an object file.
14489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14490/* end confdefs.h. */
14491short int ascii_mm[] =
14492 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14493 short int ascii_ii[] =
14494 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14495 int use_ascii (int i) {
14496 return ascii_mm[i] + ascii_ii[i];
14497 }
14498 short int ebcdic_ii[] =
14499 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14500 short int ebcdic_mm[] =
14501 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14502 int use_ebcdic (int i) {
14503 return ebcdic_mm[i] + ebcdic_ii[i];
14504 }
14505 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506
Matthias Kloseb9621712010-04-24 17:59:49 +000014507int
14508main ()
14509{
14510return use_ascii (foo) == use_ebcdic (foo);
14511 ;
14512 return 0;
14513}
14514_ACEOF
14515if ac_fn_c_try_compile "$LINENO"; then :
14516 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14517 ac_cv_c_bigendian=yes
14518 fi
14519 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14520 if test "$ac_cv_c_bigendian" = unknown; then
14521 ac_cv_c_bigendian=no
14522 else
14523 # finding both strings is unlikely to happen, but who knows?
14524 ac_cv_c_bigendian=unknown
14525 fi
14526 fi
14527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014529else
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014531/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014533int
14534main ()
14535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 /* Are we little or big endian? From Harbison&Steele. */
14538 union
14539 {
14540 long int l;
14541 char c[sizeof (long int)];
14542 } u;
14543 u.l = 1;
14544 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545
14546 ;
14547 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014548}
Martin v. Löwis11437992002-04-12 09:54:03 +000014549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014550if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014551 ac_cv_c_bigendian=no
14552else
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14556 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14562$as_echo "$ac_cv_c_bigendian" >&6; }
14563 case $ac_cv_c_bigendian in #(
14564 yes)
14565 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14566;; #(
14567 no)
14568 ;; #(
14569 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 ;; #(
14574 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014575 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014576 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014578
Michael W. Hudson54241132001-12-07 15:38:26 +000014579
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014580# ABI version string for Python extension modules. This appears between the
14581# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14582# from the following attributes which affect the ABI of this Python build (in
14583# this order):
14584#
14585# * The Python implementation (always 'cpython-' for us)
14586# * The major and minor version numbers
14587# * --with-pydebug (adds a 'd')
14588# * --with-pymalloc (adds a 'm')
14589# * --with-wide-unicode (adds a 'u')
14590#
14591# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014592# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14593# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014594
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14596$as_echo_n "checking ABIFLAGS... " >&6; }
14597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14598$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14600$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014601SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14603$as_echo "$SOABI" >&6; }
14604
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014605
14606case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014607 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014608 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14609 *)
14610 EXT_SUFFIX=${SHLIB_SUFFIX};;
14611esac
14612
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14614$as_echo_n "checking LDVERSION... " >&6; }
14615LDVERSION='$(VERSION)$(ABIFLAGS)'
14616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14617$as_echo "$LDVERSION" >&6; }
14618
doko@python.org87421192013-01-26 11:39:31 +010014619
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014620LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014621
14622
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014623# Check whether right shifting a negative integer extends the sign bit
14624# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14626$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014627if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014629else
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
Matthias Kloseb9621712010-04-24 17:59:49 +000014631if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014632 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014633else
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014635/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014636
14637int main()
14638{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014639 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014640}
14641
Martin v. Löwis11437992002-04-12 09:54:03 +000014642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014643if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014644 ac_cv_rshift_extends_sign=yes
14645else
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014650fi
14651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014652fi
14653
Matthias Kloseb9621712010-04-24 17:59:49 +000014654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14655$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014656if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014657then
Martin v. Löwis11437992002-04-12 09:54:03 +000014658
Matthias Kloseb9621712010-04-24 17:59:49 +000014659$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014660
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014661fi
14662
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014663# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14665$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014666if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014668else
Martin v. Löwis11437992002-04-12 09:54:03 +000014669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014671/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014672#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014673int
14674main ()
14675{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014676
14677 FILE *f = fopen("/dev/null", "r");
14678 flockfile(f);
14679 getc_unlocked(f);
14680 funlockfile(f);
14681
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 ;
14683 return 0;
14684}
14685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014686if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014687 ac_cv_have_getc_unlocked=yes
14688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 ac_cv_have_getc_unlocked=no
14690fi
14691rm -f core conftest.err conftest.$ac_objext \
14692 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694
Matthias Kloseb9621712010-04-24 17:59:49 +000014695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14696$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014697if test "$ac_cv_have_getc_unlocked" = yes
14698then
Martin v. Löwis11437992002-04-12 09:54:03 +000014699
Matthias Kloseb9621712010-04-24 17:59:49 +000014700$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014701
14702fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014703
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014704# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014705# save the value of LIBS so we don't actually link Python with readline
14706LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014707
Gregory P. Smith18820942008-09-07 06:24:49 +000014708# On some systems we need to link readline to a termcap compatible
14709# library. NOTE: Keep the precedence of listed libraries synchronised
14710# with setup.py.
14711py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14713$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014714for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014715 if test -z "$py_libtermcap"; then
14716 READLINE_LIBS="-lreadline"
14717 else
14718 READLINE_LIBS="-lreadline -l$py_libtermcap"
14719 fi
14720 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014722/* end confdefs.h. */
14723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724/* Override any GCC internal prototype to avoid an error.
14725 Use char because int might match the return type of a GCC
14726 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014727#ifdef __cplusplus
14728extern "C"
14729#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014730char readline ();
14731int
14732main ()
14733{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014735 ;
14736 return 0;
14737}
14738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014739if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014740 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014742rm -f core conftest.err conftest.$ac_objext \
14743 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014744 if test $py_cv_lib_readline = yes; then
14745 break
14746 fi
14747done
14748# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14749#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014750if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14752$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014753else
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14755$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014756
Matthias Kloseb9621712010-04-24 17:59:49 +000014757$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014758
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014759fi
14760
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014761# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14763$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014764if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014766else
14767 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014768LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014770/* end confdefs.h. */
14771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014772/* Override any GCC internal prototype to avoid an error.
14773 Use char because int might match the return type of a GCC
14774 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014775#ifdef __cplusplus
14776extern "C"
14777#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014778char rl_callback_handler_install ();
14779int
14780main ()
14781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014783 ;
14784 return 0;
14785}
14786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014787if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014788 ac_cv_lib_readline_rl_callback_handler_install=yes
14789else
Matthias Kloseb9621712010-04-24 17:59:49 +000014790 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014792rm -f core conftest.err conftest.$ac_objext \
14793 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014794LIBS=$ac_check_lib_save_LIBS
14795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14797$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014798if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014801
14802fi
14803
14804
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014805# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014807/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014808#include <readline/readline.h>
14809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014810if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014811 have_readline=yes
14812else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014813 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014814
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014816rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014817if test $have_readline = yes
14818then
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014820/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014821#include <readline/readline.h>
14822
14823_ACEOF
14824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014826
Matthias Kloseb9621712010-04-24 17:59:49 +000014827$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014828
14829fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014830rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014831
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014833/* end confdefs.h. */
14834#include <readline/readline.h>
14835
14836_ACEOF
14837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014841
14842fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014843rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014844
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014845fi
14846
Martin v. Löwis0daad592001-09-30 21:09:59 +000014847# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14849$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014850if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014851 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014852else
Martin v. Löwis11437992002-04-12 09:54:03 +000014853 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014854LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858/* Override any GCC internal prototype to avoid an error.
14859 Use char because int might match the return type of a GCC
14860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014861#ifdef __cplusplus
14862extern "C"
14863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014864char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014865int
14866main ()
14867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014868return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 ;
14870 return 0;
14871}
14872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014873if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014875else
Matthias Kloseb9621712010-04-24 17:59:49 +000014876 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014878rm -f core conftest.err conftest.$ac_objext \
14879 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014880LIBS=$ac_check_lib_save_LIBS
14881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14883$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014884if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014885
Matthias Kloseb9621712010-04-24 17:59:49 +000014886$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014887
Martin v. Löwis0daad592001-09-30 21:09:59 +000014888fi
14889
Michael W. Hudson54241132001-12-07 15:38:26 +000014890
Thomas Wouters89d996e2007-09-08 17:39:28 +000014891# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14893$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014894if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014895 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014896else
14897 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014898LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014900/* end confdefs.h. */
14901
14902/* Override any GCC internal prototype to avoid an error.
14903 Use char because int might match the return type of a GCC
14904 builtin and then its argument prototype would still apply. */
14905#ifdef __cplusplus
14906extern "C"
14907#endif
14908char rl_completion_display_matches_hook ();
14909int
14910main ()
14911{
14912return rl_completion_display_matches_hook ();
14913 ;
14914 return 0;
14915}
14916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014917if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014918 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14919else
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014922rm -f core conftest.err conftest.$ac_objext \
14923 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014924LIBS=$ac_check_lib_save_LIBS
14925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14927$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014928if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014929
Matthias Kloseb9621712010-04-24 17:59:49 +000014930$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014931
14932fi
14933
14934
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014935# also in 4.0, but not in editline
14936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14937$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14938if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14939 $as_echo_n "(cached) " >&6
14940else
14941 ac_check_lib_save_LIBS=$LIBS
14942LIBS="-lreadline $READLINE_LIBS $LIBS"
14943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14944/* end confdefs.h. */
14945
14946/* Override any GCC internal prototype to avoid an error.
14947 Use char because int might match the return type of a GCC
14948 builtin and then its argument prototype would still apply. */
14949#ifdef __cplusplus
14950extern "C"
14951#endif
14952char rl_resize_terminal ();
14953int
14954main ()
14955{
14956return rl_resize_terminal ();
14957 ;
14958 return 0;
14959}
14960_ACEOF
14961if ac_fn_c_try_link "$LINENO"; then :
14962 ac_cv_lib_readline_rl_resize_terminal=yes
14963else
14964 ac_cv_lib_readline_rl_resize_terminal=no
14965fi
14966rm -f core conftest.err conftest.$ac_objext \
14967 conftest$ac_exeext conftest.$ac_ext
14968LIBS=$ac_check_lib_save_LIBS
14969fi
14970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14971$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14972if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14973
14974$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14975
14976fi
14977
14978
Martin v. Löwis0daad592001-09-30 21:09:59 +000014979# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14981$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014982if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014984else
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014986LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990/* Override any GCC internal prototype to avoid an error.
14991 Use char because int might match the return type of a GCC
14992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014993#ifdef __cplusplus
14994extern "C"
14995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014996char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014997int
14998main ()
14999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 ;
15002 return 0;
15003}
15004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015005if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015007else
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015010rm -f core conftest.err conftest.$ac_objext \
15011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015012LIBS=$ac_check_lib_save_LIBS
15013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15015$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015016if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015017
Matthias Kloseb9621712010-04-24 17:59:49 +000015018$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015019
Guido van Rossum353ae582001-07-10 16:45:32 +000015020fi
15021
Jack Jansendd19cf82001-12-06 22:36:17 +000015022
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015023# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015025/* end confdefs.h. */
15026#include <readline/readline.h>
15027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015028if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015029 have_readline=yes
15030else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015031 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015032
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015033fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015034rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015035if test $have_readline = yes
15036then
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015038/* end confdefs.h. */
15039#include <readline/readline.h>
15040
15041_ACEOF
15042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015046
15047fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015048rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015049
15050fi
15051
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15053$as_echo_n "checking for append_history in -lreadline... " >&6; }
15054if ${ac_cv_lib_readline_append_history+:} false; then :
15055 $as_echo_n "(cached) " >&6
15056else
15057 ac_check_lib_save_LIBS=$LIBS
15058LIBS="-lreadline $READLINE_LIBS $LIBS"
15059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15060/* end confdefs.h. */
15061
15062/* Override any GCC internal prototype to avoid an error.
15063 Use char because int might match the return type of a GCC
15064 builtin and then its argument prototype would still apply. */
15065#ifdef __cplusplus
15066extern "C"
15067#endif
15068char append_history ();
15069int
15070main ()
15071{
15072return append_history ();
15073 ;
15074 return 0;
15075}
15076_ACEOF
15077if ac_fn_c_try_link "$LINENO"; then :
15078 ac_cv_lib_readline_append_history=yes
15079else
15080 ac_cv_lib_readline_append_history=no
15081fi
15082rm -f core conftest.err conftest.$ac_objext \
15083 conftest$ac_exeext conftest.$ac_ext
15084LIBS=$ac_check_lib_save_LIBS
15085fi
15086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15087$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15088if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15089
15090$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15091
15092fi
15093
15094
Martin v. Löwis82bca632006-02-10 20:49:30 +000015095# End of readline checks: restore LIBS
15096LIBS=$LIBS_no_readline
15097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15099$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015100if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015102else
Martin v. Löwis11437992002-04-12 09:54:03 +000015103
Matthias Kloseb9621712010-04-24 17:59:49 +000015104if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015105 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015106else
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015108/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015109
15110int main()
15111{
15112 int val1 = nice(1);
15113 if (val1 != -1 && val1 == nice(2))
15114 exit(0);
15115 exit(1);
15116}
15117
Martin v. Löwis11437992002-04-12 09:54:03 +000015118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015119if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015120 ac_cv_broken_nice=yes
15121else
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15125 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015126fi
15127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128fi
15129
Matthias Kloseb9621712010-04-24 17:59:49 +000015130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15131$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015132if test "$ac_cv_broken_nice" = yes
15133then
Martin v. Löwis11437992002-04-12 09:54:03 +000015134
Matthias Kloseb9621712010-04-24 17:59:49 +000015135$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015136
15137fi
15138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15140$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015141if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015143else
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015145 ac_cv_broken_poll=no
15146else
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015148/* end confdefs.h. */
15149
15150#include <poll.h>
15151
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015152int main()
15153{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015154 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015155 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015156
15157 close (42);
15158
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015159 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015160 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015161 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015162 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015163 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015164 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015165 return 1;
15166}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015167
15168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015169if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015170 ac_cv_broken_poll=yes
15171else
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015178fi
15179
Matthias Kloseb9621712010-04-24 17:59:49 +000015180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15181$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015182if test "$ac_cv_broken_poll" = yes
15183then
15184
Matthias Kloseb9621712010-04-24 17:59:49 +000015185$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015186
15187fi
15188
Brett Cannon43802422005-02-10 20:48:03 +000015189# 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 +000015190# (which is not required by ISO C or UNIX spec) and/or if we support
15191# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015192ac_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 +000015193#include <$ac_cv_struct_tm>
15194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195"
Victor Stinnere0be4232011-10-25 13:06:09 +020015196if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015197
15198cat >>confdefs.h <<_ACEOF
15199#define HAVE_STRUCT_TM_TM_ZONE 1
15200_ACEOF
15201
15202
15203fi
15204
15205if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015208
15209else
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15211"
Victor Stinnere0be4232011-10-25 13:06:09 +020015212if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214else
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216fi
15217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015219#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220_ACEOF
15221
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15223$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015224if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015226else
Matthias Kloseb9621712010-04-24 17:59:49 +000015227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015228/* end confdefs.h. */
15229#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230#if !HAVE_DECL_TZNAME
15231extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015232#endif
15233
15234int
15235main ()
15236{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015238 ;
15239 return 0;
15240}
15241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015242if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015243 ac_cv_var_tzname=yes
15244else
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015247rm -f core conftest.err conftest.$ac_objext \
15248 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15251$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015252 if test $ac_cv_var_tzname = yes; then
15253
Matthias Kloseb9621712010-04-24 17:59:49 +000015254$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015255
15256 fi
15257fi
15258
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015259
Martin v. Löwis1d459062005-03-14 21:23:33 +000015260# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15262$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015263if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015265else
15266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015268 ac_cv_working_tzset=no
15269else
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015271/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015272
15273#include <stdlib.h>
15274#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015275#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015276
15277#if HAVE_TZNAME
15278extern char *tzname[];
15279#endif
15280
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015281int main()
15282{
Brett Cannon18367812003-09-19 00:59:16 +000015283 /* Note that we need to ensure that not only does tzset(3)
15284 do 'something' with localtime, but it works as documented
15285 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015286 This includes making sure that tzname is set properly if
15287 tm->tm_zone does not exist since it is the alternative way
15288 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015289
15290 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015291 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015292 */
15293
Martin v. Löwis1d459062005-03-14 21:23:33 +000015294 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015295 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15296
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015297 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015298 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015299 if (localtime(&groundhogday)->tm_hour != 0)
15300 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015301#if HAVE_TZNAME
15302 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15303 if (strcmp(tzname[0], "UTC") ||
15304 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15305 exit(1);
15306#endif
Brett Cannon18367812003-09-19 00:59:16 +000015307
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015308 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015309 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015310 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015311 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015312#if HAVE_TZNAME
15313 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15314 exit(1);
15315#endif
Brett Cannon18367812003-09-19 00:59:16 +000015316
15317 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15318 tzset();
15319 if (localtime(&groundhogday)->tm_hour != 11)
15320 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015321#if HAVE_TZNAME
15322 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15323 exit(1);
15324#endif
15325
15326#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015327 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15328 exit(1);
15329 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15330 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015331#endif
Brett Cannon18367812003-09-19 00:59:16 +000015332
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015333 exit(0);
15334}
15335
15336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015337if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015338 ac_cv_working_tzset=yes
15339else
Matthias Kloseb9621712010-04-24 17:59:49 +000015340 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15343 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015344fi
15345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346fi
15347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15349$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015350if test "$ac_cv_working_tzset" = yes
15351then
15352
Matthias Kloseb9621712010-04-24 17:59:49 +000015353$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015354
15355fi
15356
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015357# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15359$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015360if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015362else
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015364/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015365#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015366int
15367main ()
15368{
15369
15370struct stat st;
15371st.st_mtim.tv_nsec = 1;
15372
15373 ;
15374 return 0;
15375}
15376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015378 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015379else
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15383fi
15384
Matthias Kloseb9621712010-04-24 17:59:49 +000015385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15386$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015387if test "$ac_cv_stat_tv_nsec" = yes
15388then
15389
Matthias Kloseb9621712010-04-24 17:59:49 +000015390$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015391
15392fi
15393
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015394# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15396$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015397if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015399else
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015401/* end confdefs.h. */
15402#include <sys/stat.h>
15403int
15404main ()
15405{
15406
15407struct stat st;
15408st.st_mtimespec.tv_nsec = 1;
15409
15410 ;
15411 return 0;
15412}
15413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015415 ac_cv_stat_tv_nsec2=yes
15416else
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15420fi
15421
Matthias Kloseb9621712010-04-24 17:59:49 +000015422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15423$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015424if test "$ac_cv_stat_tv_nsec2" = yes
15425then
15426
Matthias Kloseb9621712010-04-24 17:59:49 +000015427$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015428
15429fi
15430
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015431# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015432ac_save_cppflags="$CPPFLAGS"
15433CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015434
15435for ac_header in curses.h ncurses.h
15436do :
15437 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15438ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15439if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15440 cat >>confdefs.h <<_ACEOF
15441#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15442_ACEOF
15443
15444fi
15445
15446done
15447
15448
15449# On Solaris, term.h requires curses.h
15450for ac_header in term.h
15451do :
15452 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15453#ifdef HAVE_CURSES_H
15454#include <curses.h>
15455#endif
15456
15457"
15458if test "x$ac_cv_header_term_h" = xyes; then :
15459 cat >>confdefs.h <<_ACEOF
15460#define HAVE_TERM_H 1
15461_ACEOF
15462
15463fi
15464
15465done
15466
15467
Jack Jansen666b1e72001-10-31 12:11:48 +000015468# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15470$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015471if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015472 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015473else
Matthias Kloseb9621712010-04-24 17:59:49 +000015474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015475/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015476#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015477int
15478main ()
15479{
Jack Jansen666b1e72001-10-31 12:11:48 +000015480
15481 int rtn;
15482 rtn = mvwdelch(0,0,0);
15483
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 ;
15485 return 0;
15486}
15487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015488if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015489 ac_cv_mvwdelch_is_expression=yes
15490else
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15494fi
15495
Matthias Kloseb9621712010-04-24 17:59:49 +000015496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15497$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015498
15499if test "$ac_cv_mvwdelch_is_expression" = yes
15500then
Martin v. Löwis11437992002-04-12 09:54:03 +000015501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015503
15504fi
15505
Matthias Kloseb9621712010-04-24 17:59:49 +000015506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15507$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015508if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015509 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015510else
Matthias Kloseb9621712010-04-24 17:59:49 +000015511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015512/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015513#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015514int
15515main ()
15516{
Jack Jansen666b1e72001-10-31 12:11:48 +000015517
15518 WINDOW *w;
15519 w->_flags = 0;
15520
Martin v. Löwis11437992002-04-12 09:54:03 +000015521 ;
15522 return 0;
15523}
15524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015525if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015526 ac_cv_window_has_flags=yes
15527else
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15531fi
15532
Matthias Kloseb9621712010-04-24 17:59:49 +000015533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15534$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015535
Jack Jansen666b1e72001-10-31 12:11:48 +000015536
15537if test "$ac_cv_window_has_flags" = yes
15538then
Martin v. Löwis11437992002-04-12 09:54:03 +000015539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015541
15542fi
15543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15545$as_echo_n "checking for is_term_resized... " >&6; }
15546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015547/* end confdefs.h. */
15548#include <curses.h>
15549int
15550main ()
15551{
15552void *x=is_term_resized
15553 ;
15554 return 0;
15555}
15556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015560
Matthias Kloseb159a552010-04-25 21:00:44 +000015561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015562$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015563else
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15565$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015566
15567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15569
Matthias Kloseb9621712010-04-24 17:59:49 +000015570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15571$as_echo_n "checking for resize_term... " >&6; }
15572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015573/* end confdefs.h. */
15574#include <curses.h>
15575int
15576main ()
15577{
15578void *x=resize_term
15579 ;
15580 return 0;
15581}
15582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015583if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015586
Matthias Kloseb159a552010-04-25 21:00:44 +000015587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015588$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015589else
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15591$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015592
15593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15595
Matthias Kloseb9621712010-04-24 17:59:49 +000015596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15597$as_echo_n "checking for resizeterm... " >&6; }
15598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015599/* end confdefs.h. */
15600#include <curses.h>
15601int
15602main ()
15603{
15604void *x=resizeterm
15605 ;
15606 return 0;
15607}
15608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015609if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015610
Matthias Kloseb9621712010-04-24 17:59:49 +000015611$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015612
Matthias Kloseb159a552010-04-25 21:00:44 +000015613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015614$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015615else
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15617$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015618
15619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015621# last curses configure check
15622CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15625$as_echo "$as_me: checking for device files" >&6;}
15626
15627if test "x$cross_compiling" = xyes; then
15628 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15630$as_echo_n "checking for /dev/ptmx... " >&6; }
15631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15632$as_echo "not set" >&6; }
15633 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15634 fi
15635 if test "${ac_cv_file__dev_ptc+set}" != set; then
15636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15637$as_echo_n "checking for /dev/ptc... " >&6; }
15638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15639$as_echo "not set" >&6; }
15640 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15641 fi
15642fi
15643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15645$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015646if ${ac_cv_file__dev_ptmx+:} false; then :
15647 $as_echo_n "(cached) " >&6
15648else
15649 test "$cross_compiling" = yes &&
15650 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15651if test -r "/dev/ptmx"; then
15652 ac_cv_file__dev_ptmx=yes
15653else
15654 ac_cv_file__dev_ptmx=no
15655fi
15656fi
15657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15658$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15659if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015660
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015661fi
15662
15663if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015664
Matthias Kloseb9621712010-04-24 17:59:49 +000015665$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015666
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15669$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015670if ${ac_cv_file__dev_ptc+:} false; then :
15671 $as_echo_n "(cached) " >&6
15672else
15673 test "$cross_compiling" = yes &&
15674 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15675if test -r "/dev/ptc"; then
15676 ac_cv_file__dev_ptc=yes
15677else
15678 ac_cv_file__dev_ptc=no
15679fi
15680fi
15681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15682$as_echo "$ac_cv_file__dev_ptc" >&6; }
15683if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015684
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015685fi
15686
15687if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015688
Matthias Kloseb9621712010-04-24 17:59:49 +000015689$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015690
Neal Norwitz865400f2003-03-21 01:42:58 +000015691fi
15692
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015693if test "$have_long_long" = yes
15694then
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15696$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015697 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015698 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015699else
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015701 ac_cv_have_long_long_format="cross -- assuming no"
15702 if test x$GCC = xyes; then
15703 save_CFLAGS=$CFLAGS
15704 CFLAGS="$CFLAGS -Werror -Wformat"
15705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15706/* end confdefs.h. */
15707
15708 #include <stdio.h>
15709 #include <stddef.h>
15710
15711int
15712main ()
15713{
15714
15715 char *buffer;
15716 sprintf(buffer, "%lld", (long long)123);
15717 sprintf(buffer, "%lld", (long long)-123);
15718 sprintf(buffer, "%llu", (unsigned long long)123);
15719
15720 ;
15721 return 0;
15722}
15723_ACEOF
15724if ac_fn_c_try_compile "$LINENO"; then :
15725 ac_cv_have_long_long_format=yes
15726
15727fi
15728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15729 CFLAGS=$save_CFLAGS
15730 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015731else
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015733/* end confdefs.h. */
15734
15735 #include <stdio.h>
15736 #include <stddef.h>
15737 #include <string.h>
15738
15739 #ifdef HAVE_SYS_TYPES_H
15740 #include <sys/types.h>
15741 #endif
15742
15743 int main()
15744 {
15745 char buffer[256];
15746
15747 if (sprintf(buffer, "%lld", (long long)123) < 0)
15748 return 1;
15749 if (strcmp(buffer, "123"))
15750 return 1;
15751
15752 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15753 return 1;
15754 if (strcmp(buffer, "-123"))
15755 return 1;
15756
15757 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15758 return 1;
15759 if (strcmp(buffer, "123"))
15760 return 1;
15761
15762 return 0;
15763 }
15764
15765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015766if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015767 ac_cv_have_long_long_format=yes
15768else
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015773fi
15774
15775
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015776fi
15777
Matthias Kloseb9621712010-04-24 17:59:49 +000015778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15779$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015780fi
15781
Mark Dickinson89d7d412009-12-31 20:50:59 +000015782if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015783then
15784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015786
15787fi
15788
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015789if test $ac_sys_system = Darwin
15790then
15791 LIBS="$LIBS -framework CoreFoundation"
15792fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015793
Matthias Kloseb9621712010-04-24 17:59:49 +000015794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15795$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015796if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015797 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015798else
Matthias Kloseb9621712010-04-24 17:59:49 +000015799 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015800 ac_cv_have_size_t_format="cross -- assuming yes"
15801
Thomas Wouters477c8d52006-05-27 19:21:47 +000015802else
Matthias Kloseb9621712010-04-24 17:59:49 +000015803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015804/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015805
Thomas Wouters477c8d52006-05-27 19:21:47 +000015806#include <stdio.h>
15807#include <stddef.h>
15808#include <string.h>
15809
Christian Heimes2c181612007-12-17 20:04:13 +000015810#ifdef HAVE_SYS_TYPES_H
15811#include <sys/types.h>
15812#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015813
15814#ifdef HAVE_SSIZE_T
15815typedef ssize_t Py_ssize_t;
15816#elif SIZEOF_VOID_P == SIZEOF_LONG
15817typedef long Py_ssize_t;
15818#else
15819typedef int Py_ssize_t;
15820#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015821
Christian Heimes2c181612007-12-17 20:04:13 +000015822int main()
15823{
15824 char buffer[256];
15825
Thomas Wouters477c8d52006-05-27 19:21:47 +000015826 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15827 return 1;
15828
Thomas Wouters89f507f2006-12-13 04:49:30 +000015829 if (strcmp(buffer, "123"))
15830 return 1;
15831
15832 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15833 return 1;
15834
15835 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015836 return 1;
15837
15838 return 0;
15839}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015840
Thomas Wouters477c8d52006-05-27 19:21:47 +000015841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015842if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015843 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015844else
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015849fi
15850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15853$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015854if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015855
Matthias Kloseb9621712010-04-24 17:59:49 +000015856$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015857
15858fi
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015861#ifdef HAVE_SYS_TYPES_H
15862#include <sys/types.h>
15863#endif
15864#ifdef HAVE_SYS_SOCKET_H
15865#include <sys/socket.h>
15866#endif
15867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868"
Victor Stinnere0be4232011-10-25 13:06:09 +020015869if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015870
Martin v. Löwis11437992002-04-12 09:54:03 +000015871else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015872
Matthias Kloseb9621712010-04-24 17:59:49 +000015873$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015874
15875fi
15876
Michael W. Hudson54241132001-12-07 15:38:26 +000015877
Matthias Kloseb9621712010-04-24 17:59:49 +000015878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15879$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015880if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015881 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015882else
Matthias Kloseb9621712010-04-24 17:59:49 +000015883 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015884 ac_cv_broken_mbstowcs=no
15885else
Matthias Kloseb9621712010-04-24 17:59:49 +000015886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015887/* end confdefs.h. */
15888
Stefan Krah19c21392012-11-22 23:47:32 +010015889#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015890#include<stdlib.h>
15891int main() {
15892 size_t len = -1;
15893 const char *str = "text";
15894 len = mbstowcs(NULL, str, 0);
15895 return (len != 4);
15896}
15897
15898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015899if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015900 ac_cv_broken_mbstowcs=no
15901else
Matthias Kloseb9621712010-04-24 17:59:49 +000015902 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15905 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015906fi
15907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015908fi
15909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15911$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015912if test "$ac_cv_broken_mbstowcs" = yes
15913then
15914
Matthias Kloseb9621712010-04-24 17:59:49 +000015915$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015916
15917fi
15918
Antoine Pitroub52ec782009-01-25 16:34:23 +000015919# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15921$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015922
15923# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015924if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015925 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015926if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015927then
15928
Matthias Kloseb9621712010-04-24 17:59:49 +000015929$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015930
Matthias Kloseb9621712010-04-24 17:59:49 +000015931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15932$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015933fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015934if test "$withval" = no
15935then
15936
15937$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15938
Matthias Kloseb9621712010-04-24 17:59:49 +000015939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15940$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015941fi
15942
Antoine Pitrou042b1282010-08-13 21:15:58 +000015943else
15944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15945$as_echo "no value specified" >&6; }
15946fi
15947
Antoine Pitroub52ec782009-01-25 16:34:23 +000015948
Matthias Kloseb17289e2012-03-15 19:51:34 +010015949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15950$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15951if ${ac_cv_computed_gotos+:} false; then :
15952 $as_echo_n "(cached) " >&6
15953else
15954 if test "$cross_compiling" = yes; then :
15955 if test "${with_computed_gotos+set}" = set; then
15956 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15957 else
15958 ac_cv_computed_gotos=no
15959 fi
15960else
15961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15962/* end confdefs.h. */
15963
15964int main(int argc, char **argv)
15965{
15966 static void *targets[1] = { &&LABEL1 };
15967 goto LABEL2;
15968LABEL1:
15969 return 0;
15970LABEL2:
15971 goto *targets[0];
15972 return 1;
15973}
15974
15975_ACEOF
15976if ac_fn_c_try_run "$LINENO"; then :
15977 ac_cv_computed_gotos=yes
15978else
15979 ac_cv_computed_gotos=no
15980fi
15981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15982 conftest.$ac_objext conftest.beam conftest.$ac_ext
15983fi
15984
15985fi
15986
15987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15988$as_echo "$ac_cv_computed_gotos" >&6; }
15989case "$ac_cv_computed_gotos" in yes*)
15990
15991$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15992
15993esac
15994
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015995case $ac_sys_system in
15996AIX*)
15997
15998$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15999 ;;
16000esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016001
Michael W. Hudson54241132001-12-07 15:38:26 +000016002
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016003
16004
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016005for h in `(cd $srcdir;echo Python/thread_*.h)`
16006do
16007 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16008done
16009
Michael W. Hudson54241132001-12-07 15:38:26 +000016010
Ned Deily0db50cf2014-07-25 12:41:31 -070016011SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16013$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016014for dir in $SRCDIRS; do
16015 if test ! -d $dir; then
16016 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016017 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016018done
Matthias Kloseb9621712010-04-24 17:59:49 +000016019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16020$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016021
Stefan Krah1919b7e2012-03-21 18:25:23 +010016022# Availability of -O2:
16023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16024$as_echo_n "checking for -O2... " >&6; }
16025saved_cflags="$CFLAGS"
16026CFLAGS="-O2"
16027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16028/* end confdefs.h. */
16029
16030int
16031main ()
16032{
16033
16034
16035 ;
16036 return 0;
16037}
16038_ACEOF
16039if ac_fn_c_try_compile "$LINENO"; then :
16040 have_O2=yes
16041else
16042 have_O2=no
16043fi
16044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16046$as_echo "$have_O2" >&6; }
16047CFLAGS="$saved_cflags"
16048
16049# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16050# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16052$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16053saved_cflags="$CFLAGS"
16054CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16055if test "$have_O2" = no; then
16056 CFLAGS=""
16057fi
16058if test "$cross_compiling" = yes; then :
16059 have_glibc_memmove_bug=undefined
16060else
16061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16062/* end confdefs.h. */
16063
16064#include <stdio.h>
16065#include <stdlib.h>
16066#include <string.h>
16067void foo(void *p, void *q) { memmove(p, q, 19); }
16068int main() {
16069 char a[32] = "123456789000000000";
16070 foo(&a[9], a);
16071 if (strcmp(a, "123456789123456789000000000") != 0)
16072 return 1;
16073 foo(a, &a[9]);
16074 if (strcmp(a, "123456789000000000") != 0)
16075 return 1;
16076 return 0;
16077}
16078
16079_ACEOF
16080if ac_fn_c_try_run "$LINENO"; then :
16081 have_glibc_memmove_bug=no
16082else
16083 have_glibc_memmove_bug=yes
16084fi
16085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16086 conftest.$ac_objext conftest.beam conftest.$ac_ext
16087fi
16088
16089CFLAGS="$saved_cflags"
16090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16091$as_echo "$have_glibc_memmove_bug" >&6; }
16092if test "$have_glibc_memmove_bug" = yes; then
16093
16094$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16095
16096fi
16097
16098if test "$have_gcc_asm_for_x87" = yes; then
16099 # Some versions of gcc miscompile inline asm:
16100 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16101 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16102 case $CC in
16103 *gcc*)
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16105$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16106 saved_cflags="$CFLAGS"
16107 CFLAGS="-O2"
16108 if test "$cross_compiling" = yes; then :
16109 have_ipa_pure_const_bug=undefined
16110else
16111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16112/* end confdefs.h. */
16113
16114 __attribute__((noinline)) int
16115 foo(int *p) {
16116 int r;
16117 asm ( "movl \$6, (%1)\n\t"
16118 "xorl %0, %0\n\t"
16119 : "=r" (r) : "r" (p) : "memory"
16120 );
16121 return r;
16122 }
16123 int main() {
16124 int p = 8;
16125 if ((foo(&p) ? : p) != 6)
16126 return 1;
16127 return 0;
16128 }
16129
16130_ACEOF
16131if ac_fn_c_try_run "$LINENO"; then :
16132 have_ipa_pure_const_bug=no
16133else
16134 have_ipa_pure_const_bug=yes
16135fi
16136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16137 conftest.$ac_objext conftest.beam conftest.$ac_ext
16138fi
16139
16140 CFLAGS="$saved_cflags"
16141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16142$as_echo "$have_ipa_pure_const_bug" >&6; }
16143 if test "$have_ipa_pure_const_bug" = yes; then
16144
16145$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16146
16147 fi
16148 ;;
16149 esac
16150fi
16151
Victor Stinner4f5366e2015-01-09 02:13:19 +010016152# Check for stdatomic.h
16153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16154$as_echo_n "checking for stdatomic.h... " >&6; }
16155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16156/* end confdefs.h. */
16157
16158
16159 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016160 atomic_int value = ATOMIC_VAR_INIT(1);
16161 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016162 int main() {
16163 int loaded_value = atomic_load(&value);
16164 return 0;
16165 }
16166
16167
16168_ACEOF
16169if ac_fn_c_try_link "$LINENO"; then :
16170 have_stdatomic_h=yes
16171else
16172 have_stdatomic_h=no
16173fi
16174rm -f core conftest.err conftest.$ac_objext \
16175 conftest$ac_exeext conftest.$ac_ext
16176
16177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16178$as_echo "$have_stdatomic_h" >&6; }
16179
16180if test "$have_stdatomic_h" = yes; then
16181
16182$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16183
16184fi
16185
16186# Check for GCC >= 4.7 __atomic builtins
16187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16188$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16190/* end confdefs.h. */
16191
16192
16193 volatile int val = 1;
16194 int main() {
16195 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16196 return 0;
16197 }
16198
16199
16200_ACEOF
16201if ac_fn_c_try_link "$LINENO"; then :
16202 have_builtin_atomic=yes
16203else
16204 have_builtin_atomic=no
16205fi
16206rm -f core conftest.err conftest.$ac_objext \
16207 conftest$ac_exeext conftest.$ac_ext
16208
16209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16210$as_echo "$have_builtin_atomic" >&6; }
16211
16212if test "$have_builtin_atomic" = yes; then
16213
16214$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16215
16216fi
16217
Ned Deily322f5ba2013-11-21 23:01:59 -080016218# ensurepip option
16219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16220$as_echo_n "checking for ensurepip... " >&6; }
16221
16222# Check whether --with-ensurepip was given.
16223if test "${with_ensurepip+set}" = set; then :
16224 withval=$with_ensurepip;
16225else
16226 with_ensurepip=upgrade
16227fi
16228
16229case $with_ensurepip in #(
16230 yes|upgrade) :
16231 ENSUREPIP=upgrade ;; #(
16232 install) :
16233 ENSUREPIP=install ;; #(
16234 no) :
16235 ENSUREPIP=no ;; #(
16236 *) :
16237 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16238esac
16239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16240$as_echo "$ENSUREPIP" >&6; }
16241
16242
Victor Stinner35a97c02015-03-08 02:59:09 +010016243# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16245$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16247/* end confdefs.h. */
16248
16249
16250 #include <dirent.h>
16251
16252 int main() {
16253 struct dirent entry;
16254 return entry.d_type == DT_UNKNOWN;
16255 }
16256
16257
16258_ACEOF
16259if ac_fn_c_try_link "$LINENO"; then :
16260 have_dirent_d_type=yes
16261else
16262 have_dirent_d_type=no
16263fi
16264rm -f core conftest.err conftest.$ac_objext \
16265 conftest$ac_exeext conftest.$ac_ext
16266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16267$as_echo "$have_dirent_d_type" >&6; }
16268
16269if test "$have_dirent_d_type" = yes; then
16270
16271$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16272
16273fi
16274
Victor Stinner9eb57c52015-03-19 22:21:49 +010016275# check if the Linux getrandom() syscall is available
16276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16277$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16279/* end confdefs.h. */
16280
16281
Victor Stinner1b80b242016-04-12 22:34:58 +020016282 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016283 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016284 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016285
16286 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016287 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016288 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016289 const int flags = GRND_NONBLOCK;
16290 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016291 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016292 return 0;
16293 }
16294
16295
16296_ACEOF
16297if ac_fn_c_try_link "$LINENO"; then :
16298 have_getrandom_syscall=yes
16299else
16300 have_getrandom_syscall=no
16301fi
16302rm -f core conftest.err conftest.$ac_objext \
16303 conftest$ac_exeext conftest.$ac_ext
16304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16305$as_echo "$have_getrandom_syscall" >&6; }
16306
16307if test "$have_getrandom_syscall" = yes; then
16308
16309$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16310
16311fi
16312
Victor Stinnerbae2d622015-10-01 09:47:30 +020016313# check if the getrandom() function is available
16314# the test was written for the Solaris function of <sys/random.h>
16315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16316$as_echo_n "checking for the getrandom() function... " >&6; }
16317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16318/* end confdefs.h. */
16319
16320
16321 #include <sys/random.h>
16322
16323 int main() {
16324 char buffer[1];
16325 const size_t buflen = sizeof(buffer);
16326 const int flags = 0;
16327 /* ignore the result, Python checks for ENOSYS at runtime */
16328 (void)getrandom(buffer, buflen, flags);
16329 return 0;
16330 }
16331
16332
16333_ACEOF
16334if ac_fn_c_try_link "$LINENO"; then :
16335 have_getrandom=yes
16336else
16337 have_getrandom=no
16338fi
16339rm -f core conftest.err conftest.$ac_objext \
16340 conftest$ac_exeext conftest.$ac_ext
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16342$as_echo "$have_getrandom" >&6; }
16343
16344if test "$have_getrandom" = yes; then
16345
16346$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16347
16348fi
16349
Guido van Rossum627b2d71993-12-24 10:39:16 +000016350# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016351ac_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 +000016352
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016353ac_config_files="$ac_config_files Modules/ld_so_aix"
16354
Martin v. Löwis11437992002-04-12 09:54:03 +000016355cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016356# This file is a shell script that caches the results of configure
16357# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016358# scripts and configure runs, see configure's option --config-cache.
16359# It is not useful on other systems. If it contains results you don't
16360# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016361#
Martin v. Löwis11437992002-04-12 09:54:03 +000016362# config.status only pays attention to the cache file if you give it
16363# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016364#
Skip Montanaro6dead952003-09-25 14:50:04 +000016365# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016366# loading this file, other *unset* `ac_cv_foo' will be assigned the
16367# following values.
16368
16369_ACEOF
16370
Guido van Rossumf78abae1997-01-21 22:02:36 +000016371# The following way of writing the cache mishandles newlines in values,
16372# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016374# Ultrix sh set writes to stderr and can't be redirected directly,
16375# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016376(
16377 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16378 eval ac_val=\$$ac_var
16379 case $ac_val in #(
16380 *${as_nl}*)
16381 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016382 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16383$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016384 esac
16385 case $ac_var in #(
16386 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016387 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16388 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016389 esac ;;
16390 esac
16391 done
16392
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16395 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016396 # `set' does not quote correctly, so add quotes: double-quote
16397 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016399 "s/'/'\\\\''/g;
16400 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016402 *)
16403 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 esac |
16407 sort
16408) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016410 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016411 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16414 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016415 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16416 :end' >>confcache
16417if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16418 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016419 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016420 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16421$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016422 if test ! -f "$cache_file" || test -h "$cache_file"; then
16423 cat confcache >"$cache_file"
16424 else
16425 case $cache_file in #(
16426 */* | ?:*)
16427 mv -f confcache "$cache_file"$$ &&
16428 mv -f "$cache_file"$$ "$cache_file" ;; #(
16429 *)
16430 mv -f confcache "$cache_file" ;;
16431 esac
16432 fi
16433 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016434 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016435 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16436$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016437 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016438fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016439rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016441test "x$prefix" = xNONE && prefix=$ac_default_prefix
16442# Let make expand exec_prefix.
16443test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016444
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016445DEFS=-DHAVE_CONFIG_H
16446
Skip Montanaro6dead952003-09-25 14:50:04 +000016447ac_libobjs=
16448ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016449U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016450for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16451 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016453 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16455 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016456 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16457 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016458done
16459LIBOBJS=$ac_libobjs
16460
16461LTLIBOBJS=$ac_ltlibobjs
16462
16463
Martin v. Löwis11437992002-04-12 09:54:03 +000016464
Matthias Kloseb9621712010-04-24 17:59:49 +000016465
Victor Stinnere0be4232011-10-25 13:06:09 +020016466: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016467ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016468ac_clean_files_save=$ac_clean_files
16469ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016470{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16471$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16472as_write_fail=0
16473cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016474#! $SHELL
16475# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016476# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016477# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016478# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016479
Martin v. Löwis11437992002-04-12 09:54:03 +000016480debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016481ac_cs_recheck=false
16482ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016483
Matthias Kloseb9621712010-04-24 17:59:49 +000016484SHELL=\${CONFIG_SHELL-$SHELL}
16485export SHELL
16486_ASEOF
16487cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16488## -------------------- ##
16489## M4sh Initialization. ##
16490## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016492# Be more Bourne compatible
16493DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016494if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016495 emulate sh
16496 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016497 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016498 # is contrary to our usage. Disable this feature.
16499 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016500 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016501else
Matthias Kloseb9621712010-04-24 17:59:49 +000016502 case `(set -o) 2>/dev/null` in #(
16503 *posix*) :
16504 set -o posix ;; #(
16505 *) :
16506 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016508fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016509
16510
Matthias Kloseb9621712010-04-24 17:59:49 +000016511as_nl='
16512'
16513export as_nl
16514# Printing a long string crashes Solaris 7 /usr/bin/printf.
16515as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16516as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16517as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16518# Prefer a ksh shell builtin over an external printf program on Solaris,
16519# but without wasting forks for bash or zsh.
16520if test -z "$BASH_VERSION$ZSH_VERSION" \
16521 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16522 as_echo='print -r --'
16523 as_echo_n='print -rn --'
16524elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16525 as_echo='printf %s\n'
16526 as_echo_n='printf %s'
16527else
16528 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16529 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16530 as_echo_n='/usr/ucb/echo -n'
16531 else
16532 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16533 as_echo_n_body='eval
16534 arg=$1;
16535 case $arg in #(
16536 *"$as_nl"*)
16537 expr "X$arg" : "X\\(.*\\)$as_nl";
16538 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16539 esac;
16540 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16541 '
16542 export as_echo_n_body
16543 as_echo_n='sh -c $as_echo_n_body as_echo'
16544 fi
16545 export as_echo_body
16546 as_echo='sh -c $as_echo_body as_echo'
16547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016548
16549# The user is always right.
16550if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016551 PATH_SEPARATOR=:
16552 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16553 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16554 PATH_SEPARATOR=';'
16555 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558
16559# IFS
16560# We need space, tab and new line, in precisely that order. Quoting is
16561# there to prevent editors from complaining about space-tab.
16562# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16563# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564IFS=" "" $as_nl"
16565
16566# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016567as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016568case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016569 *[\\/]* ) as_myself=$0 ;;
16570 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016571for as_dir in $PATH
16572do
16573 IFS=$as_save_IFS
16574 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016575 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16576 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016577IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016579 ;;
16580esac
16581# We did not find ourselves, most probably we were run as `sh COMMAND'
16582# in which case we are not to be found in the path.
16583if test "x$as_myself" = x; then
16584 as_myself=$0
16585fi
16586if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016587 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16588 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016589fi
16590
Matthias Kloseb9621712010-04-24 17:59:49 +000016591# Unset variables that we do not need and which cause bugs (e.g. in
16592# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16593# suppresses any "Segmentation fault" message there. '((' could
16594# trigger a bug in pdksh 5.2.14.
16595for as_var in BASH_ENV ENV MAIL MAILPATH
16596do eval test x\${$as_var+set} = xset \
16597 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598done
16599PS1='$ '
16600PS2='> '
16601PS4='+ '
16602
16603# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016604LC_ALL=C
16605export LC_ALL
16606LANGUAGE=C
16607export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608
Matthias Kloseb9621712010-04-24 17:59:49 +000016609# CDPATH.
16610(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16611
16612
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016613# as_fn_error STATUS ERROR [LINENO LOG_FD]
16614# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016615# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16616# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016617# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016618as_fn_error ()
16619{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016620 as_status=$1; test $as_status -eq 0 && as_status=1
16621 if test "$4"; then
16622 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16623 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016624 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016625 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016626 as_fn_exit $as_status
16627} # as_fn_error
16628
16629
16630# as_fn_set_status STATUS
16631# -----------------------
16632# Set $? to STATUS, without forking.
16633as_fn_set_status ()
16634{
16635 return $1
16636} # as_fn_set_status
16637
16638# as_fn_exit STATUS
16639# -----------------
16640# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16641as_fn_exit ()
16642{
16643 set +e
16644 as_fn_set_status $1
16645 exit $1
16646} # as_fn_exit
16647
16648# as_fn_unset VAR
16649# ---------------
16650# Portably unset VAR.
16651as_fn_unset ()
16652{
16653 { eval $1=; unset $1;}
16654}
16655as_unset=as_fn_unset
16656# as_fn_append VAR VALUE
16657# ----------------------
16658# Append the text in VALUE to the end of the definition contained in VAR. Take
16659# advantage of any shell optimizations that allow amortized linear growth over
16660# repeated appends, instead of the typical quadratic growth present in naive
16661# implementations.
16662if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16663 eval 'as_fn_append ()
16664 {
16665 eval $1+=\$2
16666 }'
16667else
16668 as_fn_append ()
16669 {
16670 eval $1=\$$1\$2
16671 }
16672fi # as_fn_append
16673
16674# as_fn_arith ARG...
16675# ------------------
16676# Perform arithmetic evaluation on the ARGs, and store the result in the
16677# global $as_val. Take advantage of shells that can avoid forks. The arguments
16678# must be portable across $(()) and expr.
16679if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16680 eval 'as_fn_arith ()
16681 {
16682 as_val=$(( $* ))
16683 }'
16684else
16685 as_fn_arith ()
16686 {
16687 as_val=`expr "$@" || test $? -eq 1`
16688 }
16689fi # as_fn_arith
16690
16691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692if expr a : '\(a\)' >/dev/null 2>&1 &&
16693 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16694 as_expr=expr
16695else
16696 as_expr=false
16697fi
16698
16699if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16700 as_basename=basename
16701else
16702 as_basename=false
16703fi
16704
Matthias Kloseb9621712010-04-24 17:59:49 +000016705if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16706 as_dirname=dirname
16707else
16708 as_dirname=false
16709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711as_me=`$as_basename -- "$0" ||
16712$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16713 X"$0" : 'X\(//\)$' \| \
16714 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016715$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716 sed '/^.*\/\([^/][^/]*\)\/*$/{
16717 s//\1/
16718 q
16719 }
16720 /^X\/\(\/\/\)$/{
16721 s//\1/
16722 q
16723 }
16724 /^X\/\(\/\).*/{
16725 s//\1/
16726 q
16727 }
16728 s/.*/./; q'`
16729
Matthias Kloseb9621712010-04-24 17:59:49 +000016730# Avoid depending upon Character Ranges.
16731as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16732as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16733as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16734as_cr_digits='0123456789'
16735as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736
16737ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016738case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016740 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016742 xy) ECHO_C='\c';;
16743 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16744 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745 esac;;
16746*)
16747 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016748esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016749
Martin v. Löwis11437992002-04-12 09:54:03 +000016750rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016751if test -d conf$$.dir; then
16752 rm -f conf$$.dir/conf$$.file
16753else
16754 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016755 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016757if (echo >conf$$.file) 2>/dev/null; then
16758 if ln -s conf$$.file conf$$ 2>/dev/null; then
16759 as_ln_s='ln -s'
16760 # ... but there are two gotchas:
16761 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16762 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016763 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016764 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016765 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016766 elif ln conf$$.file conf$$ 2>/dev/null; then
16767 as_ln_s=ln
16768 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016769 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016770 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016771else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016772 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16775rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016776
Matthias Kloseb9621712010-04-24 17:59:49 +000016777
16778# as_fn_mkdir_p
16779# -------------
16780# Create "$as_dir" as a directory, including parents if necessary.
16781as_fn_mkdir_p ()
16782{
16783
16784 case $as_dir in #(
16785 -*) as_dir=./$as_dir;;
16786 esac
16787 test -d "$as_dir" || eval $as_mkdir_p || {
16788 as_dirs=
16789 while :; do
16790 case $as_dir in #(
16791 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16792 *) as_qdir=$as_dir;;
16793 esac
16794 as_dirs="'$as_qdir' $as_dirs"
16795 as_dir=`$as_dirname -- "$as_dir" ||
16796$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16797 X"$as_dir" : 'X\(//\)[^/]' \| \
16798 X"$as_dir" : 'X\(//\)$' \| \
16799 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16800$as_echo X"$as_dir" |
16801 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16802 s//\1/
16803 q
16804 }
16805 /^X\(\/\/\)[^/].*/{
16806 s//\1/
16807 q
16808 }
16809 /^X\(\/\/\)$/{
16810 s//\1/
16811 q
16812 }
16813 /^X\(\/\).*/{
16814 s//\1/
16815 q
16816 }
16817 s/.*/./; q'`
16818 test -d "$as_dir" && break
16819 done
16820 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016821 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016822
16823
16824} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016825if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016826 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016827else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016829 as_mkdir_p=false
16830fi
16831
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016832
16833# as_fn_executable_p FILE
16834# -----------------------
16835# Test if FILE is an executable regular file.
16836as_fn_executable_p ()
16837{
16838 test -f "$1" && test -x "$1"
16839} # as_fn_executable_p
16840as_test_x='test -x'
16841as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016842
16843# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016844as_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 +000016845
16846# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016847as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016848
16849
Martin v. Löwis11437992002-04-12 09:54:03 +000016850exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016851## ----------------------------------- ##
16852## Main body of $CONFIG_STATUS script. ##
16853## ----------------------------------- ##
16854_ASEOF
16855test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016856
Matthias Kloseb9621712010-04-24 17:59:49 +000016857cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16858# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016859# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860# values after options handling.
16861ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016862This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016863generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016864
16865 CONFIG_FILES = $CONFIG_FILES
16866 CONFIG_HEADERS = $CONFIG_HEADERS
16867 CONFIG_LINKS = $CONFIG_LINKS
16868 CONFIG_COMMANDS = $CONFIG_COMMANDS
16869 $ $0 $@
16870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016871on `(hostname || uname -n) 2>/dev/null | sed 1q`
16872"
16873
Martin v. Löwis11437992002-04-12 09:54:03 +000016874_ACEOF
16875
Matthias Kloseb9621712010-04-24 17:59:49 +000016876case $ac_config_files in *"
16877"*) set x $ac_config_files; shift; ac_config_files=$*;;
16878esac
16879
16880case $ac_config_headers in *"
16881"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16882esac
16883
16884
16885cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016886# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016887config_files="$ac_config_files"
16888config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016891
Matthias Kloseb9621712010-04-24 17:59:49 +000016892cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016893ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016894\`$as_me' instantiates files and other configuration actions
16895from templates according to the current configuration. Unless the files
16896and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016897
Matthias Kloseb9621712010-04-24 17:59:49 +000016898Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016899
16900 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016901 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016902 --config print configuration, then exit
16903 -q, --quiet, --silent
16904 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 -d, --debug don't remove temporary files
16906 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016907 --file=FILE[:TEMPLATE]
16908 instantiate the configuration file FILE
16909 --header=FILE[:TEMPLATE]
16910 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016911
16912Configuration files:
16913$config_files
16914
16915Configuration headers:
16916$config_headers
16917
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016918Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016921cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16922ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016923ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016924python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016925configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016926 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016927
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016928Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016929This config.status script is free software; the Free Software Foundation
16930gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931
16932ac_pwd='$ac_pwd'
16933srcdir='$srcdir'
16934INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016935MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016936test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016937_ACEOF
16938
Matthias Kloseb9621712010-04-24 17:59:49 +000016939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16940# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016941ac_need_defaults=:
16942while test $# != 0
16943do
16944 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016945 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016946 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16947 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016948 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016950 --*=)
16951 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16952 ac_optarg=
16953 ac_shift=:
16954 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016955 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016956 ac_option=$1
16957 ac_optarg=$2
16958 ac_shift=shift
16959 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 esac
16961
Skip Montanaro6dead952003-09-25 14:50:04 +000016962 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016963 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016964 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16965 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016967 $as_echo "$ac_cs_version"; exit ;;
16968 --config | --confi | --conf | --con | --co | --c )
16969 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016970 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016971 debug=: ;;
16972 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016973 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016974 case $ac_optarg in
16975 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016976 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016977 esac
16978 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016979 ac_need_defaults=false;;
16980 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016981 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016982 case $ac_optarg in
16983 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16984 esac
16985 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987 --he | --h)
16988 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016989 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016990Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016992 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016993 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16994 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16995 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016996
16997 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016998 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016999Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017000
Matthias Kloseb9621712010-04-24 17:59:49 +000017001 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017003
17004 esac
17005 shift
17006done
17007
Skip Montanaro6dead952003-09-25 14:50:04 +000017008ac_configure_extra_args=
17009
17010if $ac_cs_silent; then
17011 exec 6>/dev/null
17012 ac_configure_extra_args="$ac_configure_extra_args --silent"
17013fi
17014
17015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017016cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017017if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017018 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017019 shift
17020 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17021 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017023 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017024fi
17025
Martin v. Löwis11437992002-04-12 09:54:03 +000017026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017027cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028exec 5>>config.log
17029{
17030 echo
17031 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17032## Running $as_me. ##
17033_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017034 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017039_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017040
Matthias Kloseb9621712010-04-24 17:59:49 +000017041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042
17043# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017044for ac_config_target in $ac_config_targets
17045do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046 case $ac_config_target in
17047 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17048 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17049 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017050 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17051 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17053 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017054 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017055 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017056 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057
Victor Stinnere0be4232011-10-25 13:06:09 +020017058 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017059 esac
17060done
17061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017062
Martin v. Löwis11437992002-04-12 09:54:03 +000017063# If the user did not use the arguments to specify the items to instantiate,
17064# then the envvar interface is used. Set only those that are not.
17065# We use the long form for the default assignment because of an extremely
17066# bizarre bug on SunOS 4.1.3.
17067if $ac_need_defaults; then
17068 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17069 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17070fi
17071
Skip Montanaro6dead952003-09-25 14:50:04 +000017072# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017074# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075# Hook for its removal unless debugging.
17076# Note that there is a small window in which the directory will not be cleaned:
17077# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017078$debug ||
17079{
Victor Stinnere0be4232011-10-25 13:06:09 +020017080 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017081 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017082 : "${ac_tmp:=$tmp}"
17083 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017085 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017086}
Martin v. Löwis11437992002-04-12 09:54:03 +000017087# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017088
Martin v. Löwis11437992002-04-12 09:54:03 +000017089{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017091 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017092} ||
17093{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094 tmp=./conf$$-$RANDOM
17095 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017096} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017097ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017098
Matthias Kloseb9621712010-04-24 17:59:49 +000017099# Set up the scripts for CONFIG_FILES section.
17100# No need to generate them if there are no CONFIG_FILES.
17101# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017102if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017103
Matthias Kloseb9621712010-04-24 17:59:49 +000017104
17105ac_cr=`echo X | tr X '\015'`
17106# On cygwin, bash can eat \r inside `` if the user requested igncr.
17107# But we know of no other shell where ac_cr would be empty at this
17108# point, so we can use a bashism as a fallback.
17109if test "x$ac_cr" = x; then
17110 eval ac_cr=\$\'\\r\'
17111fi
17112ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17113if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017114 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017115else
17116 ac_cs_awk_cr=$ac_cr
17117fi
17118
Victor Stinnere0be4232011-10-25 13:06:09 +020017119echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017120_ACEOF
17121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017122
Matthias Kloseb9621712010-04-24 17:59:49 +000017123{
17124 echo "cat >conf$$subs.awk <<_ACEOF" &&
17125 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17126 echo "_ACEOF"
17127} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017128 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17129ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017130ac_delim='%!_!# '
17131for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017132 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017133 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17136 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017137 break
17138 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017139 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140 else
17141 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017142 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017143done
Matthias Kloseb9621712010-04-24 17:59:49 +000017144rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145
Matthias Kloseb9621712010-04-24 17:59:49 +000017146cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017147cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017149sed -n '
17150h
17151s/^/S["/; s/!.*/"]=/
17152p
17153g
17154s/^[^!]*!//
17155:repl
17156t repl
17157s/'"$ac_delim"'$//
17158t delim
17159:nl
17160h
17161s/\(.\{148\}\)..*/\1/
17162t more1
17163s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17164p
17165n
17166b repl
17167:more1
17168s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17169p
17170g
17171s/.\{148\}//
17172t nl
17173:delim
17174h
17175s/\(.\{148\}\)..*/\1/
17176t more2
17177s/["\\]/\\&/g; s/^/"/; s/$/"/
17178p
17179b
17180:more2
17181s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17182p
17183g
17184s/.\{148\}//
17185t delim
17186' <conf$$subs.awk | sed '
17187/^[^""]/{
17188 N
17189 s/\n//
17190}
17191' >>$CONFIG_STATUS || ac_write_fail=1
17192rm -f conf$$subs.awk
17193cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17194_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017195cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017196 for (key in S) S_is_set[key] = 1
17197 FS = ""
17198
17199}
17200{
17201 line = $ 0
17202 nfields = split(line, field, "@")
17203 substed = 0
17204 len = length(field[1])
17205 for (i = 2; i < nfields; i++) {
17206 key = field[i]
17207 keylen = length(key)
17208 if (S_is_set[key]) {
17209 value = S[key]
17210 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17211 len += length(value) + length(field[++i])
17212 substed = 1
17213 } else
17214 len += 1 + keylen
17215 }
17216
17217 print line
17218}
17219
17220_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017222cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17223if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17224 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17225else
17226 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017227fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017228 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017229_ACEOF
17230
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017231# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17232# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017233# trailing colons and then remove the whole line if VPATH becomes empty
17234# (actually we leave an empty line to preserve line numbers).
17235if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017236 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17237h
17238s///
17239s/^/:/
17240s/[ ]*$/:/
17241s/:\$(srcdir):/:/g
17242s/:\${srcdir}:/:/g
17243s/:@srcdir@:/:/g
17244s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017245s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017246x
17247s/\(=[ ]*\).*/\1/
17248G
17249s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250s/^[^=]*=[ ]*$//
17251}'
17252fi
17253
Matthias Kloseb9621712010-04-24 17:59:49 +000017254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017255fi # test -n "$CONFIG_FILES"
17256
Matthias Kloseb9621712010-04-24 17:59:49 +000017257# Set up the scripts for CONFIG_HEADERS section.
17258# No need to generate them if there are no CONFIG_HEADERS.
17259# This happens for instance with `./config.status Makefile'.
17260if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017261cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017262BEGIN {
17263_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264
Matthias Kloseb9621712010-04-24 17:59:49 +000017265# Transform confdefs.h into an awk script `defines.awk', embedded as
17266# here-document in config.status, that substitutes the proper values into
17267# config.h.in to produce config.h.
17268
17269# Create a delimiter string that does not exist in confdefs.h, to ease
17270# handling of long lines.
17271ac_delim='%!_!# '
17272for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017273 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17274 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017275 break
17276 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017278 else
17279 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17280 fi
17281done
17282
17283# For the awk script, D is an array of macro values keyed by name,
17284# likewise P contains macro parameters if any. Preserve backslash
17285# newline sequences.
17286
17287ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17288sed -n '
17289s/.\{148\}/&'"$ac_delim"'/g
17290t rset
17291:rset
17292s/^[ ]*#[ ]*define[ ][ ]*/ /
17293t def
17294d
17295:def
17296s/\\$//
17297t bsnl
17298s/["\\]/\\&/g
17299s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17300D["\1"]=" \3"/p
17301s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17302d
17303:bsnl
17304s/["\\]/\\&/g
17305s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17306D["\1"]=" \3\\\\\\n"\\/p
17307t cont
17308s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17309t cont
17310d
17311:cont
17312n
17313s/.\{148\}/&'"$ac_delim"'/g
17314t clear
17315:clear
17316s/\\$//
17317t bsnlc
17318s/["\\]/\\&/g; s/^/"/; s/$/"/p
17319d
17320:bsnlc
17321s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17322b cont
17323' <confdefs.h | sed '
17324s/'"$ac_delim"'/"\\\
17325"/g' >>$CONFIG_STATUS || ac_write_fail=1
17326
17327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17328 for (key in D) D_is_set[key] = 1
17329 FS = ""
17330}
17331/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17332 line = \$ 0
17333 split(line, arg, " ")
17334 if (arg[1] == "#") {
17335 defundef = arg[2]
17336 mac1 = arg[3]
17337 } else {
17338 defundef = substr(arg[1], 2)
17339 mac1 = arg[2]
17340 }
17341 split(mac1, mac2, "(") #)
17342 macro = mac2[1]
17343 prefix = substr(line, 1, index(line, defundef) - 1)
17344 if (D_is_set[macro]) {
17345 # Preserve the white space surrounding the "#".
17346 print prefix "define", macro P[macro] D[macro]
17347 next
17348 } else {
17349 # Replace #undef with comments. This is necessary, for example,
17350 # in the case of _POSIX_SOURCE, which is predefined and required
17351 # on some systems where configure will not decide to define it.
17352 if (defundef == "undef") {
17353 print "/*", prefix defundef, macro, "*/"
17354 next
17355 }
17356 }
17357}
17358{ print }
17359_ACAWK
17360_ACEOF
17361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017362 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017363fi # test -n "$CONFIG_HEADERS"
17364
17365
17366eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17367shift
17368for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369do
17370 case $ac_tag in
17371 :[FHLC]) ac_mode=$ac_tag; continue;;
17372 esac
17373 case $ac_mode$ac_tag in
17374 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017375 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376 :[FH]-) ac_tag=-:-;;
17377 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17378 esac
17379 ac_save_IFS=$IFS
17380 IFS=:
17381 set x $ac_tag
17382 IFS=$ac_save_IFS
17383 shift
17384 ac_file=$1
17385 shift
17386
17387 case $ac_mode in
17388 :L) ac_source=$1;;
17389 :[FH])
17390 ac_file_inputs=
17391 for ac_f
17392 do
17393 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017394 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 *) # Look for the file first in the build tree, then in the source tree
17396 # (if the path is not absolute). The absolute path cannot be DOS-style,
17397 # because $ac_f cannot contain `:'.
17398 test -f "$ac_f" ||
17399 case $ac_f in
17400 [\\/$]*) false;;
17401 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17402 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017403 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017405 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17406 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407 done
17408
17409 # Let's still pretend it is `configure' which instantiates (i.e., don't
17410 # use $as_me), people would be surprised to read:
17411 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017412 configure_input='Generated from '`
17413 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17414 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 if test x"$ac_file" != x-; then
17416 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017417 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17418$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017420 # Neutralize special characters interpreted by sed in replacement strings.
17421 case $configure_input in #(
17422 *\&* | *\|* | *\\* )
17423 ac_sed_conf_input=`$as_echo "$configure_input" |
17424 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17425 *) ac_sed_conf_input=$configure_input;;
17426 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427
17428 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017429 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17430 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431 esac
17432 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 esac
17434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017436$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017437 X"$ac_file" : 'X\(//\)[^/]' \| \
17438 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017440$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17442 s//\1/
17443 q
17444 }
17445 /^X\(\/\/\)[^/].*/{
17446 s//\1/
17447 q
17448 }
17449 /^X\(\/\/\)$/{
17450 s//\1/
17451 q
17452 }
17453 /^X\(\/\).*/{
17454 s//\1/
17455 q
17456 }
17457 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017458 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 ac_builddir=.
17460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461case "$ac_dir" in
17462.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17463*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017464 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017466 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467 case $ac_top_builddir_sub in
17468 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17469 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17470 esac ;;
17471esac
17472ac_abs_top_builddir=$ac_pwd
17473ac_abs_builddir=$ac_pwd$ac_dir_suffix
17474# for backward compatibility:
17475ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017476
17477case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480 ac_top_srcdir=$ac_top_builddir_sub
17481 ac_abs_top_srcdir=$ac_pwd ;;
17482 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484 ac_top_srcdir=$srcdir
17485 ac_abs_top_srcdir=$srcdir ;;
17486 *) # Relative name.
17487 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17488 ac_top_srcdir=$ac_top_build_prefix$srcdir
17489 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017490esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017491ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017492
Martin v. Löwis11437992002-04-12 09:54:03 +000017493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017494 case $ac_mode in
17495 :F)
17496 #
17497 # CONFIG_FILE
17498 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017499
17500 case $INSTALL in
17501 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017502 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017503 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017504 ac_MKDIR_P=$MKDIR_P
17505 case $MKDIR_P in
17506 [\\/$]* | ?:[\\/]* ) ;;
17507 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17508 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017509_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510
Matthias Kloseb9621712010-04-24 17:59:49 +000017511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017512# If the template does not know about datarootdir, expand it.
17513# FIXME: This hack should be removed a few years after 2.60.
17514ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017515ac_sed_dataroot='
17516/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517 p
17518 q
17519}
17520/@datadir@/p
17521/@docdir@/p
17522/@infodir@/p
17523/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017524/@mandir@/p'
17525case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526*datarootdir*) ac_datarootdir_seen=yes;;
17527*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017528 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17529$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017531cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532 ac_datarootdir_hack='
17533 s&@datadir@&$datadir&g
17534 s&@docdir@&$docdir&g
17535 s&@infodir@&$infodir&g
17536 s&@localedir@&$localedir&g
17537 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017538 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539esac
17540_ACEOF
17541
17542# Neutralize VPATH when `$srcdir' = `.'.
17543# Shell code in configure.ac might set extrasub.
17544# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017545cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17546ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017547$extrasub
17548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017549cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017550:t
17551/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017552s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017554s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555s&@srcdir@&$ac_srcdir&;t t
17556s&@abs_srcdir@&$ac_abs_srcdir&;t t
17557s&@top_srcdir@&$ac_top_srcdir&;t t
17558s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17559s&@builddir@&$ac_builddir&;t t
17560s&@abs_builddir@&$ac_abs_builddir&;t t
17561s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17562s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017563s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017565"
Victor Stinnere0be4232011-10-25 13:06:09 +020017566eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17567 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017570 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17571 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17572 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017574which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017575$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017576which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017577
Victor Stinnere0be4232011-10-25 13:06:09 +020017578 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017579 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017580 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17581 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017582 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017583 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584 ;;
17585 :H)
17586 #
17587 # CONFIG_HEADER
17588 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017589 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017590 {
17591 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017592 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17593 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017594 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017595 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17597$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017598 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017599 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017600 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017601 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017602 fi
17603 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017604 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017605 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017606 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017607 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017608 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017610
17611 esac
17612
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017613
17614 case $ac_file$ac_mode in
17615 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17616
17617 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618done # for ac_tag
17619
Guido van Rossum627b2d71993-12-24 10:39:16 +000017620
Matthias Kloseb9621712010-04-24 17:59:49 +000017621as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017622_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017623ac_clean_files=$ac_clean_files_save
17624
Matthias Kloseb9621712010-04-24 17:59:49 +000017625test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017626 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017627
Martin v. Löwis11437992002-04-12 09:54:03 +000017628
17629# configure is writing to config.log, and then calls config.status.
17630# config.status does its own redirection, appending to config.log.
17631# Unfortunately, on DOS this fails, as config.log is still kept open
17632# by configure, so config.status won't be able to write to it; its
17633# output is simply discarded. So we exec the FD to /dev/null,
17634# effectively closing config.log, so it can be properly (re)opened and
17635# appended to by config.status. When coming back to configure, we
17636# need to make the FD available again.
17637if test "$no_create" != yes; then
17638 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017639 ac_config_status_args=
17640 test "$silent" = yes &&
17641 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017642 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017643 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 exec 5>>config.log
17645 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17646 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017647 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017648fi
17649if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17651$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017652fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017653
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017654
Christian Heimes75ed8902013-11-20 01:11:18 +010017655echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017656if test ! -f Modules/Setup
17657then
17658 cp $srcdir/Modules/Setup.dist Modules/Setup
17659fi
17660
Christian Heimes75ed8902013-11-20 01:11:18 +010017661echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017662if test ! -f Modules/Setup.local
17663then
17664 echo "# Edit this file for local setup changes" >Modules/Setup.local
17665fi
17666
Christian Heimes75ed8902013-11-20 01:11:18 +010017667echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017668$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17669 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017670 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017671mv config.c Modules
Brett Cannon8c94f972016-09-06 17:15:21 -070017672
17673if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17674 echo "" >&6
17675 echo "" >&6
17676 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17677 echo "please run ./configure --with-optimizations" >&6
17678 echo "" >&6
17679 echo "" >&6
17680fi
17681