blob: 398f12160fc8cb8e9bdd9e061dfc33750d16e78e [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#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://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
270$0: http://bugs.python.org/ about your system, including
271$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'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000676ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000677LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100678MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000679INSTALL_DATA
680INSTALL_SCRIPT
681INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530682OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200683PYTHON
684ASDLGEN
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
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200744PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100745host_os
746host_vendor
747host_cpu
748host
749build_os
750build_vendor
751build_cpu
752build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500753HAS_HG
754HGBRANCH
755HGTAG
756HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400757BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000758target_alias
759host_alias
760build_alias
761LIBS
762ECHO_T
763ECHO_N
764ECHO_C
765DEFS
766mandir
767localedir
768libdir
769psdir
770pdfdir
771dvidir
772htmldir
773infodir
774docdir
775oldincludedir
776includedir
777localstatedir
778sharedstatedir
779sysconfdir
780datadir
781datarootdir
782libexecdir
783sbindir
784bindir
785program_transform_name
786prefix
787exec_prefix
788PACKAGE_URL
789PACKAGE_BUGREPORT
790PACKAGE_STRING
791PACKAGE_VERSION
792PACKAGE_TARNAME
793PACKAGE_NAME
794PATH_SEPARATOR
795SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000796ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000797ac_user_opts='
798enable_option_checking
799enable_universalsdk
800with_universal_archs
801with_framework_name
802enable_framework
803with_gcc
804with_cxx_main
805with_suffix
806enable_shared
807enable_profiling
808with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100809with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100810with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_libs
812with_system_expat
813with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100814with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000815enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700816with_tcltk_includes
817with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000818with_dbmliborder
819with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_threads
821with_thread
822enable_ipv6
823with_doc_strings
824with_tsc
825with_pymalloc
826with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_fpectl
828with_libm
829with_libc
830enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800832with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000833'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 ac_precious_vars='build_alias
835host_alias
836target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100837MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838CC
839CFLAGS
840LDFLAGS
841LIBS
842CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100843CPP
844PKG_CONFIG
845PKG_CONFIG_PATH
846PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847
Guido van Rossum627b2d71993-12-24 10:39:16 +0000848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000850ac_init_help=
851ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000852ac_unrecognized_opts=
853ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854# The variables have the same names as the options, with
855# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000856cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859no_recursion=
860prefix=NONE
861program_prefix=NONE
862program_suffix=NONE
863program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868x_includes=NONE
869x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000870
871# Installation directory options.
872# These are left unexpanded so users can "make install exec_prefix=/foo"
873# and all the variables that are supposed to be based on exec_prefix
874# by default will actually change.
875# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877bindir='${exec_prefix}/bin'
878sbindir='${exec_prefix}/sbin'
879libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880datarootdir='${prefix}/share'
881datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882sysconfdir='${prefix}/etc'
883sharedstatedir='${prefix}/com'
884localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885includedir='${prefix}/include'
886oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
888infodir='${datarootdir}/info'
889htmldir='${docdir}'
890dvidir='${docdir}'
891pdfdir='${docdir}'
892psdir='${docdir}'
893libdir='${exec_prefix}/lib'
894localedir='${datarootdir}/locale'
895mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000900do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901 # If the previous option needs an argument, assign it.
902 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904 ac_prev=
905 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000906 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200909 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
910 *=) ac_optarg= ;;
911 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 # Accept the important Cygnus configure options, so we can diagnose typos.
915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 case $ac_dashdash$ac_option in
917 --)
918 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920 -bindir | --bindir | --bindi | --bind | --bin | --bi)
921 ac_prev=bindir ;;
922 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 -cache-file | --cache-file | --cache-fil | --cache-fi \
931 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
932 ac_prev=cache_file ;;
933 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
934 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 cache_file=$ac_optarg ;;
936
937 --config-cache | -C)
938 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
946 | --dataroo | --dataro | --datar)
947 ac_prev=datarootdir ;;
948 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
949 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
950 datarootdir=$ac_optarg ;;
951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000953 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000955 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200956 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt_orig=$ac_useropt
958 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959 case $ac_user_opts in
960 *"
961"enable_$ac_useropt"
962"*) ;;
963 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
964 ac_unrecognized_sep=', ';;
965 esac
966 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967
968 -docdir | --docdir | --docdi | --doc | --do)
969 ac_prev=docdir ;;
970 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
971 docdir=$ac_optarg ;;
972
973 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
974 ac_prev=dvidir ;;
975 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
976 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000979 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000980 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000981 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200982 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000983 ac_useropt_orig=$ac_useropt
984 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
985 case $ac_user_opts in
986 *"
987"enable_$ac_useropt"
988"*) ;;
989 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
990 ac_unrecognized_sep=', ';;
991 esac
992 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
995 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
996 | --exec | --exe | --ex)
997 ac_prev=exec_prefix ;;
998 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
999 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1000 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
1003 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001004 # Obsolete; use --with-gas.
1005 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 -help | --help | --hel | --he | -h)
1008 ac_init_help=long ;;
1009 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1010 ac_init_help=recursive ;;
1011 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1012 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001019 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1020 ac_prev=htmldir ;;
1021 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1022 | --ht=*)
1023 htmldir=$ac_optarg ;;
1024
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025 -includedir | --includedir | --includedi | --included | --include \
1026 | --includ | --inclu | --incl | --inc)
1027 ac_prev=includedir ;;
1028 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1029 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -infodir | --infodir | --infodi | --infod | --info | --inf)
1033 ac_prev=infodir ;;
1034 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -libdir | --libdir | --libdi | --libd)
1038 ac_prev=libdir ;;
1039 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1043 | --libexe | --libex | --libe)
1044 ac_prev=libexecdir ;;
1045 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1046 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 -localedir | --localedir | --localedi | --localed | --locale)
1050 ac_prev=localedir ;;
1051 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1052 localedir=$ac_optarg ;;
1053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001055 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056 ac_prev=localstatedir ;;
1057 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
1061 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1062 ac_prev=mandir ;;
1063 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Obsolete; use --without-fp.
1068 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 no_create=yes ;;
1073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1075 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1076 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1079 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1080 | --oldin | --oldi | --old | --ol | --o)
1081 ac_prev=oldincludedir ;;
1082 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1083 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1084 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1088 ac_prev=prefix ;;
1089 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1093 | --program-pre | --program-pr | --program-p)
1094 ac_prev=program_prefix ;;
1095 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1096 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1100 | --program-suf | --program-su | --program-s)
1101 ac_prev=program_suffix ;;
1102 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1103 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-transform-name | --program-transform-name \
1107 | --program-transform-nam | --program-transform-na \
1108 | --program-transform-n | --program-transform- \
1109 | --program-transform | --program-transfor \
1110 | --program-transfo | --program-transf \
1111 | --program-trans | --program-tran \
1112 | --progr-tra | --program-tr | --program-t)
1113 ac_prev=program_transform_name ;;
1114 -program-transform-name=* | --program-transform-name=* \
1115 | --program-transform-nam=* | --program-transform-na=* \
1116 | --program-transform-n=* | --program-transform-=* \
1117 | --program-transform=* | --program-transfor=* \
1118 | --program-transfo=* | --program-transf=* \
1119 | --program-trans=* | --program-tran=* \
1120 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001123 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1124 ac_prev=pdfdir ;;
1125 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1126 pdfdir=$ac_optarg ;;
1127
1128 -psdir | --psdir | --psdi | --psd | --ps)
1129 ac_prev=psdir ;;
1130 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1131 psdir=$ac_optarg ;;
1132
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1134 | -silent | --silent | --silen | --sile | --sil)
1135 silent=yes ;;
1136
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001137 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1138 ac_prev=sbindir ;;
1139 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1140 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001142
1143 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1144 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1145 | --sharedst | --shareds | --shared | --share | --shar \
1146 | --sha | --sh)
1147 ac_prev=sharedstatedir ;;
1148 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1149 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1150 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1151 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001154 -site | --site | --sit)
1155 ac_prev=site ;;
1156 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1160 ac_prev=srcdir ;;
1161 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1165 | --syscon | --sysco | --sysc | --sys | --sy)
1166 ac_prev=sysconfdir ;;
1167 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1168 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
1176 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1177 verbose=yes ;;
1178
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 -version | --version | --versio | --versi | --vers | -V)
1180 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001186 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 ac_useropt_orig=$ac_useropt
1188 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1189 case $ac_user_opts in
1190 *"
1191"with_$ac_useropt"
1192"*) ;;
1193 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1194 ac_unrecognized_sep=', ';;
1195 esac
1196 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001202 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 --x)
1215 # Obsolete; use --with-x.
1216 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
1218 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1219 | --x-incl | --x-inc | --x-in | --x-i)
1220 ac_prev=x_includes ;;
1221 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1222 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224
1225 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1226 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1227 ac_prev=x_libraries ;;
1228 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1229 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001232 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1233Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234 ;;
1235
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 *=*)
1237 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1238 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001239 case $ac_envvar in #(
1240 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001241 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 export $ac_envvar ;;
1245
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001246 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001251 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ;;
1253
1254 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001255done
1256
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260fi
1261
Matthias Kloseb9621712010-04-24 17:59:49 +00001262if test -n "$ac_unrecognized_opts"; then
1263 case $enable_option_checking in
1264 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1267 esac
1268fi
1269
1270# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1272 datadir sysconfdir sharedstatedir localstatedir includedir \
1273 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1274 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001275do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001277 # Remove trailing slashes.
1278 case $ac_val in
1279 */ )
1280 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1281 eval $ac_var=\$ac_val;;
1282 esac
1283 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 [\\/$]* | ?:[\\/]* ) continue;;
1286 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001289done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290
Martin v. Löwis11437992002-04-12 09:54:03 +00001291# There might be people who depend on the old broken behavior: `$host'
1292# used to hold the argument of --host etc.
1293# FIXME: To remove some day.
1294build=$build_alias
1295host=$host_alias
1296target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001297
Martin v. Löwis11437992002-04-12 09:54:03 +00001298# FIXME: To remove some day.
1299if test "x$host_alias" != x; then
1300 if test "x$build_alias" = x; then
1301 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001302 elif test "x$build_alias" != "x$host_alias"; then
1303 cross_compiling=yes
1304 fi
1305fi
1306
1307ac_tool_prefix=
1308test -n "$host_alias" && ac_tool_prefix=$host_alias-
1309
1310test "$silent" = yes && exec 6>/dev/null
1311
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313ac_pwd=`pwd` && test -n "$ac_pwd" &&
1314ac_ls_di=`ls -di .` &&
1315ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001316 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001318 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319
1320
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321# Find the source files, if location was not specified.
1322if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001323 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001325 ac_confdir=`$as_dirname -- "$as_myself" ||
1326$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1327 X"$as_myself" : 'X\(//\)[^/]' \| \
1328 X"$as_myself" : 'X\(//\)$' \| \
1329 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1330$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1332 s//\1/
1333 q
1334 }
1335 /^X\(\/\/\)[^/].*/{
1336 s//\1/
1337 q
1338 }
1339 /^X\(\/\/\)$/{
1340 s//\1/
1341 q
1342 }
1343 /^X\(\/\).*/{
1344 s//\1/
1345 q
1346 }
1347 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001348 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001350 srcdir=..
1351 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352else
1353 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355if test ! -r "$srcdir/$ac_unique_file"; then
1356 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001357 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1360ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001361 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 pwd)`
1363# When building in place, set srcdir=.
1364if test "$ac_abs_confdir" = "$ac_pwd"; then
1365 srcdir=.
1366fi
1367# Remove unnecessary trailing slashes from srcdir.
1368# Double slashes in file names in object file debugging info
1369# mess up M-x gdb in Emacs.
1370case $srcdir in
1371*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1372esac
1373for ac_var in $ac_precious_vars; do
1374 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1375 eval ac_env_${ac_var}_value=\$${ac_var}
1376 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1377 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1378done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001379
Martin v. Löwis11437992002-04-12 09:54:03 +00001380#
1381# Report the --help message.
1382#
1383if test "$ac_init_help" = "long"; then
1384 # Omit some internal or obsolete options to make the list less imposing.
1385 # This message is too long to be a string in the A/UX 3.1 sh.
1386 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001387\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001388
1389Usage: $0 [OPTION]... [VAR=VALUE]...
1390
1391To assign environment variables (e.g., CC, CFLAGS...), specify them as
1392VAR=VALUE. See below for descriptions of some of the useful variables.
1393
1394Defaults for the options are specified in brackets.
1395
1396Configuration:
1397 -h, --help display this help and exit
1398 --help=short display options specific to this package
1399 --help=recursive display the short help of all the included packages
1400 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001401 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 --cache-file=FILE cache test results in FILE [disabled]
1403 -C, --config-cache alias for \`--cache-file=config.cache'
1404 -n, --no-create do not create output files
1405 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1406
Martin v. Löwis11437992002-04-12 09:54:03 +00001407Installation directories:
1408 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001409 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001411 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413By default, \`make install' will install all the files in
1414\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1415an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1416for instance \`--prefix=\$HOME'.
1417
1418For better control, use the options below.
1419
1420Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 --bindir=DIR user executables [EPREFIX/bin]
1422 --sbindir=DIR system admin executables [EPREFIX/sbin]
1423 --libexecdir=DIR program executables [EPREFIX/libexec]
1424 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1425 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1426 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1427 --libdir=DIR object code libraries [EPREFIX/lib]
1428 --includedir=DIR C header files [PREFIX/include]
1429 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1430 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1431 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1432 --infodir=DIR info documentation [DATAROOTDIR/info]
1433 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1434 --mandir=DIR man documentation [DATAROOTDIR/man]
1435 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1436 --htmldir=DIR html documentation [DOCDIR]
1437 --dvidir=DIR dvi documentation [DOCDIR]
1438 --pdfdir=DIR pdf documentation [DOCDIR]
1439 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001440_ACEOF
1441
1442 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001443
1444System types:
1445 --build=BUILD configure for building on BUILD [guessed]
1446 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001447_ACEOF
1448fi
1449
1450if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001451 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001452 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001453 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 cat <<\_ACEOF
1455
1456Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1459 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001460 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001461 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --enable-framework[=INSTALLDIR]
1463 Build (MacOSX|Darwin) framework
1464 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001465 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001466 --enable-loadable-sqlite-extensions
1467 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001468 --enable-ipv6 Enable ipv6 (with ipv4) support
1469 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001470 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001471 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472
1473Optional Packages:
1474 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1475 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001476 --with-universal-archs=ARCH
1477 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001478 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001479 --with-framework-name=FRAMEWORK
1480 specify an alternate name of the framework built
1481 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001483 --with-cxx-main=<compiler>
1484 compile main() and link python executable with C++
1485 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with-suffix=.exe set executable suffix
1487 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001488 --with-hash-algorithm=[fnv|siphash24]
1489 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001490 --with-address-sanitizer
1491 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001493 --with-system-expat build pyexpat module using an installed expat
1494 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001495 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001496 --with-system-libmpdec build _decimal module using an installed libmpdec
1497 library
Ned Deilyd819b932013-09-06 01:07:05 -07001498 --with-tcltk-includes='-I...'
1499 override search for Tcl and Tk include files
1500 --with-tcltk-libs='-L...'
1501 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001502 --with-dbmliborder=db1:db2:...
1503 order to check db backends for dbm. Valid value is a
1504 colon separated string with the backend names
1505 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with(out)-threads[=DIRECTORY]
1508 disable/enable thread support
1509 --with(out)-thread[=DIRECTORY]
1510 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001512 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001514 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with-fpectl enable SIGFPE catching
1516 --with-libm=STRING math library
1517 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001518 --with(out)-computed-gotos
1519 Use computed gotos in evaluation loop (enabled by
1520 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001521 --with(out)-ensurepip=[=upgrade]
1522 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001523
1524Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001525 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 CC C compiler command
1527 CFLAGS C compiler flags
1528 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1529 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001531 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001532 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001534 PKG_CONFIG path to pkg-config utility
1535 PKG_CONFIG_PATH
1536 directories to add to pkg-config's search path
1537 PKG_CONFIG_LIBDIR
1538 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001539
1540Use these variables to override the choices made by `configure' or to help
1541it to find libraries and programs with nonstandard names/locations.
1542
Georg Brandle2e15612009-05-20 18:25:10 +00001543Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001544_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001546fi
1547
1548if test "$ac_init_help" = "recursive"; then
1549 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001551 test -d "$ac_dir" ||
1552 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1553 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 ac_builddir=.
1555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556case "$ac_dir" in
1557.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562 case $ac_top_builddir_sub in
1563 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1565 esac ;;
1566esac
1567ac_abs_top_builddir=$ac_pwd
1568ac_abs_builddir=$ac_pwd$ac_dir_suffix
1569# for backward compatibility:
1570ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001571
1572case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575 ac_top_srcdir=$ac_top_builddir_sub
1576 ac_abs_top_srcdir=$ac_pwd ;;
1577 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 ac_top_srcdir=$srcdir
1580 ac_abs_top_srcdir=$srcdir ;;
1581 *) # Relative name.
1582 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1583 ac_top_srcdir=$ac_top_build_prefix$srcdir
1584 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001585esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 cd "$ac_dir" || { ac_status=$?; continue; }
1589 # Check for guested configure.
1590 if test -f "$ac_srcdir/configure.gnu"; then
1591 echo &&
1592 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1593 elif test -f "$ac_srcdir/configure"; then
1594 echo &&
1595 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001597 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 fi || ac_status=$?
1599 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 done
1601fi
1602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001604if $ac_init_version; then
1605 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001606python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001607generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001608
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001609Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001610This configure script is free software; the Free Software Foundation
1611gives unlimited permission to copy, distribute and modify it.
1612_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001615
1616## ------------------------ ##
1617## Autoconf initialization. ##
1618## ------------------------ ##
1619
1620# ac_fn_c_try_compile LINENO
1621# --------------------------
1622# Try to compile conftest.$ac_ext, and return whether this succeeded.
1623ac_fn_c_try_compile ()
1624{
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626 rm -f conftest.$ac_objext
1627 if { { ac_try="$ac_compile"
1628case "(($ac_try" in
1629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1630 *) ac_try_echo=$ac_try;;
1631esac
1632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1633$as_echo "$ac_try_echo"; } >&5
1634 (eval "$ac_compile") 2>conftest.err
1635 ac_status=$?
1636 if test -s conftest.err; then
1637 grep -v '^ *+' conftest.err >conftest.er1
1638 cat conftest.er1 >&5
1639 mv -f conftest.er1 conftest.err
1640 fi
1641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1642 test $ac_status = 0; } && {
1643 test -z "$ac_c_werror_flag" ||
1644 test ! -s conftest.err
1645 } && test -s conftest.$ac_objext; then :
1646 ac_retval=0
1647else
1648 $as_echo "$as_me: failed program was:" >&5
1649sed 's/^/| /' conftest.$ac_ext >&5
1650
1651 ac_retval=1
1652fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001653 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001654 as_fn_set_status $ac_retval
1655
1656} # ac_fn_c_try_compile
1657
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001658# ac_fn_c_try_cpp LINENO
1659# ----------------------
1660# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1661ac_fn_c_try_cpp ()
1662{
1663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664 if { { ac_try="$ac_cpp conftest.$ac_ext"
1665case "(($ac_try" in
1666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1667 *) ac_try_echo=$ac_try;;
1668esac
1669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1670$as_echo "$ac_try_echo"; } >&5
1671 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1672 ac_status=$?
1673 if test -s conftest.err; then
1674 grep -v '^ *+' conftest.err >conftest.er1
1675 cat conftest.er1 >&5
1676 mv -f conftest.er1 conftest.err
1677 fi
1678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1679 test $ac_status = 0; } > conftest.i && {
1680 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1681 test ! -s conftest.err
1682 }; then :
1683 ac_retval=0
1684else
1685 $as_echo "$as_me: failed program was:" >&5
1686sed 's/^/| /' conftest.$ac_ext >&5
1687
1688 ac_retval=1
1689fi
1690 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1691 as_fn_set_status $ac_retval
1692
1693} # ac_fn_c_try_cpp
1694
Matthias Kloseb9621712010-04-24 17:59:49 +00001695# ac_fn_c_try_link LINENO
1696# -----------------------
1697# Try to link conftest.$ac_ext, and return whether this succeeded.
1698ac_fn_c_try_link ()
1699{
1700 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1701 rm -f conftest.$ac_objext conftest$ac_exeext
1702 if { { ac_try="$ac_link"
1703case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_link") 2>conftest.err
1710 ac_status=$?
1711 if test -s conftest.err; then
1712 grep -v '^ *+' conftest.err >conftest.er1
1713 cat conftest.er1 >&5
1714 mv -f conftest.er1 conftest.err
1715 fi
1716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717 test $ac_status = 0; } && {
1718 test -z "$ac_c_werror_flag" ||
1719 test ! -s conftest.err
1720 } && test -s conftest$ac_exeext && {
1721 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001722 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001723 }; then :
1724 ac_retval=0
1725else
1726 $as_echo "$as_me: failed program was:" >&5
1727sed 's/^/| /' conftest.$ac_ext >&5
1728
1729 ac_retval=1
1730fi
1731 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1732 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1733 # interfere with the next link command; also delete a directory that is
1734 # left behind by Apple's compiler. We do this before executing the actions.
1735 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001736 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001737 as_fn_set_status $ac_retval
1738
1739} # ac_fn_c_try_link
1740
Matthias Kloseb9621712010-04-24 17:59:49 +00001741# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1742# -------------------------------------------------------
1743# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1744# the include files in INCLUDES and setting the cache variable VAR
1745# accordingly.
1746ac_fn_c_check_header_mongrel ()
1747{
1748 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001749 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1751$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001752if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001753 $as_echo_n "(cached) " >&6
1754fi
1755eval ac_res=\$$3
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1757$as_echo "$ac_res" >&6; }
1758else
1759 # Is the header compilable?
1760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1761$as_echo_n "checking $2 usability... " >&6; }
1762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1763/* end confdefs.h. */
1764$4
1765#include <$2>
1766_ACEOF
1767if ac_fn_c_try_compile "$LINENO"; then :
1768 ac_header_compiler=yes
1769else
1770 ac_header_compiler=no
1771fi
1772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1774$as_echo "$ac_header_compiler" >&6; }
1775
1776# Is the header present?
1777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1778$as_echo_n "checking $2 presence... " >&6; }
1779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780/* end confdefs.h. */
1781#include <$2>
1782_ACEOF
1783if ac_fn_c_try_cpp "$LINENO"; then :
1784 ac_header_preproc=yes
1785else
1786 ac_header_preproc=no
1787fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001788rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1790$as_echo "$ac_header_preproc" >&6; }
1791
1792# So? What about this header?
1793case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1794 yes:no: )
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1796$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1798$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1799 ;;
1800 no:yes:* )
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1802$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1804$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1806$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1808$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1810$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001811( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001812## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001813## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 ) | sed "s/^/$as_me: WARNING: /" >&2
1815 ;;
1816esac
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001819if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 $as_echo_n "(cached) " >&6
1821else
1822 eval "$3=\$ac_header_compiler"
1823fi
1824eval ac_res=\$$3
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826$as_echo "$ac_res" >&6; }
1827fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001828 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001829
1830} # ac_fn_c_check_header_mongrel
1831
1832# ac_fn_c_try_run LINENO
1833# ----------------------
1834# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1835# that executables *can* be run.
1836ac_fn_c_try_run ()
1837{
1838 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1839 if { { ac_try="$ac_link"
1840case "(($ac_try" in
1841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1842 *) ac_try_echo=$ac_try;;
1843esac
1844eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1845$as_echo "$ac_try_echo"; } >&5
1846 (eval "$ac_link") 2>&5
1847 ac_status=$?
1848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1849 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1850 { { case "(($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_try") 2>&5
1857 ac_status=$?
1858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1859 test $ac_status = 0; }; }; then :
1860 ac_retval=0
1861else
1862 $as_echo "$as_me: program exited with status $ac_status" >&5
1863 $as_echo "$as_me: failed program was:" >&5
1864sed 's/^/| /' conftest.$ac_ext >&5
1865
1866 ac_retval=$ac_status
1867fi
1868 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001869 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001870 as_fn_set_status $ac_retval
1871
1872} # ac_fn_c_try_run
1873
1874# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1875# -------------------------------------------------------
1876# Tests whether HEADER exists and can be compiled using the include files in
1877# INCLUDES, setting the cache variable VAR accordingly.
1878ac_fn_c_check_header_compile ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1882$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001883if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001884 $as_echo_n "(cached) " >&6
1885else
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$4
1889#include <$2>
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892 eval "$3=yes"
1893else
1894 eval "$3=no"
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897fi
1898eval ac_res=\$$3
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1900$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001902
1903} # ac_fn_c_check_header_compile
1904
Matthias Kloseb9621712010-04-24 17:59:49 +00001905# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1906# -------------------------------------------
1907# Tests whether TYPE exists after having included INCLUDES, setting cache
1908# variable VAR accordingly.
1909ac_fn_c_check_type ()
1910{
1911 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1913$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001914if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001915 $as_echo_n "(cached) " >&6
1916else
1917 eval "$3=no"
1918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919/* end confdefs.h. */
1920$4
1921int
1922main ()
1923{
1924if (sizeof ($2))
1925 return 0;
1926 ;
1927 return 0;
1928}
1929_ACEOF
1930if ac_fn_c_try_compile "$LINENO"; then :
1931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1932/* end confdefs.h. */
1933$4
1934int
1935main ()
1936{
1937if (sizeof (($2)))
1938 return 0;
1939 ;
1940 return 0;
1941}
1942_ACEOF
1943if ac_fn_c_try_compile "$LINENO"; then :
1944
1945else
1946 eval "$3=yes"
1947fi
1948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1949fi
1950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951fi
1952eval ac_res=\$$3
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1954$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001955 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001956
1957} # ac_fn_c_check_type
1958
1959# ac_fn_c_find_uintX_t LINENO BITS VAR
1960# ------------------------------------
1961# Finds an unsigned integer type with width BITS, setting cache variable VAR
1962# accordingly.
1963ac_fn_c_find_uintX_t ()
1964{
1965 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1967$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001968if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001969 $as_echo_n "(cached) " >&6
1970else
1971 eval "$3=no"
1972 # Order is important - never check a type that is potentially smaller
1973 # than half of the expected target width.
1974 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1975 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1977/* end confdefs.h. */
1978$ac_includes_default
1979int
1980main ()
1981{
1982static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001983test_array [0] = 0;
1984return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986 ;
1987 return 0;
1988}
1989_ACEOF
1990if ac_fn_c_try_compile "$LINENO"; then :
1991 case $ac_type in #(
1992 uint$2_t) :
1993 eval "$3=yes" ;; #(
1994 *) :
1995 eval "$3=\$ac_type" ;;
1996esac
1997fi
1998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001999 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002000
2001else
2002 break
2003fi
2004 done
2005fi
2006eval ac_res=\$$3
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2008$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002009 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002010
2011} # ac_fn_c_find_uintX_t
2012
2013# ac_fn_c_find_intX_t LINENO BITS VAR
2014# -----------------------------------
2015# Finds a signed integer type with width BITS, setting cache variable VAR
2016# accordingly.
2017ac_fn_c_find_intX_t ()
2018{
2019 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2021$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002022if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002023 $as_echo_n "(cached) " >&6
2024else
2025 eval "$3=no"
2026 # Order is important - never check a type that is potentially smaller
2027 # than half of the expected target width.
2028 for ac_type in int$2_t 'int' 'long int' \
2029 'long long int' 'short int' 'signed char'; do
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002033 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002034int
2035main ()
2036{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002037static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002038test_array [0] = 0;
2039return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002049 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002050int
2051main ()
2052{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002053static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002054 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063
2064else
2065 case $ac_type in #(
2066 int$2_t) :
2067 eval "$3=yes" ;; #(
2068 *) :
2069 eval "$3=\$ac_type" ;;
2070esac
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073fi
2074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002075 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002076
2077else
2078 break
2079fi
2080 done
2081fi
2082eval ac_res=\$$3
2083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2084$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002085 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002086
2087} # ac_fn_c_find_intX_t
2088
2089# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2090# --------------------------------------------
2091# Tries to find the compile-time value of EXPR in a program that includes
2092# INCLUDES, setting VAR accordingly. Returns whether the value could be
2093# computed
2094ac_fn_c_compute_int ()
2095{
2096 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2097 if test "$cross_compiling" = yes; then
2098 # Depending upon the size, compute the lo and hi bounds.
2099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h. */
2101$4
2102int
2103main ()
2104{
2105static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002106test_array [0] = 0;
2107return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 ac_lo=0 ac_mid=0
2115 while :; do
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119int
2120main ()
2121{
2122static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002123test_array [0] = 0;
2124return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002125
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130if ac_fn_c_try_compile "$LINENO"; then :
2131 ac_hi=$ac_mid; break
2132else
2133 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2134 if test $ac_lo -le $ac_mid; then
2135 ac_lo= ac_hi=
2136 break
2137 fi
2138 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2139fi
2140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141 done
2142else
2143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144/* end confdefs.h. */
2145$4
2146int
2147main ()
2148{
2149static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002150test_array [0] = 0;
2151return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_compile "$LINENO"; then :
2158 ac_hi=-1 ac_mid=-1
2159 while :; do
2160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161/* end confdefs.h. */
2162$4
2163int
2164main ()
2165{
2166static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002167test_array [0] = 0;
2168return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002169
2170 ;
2171 return 0;
2172}
2173_ACEOF
2174if ac_fn_c_try_compile "$LINENO"; then :
2175 ac_lo=$ac_mid; break
2176else
2177 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2178 if test $ac_mid -le $ac_hi; then
2179 ac_lo= ac_hi=
2180 break
2181 fi
2182 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2183fi
2184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2185 done
2186else
2187 ac_lo= ac_hi=
2188fi
2189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192# Binary search between lo and hi bounds.
2193while test "x$ac_lo" != "x$ac_hi"; do
2194 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196/* end confdefs.h. */
2197$4
2198int
2199main ()
2200{
2201static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002202test_array [0] = 0;
2203return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002204
2205 ;
2206 return 0;
2207}
2208_ACEOF
2209if ac_fn_c_try_compile "$LINENO"; then :
2210 ac_hi=$ac_mid
2211else
2212 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2213fi
2214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215done
2216case $ac_lo in #((
2217?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2218'') ac_retval=1 ;;
2219esac
2220 else
2221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2222/* end confdefs.h. */
2223$4
2224static long int longval () { return $2; }
2225static unsigned long int ulongval () { return $2; }
2226#include <stdio.h>
2227#include <stdlib.h>
2228int
2229main ()
2230{
2231
2232 FILE *f = fopen ("conftest.val", "w");
2233 if (! f)
2234 return 1;
2235 if (($2) < 0)
2236 {
2237 long int i = longval ();
2238 if (i != ($2))
2239 return 1;
2240 fprintf (f, "%ld", i);
2241 }
2242 else
2243 {
2244 unsigned long int i = ulongval ();
2245 if (i != ($2))
2246 return 1;
2247 fprintf (f, "%lu", i);
2248 }
2249 /* Do not output a trailing newline, as this causes \r\n confusion
2250 on some platforms. */
2251 return ferror (f) || fclose (f) != 0;
2252
2253 ;
2254 return 0;
2255}
2256_ACEOF
2257if ac_fn_c_try_run "$LINENO"; then :
2258 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2259else
2260 ac_retval=1
2261fi
2262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2263 conftest.$ac_objext conftest.beam conftest.$ac_ext
2264rm -f conftest.val
2265
2266 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002267 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002268 as_fn_set_status $ac_retval
2269
2270} # ac_fn_c_compute_int
2271
2272# ac_fn_c_check_func LINENO FUNC VAR
2273# ----------------------------------
2274# Tests whether FUNC exists, setting the cache variable VAR accordingly
2275ac_fn_c_check_func ()
2276{
2277 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2279$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002280if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002281 $as_echo_n "(cached) " >&6
2282else
2283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2284/* end confdefs.h. */
2285/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2286 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2287#define $2 innocuous_$2
2288
2289/* System header to define __stub macros and hopefully few prototypes,
2290 which can conflict with char $2 (); below.
2291 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2292 <limits.h> exists even on freestanding compilers. */
2293
2294#ifdef __STDC__
2295# include <limits.h>
2296#else
2297# include <assert.h>
2298#endif
2299
2300#undef $2
2301
2302/* Override any GCC internal prototype to avoid an error.
2303 Use char because int might match the return type of a GCC
2304 builtin and then its argument prototype would still apply. */
2305#ifdef __cplusplus
2306extern "C"
2307#endif
2308char $2 ();
2309/* The GNU C library defines this for functions which it implements
2310 to always fail with ENOSYS. Some functions are actually named
2311 something starting with __ and the normal name is an alias. */
2312#if defined __stub_$2 || defined __stub___$2
2313choke me
2314#endif
2315
2316int
2317main ()
2318{
2319return $2 ();
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_link "$LINENO"; then :
2325 eval "$3=yes"
2326else
2327 eval "$3=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext \
2330 conftest$ac_exeext conftest.$ac_ext
2331fi
2332eval ac_res=\$$3
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002335 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002336
2337} # ac_fn_c_check_func
2338
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002339# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2340# ---------------------------------------------
2341# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2342# accordingly.
2343ac_fn_c_check_decl ()
2344{
2345 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2346 as_decl_name=`echo $2|sed 's/ *(.*//'`
2347 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2349$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2350if eval \${$3+:} false; then :
2351 $as_echo_n "(cached) " >&6
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$4
2356int
2357main ()
2358{
2359#ifndef $as_decl_name
2360#ifdef __cplusplus
2361 (void) $as_decl_use;
2362#else
2363 (void) $as_decl_name;
2364#endif
2365#endif
2366
2367 ;
2368 return 0;
2369}
2370_ACEOF
2371if ac_fn_c_try_compile "$LINENO"; then :
2372 eval "$3=yes"
2373else
2374 eval "$3=no"
2375fi
2376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2377fi
2378eval ac_res=\$$3
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2380$as_echo "$ac_res" >&6; }
2381 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2382
2383} # ac_fn_c_check_decl
2384
Matthias Kloseb9621712010-04-24 17:59:49 +00002385# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2386# ----------------------------------------------------
2387# Tries to find if the field MEMBER exists in type AGGR, after including
2388# INCLUDES, setting cache variable VAR accordingly.
2389ac_fn_c_check_member ()
2390{
2391 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2393$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002394if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002395 $as_echo_n "(cached) " >&6
2396else
2397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2398/* end confdefs.h. */
2399$5
2400int
2401main ()
2402{
2403static $2 ac_aggr;
2404if (ac_aggr.$3)
2405return 0;
2406 ;
2407 return 0;
2408}
2409_ACEOF
2410if ac_fn_c_try_compile "$LINENO"; then :
2411 eval "$4=yes"
2412else
2413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2414/* end confdefs.h. */
2415$5
2416int
2417main ()
2418{
2419static $2 ac_aggr;
2420if (sizeof ac_aggr.$3)
2421return 0;
2422 ;
2423 return 0;
2424}
2425_ACEOF
2426if ac_fn_c_try_compile "$LINENO"; then :
2427 eval "$4=yes"
2428else
2429 eval "$4=no"
2430fi
2431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2432fi
2433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2434fi
2435eval ac_res=\$$4
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002438 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002439
2440} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002441cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002442This file contains any messages produced by compilers while
2443running configure, to aid debugging if configure makes a mistake.
2444
Yury Selivanov7aa53412015-05-30 10:57:56 -04002445It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002446generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002447
2448 $ $0 $@
2449
2450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002452{
2453cat <<_ASUNAME
2454## --------- ##
2455## Platform. ##
2456## --------- ##
2457
2458hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2459uname -m = `(uname -m) 2>/dev/null || echo unknown`
2460uname -r = `(uname -r) 2>/dev/null || echo unknown`
2461uname -s = `(uname -s) 2>/dev/null || echo unknown`
2462uname -v = `(uname -v) 2>/dev/null || echo unknown`
2463
2464/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2465/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2466
2467/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2468/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2469/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002471/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2472/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2473/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2474
2475_ASUNAME
2476
2477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2478for as_dir in $PATH
2479do
2480 IFS=$as_save_IFS
2481 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002482 $as_echo "PATH: $as_dir"
2483 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002485
2486} >&5
2487
2488cat >&5 <<_ACEOF
2489
2490
2491## ----------- ##
2492## Core tests. ##
2493## ----------- ##
2494
2495_ACEOF
2496
2497
2498# Keep a trace of the command line.
2499# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002500# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002501# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002502# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002503ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002504ac_configure_args0=
2505ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002506ac_must_keep_next=false
2507for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002508do
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 for ac_arg
2510 do
2511 case $ac_arg in
2512 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2513 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2514 | -silent | --silent | --silen | --sile | --sil)
2515 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 esac
2519 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002524 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002526 case $ac_arg in
2527 *=* | --config-cache | -C | -disable-* | --disable-* \
2528 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2529 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2530 | -with-* | --with-* | -without-* | --without-* | --x)
2531 case "$ac_configure_args0 " in
2532 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2533 esac
2534 ;;
2535 -* ) ac_must_keep_next=true ;;
2536 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 ;;
2540 esac
2541 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002542done
Matthias Kloseb9621712010-04-24 17:59:49 +00002543{ ac_configure_args0=; unset ac_configure_args0;}
2544{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002545
2546# When interrupted or exit'd, cleanup temporary files, and complete
2547# config.log. We remove comments because anyway the quotes in there
2548# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549# WARNING: Use '\'' to represent an apostrophe within the trap.
2550# 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 +00002551trap 'exit_status=$?
2552 # Save into config.log some information that might help in debugging.
2553 {
2554 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002555
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002556 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002557## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002558## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 echo
2560 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561(
2562 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2563 eval ac_val=\$$ac_var
2564 case $ac_val in #(
2565 *${as_nl}*)
2566 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002567 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2568$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 esac
2570 case $ac_var in #(
2571 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2573 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 esac ;;
2575 esac
2576 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2579 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 "s/'\''/'\''\\\\'\'''\''/g;
2582 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2583 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002584 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002586 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 esac |
2588 sort
2589)
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002591
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002592 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002593## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002595 echo
2596 for ac_var in $ac_subst_vars
2597 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 eval ac_val=\$$ac_var
2599 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002603 done | sort
2604 echo
2605
2606 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002609## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002610 echo
2611 for ac_var in $ac_subst_files
2612 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 eval ac_val=\$$ac_var
2614 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002618 done | sort
2619 echo
2620 fi
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002623 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002624## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002625## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 echo
2629 fi
2630 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 $as_echo "$as_me: caught signal $ac_signal"
2632 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 rm -f core *.core core.conftest.* &&
2635 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002638for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002640done
2641ac_signal=0
2642
2643# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002645
Matthias Kloseb9621712010-04-24 17:59:49 +00002646$as_echo "/* confdefs.h */" > confdefs.h
2647
Martin v. Löwis11437992002-04-12 09:54:03 +00002648# Predefined preprocessor variables.
2649
2650cat >>confdefs.h <<_ACEOF
2651#define PACKAGE_NAME "$PACKAGE_NAME"
2652_ACEOF
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654cat >>confdefs.h <<_ACEOF
2655#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2656_ACEOF
2657
Martin v. Löwis11437992002-04-12 09:54:03 +00002658cat >>confdefs.h <<_ACEOF
2659#define PACKAGE_VERSION "$PACKAGE_VERSION"
2660_ACEOF
2661
Martin v. Löwis11437992002-04-12 09:54:03 +00002662cat >>confdefs.h <<_ACEOF
2663#define PACKAGE_STRING "$PACKAGE_STRING"
2664_ACEOF
2665
Martin v. Löwis11437992002-04-12 09:54:03 +00002666cat >>confdefs.h <<_ACEOF
2667#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2668_ACEOF
2669
Matthias Kloseb9621712010-04-24 17:59:49 +00002670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_URL "$PACKAGE_URL"
2672_ACEOF
2673
Martin v. Löwis11437992002-04-12 09:54:03 +00002674
2675# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002676# Prefer an explicitly selected file to automatically selected ones.
2677ac_site_file1=NONE
2678ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002680 # We do not want a PATH search for config.site.
2681 case $CONFIG_SITE in #((
2682 -*) ac_site_file1=./$CONFIG_SITE;;
2683 */*) ac_site_file1=$CONFIG_SITE;;
2684 *) ac_site_file1=./$CONFIG_SITE;;
2685 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 ac_site_file1=$prefix/share/config.site
2688 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689else
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 ac_site_file1=$ac_default_prefix/share/config.site
2691 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002693for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694do
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 test "x$ac_site_file" = xNONE && continue
2696 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2698$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002700 . "$ac_site_file" \
2701 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2703as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002704See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002705 fi
2706done
2707
2708if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002709 # Some versions of bash will fail to source /dev/null (special files
2710 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2711 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2713$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2716 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 esac
2718 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002719else
Matthias Kloseb9621712010-04-24 17:59:49 +00002720 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2721$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 >$cache_file
2723fi
2724
2725# Check that the precious variables saved in the cache have kept the same
2726# value.
2727ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002728for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2730 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2732 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 case $ac_old_set,$ac_new_set in
2734 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2736$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 +00002737 ac_cache_corrupted=: ;;
2738 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2740$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 ac_cache_corrupted=: ;;
2742 ,);;
2743 *)
2744 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002745 # differences in whitespace do not lead to failure.
2746 ac_old_val_w=`echo x $ac_old_val`
2747 ac_new_val_w=`echo x $ac_new_val`
2748 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2750$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2751 ac_cache_corrupted=:
2752 else
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2754$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2755 eval $ac_var=\$ac_old_val
2756 fi
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2758$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2760$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 fi;;
2762 esac
2763 # Pass precious variables to config.status.
2764 if test "$ac_new_set" = set; then
2765 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002766 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 *) ac_arg=$ac_var=$ac_new_val ;;
2768 esac
2769 case " $ac_configure_args " in
2770 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002771 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 esac
2773 fi
2774done
2775if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002776 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2779$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002780 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002782## -------------------- ##
2783## Main body of script. ##
2784## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002785
Guido van Rossum7f43da71994-08-01 12:15:30 +00002786ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2790ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002791
Guido van Rossum627b2d71993-12-24 10:39:16 +00002792
Michael W. Hudson54241132001-12-07 15:38:26 +00002793
Trent Nelson4d4ec652012-10-16 08:51:24 -04002794
Trent Nelson5595ab52012-10-17 04:47:31 -04002795if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002796 # If we're building out-of-tree, we need to make sure the following
2797 # resources get picked up before their $srcdir counterparts.
2798 # Objects/ -> typeslots.inc
2799 # Include/ -> Python-ast.h, graminit.h
2800 # Python/ -> importlib.h
2801 # (A side effect of this is that these resources will automatically be
2802 # regenerated when building out-of-tree, regardless of whether or not
2803 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2804 # off.)
2805 BASECPPFLAGS="-IObjects -IInclude -IPython"
2806else
2807 BASECPPFLAGS=""
2808fi
2809
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002810
2811
2812
2813
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002814if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815then
2816# Extract the first word of "hg", so it can be a program name with args.
2817set dummy hg; ac_word=$2
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2819$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002820if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002821 $as_echo_n "(cached) " >&6
2822else
2823 if test -n "$HAS_HG"; then
2824 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2825else
2826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2827for as_dir in $PATH
2828do
2829 IFS=$as_save_IFS
2830 test -z "$as_dir" && as_dir=.
2831 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002833 ac_cv_prog_HAS_HG="found"
2834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2835 break 2
2836 fi
2837done
2838 done
2839IFS=$as_save_IFS
2840
2841 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2842fi
2843fi
2844HAS_HG=$ac_cv_prog_HAS_HG
2845if test -n "$HAS_HG"; then
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2847$as_echo "$HAS_HG" >&6; }
2848else
2849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2850$as_echo "no" >&6; }
2851fi
2852
2853
2854else
2855HAS_HG=no-repository
2856fi
2857if test $HAS_HG = found
2858then
2859 HGVERSION="hg id -i \$(srcdir)"
2860 HGTAG="hg id -t \$(srcdir)"
2861 HGBRANCH="hg id -b \$(srcdir)"
2862else
2863 HGVERSION=""
2864 HGTAG=""
2865 HGBRANCH=""
2866fi
2867
2868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002869ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002870
2871
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002872ac_aux_dir=
2873for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2874 if test -f "$ac_dir/install-sh"; then
2875 ac_aux_dir=$ac_dir
2876 ac_install_sh="$ac_aux_dir/install-sh -c"
2877 break
2878 elif test -f "$ac_dir/install.sh"; then
2879 ac_aux_dir=$ac_dir
2880 ac_install_sh="$ac_aux_dir/install.sh -c"
2881 break
2882 elif test -f "$ac_dir/shtool"; then
2883 ac_aux_dir=$ac_dir
2884 ac_install_sh="$ac_aux_dir/shtool install -c"
2885 break
2886 fi
2887done
2888if test -z "$ac_aux_dir"; then
2889 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2890fi
2891
2892# These three variables are undocumented and unsupported,
2893# and are intended to be withdrawn in a future Autoconf release.
2894# They can cause serious problems if a builder's source tree is in a directory
2895# whose full name contains unusual characters.
2896ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2897ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2898ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2899
2900
2901# Make sure we can run config.sub.
2902$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2903 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2904
2905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2906$as_echo_n "checking build system type... " >&6; }
2907if ${ac_cv_build+:} false; then :
2908 $as_echo_n "(cached) " >&6
2909else
2910 ac_build_alias=$build_alias
2911test "x$ac_build_alias" = x &&
2912 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2913test "x$ac_build_alias" = x &&
2914 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2915ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2916 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2917
2918fi
2919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2920$as_echo "$ac_cv_build" >&6; }
2921case $ac_cv_build in
2922*-*-*) ;;
2923*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2924esac
2925build=$ac_cv_build
2926ac_save_IFS=$IFS; IFS='-'
2927set x $ac_cv_build
2928shift
2929build_cpu=$1
2930build_vendor=$2
2931shift; shift
2932# Remember, the first character of IFS is used to create $*,
2933# except with old shells:
2934build_os=$*
2935IFS=$ac_save_IFS
2936case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2937
2938
2939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2940$as_echo_n "checking host system type... " >&6; }
2941if ${ac_cv_host+:} false; then :
2942 $as_echo_n "(cached) " >&6
2943else
2944 if test "x$host_alias" = x; then
2945 ac_cv_host=$ac_cv_build
2946else
2947 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2948 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2949fi
2950
2951fi
2952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2953$as_echo "$ac_cv_host" >&6; }
2954case $ac_cv_host in
2955*-*-*) ;;
2956*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2957esac
2958host=$ac_cv_host
2959ac_save_IFS=$IFS; IFS='-'
2960set x $ac_cv_host
2961shift
2962host_cpu=$1
2963host_vendor=$2
2964shift; shift
2965# Remember, the first character of IFS is used to create $*,
2966# except with old shells:
2967host_os=$*
2968IFS=$ac_save_IFS
2969case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2970
2971
2972
doko@python.orga10e4a92013-01-25 18:45:12 +01002973
2974
Ned Deilyfcbc2462014-08-22 13:32:49 -07002975# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2976rm -f pybuilddir.txt
2977
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002978if test "$cross_compiling" = yes; then
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2980$as_echo_n "checking for python interpreter for cross build... " >&6; }
2981 if test -z "$PYTHON_FOR_BUILD"; then
2982 for interp in python$PACKAGE_VERSION python3 python; do
2983 which $interp >/dev/null 2>&1 || continue
2984 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2985 break
2986 fi
2987 interp=
2988 done
2989 if test x$interp = x; then
2990 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2991 fi
2992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2993$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002994 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 +02002995 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002996elif test "$cross_compiling" = maybe; then
2997 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002998else
2999 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3000fi
3001
3002
Martin v. Löwis11437992002-04-12 09:54:03 +00003003
Benjamin Petersond23f8222009-04-05 19:13:16 +00003004if test "$prefix" != "/"; then
3005 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3006fi
3007
3008
Martin v. Löwis11437992002-04-12 09:54:03 +00003009
3010
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003011# We don't use PACKAGE_ variables, and they cause conflicts
3012# with other autoconf-based packages that include Python.h
3013grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3014rm confdefs.h
3015mv confdefs.h.new confdefs.h
3016
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003017
Yury Selivanov7aa53412015-05-30 10:57:56 -04003018VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003019
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003020# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003021
3022SOVERSION=1.0
3023
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003024# The later defininition of _XOPEN_SOURCE disables certain features
3025# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3026
Matthias Kloseb9621712010-04-24 17:59:49 +00003027$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003028
3029
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003030# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3031# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3032# them.
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003035
3036
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003037# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3038# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3039# them.
3040
Matthias Kloseb9621712010-04-24 17:59:49 +00003041$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003042
3043
Martin v. Löwisd6320502004-08-12 13:45:08 +00003044# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3045# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3046
Matthias Kloseb9621712010-04-24 17:59:49 +00003047$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003048
3049
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003050# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3051# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3052# them.
3053
Matthias Kloseb9621712010-04-24 17:59:49 +00003054$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003055
3056
3057
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003058define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003059
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003060# Arguments passed to configure.
3061
3062CONFIG_ARGS="$ac_configure_args"
3063
Matthias Kloseb9621712010-04-24 17:59:49 +00003064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3065$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003066# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003067if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003069 case $enableval in
3070 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071 # Locate the best usable SDK, see Mac/README.txt for more
3072 # information
3073 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003074 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003076 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3077 if test ! -d "${enableval}"
3078 then
3079 enableval=/
3080 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003081 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003082 ;;
3083 esac
3084 case $enableval in
3085 no)
3086 UNIVERSALSDK=
3087 enable_universalsdk=
3088 ;;
3089 *)
3090 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091 if test ! -d "${UNIVERSALSDK}"
3092 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003093 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003094 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003095 ;;
3096 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003097
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003098
Thomas Wouters477c8d52006-05-27 19:21:47 +00003099else
3100
3101 UNIVERSALSDK=
3102 enable_universalsdk=
3103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003105
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003106if test -n "${UNIVERSALSDK}"
3107then
Matthias Kloseb9621712010-04-24 17:59:49 +00003108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3109$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003110else
Matthias Kloseb9621712010-04-24 17:59:49 +00003111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3112$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003113fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003115
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003116
Ned Deily87adb6e2013-10-18 21:09:56 -07003117ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003118
Ned Deilycbfb9a52012-06-23 16:02:19 -07003119# For backward compatibility reasons we prefer to select '32-bit' if available,
3120# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003121UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003122if test "`uname -s`" = "Darwin"
3123then
3124 if test -n "${UNIVERSALSDK}"
3125 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003126 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003127 then
3128 UNIVERSAL_ARCHS="intel"
3129 fi
3130 fi
3131fi
3132
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003133
Matthias Kloseb9621712010-04-24 17:59:49 +00003134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3135$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003136
3137# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003138if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003139 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003140 UNIVERSAL_ARCHS="$withval"
3141
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142fi
3143
Ned Deily87adb6e2013-10-18 21:09:56 -07003144if test -n "${UNIVERSALSDK}"
3145then
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3147$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3148else
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3150$as_echo "no" >&6; }
3151fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003152
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003153
3154# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003155if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003156 withval=$with_framework_name;
3157 PYTHONFRAMEWORK=${withval}
3158 PYTHONFRAMEWORKDIR=${withval}.framework
3159 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3160
3161else
3162
3163 PYTHONFRAMEWORK=Python
3164 PYTHONFRAMEWORKDIR=Python.framework
3165 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3166
3167fi
3168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003170if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003172 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003173 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003174 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003175 esac
3176 case $enableval in
3177 no)
3178 PYTHONFRAMEWORK=
3179 PYTHONFRAMEWORKDIR=no-framework
3180 PYTHONFRAMEWORKPREFIX=
3181 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182 FRAMEWORKINSTALLFIRST=
3183 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003184 FRAMEWORKALTINSTALLFIRST=
3185 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003186 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003187 if test "x${prefix}" = "xNONE"; then
3188 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3189 else
3190 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3191 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003192 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003193 ;;
3194 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003195 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003198 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003199 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3200 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003201 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003202 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003203
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 if test "x${prefix}" = "xNONE" ; then
3205 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003206
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003207 else
3208 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3209 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003210
3211 case "${enableval}" in
3212 /System*)
3213 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3214 if test "${prefix}" = "NONE" ; then
3215 # See below
3216 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3217 fi
3218 ;;
3219
3220 /Library*)
3221 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3222 ;;
3223
3224 */Library/Frameworks)
3225 MDIR="`dirname "${enableval}"`"
3226 MDIR="`dirname "${MDIR}"`"
3227 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3228
3229 if test "${prefix}" = "NONE"; then
3230 # User hasn't specified the
3231 # --prefix option, but wants to install
3232 # the framework in a non-default location,
3233 # ensure that the compatibility links get
3234 # installed relative to that prefix as well
3235 # instead of in /usr/local.
3236 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3237 fi
3238 ;;
3239
3240 *)
3241 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3242 ;;
3243 esac
3244
Jack Jansen127e56e2001-09-11 14:41:54 +00003245 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003247 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003248 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003252
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003253 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3254
3255 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3256
Jack Jansene578a632001-08-15 01:27:14 +00003257 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003258
Guido van Rossum563e7081996-09-10 18:20:48 +00003259else
Martin v. Löwis11437992002-04-12 09:54:03 +00003260
Jack Jansene578a632001-08-15 01:27:14 +00003261 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003262 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003263 PYTHONFRAMEWORKPREFIX=
3264 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003265 FRAMEWORKINSTALLFIRST=
3266 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003267 FRAMEWORKALTINSTALLFIRST=
3268 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003269 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003270 if test "x${prefix}" = "xNONE" ; then
3271 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3272 else
3273 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3274 fi
Jack Jansene578a632001-08-15 01:27:14 +00003275 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278fi
3279
Thomas Wouters477c8d52006-05-27 19:21:47 +00003280
3281
Michael W. Hudson54241132001-12-07 15:38:26 +00003282
3283
3284
3285
Jack Jansene578a632001-08-15 01:27:14 +00003286
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003287
3288
3289
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003290
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003291
Ned Deilyb8f944f2013-11-21 22:42:25 -08003292
Jack Jansene578a632001-08-15 01:27:14 +00003293##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003294## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003295## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003296##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003297# Set name for machine-dependent library files
3298
Matthias Kloseb9621712010-04-24 17:59:49 +00003299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3300$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003301if test -z "$MACHDEP"
3302then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003303 # avoid using uname for cross builds
3304 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003305 # ac_sys_system and ac_sys_release are used for setting
3306 # a lot of different things including 'define_xopen_source'
3307 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003308 case "$host" in
3309 *-*-linux*)
3310 ac_sys_system=Linux
3311 ;;
3312 *-*-cygwin*)
3313 ac_sys_system=Cygwin
3314 ;;
3315 *)
3316 # for now, limit cross builds to known configurations
3317 MACHDEP="unknown"
3318 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3319 esac
3320 ac_sys_release=
3321 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003322 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003323 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003324 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003325 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003326 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003327 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003328 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003329 fi
3330 ac_md_system=`echo $ac_sys_system |
3331 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3332 ac_md_release=`echo $ac_sys_release |
3333 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3334 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003335
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003336 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003337 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003338 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003339 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003340 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003341 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003342 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003343fi
Guido van Rossum91922671997-10-09 20:24:13 +00003344
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003345
3346if test "$cross_compiling" = yes; then
3347 case "$host" in
3348 *-*-linux*)
3349 case "$host_cpu" in
3350 arm*)
3351 _host_cpu=arm
3352 ;;
3353 *)
3354 _host_cpu=$host_cpu
3355 esac
3356 ;;
3357 *-*-cygwin*)
3358 _host_cpu=
3359 ;;
3360 *)
3361 # for now, limit cross builds to known configurations
3362 MACHDEP="unknown"
3363 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3364 esac
3365 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3366fi
3367
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003368# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3369# disable features if it is defined, without any means to access these
3370# features as extensions. For these systems, we skip the definition of
3371# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3372# some feature, make sure there is no alternative way to access this
3373# feature. Also, when using wildcards, make sure you have verified the
3374# need for not defining _XOPEN_SOURCE on all systems matching the
3375# wildcard, and that the wildcard does not include future systems
3376# (which may remove their limitations).
3377case $ac_sys_system/$ac_sys_release in
3378 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3379 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003380 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003381 # In addition, Stefan Krah confirms that issue #1244610 exists through
3382 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003383 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003384 define_xopen_source=no
3385 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3386 # also defined. This can be overridden by defining _BSD_SOURCE
3387 # As this has a different meaning on Linux, only define it on OpenBSD
3388
Matthias Kloseb9621712010-04-24 17:59:49 +00003389$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003390
3391 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003392 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003393 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3394 # also defined. This can be overridden by defining _BSD_SOURCE
3395 # As this has a different meaning on Linux, only define it on OpenBSD
3396
Matthias Kloseb9621712010-04-24 17:59:49 +00003397$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003398
3399 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003400 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3401 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3402 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003403 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 +00003404 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003405 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3406 # request to enable features supported by the standard as a request
3407 # to disable features not supported by the standard. The best way
3408 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3409 # entirely and define __EXTENSIONS__ instead.
3410 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003411 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003412 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3413 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003414 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003415 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003416 define_xopen_source=no;;
3417 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003418 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003419 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003420 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003421 # On FreeBSD 4, the math functions C89 does not cover are never defined
3422 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3423 FreeBSD/4.*)
3424 define_xopen_source=no;;
3425 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3426 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3427 # identifies itself as Darwin/7.*
3428 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3429 # disables platform specific features beyond repair.
3430 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3431 # has no effect, don't bother defining them
3432 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003433 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003434 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003435 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003436 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3437 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3438 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003439 AIX/4)
3440 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003441 AIX/5)
3442 if test `uname -r` -eq 1; then
3443 define_xopen_source=no
3444 fi
3445 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003446 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3447 # defining NI_NUMERICHOST.
3448 QNX/6.3.2)
3449 define_xopen_source=no
3450 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003451
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003452esac
3453
3454if test $define_xopen_source = yes
3455then
Victor Stinner14d098d2011-09-07 22:29:43 +02003456 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003457
Victor Stinner14d098d2011-09-07 22:29:43 +02003458$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003459
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003460
3461 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3462 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3463 # several APIs are not declared. Since this is also needed in some
3464 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Matthias Kloseb9621712010-04-24 17:59:49 +00003466$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003467
3468
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003469
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003470$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003471
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003472fi
3473
Christian Heimes647cd872013-12-07 23:39:33 +01003474# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3475case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003476 hp*|HP*)
3477 define_stdc_a1=yes;;
3478 *)
3479 define_stdc_a1=no;;
3480esac
3481
3482if test $define_stdc_a1 = yes
3483then
Christian Heimes647cd872013-12-07 23:39:33 +01003484
3485$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3486
Christian Heimesb02bcae2013-12-08 15:21:08 +01003487fi
Christian Heimes647cd872013-12-07 23:39:33 +01003488
Guido van Rossum91922671997-10-09 20:24:13 +00003489#
3490# SGI compilers allow the specification of the both the ABI and the
3491# ISA on the command line. Depending on the values of these switches,
3492# different and often incompatable code will be generated.
3493#
3494# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3495# thus supply support for various ABI/ISA combinations. The MACHDEP
3496# variable is also adjusted.
3497#
3498
3499if test ! -z "$SGI_ABI"
3500then
3501 CC="cc $SGI_ABI"
3502 LDFLAGS="$SGI_ABI $LDFLAGS"
3503 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3506$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003507
Jack Jansen6b08a402004-06-03 12:41:45 +00003508# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3509# it may influence the way we can build extensions, so distutils
3510# needs to check it
3511
Thomas Wouters477c8d52006-05-27 19:21:47 +00003512
Jack Jansen6b08a402004-06-03 12:41:45 +00003513CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003514EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003515
Guido van Rossum627b2d71993-12-24 10:39:16 +00003516# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003517
3518# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3519# for debug/optimization stuff. BASECFLAGS is for flags that are required
3520# just to get things to compile and link. Users are free to override OPT
3521# when running configure or make. The build should not break if they do.
3522# BASECFLAGS should generally not be messed with, however.
3523
3524# XXX shouldn't some/most/all of this code be merged with the stuff later
3525# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3527$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003530if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003532 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003533 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003534 without_gcc=yes;;
3535 yes) CC=gcc
3536 without_gcc=no;;
3537 *) CC=$withval
3538 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003539 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003540else
Martin v. Löwis11437992002-04-12 09:54:03 +00003541
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003542 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003543 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003544 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003545 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003546 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547fi
3548
Matthias Kloseb9621712010-04-24 17:59:49 +00003549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3550$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003551
Guido van Rossum8b131c51995-03-09 14:10:13 +00003552# If the user switches compilers, we can't believe the cache
3553if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3554then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003555 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003556(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003557fi
3558
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003559# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3560# when the compiler supports them, but we don't always want -O2, and
3561# we set -g later.
3562if test -z "$CFLAGS"; then
3563 CFLAGS=
3564fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003565
3566if test "$ac_sys_system" = "Darwin"
3567then
3568 # Compiler selection on MacOSX is more complicated than
3569 # AC_PROG_CC can handle, see Mac/README.txt for more
3570 # information
3571 if test -z "${CC}"
3572 then
3573 found_gcc=
3574 found_clang=
3575 as_save_IFS=$IFS; IFS=:
3576 for as_dir in $PATH
3577 do
3578 IFS=$as_save_IFS
3579 if test -x $as_dir/gcc; then
3580 if test -z "${found_gcc}"; then
3581 found_gcc=$as_dir/gcc
3582 fi
3583 fi
3584 if test -x $as_dir/clang; then
3585 if test -z "${found_clang}"; then
3586 found_clang=$as_dir/clang
3587 fi
3588 fi
3589 done
3590 IFS=$as_save_IFS
3591
3592 if test -n "$found_gcc" -a -n "$found_clang"
3593 then
3594 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3595 then
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3597$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3598 CC="$found_clang"
3599 CXX="$found_clang++"
3600 fi
3601
3602
3603 elif test -z "$found_gcc" -a -n "$found_clang"
3604 then
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3606$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3607 CC="$found_clang"
3608 CXX="$found_clang++"
3609
3610 elif test -z "$found_gcc" -a -z "$found_clang"
3611 then
3612 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3613 if test -n "${found_clang}"
3614 then
3615 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3616$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3617 CC="${found_clang}"
3618 CXX="`/usr/bin/xcrun -find clang++`"
3619
3620 # else: use default behaviour
3621 fi
3622 fi
3623 fi
3624fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003625ac_ext=c
3626ac_cpp='$CPP $CPPFLAGS'
3627ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3628ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3629ac_compiler_gnu=$ac_cv_c_compiler_gnu
3630if test -n "$ac_tool_prefix"; then
3631 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3632set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3634$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003635if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003637else
3638 if test -n "$CC"; then
3639 ac_cv_prog_CC="$CC" # Let the user override the test.
3640else
Martin v. Löwis11437992002-04-12 09:54:03 +00003641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3642for as_dir in $PATH
3643do
3644 IFS=$as_save_IFS
3645 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003648 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 $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 +00003650 break 2
3651 fi
3652done
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003655
Jack Jansendd19cf82001-12-06 22:36:17 +00003656fi
3657fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003658CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003659if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3661$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003662else
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3664$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003665fi
3666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667
Martin v. Löwis11437992002-04-12 09:54:03 +00003668fi
3669if test -z "$ac_cv_prog_CC"; then
3670 ac_ct_CC=$CC
3671 # Extract the first word of "gcc", so it can be a program name with args.
3672set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3674$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003675if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
3678 if test -n "$ac_ct_CC"; then
3679 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3680else
3681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3682for as_dir in $PATH
3683do
3684 IFS=$as_save_IFS
3685 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 $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 +00003690 break 2
3691 fi
3692done
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003695
3696fi
3697fi
3698ac_ct_CC=$ac_cv_prog_ac_ct_CC
3699if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3701$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702else
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3704$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707 if test "x$ac_ct_CC" = x; then
3708 CC=""
3709 else
3710 case $cross_compiling:$ac_tool_warned in
3711yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714ac_tool_warned=yes ;;
3715esac
3716 CC=$ac_ct_CC
3717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003718else
3719 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003720fi
3721
Jack Jansendd19cf82001-12-06 22:36:17 +00003722if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723 if test -n "$ac_tool_prefix"; then
3724 # 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 +00003725set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3727$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003728if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003730else
3731 if test -n "$CC"; then
3732 ac_cv_prog_CC="$CC" # Let the user override the test.
3733else
Martin v. Löwis11437992002-04-12 09:54:03 +00003734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3735for as_dir in $PATH
3736do
3737 IFS=$as_save_IFS
3738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 $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 +00003743 break 2
3744 fi
3745done
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003748
3749fi
3750fi
3751CC=$ac_cv_prog_CC
3752if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3754$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003755else
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3757$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758fi
3759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
3763if test -z "$CC"; then
3764 # Extract the first word of "cc", so it can be a program name with args.
3765set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3767$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003768if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003770else
3771 if test -n "$CC"; then
3772 ac_cv_prog_CC="$CC" # Let the user override the test.
3773else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3776for as_dir in $PATH
3777do
3778 IFS=$as_save_IFS
3779 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3783 ac_prog_rejected=yes
3784 continue
3785 fi
3786 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 $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 +00003788 break 2
3789 fi
3790done
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003793
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794if test $ac_prog_rejected = yes; then
3795 # We found a bogon in the path, so make sure we never use it.
3796 set dummy $ac_cv_prog_CC
3797 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003799 # We chose a different compiler from the bogus one.
3800 # However, it has the same basename, so the bogon will be chosen
3801 # first if we set CC to just the basename; use the full file name.
3802 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003803 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003804 fi
3805fi
3806fi
3807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003808CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003809if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3811$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003812else
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003815fi
3816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818fi
3819if test -z "$CC"; then
3820 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003822 do
3823 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3824set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3826$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003827if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003829else
3830 if test -n "$CC"; then
3831 ac_cv_prog_CC="$CC" # Let the user override the test.
3832else
Martin v. Löwis11437992002-04-12 09:54:03 +00003833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3834for as_dir in $PATH
3835do
3836 IFS=$as_save_IFS
3837 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003839 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 $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 +00003842 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003844done
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003847
3848fi
3849fi
3850CC=$ac_cv_prog_CC
3851if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3853$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003854else
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3856$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003857fi
3858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 test -n "$CC" && break
3861 done
3862fi
3863if test -z "$CC"; then
3864 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003866do
3867 # Extract the first word of "$ac_prog", so it can be a program name with args.
3868set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3870$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003871if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003873else
3874 if test -n "$ac_ct_CC"; then
3875 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3876else
3877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878for as_dir in $PATH
3879do
3880 IFS=$as_save_IFS
3881 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 $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 +00003886 break 2
3887 fi
3888done
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003891
Martin v. Löwis11437992002-04-12 09:54:03 +00003892fi
3893fi
3894ac_ct_CC=$ac_cv_prog_ac_ct_CC
3895if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3897$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003898else
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3900$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003901fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 test -n "$ac_ct_CC" && break
3905done
Michael W. Hudson54241132001-12-07 15:38:26 +00003906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 if test "x$ac_ct_CC" = x; then
3908 CC=""
3909 else
3910 case $cross_compiling:$ac_tool_warned in
3911yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914ac_tool_warned=yes ;;
3915esac
3916 CC=$ac_ct_CC
3917 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003918fi
3919
3920fi
3921
3922
Matthias Kloseb9621712010-04-24 17:59:49 +00003923test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003925as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003926See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003927
3928# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003929$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3930set X $ac_compile
3931ac_compiler=$2
3932for ac_option in --version -v -V -qversion; do
3933 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939$as_echo "$ac_try_echo"; } >&5
3940 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 if test -s conftest.err; then
3943 sed '10a\
3944... rest of stderr output deleted ...
3945 10q' conftest.err >conftest.er1
3946 cat conftest.er1 >&5
3947 fi
3948 rm -f conftest.er1 conftest.err
3949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3950 test $ac_status = 0; }
3951done
Martin v. Löwis11437992002-04-12 09:54:03 +00003952
Matthias Kloseb9621712010-04-24 17:59:49 +00003953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003954/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003955
Martin v. Löwis11437992002-04-12 09:54:03 +00003956int
3957main ()
3958{
3959
3960 ;
3961 return 0;
3962}
3963_ACEOF
3964ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003965ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003966# Try to create an executable without -o first, disregard a.out.
3967# It will help us diagnose broken compilers, and finding out an intuition
3968# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3970$as_echo_n "checking whether the C compiler works... " >&6; }
3971ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3972
3973# The possible output files:
3974ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976ac_rmfiles=
3977for ac_file in $ac_files
3978do
3979 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3982 esac
3983done
3984rm -f $ac_rmfiles
3985
Matthias Kloseb9621712010-04-24 17:59:49 +00003986if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987case "(($ac_try" in
3988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3989 *) ac_try_echo=$ac_try;;
3990esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003991eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3992$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003994 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3996 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3998# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3999# in a Makefile. We should not override ac_cv_exeext if it was cached,
4000# so that the user can short-circuit this test for compilers unknown to
4001# Autoconf.
4002for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004003do
4004 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004005 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004006 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007 ;;
4008 [ab].out )
4009 # We found the default executable, but exeext='' is most
4010 # certainly right.
4011 break;;
4012 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 then :; else
4015 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4016 fi
4017 # We set ac_cv_exeext here because the later test for it is not
4018 # safe: cross compilers may not add the suffix if given an `-o'
4019 # argument, so we may need to know it at that point already.
4020 # Even if this section looks crufty: it has the advantage of
4021 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004022 break;;
4023 * )
4024 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 esac
4026done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027test "$ac_cv_exeext" = no && ac_cv_exeext=
4028
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004029else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030 ac_file=''
4031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004032if test -z "$ac_file"; then :
4033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4034$as_echo "no" >&6; }
4035$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004036sed 's/^/| /' conftest.$ac_ext >&5
4037
Matthias Kloseb9621712010-04-24 17:59:49 +00004038{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004040as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004041See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004042else
4043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4044$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4047$as_echo_n "checking for C compiler default output file name... " >&6; }
4048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4049$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051
Matthias Kloseb9621712010-04-24 17:59:49 +00004052rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4055$as_echo_n "checking for suffix of executables... " >&6; }
4056if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057case "(($ac_try" in
4058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059 *) ac_try_echo=$ac_try;;
4060esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004063 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004064 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4068# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4069# work properly (i.e., refer to `conftest.exe'), while it won't with
4070# `rm'.
4071for ac_file in conftest.exe conftest conftest.*; do
4072 test -f "$ac_file" || continue
4073 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004075 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4076 break;;
4077 * ) break;;
4078 esac
4079done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004080else
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004083as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004084See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004086rm -f conftest conftest$ac_cv_exeext
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4088$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004089
4090rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004091EXEEXT=$ac_cv_exeext
4092ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4094/* end confdefs.h. */
4095#include <stdio.h>
4096int
4097main ()
4098{
4099FILE *f = fopen ("conftest.out", "w");
4100 return ferror (f) || fclose (f) != 0;
4101
4102 ;
4103 return 0;
4104}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004106ac_clean_files="$ac_clean_files conftest.out"
4107# Check that the compiler produces executables we can run. If not, either
4108# the compiler is broken, or we cross compile.
4109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4110$as_echo_n "checking whether we are cross compiling... " >&6; }
4111if test "$cross_compiling" != yes; then
4112 { { ac_try="$ac_link"
4113case "(($ac_try" in
4114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4115 *) ac_try_echo=$ac_try;;
4116esac
4117eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4118$as_echo "$ac_try_echo"; } >&5
4119 (eval "$ac_link") 2>&5
4120 ac_status=$?
4121 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4122 test $ac_status = 0; }
4123 if { ac_try='./conftest$ac_cv_exeext'
4124 { { case "(($ac_try" in
4125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4126 *) ac_try_echo=$ac_try;;
4127esac
4128eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4129$as_echo "$ac_try_echo"; } >&5
4130 (eval "$ac_try") 2>&5
4131 ac_status=$?
4132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4133 test $ac_status = 0; }; }; then
4134 cross_compiling=no
4135 else
4136 if test "$cross_compiling" = maybe; then
4137 cross_compiling=yes
4138 else
4139 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004141as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004142If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004143See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 fi
4145 fi
4146fi
4147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4148$as_echo "$cross_compiling" >&6; }
4149
4150rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4151ac_clean_files=$ac_clean_files_save
4152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4153$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004154if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 $as_echo_n "(cached) " >&6
4156else
4157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004158/* end confdefs.h. */
4159
4160int
4161main ()
4162{
4163
4164 ;
4165 return 0;
4166}
4167_ACEOF
4168rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004169if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004170case "(($ac_try" in
4171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4172 *) ac_try_echo=$ac_try;;
4173esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004174eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4175$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004177 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4179 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180 for ac_file in conftest.o conftest.obj conftest.*; do
4181 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4185 break;;
4186 esac
4187done
4188else
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004190sed 's/^/| /' conftest.$ac_ext >&5
4191
Matthias Kloseb9621712010-04-24 17:59:49 +00004192{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004194as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004195See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004196fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004197rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4200$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004201OBJEXT=$ac_cv_objext
4202ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4204$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004205if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004207else
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004210
Martin v. Löwis11437992002-04-12 09:54:03 +00004211int
4212main ()
4213{
4214#ifndef __GNUC__
4215 choke me
4216#endif
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004223 ac_compiler_gnu=yes
4224else
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004228ac_cv_c_compiler_gnu=$ac_compiler_gnu
4229
4230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4232$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4233if test $ac_compiler_gnu = yes; then
4234 GCC=yes
4235else
4236 GCC=
4237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004238ac_test_CFLAGS=${CFLAGS+set}
4239ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4241$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004242if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004244else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245 ac_save_c_werror_flag=$ac_c_werror_flag
4246 ac_c_werror_flag=yes
4247 ac_cv_prog_cc_g=no
4248 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004251
Martin v. Löwis11437992002-04-12 09:54:03 +00004252int
4253main ()
4254{
4255
4256 ;
4257 return 0;
4258}
4259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004261 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262else
Matthias Kloseb9621712010-04-24 17:59:49 +00004263 CFLAGS=""
4264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265/* end confdefs.h. */
4266
4267int
4268main ()
4269{
4270
4271 ;
4272 return 0;
4273}
4274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004275if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276
Matthias Kloseb9621712010-04-24 17:59:49 +00004277else
4278 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281/* end confdefs.h. */
4282
4283int
4284main ()
4285{
4286
4287 ;
4288 return 0;
4289}
4290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004291if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4299 ac_c_werror_flag=$ac_save_c_werror_flag
4300fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4302$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004303if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004304 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004305elif test $ac_cv_prog_cc_g = yes; then
4306 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004307 CFLAGS="-g -O2"
4308 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004309 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004310 fi
4311else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004312 if test "$GCC" = yes; then
4313 CFLAGS="-O2"
4314 else
4315 CFLAGS=
4316 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4319$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004320if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004321 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004322else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004324ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004326/* end confdefs.h. */
4327#include <stdarg.h>
4328#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004329struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004330/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4331struct buf { int x; };
4332FILE * (*rcsopen) (struct buf *, struct stat *, int);
4333static char *e (p, i)
4334 char **p;
4335 int i;
4336{
4337 return p[i];
4338}
4339static char *f (char * (*g) (char **, int), char **p, ...)
4340{
4341 char *s;
4342 va_list v;
4343 va_start (v,p);
4344 s = g (p, va_arg (v,int));
4345 va_end (v);
4346 return s;
4347}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004348
4349/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4350 function prototypes and stuff, but not '\xHH' hex character constants.
4351 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004353 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4354 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004356int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4359 inside strings and character constants. */
4360#define FOO(x) 'x'
4361int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4362
Skip Montanaro6dead952003-09-25 14:50:04 +00004363int test (int i, double x);
4364struct s1 {int (*f) (int a);};
4365struct s2 {int (*f) (double a);};
4366int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4367int argc;
4368char **argv;
4369int
4370main ()
4371{
4372return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4373 ;
4374 return 0;
4375}
4376_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4378 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004379do
4380 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384rm -f core conftest.err conftest.$ac_objext
4385 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004386done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004388CC=$ac_save_CC
4389
4390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391# AC_CACHE_VAL
4392case "x$ac_cv_prog_cc_c89" in
4393 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4395$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4398$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004399 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4402$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004403esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004404if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004405
Matthias Kloseb9621712010-04-24 17:59:49 +00004406fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004407
Martin v. Löwis11437992002-04-12 09:54:03 +00004408ac_ext=c
4409ac_cpp='$CPP $CPPFLAGS'
4410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4412ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004413
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004414ac_ext=c
4415ac_cpp='$CPP $CPPFLAGS'
4416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4418ac_compiler_gnu=$ac_cv_c_compiler_gnu
4419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4420$as_echo_n "checking how to run the C preprocessor... " >&6; }
4421# On Suns, sometimes $CPP names a directory.
4422if test -n "$CPP" && test -d "$CPP"; then
4423 CPP=
4424fi
4425if test -z "$CPP"; then
4426 if ${ac_cv_prog_CPP+:} false; then :
4427 $as_echo_n "(cached) " >&6
4428else
4429 # Double quotes because CPP needs to be expanded
4430 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4431 do
4432 ac_preproc_ok=false
4433for ac_c_preproc_warn_flag in '' yes
4434do
4435 # Use a header file that comes with gcc, so configuring glibc
4436 # with a fresh cross-compiler works.
4437 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4438 # <limits.h> exists even on freestanding compilers.
4439 # On the NeXT, cc -E runs the code through the compiler's parser,
4440 # not just through cpp. "Syntax error" is here to catch this case.
4441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442/* end confdefs.h. */
4443#ifdef __STDC__
4444# include <limits.h>
4445#else
4446# include <assert.h>
4447#endif
4448 Syntax error
4449_ACEOF
4450if ac_fn_c_try_cpp "$LINENO"; then :
4451
4452else
4453 # Broken: fails on valid input.
4454continue
4455fi
4456rm -f conftest.err conftest.i conftest.$ac_ext
4457
4458 # OK, works on sane cases. Now check whether nonexistent headers
4459 # can be detected and how.
4460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4461/* end confdefs.h. */
4462#include <ac_nonexistent.h>
4463_ACEOF
4464if ac_fn_c_try_cpp "$LINENO"; then :
4465 # Broken: success on invalid input.
4466continue
4467else
4468 # Passes both tests.
4469ac_preproc_ok=:
4470break
4471fi
4472rm -f conftest.err conftest.i conftest.$ac_ext
4473
4474done
4475# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4476rm -f conftest.i conftest.err conftest.$ac_ext
4477if $ac_preproc_ok; then :
4478 break
4479fi
4480
4481 done
4482 ac_cv_prog_CPP=$CPP
4483
4484fi
4485 CPP=$ac_cv_prog_CPP
4486else
4487 ac_cv_prog_CPP=$CPP
4488fi
4489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4490$as_echo "$CPP" >&6; }
4491ac_preproc_ok=false
4492for ac_c_preproc_warn_flag in '' yes
4493do
4494 # Use a header file that comes with gcc, so configuring glibc
4495 # with a fresh cross-compiler works.
4496 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4497 # <limits.h> exists even on freestanding compilers.
4498 # On the NeXT, cc -E runs the code through the compiler's parser,
4499 # not just through cpp. "Syntax error" is here to catch this case.
4500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4501/* end confdefs.h. */
4502#ifdef __STDC__
4503# include <limits.h>
4504#else
4505# include <assert.h>
4506#endif
4507 Syntax error
4508_ACEOF
4509if ac_fn_c_try_cpp "$LINENO"; then :
4510
4511else
4512 # Broken: fails on valid input.
4513continue
4514fi
4515rm -f conftest.err conftest.i conftest.$ac_ext
4516
4517 # OK, works on sane cases. Now check whether nonexistent headers
4518 # can be detected and how.
4519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4520/* end confdefs.h. */
4521#include <ac_nonexistent.h>
4522_ACEOF
4523if ac_fn_c_try_cpp "$LINENO"; then :
4524 # Broken: success on invalid input.
4525continue
4526else
4527 # Passes both tests.
4528ac_preproc_ok=:
4529break
4530fi
4531rm -f conftest.err conftest.i conftest.$ac_ext
4532
4533done
4534# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4535rm -f conftest.i conftest.err conftest.$ac_ext
4536if $ac_preproc_ok; then :
4537
4538else
4539 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4541as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4542See \`config.log' for more details" "$LINENO" 5; }
4543fi
4544
4545ac_ext=c
4546ac_cpp='$CPP $CPPFLAGS'
4547ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4548ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4549ac_compiler_gnu=$ac_cv_c_compiler_gnu
4550
4551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4552$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4553if ${ac_cv_path_GREP+:} false; then :
4554 $as_echo_n "(cached) " >&6
4555else
4556 if test -z "$GREP"; then
4557 ac_path_GREP_found=false
4558 # Loop through the user's path and test for each of PROGNAME-LIST
4559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4560for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4561do
4562 IFS=$as_save_IFS
4563 test -z "$as_dir" && as_dir=.
4564 for ac_prog in grep ggrep; do
4565 for ac_exec_ext in '' $ac_executable_extensions; do
4566 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4567 as_fn_executable_p "$ac_path_GREP" || continue
4568# Check for GNU ac_path_GREP and select it if it is found.
4569 # Check for GNU $ac_path_GREP
4570case `"$ac_path_GREP" --version 2>&1` in
4571*GNU*)
4572 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4573*)
4574 ac_count=0
4575 $as_echo_n 0123456789 >"conftest.in"
4576 while :
4577 do
4578 cat "conftest.in" "conftest.in" >"conftest.tmp"
4579 mv "conftest.tmp" "conftest.in"
4580 cp "conftest.in" "conftest.nl"
4581 $as_echo 'GREP' >> "conftest.nl"
4582 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4583 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4584 as_fn_arith $ac_count + 1 && ac_count=$as_val
4585 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4586 # Best one so far, save it but keep looking for a better one
4587 ac_cv_path_GREP="$ac_path_GREP"
4588 ac_path_GREP_max=$ac_count
4589 fi
4590 # 10*(2^10) chars as input seems more than enough
4591 test $ac_count -gt 10 && break
4592 done
4593 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4594esac
4595
4596 $ac_path_GREP_found && break 3
4597 done
4598 done
4599 done
4600IFS=$as_save_IFS
4601 if test -z "$ac_cv_path_GREP"; then
4602 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4603 fi
4604else
4605 ac_cv_path_GREP=$GREP
4606fi
4607
4608fi
4609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4610$as_echo "$ac_cv_path_GREP" >&6; }
4611 GREP="$ac_cv_path_GREP"
4612
4613
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004614
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004615
4616
Matthias Kloseb9621712010-04-24 17:59:49 +00004617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4618$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004620# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004621if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004622 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623
4624 case $withval in
4625 no) with_cxx_main=no
4626 MAINCC='$(CC)';;
4627 yes) with_cxx_main=yes
4628 MAINCC='$(CXX)';;
4629 *) with_cxx_main=yes
4630 MAINCC=$withval
4631 if test -z "$CXX"
4632 then
4633 CXX=$withval
4634 fi;;
4635 esac
4636else
4637
4638 with_cxx_main=no
4639 MAINCC='$(CC)'
4640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004641fi
4642
Matthias Kloseb9621712010-04-24 17:59:49 +00004643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4644$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
4646preset_cxx="$CXX"
4647if test -z "$CXX"
4648then
4649 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004650 gcc) if test -n "$ac_tool_prefix"; then
4651 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4652set dummy ${ac_tool_prefix}g++; ac_word=$2
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654$as_echo_n "checking for $ac_word... " >&6; }
4655if ${ac_cv_path_CXX+:} false; then :
4656 $as_echo_n "(cached) " >&6
4657else
4658 case $CXX in
4659 [\\/]* | ?:[\\/]*)
4660 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4661 ;;
4662 *)
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in notfound
4665do
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
4668 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004670 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672 break 2
4673 fi
4674done
4675 done
4676IFS=$as_save_IFS
4677
4678 ;;
4679esac
4680fi
4681CXX=$ac_cv_path_CXX
4682if test -n "$CXX"; then
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4684$as_echo "$CXX" >&6; }
4685else
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687$as_echo "no" >&6; }
4688fi
4689
4690
4691fi
4692if test -z "$ac_cv_path_CXX"; then
4693 ac_pt_CXX=$CXX
4694 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004695set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004698if ${ac_cv_path_ac_pt_CXX+:} false; then :
4699 $as_echo_n "(cached) " >&6
4700else
4701 case $ac_pt_CXX in
4702 [\\/]* | ?:[\\/]*)
4703 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4704 ;;
4705 *)
4706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4707for as_dir in notfound
4708do
4709 IFS=$as_save_IFS
4710 test -z "$as_dir" && as_dir=.
4711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004713 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4715 break 2
4716 fi
4717done
4718 done
4719IFS=$as_save_IFS
4720
4721 ;;
4722esac
4723fi
4724ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4725if test -n "$ac_pt_CXX"; then
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4727$as_echo "$ac_pt_CXX" >&6; }
4728else
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730$as_echo "no" >&6; }
4731fi
4732
4733 if test "x$ac_pt_CXX" = x; then
4734 CXX="g++"
4735 else
4736 case $cross_compiling:$ac_tool_warned in
4737yes:)
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4739$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4740ac_tool_warned=yes ;;
4741esac
4742 CXX=$ac_pt_CXX
4743 fi
4744else
4745 CXX="$ac_cv_path_CXX"
4746fi
4747 ;;
4748 cc) if test -n "$ac_tool_prefix"; then
4749 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4750set dummy ${ac_tool_prefix}c++; ac_word=$2
4751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004753if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004755else
4756 case $CXX in
4757 [\\/]* | ?:[\\/]*)
4758 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4759 ;;
4760 *)
4761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4762for as_dir in notfound
4763do
4764 IFS=$as_save_IFS
4765 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 break 2
4771 fi
4772done
Matthias Kloseb9621712010-04-24 17:59:49 +00004773 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004774IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776 ;;
4777esac
4778fi
4779CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004780if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4782$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004783else
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4785$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788
4789fi
4790if test -z "$ac_cv_path_CXX"; then
4791 ac_pt_CXX=$CXX
4792 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4795$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 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 +00004802 ;;
4803 *)
4804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4805for as_dir in notfound
4806do
4807 IFS=$as_save_IFS
4808 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 break 2
4814 fi
4815done
Matthias Kloseb9621712010-04-24 17:59:49 +00004816 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004817IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819 ;;
4820esac
4821fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4823if test -n "$ac_pt_CXX"; then
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4825$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004826else
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004830
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004831 if test "x$ac_pt_CXX" = x; then
4832 CXX="c++"
4833 else
4834 case $cross_compiling:$ac_tool_warned in
4835yes:)
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4838ac_tool_warned=yes ;;
4839esac
4840 CXX=$ac_pt_CXX
4841 fi
4842else
4843 CXX="$ac_cv_path_CXX"
4844fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 clang|*/clang) if test -n "$ac_tool_prefix"; then
4847 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4848set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4850$as_echo_n "checking for $ac_word... " >&6; }
4851if ${ac_cv_path_CXX+:} false; then :
4852 $as_echo_n "(cached) " >&6
4853else
4854 case $CXX in
4855 [\\/]* | ?:[\\/]*)
4856 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4857 ;;
4858 *)
4859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4860for as_dir in notfound
4861do
4862 IFS=$as_save_IFS
4863 test -z "$as_dir" && as_dir=.
4864 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004866 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4868 break 2
4869 fi
4870done
4871 done
4872IFS=$as_save_IFS
4873
Ned Deilycbfb9a52012-06-23 16:02:19 -07004874 ;;
4875esac
4876fi
4877CXX=$ac_cv_path_CXX
4878if test -n "$CXX"; then
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4880$as_echo "$CXX" >&6; }
4881else
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4883$as_echo "no" >&6; }
4884fi
4885
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004886
4887fi
4888if test -z "$ac_cv_path_CXX"; then
4889 ac_pt_CXX=$CXX
4890 # Extract the first word of "clang++", so it can be a program name with args.
4891set dummy clang++; ac_word=$2
4892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4893$as_echo_n "checking for $ac_word... " >&6; }
4894if ${ac_cv_path_ac_pt_CXX+:} false; then :
4895 $as_echo_n "(cached) " >&6
4896else
4897 case $ac_pt_CXX in
4898 [\\/]* | ?:[\\/]*)
4899 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4900 ;;
4901 *)
4902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4903for as_dir in notfound
4904do
4905 IFS=$as_save_IFS
4906 test -z "$as_dir" && as_dir=.
4907 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004909 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4911 break 2
4912 fi
4913done
4914 done
4915IFS=$as_save_IFS
4916
4917 ;;
4918esac
4919fi
4920ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4921if test -n "$ac_pt_CXX"; then
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4923$as_echo "$ac_pt_CXX" >&6; }
4924else
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4926$as_echo "no" >&6; }
4927fi
4928
4929 if test "x$ac_pt_CXX" = x; then
4930 CXX="clang++"
4931 else
4932 case $cross_compiling:$ac_tool_warned in
4933yes:)
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4935$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4936ac_tool_warned=yes ;;
4937esac
4938 CXX=$ac_pt_CXX
4939 fi
4940else
4941 CXX="$ac_cv_path_CXX"
4942fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004943 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004944 esac
4945 if test "$CXX" = "notfound"
4946 then
4947 CXX=""
4948 fi
4949fi
4950if test -z "$CXX"
4951then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004952 if test -n "$ac_tool_prefix"; then
4953 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4954 do
4955 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4956set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4958$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004959if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004960 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004961else
4962 if test -n "$CXX"; then
4963 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4964else
4965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966for as_dir in $PATH
4967do
4968 IFS=$as_save_IFS
4969 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004970 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004972 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004974 break 2
4975 fi
4976done
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004978IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004979
4980fi
4981fi
4982CXX=$ac_cv_prog_CXX
4983if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4985$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004986else
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4988$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004989fi
4990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004991
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004992 test -n "$CXX" && break
4993 done
4994fi
4995if test -z "$CXX"; then
4996 ac_ct_CXX=$CXX
4997 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4998do
4999 # Extract the first word of "$ac_prog", so it can be a program name with args.
5000set dummy $ac_prog; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5004 $as_echo_n "(cached) " >&6
5005else
5006 if test -n "$ac_ct_CXX"; then
5007 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5008else
5009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012 IFS=$as_save_IFS
5013 test -z "$as_dir" && as_dir=.
5014 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005015 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005016 ac_cv_prog_ac_ct_CXX="$ac_prog"
5017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5018 break 2
5019 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005020done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005021 done
5022IFS=$as_save_IFS
5023
5024fi
5025fi
5026ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5027if test -n "$ac_ct_CXX"; then
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5029$as_echo "$ac_ct_CXX" >&6; }
5030else
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5032$as_echo "no" >&6; }
5033fi
5034
5035
5036 test -n "$ac_ct_CXX" && break
5037done
5038
5039 if test "x$ac_ct_CXX" = x; then
5040 CXX="notfound"
5041 else
5042 case $cross_compiling:$ac_tool_warned in
5043yes:)
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5045$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5046ac_tool_warned=yes ;;
5047esac
5048 CXX=$ac_ct_CXX
5049 fi
5050fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005051
5052 if test "$CXX" = "notfound"
5053 then
5054 CXX=""
5055 fi
5056fi
5057if test "$preset_cxx" != "$CXX"
5058then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005059 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060
5061 By default, distutils will build C++ extension modules with \"$CXX\".
5062 If this is not intended, then set CXX on the configure command line.
5063 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005064$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005065
5066 By default, distutils will build C++ extension modules with \"$CXX\".
5067 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005068 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005069fi
5070
5071
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005072MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5073
5074
5075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5076$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5077cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005078#undef bfin
5079#undef cris
5080#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005081#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005082#undef hppa
5083#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005084#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005085#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005086#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005087#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005088#undef unix
5089#if defined(__linux__)
5090# if defined(__x86_64__) && defined(__LP64__)
5091 x86_64-linux-gnu
5092# elif defined(__x86_64__) && defined(__ILP32__)
5093 x86_64-linux-gnux32
5094# elif defined(__i386__)
5095 i386-linux-gnu
5096# elif defined(__aarch64__) && defined(__AARCH64EL__)
5097# if defined(__ILP32__)
5098 aarch64_ilp32-linux-gnu
5099# else
5100 aarch64-linux-gnu
5101# endif
5102# elif defined(__aarch64__) && defined(__AARCH64EB__)
5103# if defined(__ILP32__)
5104 aarch64_be_ilp32-linux-gnu
5105# else
5106 aarch64_be-linux-gnu
5107# endif
5108# elif defined(__alpha__)
5109 alpha-linux-gnu
5110# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5111# if defined(__ARMEL__)
5112 arm-linux-gnueabihf
5113# else
5114 armeb-linux-gnueabihf
5115# endif
5116# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5117# if defined(__ARMEL__)
5118 arm-linux-gnueabi
5119# else
5120 armeb-linux-gnueabi
5121# endif
5122# elif defined(__hppa__)
5123 hppa-linux-gnu
5124# elif defined(__ia64__)
5125 ia64-linux-gnu
5126# elif defined(__m68k__) && !defined(__mcoldfire__)
5127 m68k-linux-gnu
5128# elif defined(__mips_hard_float) && defined(_MIPSEL)
5129# if _MIPS_SIM == _ABIO32
5130 mipsel-linux-gnu
5131# elif _MIPS_SIM == _ABIN32
5132 mips64el-linux-gnuabin32
5133# elif _MIPS_SIM == _ABI64
5134 mips64el-linux-gnuabi64
5135# else
5136# error unknown platform triplet
5137# endif
5138# elif defined(__mips_hard_float)
5139# if _MIPS_SIM == _ABIO32
5140 mips-linux-gnu
5141# elif _MIPS_SIM == _ABIN32
5142 mips64-linux-gnuabin32
5143# elif _MIPS_SIM == _ABI64
5144 mips64-linux-gnuabi64
5145# else
5146# error unknown platform triplet
5147# endif
5148# elif defined(__or1k__)
5149 or1k-linux-gnu
5150# elif defined(__powerpc__) && defined(__SPE__)
5151 powerpc-linux-gnuspe
5152# elif defined(__powerpc64__)
5153# if defined(__LITTLE_ENDIAN__)
5154 powerpc64le-linux-gnu
5155# else
5156 powerpc64-linux-gnu
5157# endif
5158# elif defined(__powerpc__)
5159 powerpc-linux-gnu
5160# elif defined(__s390x__)
5161 s390x-linux-gnu
5162# elif defined(__s390__)
5163 s390-linux-gnu
5164# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5165 sh4-linux-gnu
5166# elif defined(__sparc__) && defined(__arch64__)
5167 sparc64-linux-gnu
5168# elif defined(__sparc__)
5169 sparc-linux-gnu
5170# else
5171# error unknown platform triplet
5172# endif
5173#elif defined(__FreeBSD_kernel__)
5174# if defined(__LP64__)
5175 x86_64-kfreebsd-gnu
5176# elif defined(__i386__)
5177 i386-kfreebsd-gnu
5178# else
5179# error unknown platform triplet
5180# endif
5181#elif defined(__gnu_hurd__)
5182 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005183#elif defined(__APPLE__)
5184 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005185#else
5186# error unknown platform triplet
5187#endif
5188
5189EOF
5190
5191if $CPP conftest.c >conftest.out 2>/dev/null; then
5192 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5194$as_echo "$PLATFORM_TRIPLET" >&6; }
5195else
5196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5197$as_echo "none" >&6; }
5198fi
5199rm -f conftest.c conftest.out
5200
5201if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5202 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5203 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5204 fi
5205fi
5206PLATDIR=plat-$MACHDEP
5207
5208
5209
5210
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5212$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5213save_LDFLAGS="$LDFLAGS"
5214LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005215
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5217/* end confdefs.h. */
5218
5219int
5220main ()
5221{
5222
5223 ;
5224 return 0;
5225}
5226_ACEOF
5227if ac_fn_c_try_link "$LINENO"; then :
5228 NO_AS_NEEDED="-Wl,--no-as-needed"
5229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5230$as_echo "yes" >&6; }
5231else
5232 NO_AS_NEEDED=""
5233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5234$as_echo "no" >&6; }
5235fi
5236rm -f core conftest.err conftest.$ac_objext \
5237 conftest$ac_exeext conftest.$ac_ext
5238LDFLAGS="$save_LDFLAGS"
5239
5240
5241
5242# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005243
Matthias Kloseb9621712010-04-24 17:59:49 +00005244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5245$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005246if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005247 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005248else
5249 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5250 then ac_cv_path_EGREP="$GREP -E"
5251 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005252 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005253 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005254 # Loop through the user's path and test for each of PROGNAME-LIST
5255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005256for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5257do
5258 IFS=$as_save_IFS
5259 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005260 for ac_prog in egrep; do
5261 for ac_exec_ext in '' $ac_executable_extensions; do
5262 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005263 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005264# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005265 # Check for GNU $ac_path_EGREP
5266case `"$ac_path_EGREP" --version 2>&1` in
5267*GNU*)
5268 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5269*)
5270 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005271 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005272 while :
5273 do
5274 cat "conftest.in" "conftest.in" >"conftest.tmp"
5275 mv "conftest.tmp" "conftest.in"
5276 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005277 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005278 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5279 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005280 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005281 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5282 # Best one so far, save it but keep looking for a better one
5283 ac_cv_path_EGREP="$ac_path_EGREP"
5284 ac_path_EGREP_max=$ac_count
5285 fi
5286 # 10*(2^10) chars as input seems more than enough
5287 test $ac_count -gt 10 && break
5288 done
5289 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5290esac
5291
Matthias Kloseb9621712010-04-24 17:59:49 +00005292 $ac_path_EGREP_found && break 3
5293 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005294 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005295 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005296IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005297 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005298 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 +00005299 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005300else
5301 ac_cv_path_EGREP=$EGREP
5302fi
5303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005304 fi
5305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5307$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005308 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005309
5310
Matthias Kloseb9621712010-04-24 17:59:49 +00005311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5312$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005313if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005314 $as_echo_n "(cached) " >&6
5315else
5316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005317/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005318#include <stdlib.h>
5319#include <stdarg.h>
5320#include <string.h>
5321#include <float.h>
5322
5323int
5324main ()
5325{
5326
5327 ;
5328 return 0;
5329}
5330_ACEOF
5331if ac_fn_c_try_compile "$LINENO"; then :
5332 ac_cv_header_stdc=yes
5333else
5334 ac_cv_header_stdc=no
5335fi
5336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5337
5338if test $ac_cv_header_stdc = yes; then
5339 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5341/* end confdefs.h. */
5342#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005343
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005344_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005346 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005347
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005348else
Matthias Kloseb9621712010-04-24 17:59:49 +00005349 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005350fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005351rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
Matthias Kloseb9621712010-04-24 17:59:49 +00005353fi
5354
5355if test $ac_cv_header_stdc = yes; then
5356 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5358/* end confdefs.h. */
5359#include <stdlib.h>
5360
5361_ACEOF
5362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5363 $EGREP "free" >/dev/null 2>&1; then :
5364
5365else
5366 ac_cv_header_stdc=no
5367fi
5368rm -f conftest*
5369
5370fi
5371
5372if test $ac_cv_header_stdc = yes; then
5373 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5374 if test "$cross_compiling" = yes; then :
5375 :
5376else
5377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5378/* end confdefs.h. */
5379#include <ctype.h>
5380#include <stdlib.h>
5381#if ((' ' & 0x0FF) == 0x020)
5382# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5383# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5384#else
5385# define ISLOWER(c) \
5386 (('a' <= (c) && (c) <= 'i') \
5387 || ('j' <= (c) && (c) <= 'r') \
5388 || ('s' <= (c) && (c) <= 'z'))
5389# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5390#endif
5391
5392#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5393int
5394main ()
5395{
5396 int i;
5397 for (i = 0; i < 256; i++)
5398 if (XOR (islower (i), ISLOWER (i))
5399 || toupper (i) != TOUPPER (i))
5400 return 2;
5401 return 0;
5402}
5403_ACEOF
5404if ac_fn_c_try_run "$LINENO"; then :
5405
5406else
5407 ac_cv_header_stdc=no
5408fi
5409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5410 conftest.$ac_objext conftest.beam conftest.$ac_ext
5411fi
5412
5413fi
5414fi
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5416$as_echo "$ac_cv_header_stdc" >&6; }
5417if test $ac_cv_header_stdc = yes; then
5418
5419$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5420
5421fi
5422
5423# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5424for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5425 inttypes.h stdint.h unistd.h
5426do :
5427 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5428ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5429"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005430if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 cat >>confdefs.h <<_ACEOF
5432#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5433_ACEOF
5434
5435fi
5436
5437done
5438
5439
5440
5441 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 +02005442if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 MINIX=yes
5444else
5445 MINIX=
5446fi
5447
5448
5449 if test "$MINIX" = yes; then
5450
5451$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5452
5453
5454$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5455
5456
5457$as_echo "#define _MINIX 1" >>confdefs.h
5458
5459 fi
5460
5461
5462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5463$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005464if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 $as_echo_n "(cached) " >&6
5466else
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5468/* end confdefs.h. */
5469
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005470# define __EXTENSIONS__ 1
5471 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005472int
5473main ()
5474{
5475
5476 ;
5477 return 0;
5478}
5479_ACEOF
5480if ac_fn_c_try_compile "$LINENO"; then :
5481 ac_cv_safe_to_define___extensions__=yes
5482else
5483 ac_cv_safe_to_define___extensions__=no
5484fi
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486fi
5487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5488$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5489 test $ac_cv_safe_to_define___extensions__ = yes &&
5490 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5491
5492 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5493
5494 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5495
5496 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5497
5498 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5499
5500
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502# Check for unsupported systems
5503case $ac_sys_system/$ac_sys_release in
5504atheos*|Linux*/1*)
5505 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5506 echo See README for details.
5507 exit 1;;
5508esac
5509
5510
Matthias Kloseb9621712010-04-24 17:59:49 +00005511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5512$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513
5514# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005515if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516 withval=$with_suffix;
5517 case $withval in
5518 no) EXEEXT=;;
5519 yes) EXEEXT=.exe;;
5520 *) EXEEXT=$withval;;
5521 esac
5522fi
5523
Matthias Kloseb9621712010-04-24 17:59:49 +00005524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5525$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526
5527# Test whether we're running on a non-case-sensitive system, in which
5528# case we give a warning if no ext is given
5529
Matthias Kloseb9621712010-04-24 17:59:49 +00005530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5531$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532if test ! -d CaseSensitiveTestDir; then
5533mkdir CaseSensitiveTestDir
5534fi
5535
5536if test -d casesensitivetestdir
5537then
Matthias Kloseb9621712010-04-24 17:59:49 +00005538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5539$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540 BUILDEXEEXT=.exe
5541else
Matthias Kloseb9621712010-04-24 17:59:49 +00005542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544 BUILDEXEEXT=$EXEEXT
5545fi
5546rmdir CaseSensitiveTestDir
5547
5548case $MACHDEP in
5549bsdos*)
5550 case $CC in
5551 gcc) CC="$CC -D_HAVE_BSDI";;
5552 esac;;
5553esac
5554
5555case $ac_sys_system in
5556hp*|HP*)
5557 case $CC in
5558 cc|*/cc) CC="$CC -Ae";;
5559 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560esac
5561
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562
Matthias Kloseb9621712010-04-24 17:59:49 +00005563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5564$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565if test -z "$LIBRARY"
5566then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005567 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5570$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571
5572# LDLIBRARY is the name of the library to link against (as opposed to the
5573# name of the library into which to insert object files). BLDLIBRARY is also
5574# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5575# is blank as the main program is not linked directly against LDLIBRARY.
5576# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5577# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5578# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5579# DLLLIBRARY is the shared (i.e., DLL) library.
5580#
5581# RUNSHARED is used to run shared python without installed libraries
5582#
5583# INSTSONAME is the name of the shared library that will be use to install
5584# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005585#
5586# LDVERSION is the shared library version number, normally the Python version
5587# with the ABI build flags appended.
5588
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589
5590
5591
5592
5593
5594
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005595
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596LDLIBRARY="$LIBRARY"
5597BLDLIBRARY='$(LDLIBRARY)'
5598INSTSONAME='$(LDLIBRARY)'
5599DLLLIBRARY=''
5600LDLIBRARYDIR=''
5601RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005602LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603
5604# LINKCC is the command that links the python executable -- default is $(CC).
5605# If CXX is set, and if it is needed to link a main function that was
5606# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5607# python might then depend on the C++ runtime
5608# This is altered for AIX in order to build the export list before
5609# linking.
5610
Matthias Kloseb9621712010-04-24 17:59:49 +00005611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5612$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613if test -z "$LINKCC"
5614then
5615 LINKCC='$(PURIFY) $(MAINCC)'
5616 case $ac_sys_system in
5617 AIX*)
5618 exp_extra="\"\""
5619 if test $ac_sys_release -ge 5 -o \
5620 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5621 exp_extra="."
5622 fi
5623 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 QNX*)
5625 # qcc must be used because the other compilers do not
5626 # support -N.
5627 LINKCC=qcc;;
5628 esac
5629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5631$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632
5633# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5634# make sure we default having it set to "no": this is used by
5635# distutils.unixccompiler to know if it should add --enable-new-dtags
5636# to linker command lines, and failing to detect GNU ld simply results
5637# in the same bahaviour as before.
5638
Matthias Kloseb9621712010-04-24 17:59:49 +00005639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5640$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641ac_prog=ld
5642if test "$GCC" = yes; then
5643 ac_prog=`$CC -print-prog-name=ld`
5644fi
5645case `"$ac_prog" -V 2>&1 < /dev/null` in
5646 *GNU*)
5647 GNULD=yes;;
5648 *)
5649 GNULD=no;;
5650esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5652$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5655$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005656if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005657 $as_echo_n "(cached) " >&6
5658else
5659 ac_cv_c_inline=no
5660for ac_kw in inline __inline__ __inline; do
5661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5662/* end confdefs.h. */
5663#ifndef __cplusplus
5664typedef int foo_t;
5665static $ac_kw foo_t static_foo () {return 0; }
5666$ac_kw foo_t foo () {return 0; }
5667#endif
5668
5669_ACEOF
5670if ac_fn_c_try_compile "$LINENO"; then :
5671 ac_cv_c_inline=$ac_kw
5672fi
5673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674 test "$ac_cv_c_inline" != no && break
5675done
5676
5677fi
5678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5679$as_echo "$ac_cv_c_inline" >&6; }
5680
5681case $ac_cv_c_inline in
5682 inline | yes) ;;
5683 *)
5684 case $ac_cv_c_inline in
5685 no) ac_val=;;
5686 *) ac_val=$ac_cv_c_inline;;
5687 esac
5688 cat >>confdefs.h <<_ACEOF
5689#ifndef __cplusplus
5690#define inline $ac_val
5691#endif
5692_ACEOF
5693 ;;
5694esac
5695
5696if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005697
5698$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005699
5700
5701fi
5702
5703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5705$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005707if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 enableval=$enable_shared;
5709fi
5710
5711
5712if test -z "$enable_shared"
5713then
5714 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005715 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 enable_shared="yes";;
5717 *)
5718 enable_shared="no";;
5719 esac
5720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5722$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5725$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005727if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005728 enableval=$enable_profiling;
5729fi
5730
5731if test "x$enable_profiling" = xyes; then
5732 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005733 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735/* end confdefs.h. */
5736int main() { return 0; }
5737_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005738if ac_fn_c_try_link "$LINENO"; then :
5739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005741 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005743rm -f core conftest.err conftest.$ac_objext \
5744 conftest$ac_exeext conftest.$ac_ext
5745 CC="$ac_save_cc"
5746else
5747 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5750$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751
doko@ubuntu.comba015832012-06-30 16:52:05 +02005752if test "x$enable_profiling" = xyes; then
5753 BASECFLAGS="-pg $BASECFLAGS"
5754 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755fi
5756
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5758$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5761# library that we build, but we do not want to link against it (we
5762# will find it with a -framework option). For this reason there is an
5763# extra variable BLDLIBRARY against which Python and the extension
5764# modules are linked, BLDLIBRARY. This is normally the same as
5765# LDLIBRARY, but empty for MacOSX framework builds.
5766if test "$enable_framework"
5767then
5768 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005769 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 BLDLIBRARY=''
5771else
5772 BLDLIBRARY='$(LDLIBRARY)'
5773fi
5774
5775# Other platforms follow
5776if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005777 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
Matthias Kloseb9621712010-04-24 17:59:49 +00005779$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
5781 case $ac_sys_system in
5782 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005783 LDLIBRARY='libpython$(LDVERSION).dll.a'
5784 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785 ;;
5786 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005787 LDLIBRARY='libpython$(LDVERSION).so'
5788 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005789 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005791 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005792 then
5793 PY3LIBRARY=libpython3.so
5794 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005796 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005797 LDLIBRARY='libpython$(LDVERSION).so'
5798 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005799 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005801 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005802 then
5803 PY3LIBRARY=libpython3.so
5804 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 ;;
5806 hp*|HP*)
5807 case `uname -m` in
5808 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005809 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810 ;;
5811 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005812 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813 ;;
5814 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005815 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005816 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005819 LDLIBRARY='libpython$(LDVERSION).dylib'
5820 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005821 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005823 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005824 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005825 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005826 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827
5828 esac
5829else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005830 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831 case $ac_sys_system in
5832 CYGWIN*)
5833 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005834 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835 ;;
5836 esac
5837fi
5838
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005839if test "$cross_compiling" = yes; then
5840 RUNSHARED=
5841fi
5842
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5844$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845
5846if test -n "$ac_tool_prefix"; then
5847 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5848set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5850$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005851if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005852 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853else
5854 if test -n "$RANLIB"; then
5855 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5856else
5857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5858for as_dir in $PATH
5859do
5860 IFS=$as_save_IFS
5861 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005862 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005863 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005865 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866 break 2
5867 fi
5868done
Matthias Kloseb9621712010-04-24 17:59:49 +00005869 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870IFS=$as_save_IFS
5871
5872fi
5873fi
5874RANLIB=$ac_cv_prog_RANLIB
5875if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5877$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878else
Matthias Kloseb9621712010-04-24 17:59:49 +00005879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881fi
5882
5883
5884fi
5885if test -z "$ac_cv_prog_RANLIB"; then
5886 ac_ct_RANLIB=$RANLIB
5887 # Extract the first word of "ranlib", so it can be a program name with args.
5888set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5890$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005891if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005892 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893else
5894 if test -n "$ac_ct_RANLIB"; then
5895 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5896else
5897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5898for as_dir in $PATH
5899do
5900 IFS=$as_save_IFS
5901 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005902 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005903 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 break 2
5907 fi
5908done
Matthias Kloseb9621712010-04-24 17:59:49 +00005909 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910IFS=$as_save_IFS
5911
5912fi
5913fi
5914ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5915if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5917$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918else
Matthias Kloseb9621712010-04-24 17:59:49 +00005919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921fi
5922
5923 if test "x$ac_ct_RANLIB" = x; then
5924 RANLIB=":"
5925 else
5926 case $cross_compiling:$ac_tool_warned in
5927yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005928{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5929$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930ac_tool_warned=yes ;;
5931esac
5932 RANLIB=$ac_ct_RANLIB
5933 fi
5934else
5935 RANLIB="$ac_cv_prog_RANLIB"
5936fi
5937
5938
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005939if test -n "$ac_tool_prefix"; then
5940 for ac_prog in ar aal
5941 do
5942 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5943set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005946if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948else
5949 if test -n "$AR"; then
5950 ac_cv_prog_AR="$AR" # Let the user override the test.
5951else
5952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955 IFS=$as_save_IFS
5956 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005959 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 break 2
5962 fi
5963done
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965IFS=$as_save_IFS
5966
5967fi
5968fi
5969AR=$ac_cv_prog_AR
5970if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5972$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973else
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976fi
5977
5978
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005979 test -n "$AR" && break
5980 done
5981fi
5982if test -z "$AR"; then
5983 ac_ct_AR=$AR
5984 for ac_prog in ar aal
5985do
5986 # Extract the first word of "$ac_prog", so it can be a program name with args.
5987set dummy $ac_prog; ac_word=$2
5988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5989$as_echo_n "checking for $ac_word... " >&6; }
5990if ${ac_cv_prog_ac_ct_AR+:} false; then :
5991 $as_echo_n "(cached) " >&6
5992else
5993 if test -n "$ac_ct_AR"; then
5994 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5995else
5996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997for as_dir in $PATH
5998do
5999 IFS=$as_save_IFS
6000 test -z "$as_dir" && as_dir=.
6001 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006003 ac_cv_prog_ac_ct_AR="$ac_prog"
6004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6005 break 2
6006 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006008 done
6009IFS=$as_save_IFS
6010
6011fi
6012fi
6013ac_ct_AR=$ac_cv_prog_ac_ct_AR
6014if test -n "$ac_ct_AR"; then
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6016$as_echo "$ac_ct_AR" >&6; }
6017else
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6019$as_echo "no" >&6; }
6020fi
6021
6022
6023 test -n "$ac_ct_AR" && break
6024done
6025
6026 if test "x$ac_ct_AR" = x; then
6027 AR="ar"
6028 else
6029 case $cross_compiling:$ac_tool_warned in
6030yes:)
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6032$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6033ac_tool_warned=yes ;;
6034esac
6035 AR=$ac_ct_AR
6036 fi
6037fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038
6039
6040# tweak ARFLAGS only if the user didn't set it on the command line
6041
6042if test -z "$ARFLAGS"
6043then
6044 ARFLAGS="rc"
6045fi
6046
doko@ubuntu.com58844492012-06-30 18:25:32 +02006047if test -n "$ac_tool_prefix"; then
6048 for ac_prog in readelf
6049 do
6050 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6051set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
6054if ${ac_cv_prog_READELF+:} false; then :
6055 $as_echo_n "(cached) " >&6
6056else
6057 if test -n "$READELF"; then
6058 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6059else
6060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063 IFS=$as_save_IFS
6064 test -z "$as_dir" && as_dir=.
6065 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006066 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006067 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069 break 2
6070 fi
6071done
6072 done
6073IFS=$as_save_IFS
6074
6075fi
6076fi
6077READELF=$ac_cv_prog_READELF
6078if test -n "$READELF"; then
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6080$as_echo "$READELF" >&6; }
6081else
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083$as_echo "no" >&6; }
6084fi
6085
6086
6087 test -n "$READELF" && break
6088 done
6089fi
6090if test -z "$READELF"; then
6091 ac_ct_READELF=$READELF
6092 for ac_prog in readelf
6093do
6094 # Extract the first word of "$ac_prog", so it can be a program name with args.
6095set dummy $ac_prog; ac_word=$2
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6097$as_echo_n "checking for $ac_word... " >&6; }
6098if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6099 $as_echo_n "(cached) " >&6
6100else
6101 if test -n "$ac_ct_READELF"; then
6102 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6103else
6104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6105for as_dir in $PATH
6106do
6107 IFS=$as_save_IFS
6108 test -z "$as_dir" && as_dir=.
6109 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006111 ac_cv_prog_ac_ct_READELF="$ac_prog"
6112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6113 break 2
6114 fi
6115done
6116 done
6117IFS=$as_save_IFS
6118
6119fi
6120fi
6121ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6122if test -n "$ac_ct_READELF"; then
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6124$as_echo "$ac_ct_READELF" >&6; }
6125else
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6127$as_echo "no" >&6; }
6128fi
6129
6130
6131 test -n "$ac_ct_READELF" && break
6132done
6133
6134 if test "x$ac_ct_READELF" = x; then
6135 READELF=":"
6136 else
6137 case $cross_compiling:$ac_tool_warned in
6138yes:)
6139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6141ac_tool_warned=yes ;;
6142esac
6143 READELF=$ac_ct_READELF
6144 fi
6145fi
6146
6147if test "$cross_compiling" = yes; then
6148 case "$READELF" in
6149 readelf|:)
6150 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6151 ;;
6152 esac
6153fi
6154
6155
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156
Matthias Klosec4c48422012-10-21 23:05:35 +02006157for ac_prog in python$PACKAGE_VERSION python3 python
6158do
6159 # Extract the first word of "$ac_prog", so it can be a program name with args.
6160set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6162$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006163if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006164 $as_echo_n "(cached) " >&6
6165else
Matthias Klosec4c48422012-10-21 23:05:35 +02006166 if test -n "$PYTHON"; then
6167 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006168else
6169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH
6171do
6172 IFS=$as_save_IFS
6173 test -z "$as_dir" && as_dir=.
6174 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006176 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6178 break 2
6179 fi
6180done
6181 done
6182IFS=$as_save_IFS
6183
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006184fi
6185fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006186PYTHON=$ac_cv_prog_PYTHON
6187if test -n "$PYTHON"; then
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6189$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006190else
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6192$as_echo "no" >&6; }
6193fi
6194
6195
Matthias Klosec4c48422012-10-21 23:05:35 +02006196 test -n "$PYTHON" && break
6197done
6198test -n "$PYTHON" || PYTHON="not-found"
6199
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006200if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006201 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6202else
6203 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006204fi
6205
6206
Kushal Das02d23a22014-04-15 23:50:06 +05306207for ac_prog in python$PACKAGE_VERSION python3 python
6208do
6209 # Extract the first word of "$ac_prog", so it can be a program name with args.
6210set dummy $ac_prog; ac_word=$2
6211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6212$as_echo_n "checking for $ac_word... " >&6; }
6213if ${ac_cv_prog_PYTHON+:} false; then :
6214 $as_echo_n "(cached) " >&6
6215else
6216 if test -n "$PYTHON"; then
6217 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6218else
6219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6220for as_dir in $PATH
6221do
6222 IFS=$as_save_IFS
6223 test -z "$as_dir" && as_dir=.
6224 for ac_exec_ext in '' $ac_executable_extensions; do
6225 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6226 ac_cv_prog_PYTHON="$ac_prog"
6227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6228 break 2
6229 fi
6230done
6231 done
6232IFS=$as_save_IFS
6233
6234fi
6235fi
6236PYTHON=$ac_cv_prog_PYTHON
6237if test -n "$PYTHON"; then
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6239$as_echo "$PYTHON" >&6; }
6240else
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242$as_echo "no" >&6; }
6243fi
6244
6245
6246 test -n "$PYTHON" && break
6247done
6248test -n "$PYTHON" || PYTHON="not-found"
6249
6250if test "$PYTHON" = not-found; then
6251 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6252else
6253 OPCODEHGEN="$PYTHON"
6254fi
6255
6256
6257
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258case $MACHDEP in
6259bsdos*|hp*|HP*)
6260 # install -d does not work on BSDI or HP-UX
6261 if test -z "$INSTALL"
6262 then
6263 INSTALL="${srcdir}/install-sh -c"
6264 fi
6265esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266# Find a good install program. We prefer a C program (faster),
6267# so one script is as good as another. But avoid the broken or
6268# incompatible versions:
6269# SysV /etc/install, /usr/sbin/install
6270# SunOS /usr/etc/install
6271# IRIX /sbin/install
6272# AIX /bin/install
6273# AmigaOS /C/install, which installs bootblocks on floppy discs
6274# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6275# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6276# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6277# OS/2's system install, which has a completely different semantic
6278# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006279# Reject install programs that cannot install multiple files.
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6281$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006283if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006284 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285else
6286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287for as_dir in $PATH
6288do
6289 IFS=$as_save_IFS
6290 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006291 # Account for people who put trailing slashes in PATH elements.
6292case $as_dir/ in #((
6293 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296 /usr/ucb/* ) ;;
6297 *)
6298 # OSF1 and SCO ODT 3.0 have their own names for install.
6299 # Don't use installbsd from OSF since it installs stuff as root
6300 # by default.
6301 for ac_prog in ginstall scoinst install; do
6302 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006303 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006304 if test $ac_prog = install &&
6305 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6306 # AIX install. It has an incompatible calling convention.
6307 :
6308 elif test $ac_prog = install &&
6309 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6310 # program-specific install script used by HP pwplus--don't use.
6311 :
6312 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006313 rm -rf conftest.one conftest.two conftest.dir
6314 echo one > conftest.one
6315 echo two > conftest.two
6316 mkdir conftest.dir
6317 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6318 test -s conftest.one && test -s conftest.two &&
6319 test -s conftest.dir/conftest.one &&
6320 test -s conftest.dir/conftest.two
6321 then
6322 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6323 break 3
6324 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 fi
6326 fi
6327 done
6328 done
6329 ;;
6330esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006331
6332 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333IFS=$as_save_IFS
6334
Matthias Kloseb9621712010-04-24 17:59:49 +00006335rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336
6337fi
6338 if test "${ac_cv_path_install+set}" = set; then
6339 INSTALL=$ac_cv_path_install
6340 else
6341 # As a last resort, use the slow shell script. Don't cache a
6342 # value for INSTALL within a source directory, because that will
6343 # break other packages using the cache if that directory is
6344 # removed, or if the value is a relative name.
6345 INSTALL=$ac_install_sh
6346 fi
6347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6349$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350
6351# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6352# It thinks the first close brace ends the variable substitution.
6353test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6354
6355test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6356
6357test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6358
Matthias Klose93a0ef12012-03-15 18:08:34 +01006359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6360$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6361if test -z "$MKDIR_P"; then
6362 if ${ac_cv_path_mkdir+:} false; then :
6363 $as_echo_n "(cached) " >&6
6364else
6365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6366for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6367do
6368 IFS=$as_save_IFS
6369 test -z "$as_dir" && as_dir=.
6370 for ac_prog in mkdir gmkdir; do
6371 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006372 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006373 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6374 'mkdir (GNU coreutils) '* | \
6375 'mkdir (coreutils) '* | \
6376 'mkdir (fileutils) '4.1*)
6377 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6378 break 3;;
6379 esac
6380 done
6381 done
6382 done
6383IFS=$as_save_IFS
6384
6385fi
6386
6387 test -d ./--version && rmdir ./--version
6388 if test "${ac_cv_path_mkdir+set}" = set; then
6389 MKDIR_P="$ac_cv_path_mkdir -p"
6390 else
6391 # As a last resort, use the slow shell script. Don't cache a
6392 # value for MKDIR_P within a source directory, because that will
6393 # break other packages using the cache if that directory is
6394 # removed, or if the value is a relative name.
6395 MKDIR_P="$ac_install_sh -d"
6396 fi
6397fi
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6399$as_echo "$MKDIR_P" >&6; }
6400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401
6402# Not every filesystem supports hard links
6403
6404if test -z "$LN" ; then
6405 case $ac_sys_system in
6406 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006407 *) LN=ln;;
6408 esac
6409fi
6410
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006411# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006412
6413ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006414
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6417$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418
6419# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006420if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421 withval=$with_pydebug;
6422if test "$withval" != no
6423then
6424
Matthias Kloseb9621712010-04-24 17:59:49 +00006425$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426
Matthias Kloseb9621712010-04-24 17:59:49 +00006427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6428$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006430 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006431else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433fi
6434else
Matthias Kloseb9621712010-04-24 17:59:49 +00006435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437fi
6438
6439
Brett Cannon7188a3e2015-09-18 15:13:44 -07006440# Enable PGO flags.
6441# Extract the first word of "llvm-profdata", so it can be a program name with args.
6442set dummy llvm-profdata; ac_word=$2
6443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6444$as_echo_n "checking for $ac_word... " >&6; }
6445if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6446 $as_echo_n "(cached) " >&6
6447else
6448 if test -n "$LLVM_PROF_FOUND"; then
6449 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6450else
6451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452for as_dir in $PATH
6453do
6454 IFS=$as_save_IFS
6455 test -z "$as_dir" && as_dir=.
6456 for ac_exec_ext in '' $ac_executable_extensions; do
6457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6458 ac_cv_prog_LLVM_PROF_FOUND="found"
6459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6460 break 2
6461 fi
6462done
6463 done
6464IFS=$as_save_IFS
6465
6466 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6467fi
6468fi
6469LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6470if test -n "$LLVM_PROF_FOUND"; then
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6472$as_echo "$LLVM_PROF_FOUND" >&6; }
6473else
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475$as_echo "no" >&6; }
6476fi
6477
6478
6479LLVM_PROF_ERR=no
6480case $CC in
6481 *clang*)
6482 # Any changes made here should be reflected in the GCC+Darwin case below
6483 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6484 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6485 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6486 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6487 if test $LLVM_PROF_FOUND = not-found
6488 then
6489 LLVM_PROF_ERR=yes
6490 fi
6491 ;;
6492 *gcc*)
6493 case $ac_sys_system in
6494 Darwin*)
6495 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6496 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6497 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6498 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6499 if test $LLVM_PROF_FOUND = not-found
6500 then
6501 LLVM_PROF_ERR=yes
6502 fi
6503 ;;
6504 *)
6505 PGO_PROF_GEN_FLAG="-fprofile-generate"
6506 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6507 LLVM_PROF_MERGER="true"
6508 LLVM_PROF_FILE=""
6509 ;;
6510 esac
6511 ;;
6512esac
6513
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6515# merged with this chunk of code?
6516
6517# Optimizer/debugger flags
6518# ------------------------
6519# (The following bit of code is complicated enough - please keep things
6520# indented properly. Just pretend you're editing Python code. ;-)
6521
6522# There are two parallel sets of case statements below, one that checks to
6523# see if OPT was set and one that does BASECFLAGS setting based upon
6524# compiler and platform. BASECFLAGS tweaks need to be made even if the
6525# user set OPT.
6526
6527# tweak OPT based on compiler and platform, only if the user didn't set
6528# it on the command line
6529
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006530if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006531then
6532 case $GCC in
6533 yes)
6534 if test "$CC" != 'g++' ; then
6535 STRICT_PROTO="-Wstrict-prototypes"
6536 fi
6537 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6538 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6539 WRAP="-fwrapv"
6540 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006541
6542 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006543 case $CC in
6544 *clang*) WRAP="-fwrapv"
6545 ;;
6546 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006547
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006548 case $ac_cv_prog_cc_g in
6549 yes)
6550 if test "$Py_DEBUG" = 'true' ; then
6551 # Optimization messes up debuggers, so turn it off for
6552 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006553 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6554 OPT="-g -Og -Wall $STRICT_PROTO"
6555 else
6556 OPT="-g -O0 -Wall $STRICT_PROTO"
6557 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558 else
6559 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6560 fi
6561 ;;
6562 *)
6563 OPT="-O3 -Wall $STRICT_PROTO"
6564 ;;
6565 esac
6566 case $ac_sys_system in
6567 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6568 ;;
6569 esac
6570 ;;
6571
6572 *)
6573 OPT="-O"
6574 ;;
6575 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006576fi
6577
6578
6579
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006580
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006581# The -arch flags for universal builds on OSX
6582UNIVERSAL_ARCH_FLAGS=
6583
6584
6585# tweak BASECFLAGS based on compiler and platform
6586case $GCC in
6587yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006588 # Python doesn't violate C99 aliasing rules, but older versions of
6589 # GCC produce warnings for legal Python code. Enable
6590 # -fno-strict-aliasing on versions of GCC that support but produce
6591 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6593$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006594 ac_save_cc="$CC"
6595 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006596 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006597 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006598 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006599else
Matthias Kloseb9621712010-04-24 17:59:49 +00006600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006602
Matthias Kloseb159a552010-04-25 21:00:44 +00006603
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006604int
6605main ()
6606{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006607
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006608 ;
6609 return 0;
6610}
Matthias Kloseb159a552010-04-25 21:00:44 +00006611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006613if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006614
6615 CC="$ac_save_cc -fstrict-aliasing"
6616 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006618/* end confdefs.h. */
6619
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006620 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006621int
6622main ()
6623{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006624double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006625 ;
6626 return 0;
6627}
Matthias Kloseb159a552010-04-25 21:00:44 +00006628
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006630if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006631
6632 ac_cv_no_strict_aliasing=no
6633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006634else
Matthias Kloseb159a552010-04-25 21:00:44 +00006635
6636 ac_cv_no_strict_aliasing=yes
6637
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006638fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006640
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006641else
Matthias Kloseb159a552010-04-25 21:00:44 +00006642
6643 ac_cv_no_strict_aliasing=no
6644
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006645fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006647fi
6648
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006649 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6652$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006653 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006654 then
6655 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6656 fi
6657
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6659$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6660 ac_save_cc="$CC"
6661 CC="$CC -Wunused-result -Werror"
6662 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006663 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006664 $as_echo_n "(cached) " >&6
6665else
6666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6667/* end confdefs.h. */
6668
6669
6670int
6671main ()
6672{
6673
6674 ;
6675 return 0;
6676}
6677
6678_ACEOF
6679if ac_fn_c_try_compile "$LINENO"; then :
6680
6681 ac_cv_disable_unused_result_warning=yes
6682
6683else
6684
6685 ac_cv_disable_unused_result_warning=no
6686
6687fi
6688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6689fi
6690
6691 CFLAGS="$save_CFLAGS"
6692 CC="$ac_save_cc"
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6694$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6695
6696 if test $ac_cv_disable_unused_result_warning = yes
6697 then
6698 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6699 fi
6700
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6702$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6703 ac_save_cc="$CC"
6704 CC="$CC -Werror=declaration-after-statement"
6705 save_CFLAGS="$CFLAGS"
6706 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6707 $as_echo_n "(cached) " >&6
6708else
6709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6710/* end confdefs.h. */
6711
6712
6713int
6714main ()
6715{
6716
6717 ;
6718 return 0;
6719}
6720
6721_ACEOF
6722if ac_fn_c_try_compile "$LINENO"; then :
6723
6724 ac_cv_declaration_after_statement_warning=yes
6725
6726else
6727
6728 ac_cv_declaration_after_statement_warning=no
6729
6730fi
6731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6732fi
6733
6734 CFLAGS="$save_CFLAGS"
6735 CC="$ac_save_cc"
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6737$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6738
6739 if test $ac_cv_declaration_after_statement_warning = yes
6740 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006741 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006742 fi
6743
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6745$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6746 ac_save_cc="$CC"
6747 CC="$CC -Wsign-compare"
6748 save_CFLAGS="$CFLAGS"
6749 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6750 $as_echo_n "(cached) " >&6
6751else
6752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6753/* end confdefs.h. */
6754
6755
6756int
6757main ()
6758{
6759
6760 ;
6761 return 0;
6762}
6763
6764_ACEOF
6765if ac_fn_c_try_compile "$LINENO"; then :
6766
6767 ac_cv_enable_sign_compare_warning=yes
6768
6769else
6770
6771 ac_cv_enable_sign_compare_warning=no
6772
6773fi
6774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6775fi
6776
6777 CFLAGS="$save_CFLAGS"
6778 CC="$ac_save_cc"
6779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6780$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6781
6782 if test $ac_cv_enable_sign_compare_warning = yes
6783 then
6784 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6785 fi
6786
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6788$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6789 ac_save_cc="$CC"
6790 CC="$CC -Wunreachable-code"
6791 save_CFLAGS="$CFLAGS"
6792 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6793 $as_echo_n "(cached) " >&6
6794else
6795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6796/* end confdefs.h. */
6797
6798
6799int
6800main ()
6801{
6802
6803 ;
6804 return 0;
6805}
6806
6807_ACEOF
6808if ac_fn_c_try_compile "$LINENO"; then :
6809
6810 ac_cv_enable_unreachable_code_warning=yes
6811
6812else
6813
6814 ac_cv_enable_unreachable_code_warning=no
6815
6816fi
6817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6818fi
6819
6820 CFLAGS="$save_CFLAGS"
6821 CC="$ac_save_cc"
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6823$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6824
6825 # Don't enable unreachable code warning in debug mode, since it usually
6826 # results in non-standard code paths.
6827 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6828 then
6829 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6830 fi
6831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6833 # support. Without this, treatment of subnormals doesn't follow
6834 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006835 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836 alpha*)
6837 BASECFLAGS="$BASECFLAGS -mieee"
6838 ;;
6839 esac
6840
6841 case $ac_sys_system in
6842 SCO_SV*)
6843 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6844 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006845
6846 # is there any other compiler on Darwin besides gcc?
6847 Darwin*)
6848 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6849 # used to be here, but non-Apple gcc doesn't accept them.
6850 if test "${CC}" = gcc
6851 then
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006853$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006854 case "${UNIVERSALSDK}" in
6855 */MacOSX10.4u.sdk)
6856 # Build using 10.4 SDK, force usage of gcc when the
6857 # compiler is gcc, otherwise the user will get very
6858 # confusing error messages when building on OSX 10.6
6859 CC=gcc-4.0
6860 CPP=cpp-4.0
6861 ;;
6862 esac
6863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006864$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006865 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866
Ned Deily87adb6e2013-10-18 21:09:56 -07006867 if test "${enable_universalsdk}"
6868 then
6869 case "$UNIVERSAL_ARCHS" in
6870 32-bit)
6871 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6872 LIPO_32BIT_FLAGS=""
6873 ARCH_RUN_32BIT=""
6874 ;;
6875 64-bit)
6876 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6877 LIPO_32BIT_FLAGS=""
6878 ARCH_RUN_32BIT="true"
6879 ;;
6880 all)
6881 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6882 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6883 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6884 ;;
6885 intel)
6886 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6887 LIPO_32BIT_FLAGS="-extract i386"
6888 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6889 ;;
6890 intel-32)
6891 UNIVERSAL_ARCH_FLAGS="-arch i386"
6892 LIPO_32BIT_FLAGS=""
6893 ARCH_RUN_32BIT=""
6894 ;;
6895 3-way)
6896 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6897 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6898 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6899 ;;
6900 *)
6901 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6902 ;;
6903 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904
Ned Deily87adb6e2013-10-18 21:09:56 -07006905 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6906 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6907 if test "${UNIVERSALSDK}" != "/"
6908 then
6909 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6910 fi
6911 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912
Ned Deily87adb6e2013-10-18 21:09:56 -07006913 # Calculate an appropriate deployment target for this build:
6914 # The deployment target value is used explicitly to enable certain
6915 # features are enabled (such as builtin libedit support for readline)
6916 # through the use of Apple's Availabiliy Macros and is used as a
6917 # component of the string returned by distutils.get_platform().
6918 #
6919 # Use the value from:
6920 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6921 # 2. the operating system version of the build machine if >= 10.6
6922 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6923 # below to pick either 10.3, 10.4, or 10.5 as the target.
6924 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925
Ned Deily87adb6e2013-10-18 21:09:56 -07006926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6927$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006928 cur_target_major=`sw_vers -productVersion | \
6929 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6930 cur_target_minor=`sw_vers -productVersion | \
6931 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6932 cur_target="${cur_target_major}.${cur_target_minor}"
6933 if test ${cur_target_major} -eq 10 && \
6934 test ${cur_target_minor} -ge 3 && \
6935 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006936 then
Ned Deily36820b62014-06-25 13:44:22 -07006937 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006938 cur_target=10.3
6939 if test ${enable_universalsdk}
6940 then
6941 case "$UNIVERSAL_ARCHS" in
6942 all|3-way|intel|64-bit)
6943 # These configurations were first supported in 10.5
6944 cur_target='10.5'
6945 ;;
6946 esac
6947 else
6948 if test `/usr/bin/arch` = "i386"
6949 then
6950 # 10.4 was the first release to support Intel archs
6951 cur_target="10.4"
6952 fi
6953 fi
6954 fi
6955 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006956
Ned Deily87adb6e2013-10-18 21:09:56 -07006957 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6958 # environment with a value that is the same as what we'll use
6959 # in the Makefile to ensure that we'll get the same compiler
6960 # environment during configure and build time.
6961 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6962 export MACOSX_DEPLOYMENT_TARGET
6963 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6965$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006966
Ned Deily87adb6e2013-10-18 21:09:56 -07006967 # end of Darwin* tests
6968 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969 esac
6970 ;;
6971
6972*)
6973 case $ac_sys_system in
6974 OpenUNIX*|UnixWare*)
6975 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6976 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977 SCO_SV*)
6978 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6979 ;;
6980 esac
6981 ;;
6982esac
6983
6984if test "$Py_DEBUG" = 'true'; then
6985 :
6986else
6987 OPT="-DNDEBUG $OPT"
6988fi
6989
6990if test "$ac_arch_flags"
6991then
6992 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6993fi
6994
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995# On some compilers, pthreads are available without further options
6996# (e.g. MacOS X). On some of these systems, the compiler will not
6997# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6998# So we have to see first whether pthreads are available without
6999# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7001$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007002if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007003 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004else
Matthias Kloseb9621712010-04-24 17:59:49 +00007005 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006 ac_cv_pthread_is_default=no
7007else
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009/* end confdefs.h. */
7010
Stefan Krah7dba5942012-11-22 22:49:11 +01007011#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007012#include <pthread.h>
7013
7014void* routine(void* p){return NULL;}
7015
7016int main(){
7017 pthread_t p;
7018 if(pthread_create(&p,NULL,routine,NULL)!=0)
7019 return 1;
7020 (void)pthread_detach(p);
7021 return 0;
7022}
7023
7024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007025if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007026
7027 ac_cv_pthread_is_default=yes
7028 ac_cv_kthread=no
7029 ac_cv_pthread=no
7030
7031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007036fi
7037
7038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007039fi
7040
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7042$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007043
7044
7045if test $ac_cv_pthread_is_default = yes
7046then
7047 ac_cv_kpthread=no
7048else
7049# -Kpthread, if available, provides the right #defines
7050# and linker options to make pthread_create available
7051# Some compilers won't report that they do not support -Kpthread,
7052# so we need to run a program to see whether it really made the
7053# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7055$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007056if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007057 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058else
7059 ac_save_cc="$CC"
7060CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007061if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007062 ac_cv_kpthread=no
7063else
Matthias Kloseb9621712010-04-24 17:59:49 +00007064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065/* end confdefs.h. */
7066
Stefan Krah7dba5942012-11-22 22:49:11 +01007067#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007068#include <pthread.h>
7069
7070void* routine(void* p){return NULL;}
7071
7072int main(){
7073 pthread_t p;
7074 if(pthread_create(&p,NULL,routine,NULL)!=0)
7075 return 1;
7076 (void)pthread_detach(p);
7077 return 0;
7078}
7079
7080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007081if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007082 ac_cv_kpthread=yes
7083else
Matthias Kloseb9621712010-04-24 17:59:49 +00007084 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007088fi
7089
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007090CC="$ac_save_cc"
7091fi
7092
Matthias Kloseb9621712010-04-24 17:59:49 +00007093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7094$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007095fi
7096
7097if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7098then
7099# -Kthread, if available, provides the right #defines
7100# and linker options to make pthread_create available
7101# Some compilers won't report that they do not support -Kthread,
7102# so we need to run a program to see whether it really made the
7103# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7105$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007106if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007108else
7109 ac_save_cc="$CC"
7110CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007111if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007112 ac_cv_kthread=no
7113else
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007115/* end confdefs.h. */
7116
Stefan Krah7dba5942012-11-22 22:49:11 +01007117#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007118#include <pthread.h>
7119
7120void* routine(void* p){return NULL;}
7121
7122int main(){
7123 pthread_t p;
7124 if(pthread_create(&p,NULL,routine,NULL)!=0)
7125 return 1;
7126 (void)pthread_detach(p);
7127 return 0;
7128}
7129
7130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007131if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007132 ac_cv_kthread=yes
7133else
Matthias Kloseb9621712010-04-24 17:59:49 +00007134 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7137 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007138fi
7139
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007140CC="$ac_save_cc"
7141fi
7142
Matthias Kloseb9621712010-04-24 17:59:49 +00007143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7144$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007145fi
7146
7147if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7148then
7149# -pthread, if available, provides the right #defines
7150# and linker options to make pthread_create available
7151# Some compilers won't report that they do not support -pthread,
7152# so we need to run a program to see whether it really made the
7153# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7155$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007156if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007158else
7159 ac_save_cc="$CC"
7160CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007161if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007162 ac_cv_pthread=no
7163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007165/* end confdefs.h. */
7166
Stefan Krah7dba5942012-11-22 22:49:11 +01007167#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007168#include <pthread.h>
7169
7170void* routine(void* p){return NULL;}
7171
7172int main(){
7173 pthread_t p;
7174 if(pthread_create(&p,NULL,routine,NULL)!=0)
7175 return 1;
7176 (void)pthread_detach(p);
7177 return 0;
7178}
7179
7180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007181if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007182 ac_cv_pthread=yes
7183else
Matthias Kloseb9621712010-04-24 17:59:49 +00007184 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188fi
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190CC="$ac_save_cc"
7191fi
7192
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7194$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007195fi
7196
7197# If we have set a CC compiler flag for thread support then
7198# check if it works for CXX, too.
7199ac_cv_cxx_thread=no
7200if test ! -z "$CXX"
7201then
Matthias Kloseb9621712010-04-24 17:59:49 +00007202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7203$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007204ac_save_cxx="$CXX"
7205
7206if test "$ac_cv_kpthread" = "yes"
7207then
7208 CXX="$CXX -Kpthread"
7209 ac_cv_cxx_thread=yes
7210elif test "$ac_cv_kthread" = "yes"
7211then
7212 CXX="$CXX -Kthread"
7213 ac_cv_cxx_thread=yes
7214elif test "$ac_cv_pthread" = "yes"
7215then
7216 CXX="$CXX -pthread"
7217 ac_cv_cxx_thread=yes
7218fi
7219
7220if test $ac_cv_cxx_thread = yes
7221then
7222 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7223 $CXX -c conftest.$ac_ext 2>&5
7224 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7225 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7226 then
7227 ac_cv_cxx_thread=yes
7228 else
7229 ac_cv_cxx_thread=no
7230 fi
7231 rm -fr conftest*
7232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7234$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007235fi
7236CXX="$ac_save_cxx"
7237
7238
7239# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7241$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007242if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007243 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007244else
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007246/* end confdefs.h. */
7247#include <stdlib.h>
7248#include <stdarg.h>
7249#include <string.h>
7250#include <float.h>
7251
7252int
7253main ()
7254{
7255
7256 ;
7257 return 0;
7258}
7259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007260if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007261 ac_cv_header_stdc=yes
7262else
Matthias Kloseb9621712010-04-24 17:59:49 +00007263 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007264fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7266
7267if test $ac_cv_header_stdc = yes; then
7268 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007270/* end confdefs.h. */
7271#include <string.h>
7272
7273_ACEOF
7274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007275 $EGREP "memchr" >/dev/null 2>&1; then :
7276
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007277else
7278 ac_cv_header_stdc=no
7279fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007280rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007281
7282fi
7283
7284if test $ac_cv_header_stdc = yes; then
7285 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007287/* end confdefs.h. */
7288#include <stdlib.h>
7289
7290_ACEOF
7291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007292 $EGREP "free" >/dev/null 2>&1; then :
7293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007294else
7295 ac_cv_header_stdc=no
7296fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007297rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298
7299fi
7300
7301if test $ac_cv_header_stdc = yes; then
7302 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007304 :
7305else
Matthias Kloseb9621712010-04-24 17:59:49 +00007306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007307/* end confdefs.h. */
7308#include <ctype.h>
7309#include <stdlib.h>
7310#if ((' ' & 0x0FF) == 0x020)
7311# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7312# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7313#else
7314# define ISLOWER(c) \
7315 (('a' <= (c) && (c) <= 'i') \
7316 || ('j' <= (c) && (c) <= 'r') \
7317 || ('s' <= (c) && (c) <= 'z'))
7318# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7319#endif
7320
7321#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7322int
7323main ()
7324{
7325 int i;
7326 for (i = 0; i < 256; i++)
7327 if (XOR (islower (i), ISLOWER (i))
7328 || toupper (i) != TOUPPER (i))
7329 return 2;
7330 return 0;
7331}
7332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007333if ac_fn_c_try_run "$LINENO"; then :
7334
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335else
Matthias Kloseb9621712010-04-24 17:59:49 +00007336 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340fi
7341
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342fi
7343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7345$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346if test $ac_cv_header_stdc = yes; then
7347
Matthias Kloseb9621712010-04-24 17:59:49 +00007348$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007349
7350fi
7351
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007352for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007353fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007354ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007355sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007356unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007357poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007358sys/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 +01007359sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007360sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007361sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007362sys/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 -07007363libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007364bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7365sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007366do :
7367 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7368ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007369if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007370 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007371#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007372_ACEOF
7373
7374fi
7375
Guido van Rossum627b2d71993-12-24 10:39:16 +00007376done
7377
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007378ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007379for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7382$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007383if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007384 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007385else
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007387/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007388#include <sys/types.h>
7389#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007390
Martin v. Löwis11437992002-04-12 09:54:03 +00007391int
7392main ()
7393{
7394if ((DIR *) 0)
7395return 0;
7396 ;
7397 return 0;
7398}
7399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007401 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007402else
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007407eval ac_res=\$$as_ac_Header
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7409$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007410if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007411 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007412#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007413_ACEOF
7414
7415ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007417
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007418done
7419# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7420if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7422$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007423if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007424 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007425else
Martin v. Löwis11437992002-04-12 09:54:03 +00007426 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007430/* Override any GCC internal prototype to avoid an error.
7431 Use char because int might match the return type of a GCC
7432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007433#ifdef __cplusplus
7434extern "C"
7435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007436char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007437int
7438main ()
7439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007440return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007441 ;
7442 return 0;
7443}
7444_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007445for ac_lib in '' dir; do
7446 if test -z "$ac_lib"; then
7447 ac_res="none required"
7448 else
7449 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007450 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007451 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007453 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007455rm -f core conftest.err conftest.$ac_objext \
7456 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007457 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007458 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007460done
Victor Stinnere0be4232011-10-25 13:06:09 +02007461if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007463else
7464 ac_cv_search_opendir=no
7465fi
7466rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007467LIBS=$ac_func_search_save_LIBS
7468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7470$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007471ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007472if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007473 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007474
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007475fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007476
Michael W. Hudson54241132001-12-07 15:38:26 +00007477else
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7479$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007480if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007482else
7483 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007487/* Override any GCC internal prototype to avoid an error.
7488 Use char because int might match the return type of a GCC
7489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007490#ifdef __cplusplus
7491extern "C"
7492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007493char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007494int
7495main ()
7496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007497return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007498 ;
7499 return 0;
7500}
7501_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007502for ac_lib in '' x; do
7503 if test -z "$ac_lib"; then
7504 ac_res="none required"
7505 else
7506 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007507 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007508 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007510 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007512rm -f core conftest.err conftest.$ac_objext \
7513 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007514 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007515 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007517done
Victor Stinnere0be4232011-10-25 13:06:09 +02007518if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007520else
7521 ac_cv_search_opendir=no
7522fi
7523rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007524LIBS=$ac_func_search_save_LIBS
7525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7527$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007528ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007529if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007531
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007532fi
7533
7534fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007535
Matthias Kloseb9621712010-04-24 17:59:49 +00007536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7537$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007538if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007539 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007540else
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007542/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007543#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007544int
7545main ()
7546{
7547return makedev(0, 0);
7548 ;
7549 return 0;
7550}
7551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007553 ac_cv_header_sys_types_h_makedev=yes
7554else
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007557rm -f core conftest.err conftest.$ac_objext \
7558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007559
7560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7562$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007563
7564if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007565ac_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 +02007566if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007567
Matthias Kloseb9621712010-04-24 17:59:49 +00007568$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007569
7570fi
7571
7572
7573
7574 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 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 +02007576if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007577
Matthias Kloseb9621712010-04-24 17:59:49 +00007578$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007579
7580fi
7581
7582
7583 fi
7584fi
7585
Michael W. Hudson54241132001-12-07 15:38:26 +00007586
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007587# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7588for ac_header in net/if.h
7589do :
7590 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7591#ifdef STDC_HEADERS
7592# include <stdlib.h>
7593# include <stddef.h>
7594#else
7595# ifdef HAVE_STDLIB_H
7596# include <stdlib.h>
7597# endif
7598#endif
7599#ifdef HAVE_SYS_SOCKET_H
7600# include <sys/socket.h>
7601#endif
7602
7603"
Victor Stinnere0be4232011-10-25 13:06:09 +02007604if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007605 cat >>confdefs.h <<_ACEOF
7606#define HAVE_NET_IF_H 1
7607_ACEOF
7608
7609fi
7610
7611done
7612
7613
Martin v. Löwis11017b12006-01-14 18:12:57 +00007614# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007615for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007616do :
7617 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 +00007618#ifdef HAVE_ASM_TYPES_H
7619#include <asm/types.h>
7620#endif
7621#ifdef HAVE_SYS_SOCKET_H
7622#include <sys/socket.h>
7623#endif
7624
Matthias Kloseb9621712010-04-24 17:59:49 +00007625"
Victor Stinnere0be4232011-10-25 13:06:09 +02007626if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007627 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007628#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007629_ACEOF
7630
7631fi
7632
7633done
7634
7635
Charles-François Natali47413c12011-10-06 19:47:44 +02007636# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007637for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007638do :
7639 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7640ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7641#ifdef HAVE_SYS_SOCKET_H
7642#include <sys/socket.h>
7643#endif
7644
7645"
7646if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7647 cat >>confdefs.h <<_ACEOF
7648#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7649_ACEOF
7650
7651fi
7652
7653done
7654
7655
Guido van Rossum627b2d71993-12-24 10:39:16 +00007656# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007657was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7659$as_echo_n "checking for clock_t in time.h... " >&6; }
7660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007661/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007662#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007663
7664_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007666 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007667 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007668else
Martin v. Löwis11437992002-04-12 09:54:03 +00007669
7670
Matthias Kloseb9621712010-04-24 17:59:49 +00007671$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007672
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007673
Guido van Rossum627b2d71993-12-24 10:39:16 +00007674fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007675rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007676
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7678$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007679
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7681$as_echo_n "checking for makedev... " >&6; }
7682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007683/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007684
Jesus Cea740f53a2010-04-28 11:35:30 +00007685#if defined(MAJOR_IN_MKDEV)
7686#include <sys/mkdev.h>
7687#elif defined(MAJOR_IN_SYSMACROS)
7688#include <sys/sysmacros.h>
7689#else
7690#include <sys/types.h>
7691#endif
7692
Neal Norwitz11690112002-07-30 01:08:28 +00007693int
7694main ()
7695{
Jesus Cea740f53a2010-04-28 11:35:30 +00007696
7697 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007698 ;
7699 return 0;
7700}
Matthias Kloseb159a552010-04-25 21:00:44 +00007701
Neal Norwitz11690112002-07-30 01:08:28 +00007702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007703if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007704 ac_cv_has_makedev=yes
7705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007708rm -f core conftest.err conftest.$ac_objext \
7709 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7711$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007712if test "$ac_cv_has_makedev" = "yes"; then
7713
Matthias Kloseb9621712010-04-24 17:59:49 +00007714$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007715
7716fi
7717
Christian Heimes985ecdc2013-11-20 11:46:18 +01007718# byte swapping
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7720$as_echo_n "checking for le64toh... " >&6; }
7721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7722/* end confdefs.h. */
7723
7724#ifdef HAVE_ENDIAN_H
7725#include <endian.h>
7726#elif defined(HAVE_SYS_ENDIAN_H)
7727#include <sys/endian.h>
7728#endif
7729
7730int
7731main ()
7732{
7733
7734 le64toh(1)
7735 ;
7736 return 0;
7737}
7738
7739_ACEOF
7740if ac_fn_c_try_link "$LINENO"; then :
7741 ac_cv_has_le64toh=yes
7742else
7743 ac_cv_has_le64toh=no
7744fi
7745rm -f core conftest.err conftest.$ac_objext \
7746 conftest$ac_exeext conftest.$ac_ext
7747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7748$as_echo "$ac_cv_has_le64toh" >&6; }
7749if test "$ac_cv_has_le64toh" = "yes"; then
7750
7751$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7752
7753fi
7754
Martin v. Löwis399a6892002-10-04 10:22:02 +00007755# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7756# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7757# defined, but the compiler does not support pragma redefine_extname,
7758# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7759# structures (such as rlimit64) without declaring them. As a
7760# work-around, disable LFS on such configurations
7761
7762use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7764$as_echo_n "checking Solaris LFS bug... " >&6; }
7765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007766/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007767
7768#define _LARGEFILE_SOURCE 1
7769#define _FILE_OFFSET_BITS 64
7770#include <sys/resource.h>
7771
Martin v. Löwis399a6892002-10-04 10:22:02 +00007772int
7773main ()
7774{
7775struct rlimit foo;
7776 ;
7777 return 0;
7778}
7779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007780if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007781 sol_lfs_bug=no
7782else
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7787$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007788if test "$sol_lfs_bug" = "yes"; then
7789 use_lfs=no
7790fi
7791
7792if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007793# Two defines needed to enable largefile support on various platforms
7794# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007795case $ac_sys_system/$ac_sys_release in
7796AIX*)
7797
7798$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7799
7800 ;;
7801esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007802
Matthias Kloseb9621712010-04-24 17:59:49 +00007803$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007804
7805
Matthias Kloseb9621712010-04-24 17:59:49 +00007806$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007807
Martin v. Löwis399a6892002-10-04 10:22:02 +00007808fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007809
Guido van Rossum84e7b241996-08-19 21:59:00 +00007810# Add some code to confdefs.h so that the test for off_t works on SCO
7811cat >> confdefs.h <<\EOF
7812#if defined(SCO_DS)
7813#undef _OFF_T
7814#endif
7815EOF
7816
Guido van Rossumef2255b2000-03-10 22:30:29 +00007817# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007818ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007819if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007820
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007821else
Martin v. Löwis11437992002-04-12 09:54:03 +00007822
7823cat >>confdefs.h <<_ACEOF
7824#define mode_t int
7825_ACEOF
7826
7827fi
7828
Matthias Kloseb9621712010-04-24 17:59:49 +00007829ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007830if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007831
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007832else
Martin v. Löwis11437992002-04-12 09:54:03 +00007833
7834cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007836_ACEOF
7837
7838fi
7839
Matthias Kloseb9621712010-04-24 17:59:49 +00007840ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007841if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007842
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007843else
Martin v. Löwis11437992002-04-12 09:54:03 +00007844
7845cat >>confdefs.h <<_ACEOF
7846#define pid_t int
7847_ACEOF
7848
7849fi
7850
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007853#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007854_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007855
Matthias Kloseb9621712010-04-24 17:59:49 +00007856ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007857if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007858
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859else
Martin v. Löwis11437992002-04-12 09:54:03 +00007860
7861cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007863_ACEOF
7864
7865fi
7866
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7868$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007869if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007871else
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007873/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007874#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007875
7876_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007879 ac_cv_type_uid_t=yes
7880else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007881 ac_cv_type_uid_t=no
7882fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007883rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007884
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7887$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007888if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007889
Matthias Kloseb9621712010-04-24 17:59:49 +00007890$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007891
7892
Matthias Kloseb9621712010-04-24 17:59:49 +00007893$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007894
7895fi
7896
Mark Dickinson983bc162012-12-02 12:11:38 +00007897
7898# There are two separate checks for each of the exact-width integer types we
7899# need. First we check whether the type is available using the usual
7900# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7901# and <stdint.h> where available). We then also use the special type checks of
7902# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7903# directly, #define's uint32_t to be a suitable type.
7904
7905ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7906if test "x$ac_cv_type_uint32_t" = xyes; then :
7907
7908$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7909
7910fi
7911
Matthias Kloseb9621712010-04-24 17:59:49 +00007912ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7913case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007914 no|yes) ;; #(
7915 *)
7916
Matthias Kloseb9621712010-04-24 17:59:49 +00007917$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007918
7919
7920cat >>confdefs.h <<_ACEOF
7921#define uint32_t $ac_cv_c_uint32_t
7922_ACEOF
7923;;
7924 esac
7925
Mark Dickinson983bc162012-12-02 12:11:38 +00007926
7927ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7928if test "x$ac_cv_type_uint64_t" = xyes; then :
7929
7930$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7931
7932fi
7933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7935case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007936 no|yes) ;; #(
7937 *)
7938
Matthias Kloseb9621712010-04-24 17:59:49 +00007939$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007940
7941
7942cat >>confdefs.h <<_ACEOF
7943#define uint64_t $ac_cv_c_uint64_t
7944_ACEOF
7945;;
7946 esac
7947
Mark Dickinson983bc162012-12-02 12:11:38 +00007948
7949ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7950if test "x$ac_cv_type_int32_t" = xyes; then :
7951
7952$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7953
7954fi
7955
Matthias Kloseb9621712010-04-24 17:59:49 +00007956ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7957case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007958 no|yes) ;; #(
7959 *)
7960
7961cat >>confdefs.h <<_ACEOF
7962#define int32_t $ac_cv_c_int32_t
7963_ACEOF
7964;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007965esac
7966
Mark Dickinson983bc162012-12-02 12:11:38 +00007967
7968ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7969if test "x$ac_cv_type_int64_t" = xyes; then :
7970
7971$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7972
7973fi
7974
Matthias Kloseb9621712010-04-24 17:59:49 +00007975ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7976case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007977 no|yes) ;; #(
7978 *)
7979
7980cat >>confdefs.h <<_ACEOF
7981#define int64_t $ac_cv_c_int64_t
7982_ACEOF
7983;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007984esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007985
Mark Dickinson983bc162012-12-02 12:11:38 +00007986
Matthias Kloseb9621712010-04-24 17:59:49 +00007987ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007988if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989
Matthias Kloseb9621712010-04-24 17:59:49 +00007990$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007991
7992fi
7993
Stefan Krah1919b7e2012-03-21 18:25:23 +01007994ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7995if test "x$ac_cv_type___uint128_t" = xyes; then :
7996
7997$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7998
7999fi
8000
Jack Jansendd19cf82001-12-06 22:36:17 +00008001
Michael W. Hudson54241132001-12-07 15:38:26 +00008002# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008003# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004# The cast to long int works around a bug in the HP C Compiler
8005# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8006# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8007# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8009$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008010if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 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 +00008014
Martin v. Löwis11437992002-04-12 09:54:03 +00008015else
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 if test "$ac_cv_type_int" = yes; then
8017 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008019as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008020See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021 else
8022 ac_cv_sizeof_int=0
8023 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025
Martin v. Löwis11437992002-04-12 09:54:03 +00008026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8028$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029
8030
8031
Martin v. Löwis11437992002-04-12 09:54:03 +00008032cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008033#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008034_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008035
8036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037# The cast to long int works around a bug in the HP C Compiler
8038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8040# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8042$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008043if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008045else
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 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 +00008047
Martin v. Löwis11437992002-04-12 09:54:03 +00008048else
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 if test "$ac_cv_type_long" = yes; then
8050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008052as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008053See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 else
8055 ac_cv_sizeof_long=0
8056 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008058
Martin v. Löwis11437992002-04-12 09:54:03 +00008059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8061$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062
8063
8064
Martin v. Löwis11437992002-04-12 09:54:03 +00008065cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008066#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008067_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008068
8069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070# The cast to long int works around a bug in the HP C Compiler
8071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8073# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8075$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008076if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008078else
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 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 +00008080
Martin v. Löwis11437992002-04-12 09:54:03 +00008081else
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 if test "$ac_cv_type_void_p" = yes; then
8083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008085as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008086See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 else
8088 ac_cv_sizeof_void_p=0
8089 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008091
Martin v. Löwis11437992002-04-12 09:54:03 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8094$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095
8096
8097
Martin v. Löwis11437992002-04-12 09:54:03 +00008098cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008099#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008100_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008101
8102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103# The cast to long int works around a bug in the HP C Compiler
8104# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8105# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8106# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8108$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008109if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008110 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008111else
Matthias Kloseb9621712010-04-24 17:59:49 +00008112 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 +00008113
Martin v. Löwis11437992002-04-12 09:54:03 +00008114else
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 if test "$ac_cv_type_short" = yes; then
8116 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8117$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008118as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008119See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008120 else
8121 ac_cv_sizeof_short=0
8122 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124
Martin v. Löwis11437992002-04-12 09:54:03 +00008125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8127$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008128
8129
8130
Martin v. Löwis11437992002-04-12 09:54:03 +00008131cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008132#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008133_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008134
8135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008136# The cast to long int works around a bug in the HP C Compiler
8137# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8138# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8139# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8141$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008142if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008144else
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 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 +00008146
Martin v. Löwis11437992002-04-12 09:54:03 +00008147else
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 if test "$ac_cv_type_float" = yes; then
8149 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008151as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008152See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153 else
8154 ac_cv_sizeof_float=0
8155 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008157
Martin v. Löwis11437992002-04-12 09:54:03 +00008158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8160$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161
8162
8163
Martin v. Löwis11437992002-04-12 09:54:03 +00008164cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008165#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008166_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008167
8168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008169# The cast to long int works around a bug in the HP C Compiler
8170# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8171# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8172# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8174$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008175if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008177else
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 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 +00008179
Martin v. Löwis11437992002-04-12 09:54:03 +00008180else
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 if test "$ac_cv_type_double" = yes; then
8182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008184as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008185See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186 else
8187 ac_cv_sizeof_double=0
8188 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008190
Martin v. Löwis11437992002-04-12 09:54:03 +00008191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8193$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194
8195
8196
Martin v. Löwis11437992002-04-12 09:54:03 +00008197cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008198#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008199_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008200
8201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202# The cast to long int works around a bug in the HP C Compiler
8203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8205# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8207$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008208if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008210else
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 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 +00008212
Martin v. Löwis11437992002-04-12 09:54:03 +00008213else
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 if test "$ac_cv_type_fpos_t" = yes; then
8215 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008217as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008218See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 else
8220 ac_cv_sizeof_fpos_t=0
8221 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008223
Martin v. Löwis11437992002-04-12 09:54:03 +00008224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8226$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227
8228
8229
Martin v. Löwis11437992002-04-12 09:54:03 +00008230cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008231#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008232_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008233
Michael W. Hudson54241132001-12-07 15:38:26 +00008234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235# The cast to long int works around a bug in the HP C Compiler
8236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8238# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8240$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008241if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008243else
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 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 +00008245
Martin v. Löwis18e16552006-02-15 17:27:45 +00008246else
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 if test "$ac_cv_type_size_t" = yes; then
8248 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008250as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008251See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 else
8253 ac_cv_sizeof_size_t=0
8254 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008256
Martin v. Löwis18e16552006-02-15 17:27:45 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8259$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260
8261
8262
Martin v. Löwis18e16552006-02-15 17:27:45 +00008263cat >>confdefs.h <<_ACEOF
8264#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8265_ACEOF
8266
8267
Christian Heimes400adb02008-02-01 08:12:03 +00008268# The cast to long int works around a bug in the HP C Compiler
8269# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8270# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8271# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8273$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008274if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 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 +00008278
Christian Heimes400adb02008-02-01 08:12:03 +00008279else
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 if test "$ac_cv_type_pid_t" = yes; then
8281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008283as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008284See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008285 else
8286 ac_cv_sizeof_pid_t=0
8287 fi
8288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008289
Christian Heimes400adb02008-02-01 08:12:03 +00008290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8292$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008293
8294
8295
8296cat >>confdefs.h <<_ACEOF
8297#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8298_ACEOF
8299
8300
Michael W. Hudson54241132001-12-07 15:38:26 +00008301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8303$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008304have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008306/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008307
Martin v. Löwis11437992002-04-12 09:54:03 +00008308int
8309main ()
8310{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008311long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008312 ;
8313 return 0;
8314}
8315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008316if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008317
8318
Matthias Kloseb9621712010-04-24 17:59:49 +00008319$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008320
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008321 have_long_long=yes
8322
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8326$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008327if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328# The cast to long int works around a bug in the HP C Compiler
8329# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8330# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8331# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8333$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008334if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008336else
Matthias Kloseb9621712010-04-24 17:59:49 +00008337 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 +00008338
Martin v. Löwis11437992002-04-12 09:54:03 +00008339else
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 if test "$ac_cv_type_long_long" = yes; then
8341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008343as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008344See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345 else
8346 ac_cv_sizeof_long_long=0
8347 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008349
Martin v. Löwis11437992002-04-12 09:54:03 +00008350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8352$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353
8354
8355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008357#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008358_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008359
Michael W. Hudson54241132001-12-07 15:38:26 +00008360
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008361fi
8362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8364$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008365have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008367/* end confdefs.h. */
8368
8369int
8370main ()
8371{
8372long double x; x = (long double)0;
8373 ;
8374 return 0;
8375}
8376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008377if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008378
8379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008381
8382 have_long_double=yes
8383
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008384fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8387$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008388if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008389# The cast to long int works around a bug in the HP C Compiler
8390# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8391# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8392# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8394$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008395if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008397else
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 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 +00008399
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008400else
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 if test "$ac_cv_type_long_double" = yes; then
8402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008404as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008405See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008406 else
8407 ac_cv_sizeof_long_double=0
8408 fi
8409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008410
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8413$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008414
8415
8416
8417cat >>confdefs.h <<_ACEOF
8418#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8419_ACEOF
8420
8421
8422fi
8423
8424
Matthias Kloseb9621712010-04-24 17:59:49 +00008425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8426$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008427have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008429/* end confdefs.h. */
8430
8431int
8432main ()
8433{
8434_Bool x; x = (_Bool)0;
8435 ;
8436 return 0;
8437}
8438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008439if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008440
8441
Matthias Kloseb9621712010-04-24 17:59:49 +00008442$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008443
8444 have_c99_bool=yes
8445
Thomas Woutersb2137042007-02-01 18:02:27 +00008446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8449$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008450if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451# The cast to long int works around a bug in the HP C Compiler
8452# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8453# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8454# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8456$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008457if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008459else
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 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 +00008461
Thomas Woutersb2137042007-02-01 18:02:27 +00008462else
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 if test "$ac_cv_type__Bool" = yes; then
8464 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008466as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008467See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468 else
8469 ac_cv_sizeof__Bool=0
8470 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008472
Thomas Woutersb2137042007-02-01 18:02:27 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8475$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476
8477
8478
Thomas Woutersb2137042007-02-01 18:02:27 +00008479cat >>confdefs.h <<_ACEOF
8480#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8481_ACEOF
8482
8483
8484fi
8485
Matthias Kloseb9621712010-04-24 17:59:49 +00008486ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008487 #include <stdint.h>
8488 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008489 #ifdef HAVE_INTTYPES_H
8490 #include <inttypes.h>
8491 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008492"
Victor Stinnere0be4232011-10-25 13:06:09 +02008493if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008494
8495cat >>confdefs.h <<_ACEOF
8496#define HAVE_UINTPTR_T 1
8497_ACEOF
8498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499# The cast to long int works around a bug in the HP C Compiler
8500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8502# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8504$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008505if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008507else
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 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 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510else
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 if test "$ac_cv_type_uintptr_t" = yes; then
8512 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008514as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008515See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516 else
8517 ac_cv_sizeof_uintptr_t=0
8518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8523$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008524
8525
8526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008528#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008529_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008530
Michael W. Hudson54241132001-12-07 15:38:26 +00008531
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008532fi
8533
Thomas Wouters89f507f2006-12-13 04:49:30 +00008534
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008535# The cast to long int works around a bug in the HP C Compiler
8536# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8537# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8538# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8540$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008541if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008543else
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008545#ifdef HAVE_SYS_TYPES_H
8546#include <sys/types.h>
8547#endif
8548
Matthias Kloseb9621712010-04-24 17:59:49 +00008549"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008550
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008551else
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 if test "$ac_cv_type_off_t" = yes; then
8553 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8554$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008555as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008556See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008557 else
8558 ac_cv_sizeof_off_t=0
8559 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008561
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8564$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008565
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008566
8567
Martin v. Löwis11437992002-04-12 09:54:03 +00008568cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008569#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008570_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008571
Michael W. Hudson54241132001-12-07 15:38:26 +00008572
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008573
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8575$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008576if test "$have_long_long" = yes
8577then
8578if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008579 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008580
Matthias Kloseb9621712010-04-24 17:59:49 +00008581$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008582
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8584$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8587$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008588fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008589else
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008592fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008594# The cast to long int works around a bug in the HP C Compiler
8595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8597# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8599$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008600if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008602else
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008604#ifdef HAVE_SYS_TYPES_H
8605#include <sys/types.h>
8606#endif
8607#ifdef HAVE_TIME_H
8608#include <time.h>
8609#endif
8610
Matthias Kloseb9621712010-04-24 17:59:49 +00008611"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008612
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008613else
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 if test "$ac_cv_type_time_t" = yes; then
8615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008617as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008618See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008619 else
8620 ac_cv_sizeof_time_t=0
8621 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8626$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008627
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008628
8629
Martin v. Löwis11437992002-04-12 09:54:03 +00008630cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008631#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008632_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008633
Michael W. Hudson54241132001-12-07 15:38:26 +00008634
8635
Trent Mick635f6fb2000-08-23 21:33:05 +00008636# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008637ac_save_cc="$CC"
8638if test "$ac_cv_kpthread" = "yes"
8639then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008640elif test "$ac_cv_kthread" = "yes"
8641then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008642elif test "$ac_cv_pthread" = "yes"
8643then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008644fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008645
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8647$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008648have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008650/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008651
8652 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008653int
8654main ()
8655{
Guido van Rossum12580492000-09-24 16:47:19 +00008656pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008657 ;
8658 return 0;
8659}
Matthias Kloseb159a552010-04-25 21:00:44 +00008660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008662if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008663 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8667$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008668if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8672# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8674$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008675if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008679#ifdef HAVE_PTHREAD_H
8680#include <pthread.h>
8681#endif
8682
Matthias Kloseb9621712010-04-24 17:59:49 +00008683"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008684
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 if test "$ac_cv_type_pthread_t" = yes; then
8687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008689as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008690See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008691 else
8692 ac_cv_sizeof_pthread_t=0
8693 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695
Trent Mick635f6fb2000-08-23 21:33:05 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8698$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008700
8701
Martin v. Löwis11437992002-04-12 09:54:03 +00008702cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008703#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008704_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008706
Trent Mick635f6fb2000-08-23 21:33:05 +00008707fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008708CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008709
Michael W. Hudson54241132001-12-07 15:38:26 +00008710
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008711case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008712 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008713 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8714 ;;
8715 Darwin/*)
8716 OTHER_LIBTOOL_OPT=""
8717 ;;
8718esac
8719
8720
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008721
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008722case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008723 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008724 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8725 if test "${enable_universalsdk}"; then
8726 :
8727 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008728 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008729 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008730 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008731 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008732 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008733 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008734 if test ${gcc_version} '<' 4.0
8735 then
8736 LIBTOOL_CRUFT="-lcc_dynamic"
8737 else
8738 LIBTOOL_CRUFT=""
8739 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008741 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008742else
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008744/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008745
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008746 #include <unistd.h>
8747 int main(int argc, char*argv[])
8748 {
8749 if (sizeof(long) == 4) {
8750 return 0;
8751 } else {
8752 return 1;
8753 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008754 }
8755
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008757if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008758 ac_osx_32bit=yes
8759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008764fi
8765
8766
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008767 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008768 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008769 i386)
8770 MACOSX_DEFAULT_ARCH="i386"
8771 ;;
8772 ppc)
8773 MACOSX_DEFAULT_ARCH="ppc"
8774 ;;
8775 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008776 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008777 ;;
8778 esac
8779 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008780 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008781 i386)
8782 MACOSX_DEFAULT_ARCH="x86_64"
8783 ;;
8784 ppc)
8785 MACOSX_DEFAULT_ARCH="ppc64"
8786 ;;
8787 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008788 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008789 ;;
8790 esac
8791
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008792 fi
8793
8794 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008795 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008796 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008797esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8799$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008800if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008801then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008802 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008804 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008805
Matthias Kloseb9621712010-04-24 17:59:49 +00008806$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008807
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8809$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008810 if test $enable_shared = "yes"
8811 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008812 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 +00008813 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008817fi
8818
Matthias Kloseb9621712010-04-24 17:59:49 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8820$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008821case $ac_sys_system/$ac_sys_release in
8822 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008823
Matthias Kloseb9621712010-04-24 17:59:49 +00008824$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008825
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8827$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008828 ;;
8829 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8831$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008832 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008833esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008834
Guido van Rossum0a516c91994-09-12 10:58:40 +00008835# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008836
Michael W. Hudson54241132001-12-07 15:38:26 +00008837
8838
8839
8840
Benjamin Peterson99f03762010-04-11 22:15:28 +00008841
Thomas Wouters477c8d52006-05-27 19:21:47 +00008842
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008843# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8844# -- usually .so, .sl on HP-UX, .dll on Cygwin
8845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8846$as_echo_n "checking the extension of shared libraries... " >&6; }
8847if test -z "$SHLIB_SUFFIX"; then
8848 case $ac_sys_system in
8849 hp*|HP*)
8850 case `uname -m` in
8851 ia64) SHLIB_SUFFIX=.so;;
8852 *) SHLIB_SUFFIX=.sl;;
8853 esac
8854 ;;
8855 CYGWIN*) SHLIB_SUFFIX=.dll;;
8856 *) SHLIB_SUFFIX=.so;;
8857 esac
8858fi
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8860$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008861
Guido van Rossum0a516c91994-09-12 10:58:40 +00008862# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008863# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008864# (Shared libraries in this instance are shared modules to be loaded into
8865# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8867$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008868if test -z "$LDSHARED"
8869then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008870 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008871 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008872 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008873 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008874 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008875 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008876 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008878 if test "$GCC" = "yes" ; then
8879 LDSHARED='$(CC) -shared'
8880 LDCXXSHARED='$(CXX) -shared'
8881 else
8882 LDSHARED='$(CC) -G'
8883 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008884 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008885 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008886 if test "$GCC" = "yes" ; then
8887 LDSHARED='$(CC) -shared'
8888 LDCXXSHARED='$(CXX) -shared'
8889 else
8890 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008891 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008892 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008893 LDSHARED='$(CC) -bundle'
8894 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008895 if test "$enable_framework" ; then
8896 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008897 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8898 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008899 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008900 else
8901 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008902 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008903 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008904 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008905 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008906 LDSHARED='$(CC) -bundle'
8907 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008908 if test "$enable_framework" ; then
8909 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008910 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8911 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008912 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008913 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008914 # No framework, use the Python app as bundle-loader
8915 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008916 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008917 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008918 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008919 Darwin/*)
8920 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8921 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008922
Ned Deily36820b62014-06-25 13:44:22 -07008923 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8924 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8925 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8926 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8927 if test ${dep_target_major} -eq 10 && \
8928 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008929 then
Ned Deily36820b62014-06-25 13:44:22 -07008930 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008931 LDSHARED='$(CC) -bundle'
8932 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008933 if test "$enable_framework" ; then
8934 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008935 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8936 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008937 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008938 else
8939 # No framework, use the Python app as bundle-loader
8940 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8941 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008942 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008943 fi
Ned Deily36820b62014-06-25 13:44:22 -07008944 else
8945 # building for OS X 10.3 and later
8946 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8947 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8948 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008949 fi
8950 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008951 Linux*|GNU*|QNX*)
8952 LDSHARED='$(CC) -shared'
8953 LDCXXSHARED='$(CXX) -shared';;
8954 BSD/OS*/4*)
8955 LDSHARED="gcc -shared"
8956 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008957 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008958 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008959 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008960 LDSHARED='$(CC) -shared'
8961 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008962 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008963 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008964 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008965 OpenBSD*)
8966 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8967 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008968 LDSHARED='$(CC) -shared $(CCSHARED)'
8969 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008970 else
8971 case `uname -r` in
8972 [01].* | 2.[0-7] | 2.[0-7].*)
8973 LDSHARED="ld -Bshareable ${LDFLAGS}"
8974 ;;
8975 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008976 LDSHARED='$(CC) -shared $(CCSHARED)'
8977 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008978 ;;
8979 esac
8980 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008981 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008982 LDSHARED='$(CC) -shared'
8983 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008984 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008985 if test "$GCC" = "yes" ; then
8986 LDSHARED='$(CC) -shared'
8987 LDCXXSHARED='$(CXX) -shared'
8988 else
8989 LDSHARED='$(CC) -G'
8990 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008991 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008992 SCO_SV*)
8993 LDSHARED='$(CC) -Wl,-G,-Bexport'
8994 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8995 CYGWIN*)
8996 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8997 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008998 *) LDSHARED="ld";;
8999 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9002$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009003LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009004BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009005# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009006# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9008$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009009if test -z "$CCSHARED"
9010then
Guido van Rossum07397971997-04-29 21:49:50 +00009011 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009012 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009013 then CCSHARED="-fPIC";
9014 elif test `uname -p` = sparc;
9015 then CCSHARED="-xcode=pic32";
9016 else CCSHARED="-Kpic";
9017 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009018 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009019 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009020 else CCSHARED="+z";
9021 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009022 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009023 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009024 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009025 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009026 if test "$GCC" = "yes"
9027 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009028 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009029 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009030 SCO_SV*)
9031 if test "$GCC" = "yes"
9032 then CCSHARED="-fPIC"
9033 else CCSHARED="-Kpic -belf"
9034 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009035 IRIX*/6*) case $CC in
9036 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009037 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009038 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009039 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9042$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009043# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009044# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9046$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009047if test -z "$LINKFORSHARED"
9048then
Guido van Rossum07397971997-04-29 21:49:50 +00009049 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009050 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009051 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009052 LINKFORSHARED="-Wl,-E -Wl,+s";;
9053# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009054 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009055 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009056 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009058 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009059
9060 # Issue #18075: the default maximum stack size (8MBytes) is too
9061 # small for the default recursion limit. Increase the stack size
9062 # to ensure that tests don't crash
9063 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9064
Jack Jansene578a632001-08-15 01:27:14 +00009065 if test "$enable_framework"
9066 then
Jack Jansenda49e192005-01-07 13:08:22 +00009067 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009068 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009069 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009070 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009071 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009072 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009073 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009074 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9075 then
9076 LINKFORSHARED="-Wl,--export-dynamic"
9077 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009078 SunOS/5*) case $CC in
9079 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009080 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009081 then
9082 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009083 fi;;
9084 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009085 CYGWIN*)
9086 if test $enable_shared = "no"
9087 then
9088 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9089 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009090 QNX*)
9091 # -Wl,-E causes the symbols to be added to the dynamic
9092 # symbol table so that they can be found when a module
9093 # is loaded. -N 2048K causes the stack size to be set
9094 # to 2048 kilobytes so that the stack doesn't overflow
9095 # when running test_compile.py.
9096 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009097 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9100$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009101
Michael W. Hudson54241132001-12-07 15:38:26 +00009102
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009103
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9105$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009106if test ! "$LIBRARY" = "$LDLIBRARY"
9107then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009108 case $ac_sys_system in
9109 CYGWIN*)
9110 # Cygwin needs CCSHARED when building extension DLLs
9111 # but not when building the interpreter DLL.
9112 CFLAGSFORSHARED='';;
9113 *)
9114 CFLAGSFORSHARED='$(CCSHARED)'
9115 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9118$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009119
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009120# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9121# library (with --enable-shared).
9122# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009123# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9124# if it is not required, since it creates a dependency of the shared library
9125# to LIBS. This, in turn, means that applications linking the shared libpython
9126# don't need to link LIBS explicitly. The default should be only changed
9127# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009128
Matthias Kloseb9621712010-04-24 17:59:49 +00009129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9130$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009131case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009132 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009133 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009134esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9136$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009137
9138
Guido van Rossum627b2d71993-12-24 10:39:16 +00009139# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9141$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009142if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009143 $as_echo_n "(cached) " >&6
9144else
9145 ac_check_lib_save_LIBS=$LIBS
9146LIBS="-lsendfile $LIBS"
9147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9148/* end confdefs.h. */
9149
9150/* Override any GCC internal prototype to avoid an error.
9151 Use char because int might match the return type of a GCC
9152 builtin and then its argument prototype would still apply. */
9153#ifdef __cplusplus
9154extern "C"
9155#endif
9156char sendfile ();
9157int
9158main ()
9159{
9160return sendfile ();
9161 ;
9162 return 0;
9163}
9164_ACEOF
9165if ac_fn_c_try_link "$LINENO"; then :
9166 ac_cv_lib_sendfile_sendfile=yes
9167else
9168 ac_cv_lib_sendfile_sendfile=no
9169fi
9170rm -f core conftest.err conftest.$ac_objext \
9171 conftest$ac_exeext conftest.$ac_ext
9172LIBS=$ac_check_lib_save_LIBS
9173fi
9174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9175$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009176if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009177 cat >>confdefs.h <<_ACEOF
9178#define HAVE_LIBSENDFILE 1
9179_ACEOF
9180
9181 LIBS="-lsendfile $LIBS"
9182
9183fi
9184
Matthias Kloseb9621712010-04-24 17:59:49 +00009185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9186$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009187if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009189else
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009191LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009195/* Override any GCC internal prototype to avoid an error.
9196 Use char because int might match the return type of a GCC
9197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009198#ifdef __cplusplus
9199extern "C"
9200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009201char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009202int
9203main ()
9204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 ;
9207 return 0;
9208}
9209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009210if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009211 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009212else
Matthias Kloseb9621712010-04-24 17:59:49 +00009213 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009215rm -f core conftest.err conftest.$ac_objext \
9216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009217LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9220$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009221if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 cat >>confdefs.h <<_ACEOF
9223#define HAVE_LIBDL 1
9224_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009225
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009226 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009228fi
9229 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9231$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009232if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009234else
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009236LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240/* Override any GCC internal prototype to avoid an error.
9241 Use char because int might match the return type of a GCC
9242 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009243#ifdef __cplusplus
9244extern "C"
9245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009246char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009247int
9248main ()
9249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 ;
9252 return 0;
9253}
9254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009255if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009257else
Matthias Kloseb9621712010-04-24 17:59:49 +00009258 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009260rm -f core conftest.err conftest.$ac_objext \
9261 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009262LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9265$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009266if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009267 cat >>confdefs.h <<_ACEOF
9268#define HAVE_LIBDLD 1
9269_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009270
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009271 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009272
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009273fi
9274 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9276$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9277if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9278 $as_echo_n "(cached) " >&6
9279else
9280 ac_check_lib_save_LIBS=$LIBS
9281LIBS="-lcrypto $LIBS"
9282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9283/* end confdefs.h. */
9284
9285/* Override any GCC internal prototype to avoid an error.
9286 Use char because int might match the return type of a GCC
9287 builtin and then its argument prototype would still apply. */
9288#ifdef __cplusplus
9289extern "C"
9290#endif
9291char RAND_egd ();
9292int
9293main ()
9294{
9295return RAND_egd ();
9296 ;
9297 return 0;
9298}
9299_ACEOF
9300if ac_fn_c_try_link "$LINENO"; then :
9301 ac_cv_lib_crypto_RAND_egd=yes
9302else
9303 ac_cv_lib_crypto_RAND_egd=no
9304fi
9305rm -f core conftest.err conftest.$ac_objext \
9306 conftest$ac_exeext conftest.$ac_ext
9307LIBS=$ac_check_lib_save_LIBS
9308fi
9309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9310$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9311if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9312
9313$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9314
9315fi
9316
Martin v. Löwis519adae2003-09-20 10:47:47 +00009317
Georg Brandlb1441c72009-01-03 22:33:39 +00009318# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009319if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9321$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009322if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009323 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009324else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009325 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329/* Override any GCC internal prototype to avoid an error.
9330 Use char because int might match the return type of a GCC
9331 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009332#ifdef __cplusplus
9333extern "C"
9334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009335char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009336int
9337main ()
9338{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009339return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 ;
9341 return 0;
9342}
9343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344for ac_lib in '' pthread rt posix4; do
9345 if test -z "$ac_lib"; then
9346 ac_res="none required"
9347 else
9348 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009349 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009350 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009352 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009354rm -f core conftest.err conftest.$ac_objext \
9355 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009356 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009357 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359done
Victor Stinnere0be4232011-10-25 13:06:09 +02009360if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362else
9363 ac_cv_search_sem_init=no
9364fi
9365rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009366LIBS=$ac_func_search_save_LIBS
9367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9369$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009371if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009373
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009374fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009375 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009376 # posix4 on Solaris 2.6
9377 # pthread (first!) on Linux
9378fi
9379
Martin v. Löwis19d17342003-06-14 21:03:05 +00009380# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9382$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009383if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009384 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009385else
9386 ac_check_lib_save_LIBS=$LIBS
9387LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391/* Override any GCC internal prototype to avoid an error.
9392 Use char because int might match the return type of a GCC
9393 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009394#ifdef __cplusplus
9395extern "C"
9396#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009397char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009398int
9399main ()
9400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009402 ;
9403 return 0;
9404}
9405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009407 ac_cv_lib_intl_textdomain=yes
9408else
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009411rm -f core conftest.err conftest.$ac_objext \
9412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009413LIBS=$ac_check_lib_save_LIBS
9414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9416$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009417if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009418
Matthias Kloseb9621712010-04-24 17:59:49 +00009419$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009420
Brett Cannonc6d936e2009-06-07 20:09:53 +00009421 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009422fi
9423
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009424
9425# checks for system dependent C++ extensions support
9426case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009427 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9428$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009430/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009431
Georg Brandl59e87bd2011-02-15 19:48:59 +00009432 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009433int
9434main ()
9435{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009436loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 ;
9438 return 0;
9439}
Matthias Kloseb159a552010-04-25 21:00:44 +00009440
Martin v. Löwis11437992002-04-12 09:54:03 +00009441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009442if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009443
Matthias Kloseb159a552010-04-25 21:00:44 +00009444
Matthias Kloseb9621712010-04-24 17:59:49 +00009445$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009446
Matthias Kloseb159a552010-04-25 21:00:44 +00009447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009448$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009449
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009450else
Matthias Kloseb159a552010-04-25 21:00:44 +00009451
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009453$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009454
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009456rm -f core conftest.err conftest.$ac_objext \
9457 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009458 *) ;;
9459esac
9460
Christian Heimes985ecdc2013-11-20 11:46:18 +01009461# check for systems that require aligned memory access
9462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9463$as_echo_n "checking aligned memory access is required... " >&6; }
9464if test "$cross_compiling" = yes; then :
9465 aligned_required=yes
9466else
9467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9468/* end confdefs.h. */
9469
9470int main()
9471{
9472 char s[16];
9473 int i, *p1, *p2;
9474 for (i=0; i < 16; i++)
9475 s[i] = i;
9476 p1 = (int*)(s+1);
9477 p2 = (int*)(s+2);
9478 if (*p1 == *p2)
9479 return 1;
9480 return 0;
9481}
9482
9483_ACEOF
9484if ac_fn_c_try_run "$LINENO"; then :
9485 aligned_required=no
9486else
9487 aligned_required=yes
9488fi
9489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9490 conftest.$ac_objext conftest.beam conftest.$ac_ext
9491fi
9492
9493
9494if test "$aligned_required" = yes ; then
9495
9496$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9497
9498fi
9499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9500$as_echo "$aligned_required" >&6; }
9501
9502
9503# str, bytes and memoryview hash algorithm
9504
9505
9506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9507$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9508
9509# Check whether --with-hash_algorithm was given.
9510if test "${with_hash_algorithm+set}" = set; then :
9511 withval=$with_hash_algorithm;
9512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9513$as_echo "$withval" >&6; }
9514case "$withval" in
9515 siphash24)
9516 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9517
9518 ;;
9519 fnv)
9520 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9521
9522 ;;
9523 *)
9524 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9525 ;;
9526esac
9527
9528else
9529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9530$as_echo "default" >&6; }
9531fi
9532
9533
Charles-François Natalid30b0222014-05-08 23:08:51 +01009534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9535$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9536
9537# Check whether --with-address_sanitizer was given.
9538if test "${with_address_sanitizer+set}" = set; then :
9539 withval=$with_address_sanitizer;
9540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9541$as_echo "$withval" >&6; }
9542BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9543LDFLAGS="-fsanitize=address $LDFLAGS"
9544
9545else
9546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9547$as_echo "no" >&6; }
9548fi
9549
9550
Guido van Rossum70c7f481998-03-26 18:44:10 +00009551# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9553$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009554if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009555 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009556else
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009558LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562/* Override any GCC internal prototype to avoid an error.
9563 Use char because int might match the return type of a GCC
9564 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009565#ifdef __cplusplus
9566extern "C"
9567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009568char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009569int
9570main ()
9571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ;
9574 return 0;
9575}
9576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009577if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009579else
Matthias Kloseb9621712010-04-24 17:59:49 +00009580 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009582rm -f core conftest.err conftest.$ac_objext \
9583 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009584LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9587$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009588if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009589 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009590fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009591 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9593$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009594if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009596else
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009598LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009602/* Override any GCC internal prototype to avoid an error.
9603 Use char because int might match the return type of a GCC
9604 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009605#ifdef __cplusplus
9606extern "C"
9607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009608char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009609int
9610main ()
9611{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ;
9614 return 0;
9615}
9616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009617if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009619else
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009622rm -f core conftest.err conftest.$ac_objext \
9623 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009624LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9627$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009628if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009629 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009630fi
9631 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009632
Matthias Kloseb9621712010-04-24 17:59:49 +00009633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9634$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009637if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9640$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009641LIBS="$withval $LIBS"
9642
9643else
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646fi
9647
Guido van Rossum7f43da71994-08-01 12:15:30 +00009648
Victor Stinner8291b5e2015-03-20 16:03:14 +01009649
9650
9651
9652
9653
9654
9655
9656if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9657 if test -n "$ac_tool_prefix"; then
9658 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9659set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9661$as_echo_n "checking for $ac_word... " >&6; }
9662if ${ac_cv_path_PKG_CONFIG+:} false; then :
9663 $as_echo_n "(cached) " >&6
9664else
9665 case $PKG_CONFIG in
9666 [\\/]* | ?:[\\/]*)
9667 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9668 ;;
9669 *)
9670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9671for as_dir in $PATH
9672do
9673 IFS=$as_save_IFS
9674 test -z "$as_dir" && as_dir=.
9675 for ac_exec_ext in '' $ac_executable_extensions; do
9676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9677 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9679 break 2
9680 fi
9681done
9682 done
9683IFS=$as_save_IFS
9684
9685 ;;
9686esac
9687fi
9688PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9689if test -n "$PKG_CONFIG"; then
9690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9691$as_echo "$PKG_CONFIG" >&6; }
9692else
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9694$as_echo "no" >&6; }
9695fi
9696
9697
9698fi
9699if test -z "$ac_cv_path_PKG_CONFIG"; then
9700 ac_pt_PKG_CONFIG=$PKG_CONFIG
9701 # Extract the first word of "pkg-config", so it can be a program name with args.
9702set dummy pkg-config; ac_word=$2
9703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9704$as_echo_n "checking for $ac_word... " >&6; }
9705if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9706 $as_echo_n "(cached) " >&6
9707else
9708 case $ac_pt_PKG_CONFIG in
9709 [\\/]* | ?:[\\/]*)
9710 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9711 ;;
9712 *)
9713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9714for as_dir in $PATH
9715do
9716 IFS=$as_save_IFS
9717 test -z "$as_dir" && as_dir=.
9718 for ac_exec_ext in '' $ac_executable_extensions; do
9719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9720 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9722 break 2
9723 fi
9724done
9725 done
9726IFS=$as_save_IFS
9727
9728 ;;
9729esac
9730fi
9731ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9732if test -n "$ac_pt_PKG_CONFIG"; then
9733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9734$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9735else
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9737$as_echo "no" >&6; }
9738fi
9739
9740 if test "x$ac_pt_PKG_CONFIG" = x; then
9741 PKG_CONFIG=""
9742 else
9743 case $cross_compiling:$ac_tool_warned in
9744yes:)
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9747ac_tool_warned=yes ;;
9748esac
9749 PKG_CONFIG=$ac_pt_PKG_CONFIG
9750 fi
9751else
9752 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9753fi
9754
9755fi
9756if test -n "$PKG_CONFIG"; then
9757 _pkg_min_version=0.9.0
9758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9759$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9760 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9762$as_echo "yes" >&6; }
9763 else
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9765$as_echo "no" >&6; }
9766 PKG_CONFIG=""
9767 fi
9768fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009769
9770# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9772$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009773
9774# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009775if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009776 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009777else
9778 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009779fi
9780
9781
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9783$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009784
9785# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9787$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009788
9789# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009790if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009791 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009792else
9793 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009794fi
9795
9796
9797if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009798 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9799else
9800 LIBFFI_INCLUDEDIR=""
9801fi
9802
9803
Matthias Kloseb9621712010-04-24 17:59:49 +00009804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9805$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009806
Stefan Krah60187b52012-03-23 19:06:27 +01009807# Check for use of the system libmpdec library
9808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9809$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9810
9811# Check whether --with-system_libmpdec was given.
9812if test "${with_system_libmpdec+set}" = set; then :
9813 withval=$with_system_libmpdec;
9814else
9815 with_system_libmpdec="no"
9816fi
9817
9818
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9820$as_echo "$with_system_libmpdec" >&6; }
9821
Benjamin Peterson076ed002010-10-31 17:11:02 +00009822# Check for support for loadable sqlite extensions
9823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9824$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9825# Check whether --enable-loadable-sqlite-extensions was given.
9826if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9827 enableval=$enable_loadable_sqlite_extensions;
9828else
9829 enable_loadable_sqlite_extensions="no"
9830fi
9831
9832
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9834$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9835
Ned Deilyd819b932013-09-06 01:07:05 -07009836# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9837
9838
9839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9840$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9841
9842# Check whether --with-tcltk-includes was given.
9843if test "${with_tcltk_includes+set}" = set; then :
9844 withval=$with_tcltk_includes;
9845else
9846 with_tcltk_includes="default"
9847fi
9848
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9850$as_echo "$with_tcltk_includes" >&6; }
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9852$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9853
9854# Check whether --with-tcltk-libs was given.
9855if test "${with_tcltk_libs+set}" = set; then :
9856 withval=$with_tcltk_libs;
9857else
9858 with_tcltk_libs="default"
9859fi
9860
9861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9862$as_echo "$with_tcltk_libs" >&6; }
9863if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9864then
9865 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9866 then
9867 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9868 fi
9869 TCLTK_INCLUDES=""
9870 TCLTK_LIBS=""
9871else
9872 TCLTK_INCLUDES="$with_tcltk_includes"
9873 TCLTK_LIBS="$with_tcltk_libs"
9874fi
9875
Matthias Klose55708cc2009-04-30 08:06:49 +00009876# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9878$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009879
9880# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009881if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009882 withval=$with_dbmliborder;
9883if test x$with_dbmliborder = xyes
9884then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009885as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009886else
9887 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9888 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9889 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009890 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009891 fi
9892 done
9893fi
9894fi
9895
Matthias Kloseb9621712010-04-24 17:59:49 +00009896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9897$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009898
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009899# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009900
9901
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9903$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009906if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907 withval=$with_signal_module;
9908fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009909
9910
9911if test -z "$with_signal_module"
9912then with_signal_module="yes"
9913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9915$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009916
9917if test "${with_signal_module}" = "yes"; then
9918 USE_SIGNAL_MODULE=""
9919 SIGNAL_OBJS=""
9920else
9921 USE_SIGNAL_MODULE="#"
9922 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9923fi
9924
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009925# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009926
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009927USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009929
Martin v. Löwis11437992002-04-12 09:54:03 +00009930
9931# Templates for things AC_DEFINEd more than once.
9932# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009933
9934
Martin v. Löwis11437992002-04-12 09:54:03 +00009935
Matthias Kloseb9621712010-04-24 17:59:49 +00009936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9937$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009940if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941 withval=$with_threads;
9942fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009943
9944
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009945# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009947# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009948if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949 withval=$with_thread; with_threads=$with_thread
9950fi
9951
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009952
9953if test -z "$with_threads"
9954then with_threads="yes"
9955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9957$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009958
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009959
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009960if test "$with_threads" = "no"
9961then
9962 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009963elif test "$ac_cv_pthread_is_default" = yes
9964then
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009966
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009967 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009968 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009969
9970 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009972elif test "$ac_cv_kpthread" = "yes"
9973then
9974 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009975 if test "$ac_cv_cxx_thread" = "yes"; then
9976 CXX="$CXX -Kpthread"
9977 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009979
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009980 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009981 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009982elif test "$ac_cv_kthread" = "yes"
9983then
9984 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009985 if test "$ac_cv_cxx_thread" = "yes"; then
9986 CXX="$CXX -Kthread"
9987 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009989
9990 posix_threads=yes
9991 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009992elif test "$ac_cv_pthread" = "yes"
9993then
9994 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009995 if test "$ac_cv_cxx_thread" = "yes"; then
9996 CXX="$CXX -pthread"
9997 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009999
10000 posix_threads=yes
10001 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010002else
10003 if test ! -z "$with_threads" -a -d "$with_threads"
10004 then LDFLAGS="$LDFLAGS -L$with_threads"
10005 fi
10006 if test ! -z "$withval" -a -d "$withval"
10007 then LDFLAGS="$LDFLAGS -L$withval"
10008 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010009
10010 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010011 # define _POSIX_THREADS in unistd.h. Some apparently don't
10012 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10014$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010016/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010017
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010018#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010019#ifdef _POSIX_THREADS
10020yes
10021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010022
10023_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010026 unistd_defines_pthreads=yes
10027else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010028 unistd_defines_pthreads=no
10029fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010030rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010031
Matthias Kloseb9621712010-04-24 17:59:49 +000010032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10033$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010034
Matthias Kloseb9621712010-04-24 17:59:49 +000010035 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010036
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010037 # Just looking for pthread_create in libpthread is not enough:
10038 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10039 # So we really have to include pthread.h, and then link.
10040 _libs=$LIBS
10041 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10043$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010045/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010046
10047#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010048#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010049
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010050void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010051int
10052main ()
10053{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010054
10055pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010056 ;
10057 return 0;
10058}
10059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010060if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010061
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10063$as_echo "yes" >&6; }
10064 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010065
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010066 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010067 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010068else
Martin v. Löwis11437992002-04-12 09:54:03 +000010069
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010070 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010072if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010073 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010074
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010075 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010076 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010077else
Guido van Rossumad678af1998-10-02 14:42:15 +000010078
Matthias Kloseb9621712010-04-24 17:59:49 +000010079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10080$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010081if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010083else
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010085LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010089/* Override any GCC internal prototype to avoid an error.
10090 Use char because int might match the return type of a GCC
10091 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010092#ifdef __cplusplus
10093extern "C"
10094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010095char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010096int
10097main ()
10098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 ;
10101 return 0;
10102}
10103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010104if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010105 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010106else
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010109rm -f core conftest.err conftest.$ac_objext \
10110 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010111LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10114$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010115if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010116 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010117
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010118 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010119 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010120 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010121else
Greg Steinadf63d62000-07-05 10:38:09 +000010122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10124$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010125if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010127else
Martin v. Löwis11437992002-04-12 09:54:03 +000010128 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010129LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133/* Override any GCC internal prototype to avoid an error.
10134 Use char because int might match the return type of a GCC
10135 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010136#ifdef __cplusplus
10137extern "C"
10138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010139char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010140int
10141main ()
10142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ;
10145 return 0;
10146}
10147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010148if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010150else
Matthias Kloseb9621712010-04-24 17:59:49 +000010151 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010153rm -f core conftest.err conftest.$ac_objext \
10154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010155LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10158$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010159if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010161
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010162 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010163 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010164 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010165else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010166
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10168$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010169if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010170 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010171else
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010173LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177/* Override any GCC internal prototype to avoid an error.
10178 Use char because int might match the return type of a GCC
10179 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010180#ifdef __cplusplus
10181extern "C"
10182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010183char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010184int
10185main ()
10186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 ;
10189 return 0;
10190}
10191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010192if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010193 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010194else
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010197rm -f core conftest.err conftest.$ac_objext \
10198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010199LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10202$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010203if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010206 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010207 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010208 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010209else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10212$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010213if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010215else
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010217LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221/* Override any GCC internal prototype to avoid an error.
10222 Use char because int might match the return type of a GCC
10223 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010224#ifdef __cplusplus
10225extern "C"
10226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010227char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010228int
10229main ()
10230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 ;
10233 return 0;
10234}
10235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010238else
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241rm -f core conftest.err conftest.$ac_objext \
10242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010243LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10246$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010247if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010249
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010250 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010251 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010252 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010253else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010254
Martin v. Löwis130fb172001-07-19 11:00:41 +000010255 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010256fi
10257
Guido van Rossum627b2d71993-12-24 10:39:16 +000010258
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010259fi
10260
Guido van Rossum0be3e491997-05-22 20:33:33 +000010261fi
10262
Guido van Rossum49545951997-12-02 19:28:29 +000010263fi
10264
Guido van Rossumb93a8621998-05-07 13:27:32 +000010265fi
10266
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010268rm -f core conftest.err conftest.$ac_objext \
10269 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010270
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10272$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010273if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010275else
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010277LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281/* Override any GCC internal prototype to avoid an error.
10282 Use char because int might match the return type of a GCC
10283 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010284#ifdef __cplusplus
10285extern "C"
10286#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010287char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010288int
10289main ()
10290{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 ;
10293 return 0;
10294}
10295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010298else
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010301rm -f core conftest.err conftest.$ac_objext \
10302 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010303LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10306$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010307if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010309
Martin v. Löwis130fb172001-07-19 11:00:41 +000010310 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010311 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010312 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010313fi
10314
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010315
Neal Norwitza978ab02002-11-02 16:58:05 +000010316 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10318$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010319if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010321else
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010323LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010327/* Override any GCC internal prototype to avoid an error.
10328 Use char because int might match the return type of a GCC
10329 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010330#ifdef __cplusplus
10331extern "C"
10332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010333char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010334int
10335main ()
10336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 ;
10339 return 0;
10340}
10341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010342if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010343 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010344else
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010347rm -f core conftest.err conftest.$ac_objext \
10348 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010349LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10352$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010353if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010355
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010356 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010357 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010358 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010359fi
10360
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010361 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010362fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010363
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010364if test "$posix_threads" = "yes"; then
10365 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010366
Matthias Kloseb9621712010-04-24 17:59:49 +000010367$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010368
10369 fi
10370
10371 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10372 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010373 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010374$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010375
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010376 ;;
10377 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010378$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010379
10380 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010381 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010382$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010383
10384 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010385 esac
10386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10388$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010389 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010391else
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010393 ac_cv_pthread_system_supported=no
10394else
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010396/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010397
10398 #include <stdio.h>
10399 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010400 void *foo(void *parm) {
10401 return NULL;
10402 }
10403 main() {
10404 pthread_attr_t attr;
10405 pthread_t id;
10406 if (pthread_attr_init(&attr)) exit(-1);
10407 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10408 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10409 exit(0);
10410 }
10411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010412if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010413 ac_cv_pthread_system_supported=yes
10414else
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10418 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010419fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010421
Guido van Rossum627b2d71993-12-24 10:39:16 +000010422fi
10423
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10425$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010426 if test "$ac_cv_pthread_system_supported" = "yes"; then
10427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010429
10430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 for ac_func in pthread_sigmask
10432do :
10433 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010434if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010435 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010436#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010437_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010438 case $ac_sys_system in
10439 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010442
10443 ;;
10444 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010445fi
10446done
10447
Christian Heimesf77b4b22013-08-21 13:26:05 +020010448 for ac_func in pthread_atfork
10449do :
10450 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10451if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10452 cat >>confdefs.h <<_ACEOF
10453#define HAVE_PTHREAD_ATFORK 1
10454_ACEOF
10455
10456fi
10457done
10458
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010459fi
10460
10461
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010462# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010463
Matthias Kloseb9621712010-04-24 17:59:49 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10465$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010466# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010467if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010468 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010469 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010472 ipv6=no
10473 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10475$as_echo "yes" >&6; }
10476 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010477
10478 ipv6=yes
10479 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010480 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010481else
Martin v. Löwis11437992002-04-12 09:54:03 +000010482
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010484/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010485 /* AF_INET6 available check */
10486#include <sys/types.h>
10487#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010488int
10489main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010490{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010491int domain = AF_INET6;
10492 ;
10493 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010494}
Martin v. Löwis11437992002-04-12 09:54:03 +000010495_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010496if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010497
Matthias Kloseb9621712010-04-24 17:59:49 +000010498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10499$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010500 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010501
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010502else
Matthias Kloseb159a552010-04-25 21:00:44 +000010503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010506 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010507
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010508fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010511if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10513$as_echo_n "checking if RFC2553 API is available... " >&6; }
10514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010515/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010516
10517 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010518#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010519int
10520main ()
10521{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010522struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010523 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010524 ;
10525 return 0;
10526}
Matthias Kloseb159a552010-04-25 21:00:44 +000010527
Martin v. Löwis11437992002-04-12 09:54:03 +000010528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010530
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010532$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010533 ipv6=yes
10534
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010535else
Matthias Kloseb159a552010-04-25 21:00:44 +000010536
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010538$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010539 ipv6=no
10540
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010543fi
10544
10545if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010547
10548fi
10549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010550fi
10551
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010552
10553ipv6type=unknown
10554ipv6lib=none
10555ipv6trylibc=no
10556
10557if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10559$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010560 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10561 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010562 case $i in
10563 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010565/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010566
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010567#include <netinet/in.h>
10568#ifdef IPV6_INRIA_VERSION
10569yes
10570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010571_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010574 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010575fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010576rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010577
10578 ;;
10579 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010581/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010582
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010583#include <netinet/in.h>
10584#ifdef __KAME__
10585yes
10586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010587_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590 ipv6type=$i;
10591 ipv6lib=inet6
10592 ipv6libdir=/usr/local/v6/lib
10593 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010594fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010595rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010596
10597 ;;
10598 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010600/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010601
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010602#include <features.h>
10603#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10604yes
10605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010606_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010609 ipv6type=$i;
10610 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010611fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010612rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613
10614 ;;
10615 linux-inet6)
10616 if test -d /usr/inet6; then
10617 ipv6type=$i
10618 ipv6lib=inet6
10619 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010620 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010621 fi
10622 ;;
10623 solaris)
10624 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010625 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010626 ipv6type=$i
10627 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010628 fi
10629 fi
10630 ;;
10631 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010633/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010634
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010635#include <sys/param.h>
10636#ifdef _TOSHIBA_INET6
10637yes
10638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010639_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010642 ipv6type=$i;
10643 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010644 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010646rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010647
10648 ;;
10649 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010651/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010652
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653#include </usr/local/v6/include/sys/v6config.h>
10654#ifdef __V6D__
10655yes
10656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010657_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010658if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010660 ipv6type=$i;
10661 ipv6lib=v6;
10662 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010663 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010664fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010665rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010666
10667 ;;
10668 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010670/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010671
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010672#include <sys/param.h>
10673#ifdef _ZETA_MINAMI_INET6
10674yes
10675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010676_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679 ipv6type=$i;
10680 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010681 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010682fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010683rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010684
10685 ;;
10686 esac
10687 if test "$ipv6type" != "unknown"; then
10688 break
10689 fi
10690 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10692$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693fi
10694
10695if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10696 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10697 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10698 echo "using lib$ipv6lib"
10699 else
10700 if test $ipv6trylibc = "yes"; then
10701 echo "using libc"
10702 else
10703 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10704 echo "You need to fetch lib$ipv6lib.a from appropriate"
10705 echo 'ipv6 kit and compile beforehand.'
10706 exit 1
10707 fi
10708 fi
10709fi
10710
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10712$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10714/* end confdefs.h. */
10715 /* CAN_RAW_FD_FRAMES available check */
10716#include <linux/can/raw.h>
10717int
10718main ()
10719{
10720int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10721 ;
10722 return 0;
10723}
10724_ACEOF
10725if ac_fn_c_try_compile "$LINENO"; then :
10726
10727
10728$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10729
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10731$as_echo "yes" >&6; }
10732
10733else
10734
10735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10736$as_echo "no" >&6; }
10737
10738fi
10739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10742$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010744/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010745
10746 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010747int
10748main ()
10749{
10750FSIORefNum fRef = 0
10751 ;
10752 return 0;
10753}
Matthias Kloseb159a552010-04-25 21:00:44 +000010754
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010756if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010757
Matthias Kloseb159a552010-04-25 21:00:44 +000010758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10762$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010763
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010764else
Matthias Kloseb159a552010-04-25 21:00:44 +000010765
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010768
10769fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10771
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010772# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10774$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010777if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778 withval=$with_doc_strings;
10779fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010780
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010781
10782if test -z "$with_doc_strings"
10783then with_doc_strings="yes"
10784fi
10785if test "$with_doc_strings" != "no"
10786then
10787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010789
10790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10792$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010793
Antoine Pitrou042b1282010-08-13 21:15:58 +000010794# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10796$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010799if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010800 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010801if test "$withval" != no
10802then
10803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010805
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10807$as_echo "yes" >&6; }
10808else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10809$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010810fi
10811else
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10813$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010814fi
10815
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010816
10817# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10819$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010822if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823 withval=$with_pymalloc;
10824fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010825
Neil Schemenauera35c6882001-02-27 04:45:05 +000010826
Neil Schemenauer16c22972002-03-22 15:34:49 +000010827if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010828then
10829 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010830fi
10831if test "$with_pymalloc" != "no"
10832then
Martin v. Löwis11437992002-04-12 09:54:03 +000010833
Matthias Kloseb9621712010-04-24 17:59:49 +000010834$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010835
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010836 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10839$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010840
Benjamin Peterson05159c42009-12-03 03:01:27 +000010841# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10843$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010844
10845# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010846if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010847 withval=$with_valgrind;
10848else
10849 with_valgrind=no
10850fi
10851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10853$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010854if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 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 +020010856if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010859
10860else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010861 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010862
10863fi
10864
10865
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010866 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010867fi
10868
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010869# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010870
Guido van Rossum98935bf2001-09-05 19:13:16 +000010871DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010872
Guido van Rossume97ee181999-12-20 21:27:22 +000010873# the dlopen() function means we might want to use dynload_shlib.o. some
10874# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010875for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010876do :
10877 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010878if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010880#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010881_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010882
Guido van Rossume97ee181999-12-20 21:27:22 +000010883fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010884done
Guido van Rossume97ee181999-12-20 21:27:22 +000010885
Michael W. Hudson54241132001-12-07 15:38:26 +000010886
Guido van Rossume97ee181999-12-20 21:27:22 +000010887# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10888# loading of modules.
10889
Matthias Kloseb9621712010-04-24 17:59:49 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10891$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010892if test -z "$DYNLOADFILE"
10893then
10894 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010895 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10896 if test "$ac_cv_func_dlopen" = yes
10897 then DYNLOADFILE="dynload_shlib.o"
10898 else DYNLOADFILE="dynload_aix.o"
10899 fi
10900 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010901 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010902 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10903 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010904 *)
10905 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10906 # out any dynamic loading
10907 if test "$ac_cv_func_dlopen" = yes
10908 then DYNLOADFILE="dynload_shlib.o"
10909 else DYNLOADFILE="dynload_stub.o"
10910 fi
10911 ;;
10912 esac
10913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10915$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010916if test "$DYNLOADFILE" != "dynload_stub.o"
10917then
Martin v. Löwis11437992002-04-12 09:54:03 +000010918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010920
10921fi
10922
Neil Schemenauer4e425612001-06-19 15:44:15 +000010923# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10924
Michael W. Hudson54241132001-12-07 15:38:26 +000010925
Matthias Kloseb9621712010-04-24 17:59:49 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10927$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010928if test -z "$MACHDEP_OBJS"
10929then
Jack Jansene578a632001-08-15 01:27:14 +000010930 MACHDEP_OBJS=$extra_machdep_objs
10931else
10932 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010933fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010934if test -z "$MACHDEP_OBJS"; then
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10936$as_echo "none" >&6; }
10937else
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10939$as_echo "$MACHDEP_OBJS" >&6; }
10940fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010941
Guido van Rossum627b2d71993-12-24 10:39:16 +000010942# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010943for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010944 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010945 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010946 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010947 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010948 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010949 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010950 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10951 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010952 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010953 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010954 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010955 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010956 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010957 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010958 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10959 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010960 sigaction sigaltstack siginterrupt sigpending sigrelse \
10961 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010962 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010963 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010964 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010965do :
10966 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10967ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010968if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010970#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010971_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010972
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010973fi
10974done
10975
Michael W. Hudson54241132001-12-07 15:38:26 +000010976
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010977ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10978 #include <dirent.h>
10979"
10980if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10981
10982$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10983
10984fi
10985
10986
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010987# For some functions, having a definition is not sufficient, since
10988# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10990$as_echo_n "checking for chroot... " >&6; }
10991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010992/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010993#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010994int
10995main ()
10996{
10997void *x=chroot
10998 ;
10999 return 0;
11000}
11001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011003
Matthias Kloseb9621712010-04-24 17:59:49 +000011004$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011005
Matthias Kloseb159a552010-04-25 21:00:44 +000011006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011007$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011008else
Matthias Kloseb9621712010-04-24 17:59:49 +000011009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11010$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011011
11012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11015$as_echo_n "checking for link... " >&6; }
11016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011017/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011018#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011019int
11020main ()
11021{
11022void *x=link
11023 ;
11024 return 0;
11025}
11026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011027if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011028
Matthias Kloseb9621712010-04-24 17:59:49 +000011029$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011030
Matthias Kloseb159a552010-04-25 21:00:44 +000011031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011032$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011033else
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11035$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011036
11037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11040$as_echo_n "checking for symlink... " >&6; }
11041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011042/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011043#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011044int
11045main ()
11046{
11047void *x=symlink
11048 ;
11049 return 0;
11050}
11051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011055
Matthias Kloseb159a552010-04-25 21:00:44 +000011056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011057$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011058else
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011061
11062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11065$as_echo_n "checking for fchdir... " >&6; }
11066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011067/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011068#include <unistd.h>
11069int
11070main ()
11071{
11072void *x=fchdir
11073 ;
11074 return 0;
11075}
11076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011077if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011078
Matthias Kloseb9621712010-04-24 17:59:49 +000011079$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011080
Matthias Kloseb159a552010-04-25 21:00:44 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011082$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011083else
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11085$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011086
11087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11090$as_echo_n "checking for fsync... " >&6; }
11091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011092/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011093#include <unistd.h>
11094int
11095main ()
11096{
11097void *x=fsync
11098 ;
11099 return 0;
11100}
11101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011102if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011103
Matthias Kloseb9621712010-04-24 17:59:49 +000011104$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011105
Matthias Kloseb159a552010-04-25 21:00:44 +000011106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011107$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011108else
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11110$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011111
11112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11115$as_echo_n "checking for fdatasync... " >&6; }
11116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011117/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011118#include <unistd.h>
11119int
11120main ()
11121{
11122void *x=fdatasync
11123 ;
11124 return 0;
11125}
11126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011127if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011128
Matthias Kloseb9621712010-04-24 17:59:49 +000011129$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011130
Matthias Kloseb159a552010-04-25 21:00:44 +000011131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011132$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011133else
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11135$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011136
11137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11140$as_echo_n "checking for epoll... " >&6; }
11141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011142/* end confdefs.h. */
11143#include <sys/epoll.h>
11144int
11145main ()
11146{
11147void *x=epoll_create
11148 ;
11149 return 0;
11150}
11151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011153
Matthias Kloseb9621712010-04-24 17:59:49 +000011154$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011155
Matthias Kloseb159a552010-04-25 21:00:44 +000011156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011157$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011158else
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11160$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011161
11162fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11165$as_echo_n "checking for epoll_create1... " >&6; }
11166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11167/* end confdefs.h. */
11168#include <sys/epoll.h>
11169int
11170main ()
11171{
11172void *x=epoll_create1
11173 ;
11174 return 0;
11175}
11176_ACEOF
11177if ac_fn_c_try_compile "$LINENO"; then :
11178
11179$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11180
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11182$as_echo "yes" >&6; }
11183else
11184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11185$as_echo "no" >&6; }
11186
11187fi
11188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11190$as_echo_n "checking for kqueue... " >&6; }
11191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011192/* end confdefs.h. */
11193
11194#include <sys/types.h>
11195#include <sys/event.h>
11196
11197int
11198main ()
11199{
11200int x=kqueue()
11201 ;
11202 return 0;
11203}
11204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011205if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011206
Matthias Kloseb9621712010-04-24 17:59:49 +000011207$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011208
Matthias Kloseb159a552010-04-25 21:00:44 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011211else
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011214
11215fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11218$as_echo_n "checking for prlimit... " >&6; }
11219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11220/* end confdefs.h. */
11221
11222#include <sys/time.h>
11223#include <sys/resource.h>
11224
11225int
11226main ()
11227{
11228void *x=prlimit
11229 ;
11230 return 0;
11231}
11232_ACEOF
11233if ac_fn_c_try_compile "$LINENO"; then :
11234
11235$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11236
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11238$as_echo "yes" >&6; }
11239else
11240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241$as_echo "no" >&6; }
11242
11243fi
11244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11245
Martin v. Löwisd5843682002-11-21 20:41:28 +000011246# On some systems (eg. FreeBSD 5), we would find a definition of the
11247# functions ctermid_r, setgroups in the library, but no prototype
11248# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11249# address to avoid compiler warnings and potential miscompilations
11250# because of the missing prototypes.
11251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11253$as_echo_n "checking for ctermid_r... " >&6; }
11254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011255/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011256
Martin v. Löwisd5843682002-11-21 20:41:28 +000011257#include <stdio.h>
11258
Martin v. Löwisd5843682002-11-21 20:41:28 +000011259int
11260main ()
11261{
11262void* p = ctermid_r
11263 ;
11264 return 0;
11265}
11266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011268
Matthias Kloseb9621712010-04-24 17:59:49 +000011269$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011270
Matthias Kloseb159a552010-04-25 21:00:44 +000011271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011272$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011273else
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11275$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011276
11277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11279
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11281$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011282if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011283 $as_echo_n "(cached) " >&6
11284else
11285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011287#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011288int
11289main ()
11290{
11291void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011292
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011293 ;
11294 return 0;
11295}
11296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011298 ac_cv_flock_decl=yes
11299else
11300 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011301
11302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011304
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011305fi
11306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11307$as_echo "$ac_cv_flock_decl" >&6; }
11308if test "x${ac_cv_flock_decl}" = xyes; then
11309 for ac_func in flock
11310do :
11311 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011312if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011313 cat >>confdefs.h <<_ACEOF
11314#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011315_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011316
Antoine Pitroua3000072010-09-07 14:52:42 +000011317else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011319$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011320if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011321 $as_echo_n "(cached) " >&6
11322else
11323 ac_check_lib_save_LIBS=$LIBS
11324LIBS="-lbsd $LIBS"
11325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11326/* end confdefs.h. */
11327
11328/* Override any GCC internal prototype to avoid an error.
11329 Use char because int might match the return type of a GCC
11330 builtin and then its argument prototype would still apply. */
11331#ifdef __cplusplus
11332extern "C"
11333#endif
11334char flock ();
11335int
11336main ()
11337{
11338return flock ();
11339 ;
11340 return 0;
11341}
11342_ACEOF
11343if ac_fn_c_try_link "$LINENO"; then :
11344 ac_cv_lib_bsd_flock=yes
11345else
11346 ac_cv_lib_bsd_flock=no
11347fi
11348rm -f core conftest.err conftest.$ac_objext \
11349 conftest$ac_exeext conftest.$ac_ext
11350LIBS=$ac_check_lib_save_LIBS
11351fi
11352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11353$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011354if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011355 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011356
11357
11358$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11359
11360
11361fi
11362
11363
11364fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011365done
11366
Antoine Pitroua3000072010-09-07 14:52:42 +000011367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011368
Matthias Kloseb9621712010-04-24 17:59:49 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11370$as_echo_n "checking for getpagesize... " >&6; }
11371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011373
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011374#include <unistd.h>
11375
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011376int
11377main ()
11378{
11379void* p = getpagesize
11380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011385
Matthias Kloseb9621712010-04-24 17:59:49 +000011386$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011387
Matthias Kloseb159a552010-04-25 21:00:44 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011389$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011390else
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011393
11394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011396
Victor Stinner984890f2011-11-24 13:53:38 +010011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11398$as_echo_n "checking for broken unsetenv... " >&6; }
11399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11400/* end confdefs.h. */
11401
11402#include <stdlib.h>
11403
11404int
11405main ()
11406{
11407int res = unsetenv("DUMMY")
11408 ;
11409 return 0;
11410}
11411_ACEOF
11412if ac_fn_c_try_compile "$LINENO"; then :
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
11415else
11416
11417$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11418
11419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11420$as_echo "yes" >&6; }
11421
11422fi
11423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11424
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011425for ac_prog in true
11426do
11427 # Extract the first word of "$ac_prog", so it can be a program name with args.
11428set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11430$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011431if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011433else
11434 if test -n "$TRUE"; then
11435 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11436else
11437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11438for as_dir in $PATH
11439do
11440 IFS=$as_save_IFS
11441 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011442 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011444 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 $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 +000011446 break 2
11447 fi
11448done
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011451
11452fi
11453fi
11454TRUE=$ac_cv_prog_TRUE
11455if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11457$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011458else
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011461fi
11462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011464 test -n "$TRUE" && break
11465done
11466test -n "$TRUE" || TRUE="/bin/true"
11467
11468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11470$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011471if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011473else
11474 ac_check_lib_save_LIBS=$LIBS
11475LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011477/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011479/* Override any GCC internal prototype to avoid an error.
11480 Use char because int might match the return type of a GCC
11481 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011482#ifdef __cplusplus
11483extern "C"
11484#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011485char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011486int
11487main ()
11488{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011490 ;
11491 return 0;
11492}
11493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011494if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011495 ac_cv_lib_c_inet_aton=yes
11496else
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011499rm -f core conftest.err conftest.$ac_objext \
11500 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011501LIBS=$ac_check_lib_save_LIBS
11502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11504$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011505if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011506 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011507else
Matthias Kloseb9621712010-04-24 17:59:49 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11509$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011510if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011511 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011512else
11513 ac_check_lib_save_LIBS=$LIBS
11514LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011516/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518/* Override any GCC internal prototype to avoid an error.
11519 Use char because int might match the return type of a GCC
11520 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011521#ifdef __cplusplus
11522extern "C"
11523#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011524char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011525int
11526main ()
11527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011529 ;
11530 return 0;
11531}
11532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011534 ac_cv_lib_resolv_inet_aton=yes
11535else
Matthias Kloseb9621712010-04-24 17:59:49 +000011536 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011538rm -f core conftest.err conftest.$ac_objext \
11539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011540LIBS=$ac_check_lib_save_LIBS
11541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11543$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011544if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011545 cat >>confdefs.h <<_ACEOF
11546#define HAVE_LIBRESOLV 1
11547_ACEOF
11548
11549 LIBS="-lresolv $LIBS"
11550
11551fi
11552
11553
11554fi
11555
11556
Christian Heimesd0764e22007-12-04 15:00:33 +000011557# On Tru64, chflags seems to be present, but calling it will
11558# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11560$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011561if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011563else
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011565 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011566else
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011568/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011569
Christian Heimesd0764e22007-12-04 15:00:33 +000011570#include <sys/stat.h>
11571#include <unistd.h>
11572int main(int argc, char*argv[])
11573{
11574 if(chflags(argv[0], 0) != 0)
11575 return 1;
11576 return 0;
11577}
Ned Deily3eb67d52011-06-28 00:00:28 -070011578
Christian Heimesd0764e22007-12-04 15:00:33 +000011579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011580if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011581 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011582else
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011587fi
11588
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011589
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11592$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011593if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011595if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011596 ac_cv_have_chflags="yes"
11597else
11598 ac_cv_have_chflags="no"
11599fi
11600
11601fi
11602if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011605
11606fi
11607
Matthias Kloseb9621712010-04-24 17:59:49 +000011608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11609$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011610if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011612else
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011614 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011615else
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011617/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011618
Christian Heimesd0764e22007-12-04 15:00:33 +000011619#include <sys/stat.h>
11620#include <unistd.h>
11621int main(int argc, char*argv[])
11622{
11623 if(lchflags(argv[0], 0) != 0)
11624 return 1;
11625 return 0;
11626}
Ned Deily3eb67d52011-06-28 00:00:28 -070011627
Christian Heimesd0764e22007-12-04 15:00:33 +000011628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011629if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011630 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011631else
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011636fi
11637
11638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11641$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011642if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011644if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011645 ac_cv_have_lchflags="yes"
11646else
11647 ac_cv_have_lchflags="no"
11648fi
11649
11650fi
11651if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011652
Matthias Kloseb9621712010-04-24 17:59:49 +000011653$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011654
11655fi
11656
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011657case $ac_sys_system/$ac_sys_release in
11658Darwin/*)
11659 _CUR_CFLAGS="${CFLAGS}"
11660 _CUR_LDFLAGS="${LDFLAGS}"
11661 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11662 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11663 ;;
11664esac
11665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11667$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011668if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011670else
11671 ac_check_lib_save_LIBS=$LIBS
11672LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011674/* end confdefs.h. */
11675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011676/* Override any GCC internal prototype to avoid an error.
11677 Use char because int might match the return type of a GCC
11678 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011679#ifdef __cplusplus
11680extern "C"
11681#endif
11682char inflateCopy ();
11683int
11684main ()
11685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011686return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011691if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011692 ac_cv_lib_z_inflateCopy=yes
11693else
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011696rm -f core conftest.err conftest.$ac_objext \
11697 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011698LIBS=$ac_check_lib_save_LIBS
11699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11701$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011702if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011705
11706fi
11707
11708
11709case $ac_sys_system/$ac_sys_release in
11710Darwin/*)
11711 CFLAGS="${_CUR_CFLAGS}"
11712 LDFLAGS="${_CUR_LDFLAGS}"
11713 ;;
11714esac
11715
Matthias Kloseb9621712010-04-24 17:59:49 +000011716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11717$as_echo_n "checking for hstrerror... " >&6; }
11718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011719/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011720
Martin v. Löwise9416172003-05-03 10:12:45 +000011721#include <netdb.h>
11722
Martin v. Löwise9416172003-05-03 10:12:45 +000011723int
11724main ()
11725{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011726void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011727 ;
11728 return 0;
11729}
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011734
Matthias Kloseb159a552010-04-25 21:00:44 +000011735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011740
11741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011742rm -f core conftest.err conftest.$ac_objext \
11743 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11746$as_echo_n "checking for inet_aton... " >&6; }
11747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011748/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011749
Martin v. Löwis86d66262006-02-17 08:40:11 +000011750#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011751#include <sys/socket.h>
11752#include <netinet/in.h>
11753#include <arpa/inet.h>
11754
Martin v. Löwise9416172003-05-03 10:12:45 +000011755int
11756main ()
11757{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011758void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011759 ;
11760 return 0;
11761}
11762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011763if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011764
Matthias Kloseb9621712010-04-24 17:59:49 +000011765$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011766
Matthias Kloseb159a552010-04-25 21:00:44 +000011767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011768$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011772
11773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011774rm -f core conftest.err conftest.$ac_objext \
11775 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011776
Matthias Kloseb9621712010-04-24 17:59:49 +000011777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11778$as_echo_n "checking for inet_pton... " >&6; }
11779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011780/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011781
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011782#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011783#include <sys/socket.h>
11784#include <netinet/in.h>
11785#include <arpa/inet.h>
11786
Martin v. Löwise9416172003-05-03 10:12:45 +000011787int
11788main ()
11789{
11790void* p = inet_pton
11791 ;
11792 return 0;
11793}
11794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011795if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011798
Matthias Kloseb159a552010-04-25 21:00:44 +000011799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011800$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011801else
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11803$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011804
11805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011807
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011808# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11810$as_echo_n "checking for setgroups... " >&6; }
11811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011812/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011813
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011814#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011815#ifdef HAVE_GRP_H
11816#include <grp.h>
11817#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011818
Martin v. Löwisd5843682002-11-21 20:41:28 +000011819int
11820main ()
11821{
11822void* p = setgroups
11823 ;
11824 return 0;
11825}
11826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011828
Matthias Kloseb9621712010-04-24 17:59:49 +000011829$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011830
Matthias Kloseb159a552010-04-25 21:00:44 +000011831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011832$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11835$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011836
11837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011839
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011840# check for openpty and forkpty
11841
11842for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011843do :
11844 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011845if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011846 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011847#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011848_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011849
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11852$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011853if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011855else
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011857LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011861/* Override any GCC internal prototype to avoid an error.
11862 Use char because int might match the return type of a GCC
11863 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011864#ifdef __cplusplus
11865extern "C"
11866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011867char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011868int
11869main ()
11870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011871return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011872 ;
11873 return 0;
11874}
11875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011877 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011881rm -f core conftest.err conftest.$ac_objext \
11882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011883LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11886$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011887if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011889 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11892$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011893if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011895else
11896 ac_check_lib_save_LIBS=$LIBS
11897LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011899/* end confdefs.h. */
11900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011901/* Override any GCC internal prototype to avoid an error.
11902 Use char because int might match the return type of a GCC
11903 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011904#ifdef __cplusplus
11905extern "C"
11906#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011907char openpty ();
11908int
11909main ()
11910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011911return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011912 ;
11913 return 0;
11914}
11915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011916if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011917 ac_cv_lib_bsd_openpty=yes
11918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011921rm -f core conftest.err conftest.$ac_objext \
11922 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011923LIBS=$ac_check_lib_save_LIBS
11924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11926$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011927if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011929 LIBS="$LIBS -lbsd"
11930fi
11931
11932
11933fi
11934
Fred Drake8cef4cf2000-06-28 16:40:38 +000011935
11936fi
11937done
11938
11939for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011940do :
11941 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011942if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011943 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011944#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011945_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011946
Fred Drake8cef4cf2000-06-28 16:40:38 +000011947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11949$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011950if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011952else
Martin v. Löwis11437992002-04-12 09:54:03 +000011953 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011954LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011958/* Override any GCC internal prototype to avoid an error.
11959 Use char because int might match the return type of a GCC
11960 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011961#ifdef __cplusplus
11962extern "C"
11963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011964char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011965int
11966main ()
11967{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011968return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011969 ;
11970 return 0;
11971}
11972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011975else
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011978rm -f core conftest.err conftest.$ac_objext \
11979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011980LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11983$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011984if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011986 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011987else
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11989$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011990if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011992else
11993 ac_check_lib_save_LIBS=$LIBS
11994LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011996/* end confdefs.h. */
11997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011998/* Override any GCC internal prototype to avoid an error.
11999 Use char because int might match the return type of a GCC
12000 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012001#ifdef __cplusplus
12002extern "C"
12003#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012004char forkpty ();
12005int
12006main ()
12007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012008return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012009 ;
12010 return 0;
12011}
12012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012014 ac_cv_lib_bsd_forkpty=yes
12015else
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012018rm -f core conftest.err conftest.$ac_objext \
12019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012020LIBS=$ac_check_lib_save_LIBS
12021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12023$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012024if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012026 LIBS="$LIBS -lbsd"
12027fi
12028
12029
12030fi
12031
Fred Drake8cef4cf2000-06-28 16:40:38 +000012032
12033fi
12034done
12035
Jack Jansendd19cf82001-12-06 22:36:17 +000012036
Christian Heimesb186d002008-03-18 15:15:01 +000012037# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012038for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012039do :
12040 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012041if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012042 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012043#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012044_ACEOF
12045
12046fi
12047done
12048
12049
Michael W. Hudson54241132001-12-07 15:38:26 +000012050# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012051for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012052do :
12053 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12054ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012055if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012058_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012059
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012060fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012061done
12062
Michael W. Hudson54241132001-12-07 15:38:26 +000012063
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012064ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012065if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012066 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012067
Martin v. Löwis1142de32002-03-29 16:28:31 +000012068else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012070 *" dup2.$ac_objext "* ) ;;
12071 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012073esac
12074
Martin v. Löwis1142de32002-03-29 16:28:31 +000012075fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012076
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012077ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012078if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012079 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12080
12081else
12082 case " $LIBOBJS " in
12083 *" strdup.$ac_objext "* ) ;;
12084 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12085 ;;
12086esac
12087
12088fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012089
12090
12091for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012092do :
12093 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012094if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012095 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012096#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012099/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012100#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012101int
12102main ()
12103{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012104getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012105 ;
12106 return 0;
12107}
12108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012110
Matthias Kloseb9621712010-04-24 17:59:49 +000012111$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012112
Guido van Rossum627b2d71993-12-24 10:39:16 +000012113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012115
Guido van Rossum627b2d71993-12-24 10:39:16 +000012116fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012117done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012118
Jack Jansen150753c2003-03-29 22:07:47 +000012119for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012120do :
12121 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012122if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012123 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012124#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012127/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012128#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012129int
12130main ()
12131{
12132setpgrp(0,0);
12133 ;
12134 return 0;
12135}
12136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012138
Matthias Kloseb9621712010-04-24 17:59:49 +000012139$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012140
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012143
12144fi
12145done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012146
Thomas Wouters3a584202000-08-05 23:28:51 +000012147for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012148do :
12149 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012150if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012152#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012155/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012156#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012157int
12158main ()
12159{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ;
12162 return 0;
12163}
12164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012165if ac_fn_c_try_compile "$LINENO"; then :
12166
Guido van Rossum627b2d71993-12-24 10:39:16 +000012167else
Skip Montanaro6dead952003-09-25 14:50:04 +000012168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012170
Martin v. Löwis11437992002-04-12 09:54:03 +000012171
Guido van Rossum627b2d71993-12-24 10:39:16 +000012172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012174
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012176done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177
Michael W. Hudson54241132001-12-07 15:38:26 +000012178
Victor Stinnere0be4232011-10-25 13:06:09 +020012179for ac_func in clock_gettime
12180do :
12181 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12182if test "x$ac_cv_func_clock_gettime" = xyes; then :
12183 cat >>confdefs.h <<_ACEOF
12184#define HAVE_CLOCK_GETTIME 1
12185_ACEOF
12186
12187else
12188
12189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12190$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12191if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12192 $as_echo_n "(cached) " >&6
12193else
12194 ac_check_lib_save_LIBS=$LIBS
12195LIBS="-lrt $LIBS"
12196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12197/* end confdefs.h. */
12198
12199/* Override any GCC internal prototype to avoid an error.
12200 Use char because int might match the return type of a GCC
12201 builtin and then its argument prototype would still apply. */
12202#ifdef __cplusplus
12203extern "C"
12204#endif
12205char clock_gettime ();
12206int
12207main ()
12208{
12209return clock_gettime ();
12210 ;
12211 return 0;
12212}
12213_ACEOF
12214if ac_fn_c_try_link "$LINENO"; then :
12215 ac_cv_lib_rt_clock_gettime=yes
12216else
12217 ac_cv_lib_rt_clock_gettime=no
12218fi
12219rm -f core conftest.err conftest.$ac_objext \
12220 conftest$ac_exeext conftest.$ac_ext
12221LIBS=$ac_check_lib_save_LIBS
12222fi
12223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12224$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12225if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12226
Victor Stinner7efb8332014-08-29 15:41:08 +020012227 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012228 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12229
12230
12231$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12232
12233
12234fi
12235
12236
12237fi
12238done
12239
12240
12241for ac_func in clock_getres
12242do :
12243 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12244if test "x$ac_cv_func_clock_getres" = xyes; then :
12245 cat >>confdefs.h <<_ACEOF
12246#define HAVE_CLOCK_GETRES 1
12247_ACEOF
12248
12249else
12250
12251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12252$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12253if ${ac_cv_lib_rt_clock_getres+:} false; then :
12254 $as_echo_n "(cached) " >&6
12255else
12256 ac_check_lib_save_LIBS=$LIBS
12257LIBS="-lrt $LIBS"
12258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12259/* end confdefs.h. */
12260
12261/* Override any GCC internal prototype to avoid an error.
12262 Use char because int might match the return type of a GCC
12263 builtin and then its argument prototype would still apply. */
12264#ifdef __cplusplus
12265extern "C"
12266#endif
12267char clock_getres ();
12268int
12269main ()
12270{
12271return clock_getres ();
12272 ;
12273 return 0;
12274}
12275_ACEOF
12276if ac_fn_c_try_link "$LINENO"; then :
12277 ac_cv_lib_rt_clock_getres=yes
12278else
12279 ac_cv_lib_rt_clock_getres=no
12280fi
12281rm -f core conftest.err conftest.$ac_objext \
12282 conftest$ac_exeext conftest.$ac_ext
12283LIBS=$ac_check_lib_save_LIBS
12284fi
12285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12286$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12287if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12288
12289 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12290
12291
12292fi
12293
12294
12295fi
12296done
12297
12298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12300$as_echo_n "checking for major... " >&6; }
12301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012302/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012303
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012304#if defined(MAJOR_IN_MKDEV)
12305#include <sys/mkdev.h>
12306#elif defined(MAJOR_IN_SYSMACROS)
12307#include <sys/sysmacros.h>
12308#else
12309#include <sys/types.h>
12310#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012311
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012312int
12313main ()
12314{
12315
12316 makedev(major(0),minor(0));
12317
12318 ;
12319 return 0;
12320}
12321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012322if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012323
12324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012326
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12328$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012329
12330else
Skip Montanaro6dead952003-09-25 14:50:04 +000012331
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12333$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012334
12335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012336rm -f core conftest.err conftest.$ac_objext \
12337 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012338
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012339# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012340# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12342$as_echo_n "checking for getaddrinfo... " >&6; }
12343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012344/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012345
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012346#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012347#include <sys/socket.h>
12348#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012349#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012350
Martin v. Löwis11437992002-04-12 09:54:03 +000012351int
12352main ()
12353{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012354getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012360 have_getaddrinfo=yes
12361else
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012364rm -f core conftest.err conftest.$ac_objext \
12365 conftest$ac_exeext conftest.$ac_ext
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12367$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012368if test $have_getaddrinfo = yes
12369then
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12371$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012372 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012374else
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012376
12377if test "${enable_ipv6+set}" = set; then
12378 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12379else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012380 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012381fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012382else
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385
Stefan Krah19c21392012-11-22 23:47:32 +010012386#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387#include <sys/types.h>
12388#include <netdb.h>
12389#include <string.h>
12390#include <sys/socket.h>
12391#include <netinet/in.h>
12392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012393int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012394{
12395 int passive, gaierr, inet4 = 0, inet6 = 0;
12396 struct addrinfo hints, *ai, *aitop;
12397 char straddr[INET6_ADDRSTRLEN], strport[16];
12398
12399 for (passive = 0; passive <= 1; passive++) {
12400 memset(&hints, 0, sizeof(hints));
12401 hints.ai_family = AF_UNSPEC;
12402 hints.ai_flags = passive ? AI_PASSIVE : 0;
12403 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012404 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012405 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12406 (void)gai_strerror(gaierr);
12407 goto bad;
12408 }
12409 for (ai = aitop; ai; ai = ai->ai_next) {
12410 if (ai->ai_addr == NULL ||
12411 ai->ai_addrlen == 0 ||
12412 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12413 straddr, sizeof(straddr), strport, sizeof(strport),
12414 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12415 goto bad;
12416 }
12417 switch (ai->ai_family) {
12418 case AF_INET:
12419 if (strcmp(strport, "54321") != 0) {
12420 goto bad;
12421 }
12422 if (passive) {
12423 if (strcmp(straddr, "0.0.0.0") != 0) {
12424 goto bad;
12425 }
12426 } else {
12427 if (strcmp(straddr, "127.0.0.1") != 0) {
12428 goto bad;
12429 }
12430 }
12431 inet4++;
12432 break;
12433 case AF_INET6:
12434 if (strcmp(strport, "54321") != 0) {
12435 goto bad;
12436 }
12437 if (passive) {
12438 if (strcmp(straddr, "::") != 0) {
12439 goto bad;
12440 }
12441 } else {
12442 if (strcmp(straddr, "::1") != 0) {
12443 goto bad;
12444 }
12445 }
12446 inet6++;
12447 break;
12448 case AF_UNSPEC:
12449 goto bad;
12450 break;
12451 default:
12452 /* another family support? */
12453 break;
12454 }
12455 }
12456 }
12457
12458 if (!(inet4 == 0 || inet4 == 2))
12459 goto bad;
12460 if (!(inet6 == 0 || inet6 == 2))
12461 goto bad;
12462
12463 if (aitop)
12464 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012465 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012466
12467 bad:
12468 if (aitop)
12469 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012470 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012471}
12472
Martin v. Löwis11437992002-04-12 09:54:03 +000012473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012475 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012476else
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012483fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012484
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12488$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12489
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012490if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012491then
12492 if test $ipv6 = yes
12493 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012494 echo 'Fatal: You must get working getaddrinfo() function.'
12495 echo ' or you can specify "--disable-ipv6"'.
12496 exit 1
12497 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012498else
Martin v. Löwis11437992002-04-12 09:54:03 +000012499
Matthias Kloseb9621712010-04-24 17:59:49 +000012500$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012501
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012502fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012503
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012504for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012505do :
12506 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012507if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012509#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012510_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012511
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012512fi
12513done
12514
Michael W. Hudson54241132001-12-07 15:38:26 +000012515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012516# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12518$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012519if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012521else
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012523/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012524#include <sys/types.h>
12525#include <sys/time.h>
12526#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Martin v. Löwis11437992002-04-12 09:54:03 +000012528int
12529main ()
12530{
12531if ((struct tm *) 0)
12532return 0;
12533 ;
12534 return 0;
12535}
12536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012537if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012539else
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12545$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012546if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012547
Matthias Kloseb9621712010-04-24 17:59:49 +000012548$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012549
12550fi
12551
Matthias Kloseb9621712010-04-24 17:59:49 +000012552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12553$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012554if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012556else
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012558/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012559#include <sys/types.h>
12560#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012561
Martin v. Löwis11437992002-04-12 09:54:03 +000012562int
12563main ()
12564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565struct tm tm;
12566 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 ;
12569 return 0;
12570}
12571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012573 ac_cv_struct_tm=time.h
12574else
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12580$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012581if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012582
Matthias Kloseb9621712010-04-24 17:59:49 +000012583$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012584
12585fi
12586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012588#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012589
Matthias Kloseb9621712010-04-24 17:59:49 +000012590"
Victor Stinnere0be4232011-10-25 13:06:09 +020012591if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
12593cat >>confdefs.h <<_ACEOF
12594#define HAVE_STRUCT_TM_TM_ZONE 1
12595_ACEOF
12596
12597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012598fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012599
Martin v. Löwis11437992002-04-12 09:54:03 +000012600if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012603
12604else
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12606"
Victor Stinnere0be4232011-10-25 13:06:09 +020012607if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012609else
Matthias Kloseb9621712010-04-24 17:59:49 +000012610 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012611fi
12612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615_ACEOF
12616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12618$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012619if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012620 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012621else
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012623/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012624#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012625#if !HAVE_DECL_TZNAME
12626extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012628
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ;
12634 return 0;
12635}
12636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012638 ac_cv_var_tzname=yes
12639else
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642rm -f core conftest.err conftest.$ac_objext \
12643 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12646$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012647 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012648
Matthias Kloseb9621712010-04-24 17:59:49 +000012649$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012650
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651 fi
12652fi
12653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012655if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
12657cat >>confdefs.h <<_ACEOF
12658#define HAVE_STRUCT_STAT_ST_RDEV 1
12659_ACEOF
12660
12661
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012662fi
12663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012665if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012666
Martin v. Löwis11437992002-04-12 09:54:03 +000012667cat >>confdefs.h <<_ACEOF
12668#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12669_ACEOF
12670
12671
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012672fi
12673
Matthias Kloseb9621712010-04-24 17:59:49 +000012674ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012675if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012676
12677cat >>confdefs.h <<_ACEOF
12678#define HAVE_STRUCT_STAT_ST_FLAGS 1
12679_ACEOF
12680
12681
12682fi
12683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012685if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012686
12687cat >>confdefs.h <<_ACEOF
12688#define HAVE_STRUCT_STAT_ST_GEN 1
12689_ACEOF
12690
12691
12692fi
12693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012695if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012696
12697cat >>confdefs.h <<_ACEOF
12698#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12699_ACEOF
12700
12701
12702fi
12703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012705if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012706
Martin v. Löwis11437992002-04-12 09:54:03 +000012707cat >>confdefs.h <<_ACEOF
12708#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12709_ACEOF
12710
12711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012713
12714else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012716 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12718 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012719esac
12720
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012721fi
12722
Michael W. Hudson54241132001-12-07 15:38:26 +000012723
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12726$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012727if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729else
Matthias Kloseb159a552010-04-25 21:00:44 +000012730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012732/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012733#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012734int
12735main ()
12736{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012737return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ;
12739 return 0;
12740}
12741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012743 ac_cv_header_time_altzone=yes
12744else
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749fi
12750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12752$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012753if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012756
12757fi
12758
Guido van Rossumda88dad1995-01-26 00:46:29 +000012759was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12761$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012763/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012764
12765#include <sys/types.h>
12766#include <sys/select.h>
12767#include <sys/time.h>
12768
Martin v. Löwis11437992002-04-12 09:54:03 +000012769int
12770main ()
12771{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012772;
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ;
12774 return 0;
12775}
12776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012778
12779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012781
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012782 was_it_defined=yes
12783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12787$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788
Matthias Kloseb9621712010-04-24 17:59:49 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12790$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012791if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793else
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012795/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012796#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012797int
12798main ()
12799{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012800struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ;
12802 return 0;
12803}
12804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012805if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012806 ac_cv_struct_addrinfo=yes
12807else
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12811fi
12812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12814$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012815if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
Matthias Kloseb9621712010-04-24 17:59:49 +000012817$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012818
12819fi
12820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12822$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012823if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012825else
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012827/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012828
12829# include <sys/types.h>
12830# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012831int
12832main ()
12833{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012834struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 ;
12836 return 0;
12837}
12838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012839if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012840 ac_cv_struct_sockaddr_storage=yes
12841else
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12845fi
12846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12848$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012849if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012852
12853fi
12854
Guido van Rossum627b2d71993-12-24 10:39:16 +000012855# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12858$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012859if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012861else
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012864$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012865int
12866main ()
12867{
12868static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012869test_array [0] = 0;
12870return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
12872 ;
12873 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012874}
Martin v. Löwis11437992002-04-12 09:54:03 +000012875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012876if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012877 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012878else
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12884$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012885if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887
12888fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12891$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012892if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012894else
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897
Martin v. Löwis11437992002-04-12 09:54:03 +000012898int
12899main ()
12900{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012901
Martin v. Löwis11437992002-04-12 09:54:03 +000012902#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012903 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012905 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907 char const *const *pcpcc;
12908 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 /* NEC SVR4.0.2 mips cc rejects this. */
12910 struct point {int x, y;};
12911 static struct point const zero = {0,0};
12912 /* AIX XL C 1.02.0.0 rejects this.
12913 It does not let you subtract one const X* pointer from another in
12914 an arm of an if-expression whose if-part is not a constant
12915 expression */
12916 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919 ++pcpcc;
12920 ppc = (char**) pcpcc;
12921 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012922 { /* SCO 3.2v4 cc rejects this sort of thing. */
12923 char tx;
12924 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012926
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 }
12930 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12931 int x[] = {25, 17};
12932 const int *foo = &x[0];
12933 ++foo;
12934 }
12935 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12936 typedef const int *iptr;
12937 iptr p = 0;
12938 ++p;
12939 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012940 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012942 struct s { int j; const int *ap[3]; } bx;
12943 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 }
12945 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12946 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012950#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012951
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 ;
12953 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012954}
Martin v. Löwis11437992002-04-12 09:54:03 +000012955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012956if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012957 ac_cv_c_const=yes
12958else
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12964$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012965if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012966
Matthias Kloseb9621712010-04-24 17:59:49 +000012967$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012968
12969fi
12970
Michael W. Hudson54241132001-12-07 15:38:26 +000012971
Guido van Rossumda88dad1995-01-26 00:46:29 +000012972works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12974$as_echo_n "checking for working volatile... " >&6; }
12975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012976/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012977
Martin v. Löwis11437992002-04-12 09:54:03 +000012978int
12979main ()
12980{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012981volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 ;
12983 return 0;
12984}
12985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012986if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012987 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012988else
Skip Montanaro6dead952003-09-25 14:50:04 +000012989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012991
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012992
Guido van Rossum627b2d71993-12-24 10:39:16 +000012993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12996$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012997
Guido van Rossumda88dad1995-01-26 00:46:29 +000012998works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13000$as_echo_n "checking for working signed char... " >&6; }
13001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013002/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013003
Martin v. Löwis11437992002-04-12 09:54:03 +000013004int
13005main ()
13006{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013007signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013008 ;
13009 return 0;
13010}
13011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013013 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013014else
Skip Montanaro6dead952003-09-25 14:50:04 +000013015
Matthias Kloseb9621712010-04-24 17:59:49 +000013016$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013017
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013018
Guido van Rossum7f43da71994-08-01 12:15:30 +000013019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13022$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013023
Guido van Rossumda88dad1995-01-26 00:46:29 +000013024have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13026$as_echo_n "checking for prototypes... " >&6; }
13027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013029int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013030int
13031main ()
13032{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013033return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 ;
13035 return 0;
13036}
13037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013038if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013041
Matthias Kloseb159a552010-04-25 21:00:44 +000013042 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13046$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013047
Guido van Rossumda88dad1995-01-26 00:46:29 +000013048works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13050$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013052/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013053
13054#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013055int foo(int x, ...) {
13056 va_list va;
13057 va_start(va, x);
13058 va_arg(va, int);
13059 va_arg(va, char *);
13060 va_arg(va, double);
13061 return 0;
13062}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013063
Martin v. Löwis11437992002-04-12 09:54:03 +000013064int
13065main ()
13066{
Guido van Rossum90eea071996-08-30 20:58:57 +000013067return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013068 ;
13069 return 0;
13070}
13071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013073
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013076
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013077 works=yes
13078
Guido van Rossum627b2d71993-12-24 10:39:16 +000013079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13082$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083
Martin v. Löwisd6320502004-08-12 13:45:08 +000013084# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13086$as_echo_n "checking for socketpair... " >&6; }
13087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013088/* end confdefs.h. */
13089
13090#include <sys/types.h>
13091#include <sys/socket.h>
13092
13093int
13094main ()
13095{
13096void *x=socketpair
13097 ;
13098 return 0;
13099}
13100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013101if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013104
Matthias Kloseb159a552010-04-25 21:00:44 +000013105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013106$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013107else
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13109$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013110
13111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013113
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013114# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13116$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013118/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013119#include <sys/types.h>
13120#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013121int
13122main ()
13123{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013124struct sockaddr x;
13125x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 ;
13127 return 0;
13128}
13129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013130if ac_fn_c_try_compile "$LINENO"; then :
13131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13132$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013135
13136else
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13138$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013139
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013142
Guido van Rossumda88dad1995-01-26 00:46:29 +000013143va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13145$as_echo_n "checking whether va_list is an array... " >&6; }
13146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013147/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013148
13149#ifdef HAVE_STDARG_PROTOTYPES
13150#include <stdarg.h>
13151#else
13152#include <varargs.h>
13153#endif
13154
Martin v. Löwis11437992002-04-12 09:54:03 +000013155int
13156main ()
13157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013158va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 ;
13160 return 0;
13161}
13162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013163if ac_fn_c_try_compile "$LINENO"; then :
13164
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013165else
Skip Montanaro6dead952003-09-25 14:50:04 +000013166
Martin v. Löwis11437992002-04-12 09:54:03 +000013167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013169
Guido van Rossumda88dad1995-01-26 00:46:29 +000013170 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013171
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13175$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013177# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013178
13179
Matthias Kloseb9621712010-04-24 17:59:49 +000013180ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013181if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13186$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013187 OLD_CFLAGS=$CFLAGS
13188 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013190/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013191
13192# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013193
Martin v. Löwis11437992002-04-12 09:54:03 +000013194int
13195main ()
13196{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013197
13198 char *name;
13199 struct hostent *he, *res;
13200 char buffer[2048];
13201 int buflen = 2048;
13202 int h_errnop;
13203
13204 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013205
13206 ;
13207 return 0;
13208}
13209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013213
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13218$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013219
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013220else
Skip Montanaro6dead952003-09-25 14:50:04 +000013221
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13223$as_echo "no" >&6; }
13224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13225$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013227/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013228
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013229# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
Martin v. Löwis11437992002-04-12 09:54:03 +000013231int
13232main ()
13233{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013234
13235 char *name;
13236 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013237 char buffer[2048];
13238 int buflen = 2048;
13239 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013240
Matthias Kloseb159a552010-04-25 21:00:44 +000013241 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013242
13243 ;
13244 return 0;
13245}
13246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013250
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
Matthias Kloseb159a552010-04-25 21:00:44 +000013252$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13255$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013256
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013257else
Skip Montanaro6dead952003-09-25 14:50:04 +000013258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13260$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13262$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13264/* end confdefs.h. */
13265
13266# include <netdb.h>
13267
13268int
13269main ()
13270{
13271
13272 char *name;
13273 struct hostent *he;
13274 struct hostent_data data;
13275
13276 (void) gethostbyname_r(name, he, &data);
13277
13278 ;
13279 return 0;
13280}
13281_ACEOF
13282if ac_fn_c_try_compile "$LINENO"; then :
13283
13284 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13285
13286
13287$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13288
13289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13290$as_echo "yes" >&6; }
13291
13292else
13293
13294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13295$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013296
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013305 CFLAGS=$OLD_CFLAGS
13306
13307else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 for ac_func in gethostbyname
13310do :
13311 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013312if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013314#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013315_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013316
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013317fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013318done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013319
Michael W. Hudson54241132001-12-07 15:38:26 +000013320
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013321fi
13322
Michael W. Hudson54241132001-12-07 15:38:26 +000013323
13324
13325
13326
13327
13328
Guido van Rossum627b2d71993-12-24 10:39:16 +000013329# checks for system services
13330# (none yet)
13331
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013333ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013334if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013335
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13338$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013339if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341else
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013343LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347/* Override any GCC internal prototype to avoid an error.
13348 Use char because int might match the return type of a GCC
13349 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013350#ifdef __cplusplus
13351extern "C"
13352#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013353char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013354int
13355main ()
13356{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 ;
13359 return 0;
13360}
13361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013362if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013363 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013367rm -f core conftest.err conftest.$ac_objext \
13368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013369LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13372$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013373if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 cat >>confdefs.h <<_ACEOF
13375#define HAVE_LIBIEEE 1
13376_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013377
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013378 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379
Guido van Rossum627b2d71993-12-24 10:39:16 +000013380fi
13381
Michael W. Hudson54241132001-12-07 15:38:26 +000013382
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013383fi
13384
Michael W. Hudson54241132001-12-07 15:38:26 +000013385
Guido van Rossum7f253911997-05-09 02:42:48 +000013386# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13388$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013390# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013391if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013392 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013393if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013394then
13395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13399$as_echo "yes" >&6; }
13400else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13401$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013402fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013403else
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13405$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013406fi
13407
Guido van Rossum7f253911997-05-09 02:42:48 +000013408
Guido van Rossum7f43da71994-08-01 12:15:30 +000013409# check for --with-libm=...
13410
Guido van Rossum563e7081996-09-10 18:20:48 +000013411case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013412Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013413*) LIBM=-lm
13414esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13416$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013419if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013421if test "$withval" = no
13422then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13424$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013425elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013426then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13428$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013429else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013430fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013431else
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13433$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434fi
13435
Guido van Rossum7f43da71994-08-01 12:15:30 +000013436
13437# check for --with-libc=...
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13440$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013445if test "$withval" = no
13446then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13448$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013449elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013450then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13452$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013453else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013454fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013455else
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13457$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013458fi
13459
Guido van Rossum7f43da71994-08-01 12:15:30 +000013460
Stefan Krah1919b7e2012-03-21 18:25:23 +010013461# **************************************
13462# * Check for gcc x64 inline assembler *
13463# **************************************
13464
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13466$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13468/* end confdefs.h. */
13469
13470int
13471main ()
13472{
13473
13474 __asm__ __volatile__ ("movq %rcx, %rax");
13475
13476 ;
13477 return 0;
13478}
13479_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013480if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013481 have_gcc_asm_for_x64=yes
13482else
13483 have_gcc_asm_for_x64=no
13484fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013485rm -f core conftest.err conftest.$ac_objext \
13486 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13488$as_echo "$have_gcc_asm_for_x64" >&6; }
13489if test "$have_gcc_asm_for_x64" = yes
13490then
13491
13492$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13493
13494fi
13495
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013496# **************************************************
13497# * Check for various properties of floating point *
13498# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13501$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013502if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013504else
13505
Matthias Kloseb9621712010-04-24 17:59:49 +000013506if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013507 ac_cv_little_endian_double=no
13508else
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013510/* end confdefs.h. */
13511
13512#include <string.h>
13513int main() {
13514 double x = 9006104071832581.0;
13515 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13516 return 0;
13517 else
13518 return 1;
13519}
13520
13521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013523 ac_cv_little_endian_double=yes
13524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13528 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013529fi
13530
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013531fi
13532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13534$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013535if test "$ac_cv_little_endian_double" = yes
13536then
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013539
13540fi
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13543$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013544if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013546else
13547
Matthias Kloseb9621712010-04-24 17:59:49 +000013548if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013549 ac_cv_big_endian_double=no
13550else
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013552/* end confdefs.h. */
13553
13554#include <string.h>
13555int main() {
13556 double x = 9006104071832581.0;
13557 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13558 return 0;
13559 else
13560 return 1;
13561}
13562
13563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013564if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013565 ac_cv_big_endian_double=yes
13566else
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13570 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013571fi
13572
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013573fi
13574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13576$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013577if test "$ac_cv_big_endian_double" = yes
13578then
13579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013581
13582fi
13583
13584# Some ARM platforms use a mixed-endian representation for doubles.
13585# While Python doesn't currently have full support for these platforms
13586# (see e.g., issue 1762561), we can at least make sure that float <-> string
13587# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13589$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013590if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013592else
13593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013595 ac_cv_mixed_endian_double=no
13596else
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013598/* end confdefs.h. */
13599
13600#include <string.h>
13601int main() {
13602 double x = 9006104071832581.0;
13603 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13604 return 0;
13605 else
13606 return 1;
13607}
13608
13609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013610if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013611 ac_cv_mixed_endian_double=yes
13612else
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13616 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013617fi
13618
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013619fi
13620
Matthias Kloseb9621712010-04-24 17:59:49 +000013621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13622$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013623if test "$ac_cv_mixed_endian_double" = yes
13624then
13625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013627
13628fi
13629
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013630# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013631# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013632# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013633# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013634# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013635# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013636
13637# This inline assembler syntax may also work for suncc and icc,
13638# so we try it on all platforms.
13639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13641$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013643/* end confdefs.h. */
13644
13645int
13646main ()
13647{
13648
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013649 unsigned short cw;
13650 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13651 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013652
13653 ;
13654 return 0;
13655}
13656_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013657if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013658 have_gcc_asm_for_x87=yes
13659else
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013661fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013662rm -f core conftest.err conftest.$ac_objext \
13663 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13665$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013666if test "$have_gcc_asm_for_x87" = yes
13667then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013670
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013671fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13674$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13676/* end confdefs.h. */
13677
13678int
13679main ()
13680{
13681
13682 unsigned int fpcr;
13683 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13684 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13685
13686 ;
13687 return 0;
13688}
13689_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013690if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013691 have_gcc_asm_for_mc68881=yes
13692else
13693 have_gcc_asm_for_mc68881=no
13694fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013695rm -f core conftest.err conftest.$ac_objext \
13696 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13698$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13699if test "$have_gcc_asm_for_mc68881" = yes
13700then
13701
13702$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13703
13704fi
13705
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013706# Detect whether system arithmetic is subject to x87-style double
13707# rounding issues. The result of this test has little meaning on non
13708# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13709# mode is round-to-nearest and double rounding issues are present, and
13710# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13712$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013713# $BASECFLAGS may affect the result
13714ac_save_cc="$CC"
13715CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013716if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013717 ac_cv_x87_double_rounding=no
13718else
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013720/* end confdefs.h. */
13721
13722#include <stdlib.h>
13723#include <math.h>
13724int main() {
13725 volatile double x, y, z;
13726 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13727 x = 0.99999999999999989; /* 1-2**-53 */
13728 y = 1./x;
13729 if (y != 1.)
13730 exit(0);
13731 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13732 x = 1e16;
13733 y = 2.99999;
13734 z = x + y;
13735 if (z != 1e16+4.)
13736 exit(0);
13737 /* both tests show evidence of double rounding */
13738 exit(1);
13739}
13740
13741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013742if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013743 ac_cv_x87_double_rounding=no
13744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013749fi
13750
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013751CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13753$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013754if test "$ac_cv_x87_double_rounding" = yes
13755then
13756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013758
13759fi
13760
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013761# ************************************
13762# * Check for mathematical functions *
13763# ************************************
13764
13765LIBS_SAVE=$LIBS
13766LIBS="$LIBS $LIBM"
13767
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013768for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13769do :
13770 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13771ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013772if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013773 cat >>confdefs.h <<_ACEOF
13774#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13775_ACEOF
13776
13777fi
13778done
13779
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013780for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013781do :
13782 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13783ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013784if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013785 cat >>confdefs.h <<_ACEOF
13786#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13787_ACEOF
13788
13789fi
13790done
13791
13792ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13793"
Victor Stinnere0be4232011-10-25 13:06:09 +020013794if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013795 ac_have_decl=1
13796else
13797 ac_have_decl=0
13798fi
13799
13800cat >>confdefs.h <<_ACEOF
13801#define HAVE_DECL_ISINF $ac_have_decl
13802_ACEOF
13803ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13804"
Victor Stinnere0be4232011-10-25 13:06:09 +020013805if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013806 ac_have_decl=1
13807else
13808 ac_have_decl=0
13809fi
13810
13811cat >>confdefs.h <<_ACEOF
13812#define HAVE_DECL_ISNAN $ac_have_decl
13813_ACEOF
13814ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13815"
Victor Stinnere0be4232011-10-25 13:06:09 +020013816if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013817 ac_have_decl=1
13818else
13819 ac_have_decl=0
13820fi
13821
13822cat >>confdefs.h <<_ACEOF
13823#define HAVE_DECL_ISFINITE $ac_have_decl
13824_ACEOF
13825
13826
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013827# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13828# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13830$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013831if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013833else
13834
Matthias Kloseb9621712010-04-24 17:59:49 +000013835if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013836 ac_cv_tanh_preserves_zero_sign=no
13837else
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013839/* end confdefs.h. */
13840
13841#include <math.h>
13842#include <stdlib.h>
13843int main() {
13844 /* return 0 if either negative zeros don't exist
13845 on this platform or if negative zeros exist
13846 and tanh(-0.) == -0. */
13847 if (atan2(0., -1.) == atan2(-0., -1.) ||
13848 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13849 else exit(1);
13850}
13851
13852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013853if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013854 ac_cv_tanh_preserves_zero_sign=yes
13855else
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013860fi
13861
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013862fi
13863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13865$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013866if test "$ac_cv_tanh_preserves_zero_sign" = yes
13867then
13868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013870
13871fi
13872
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013873if test "$ac_cv_func_log1p" = yes
13874then
13875 # On some versions of AIX, log1p(-0.) returns 0. instead of
13876 # -0. See issue #9920.
13877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13878$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013879 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013880 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013881else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013882
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013883 if test "$cross_compiling" = yes; then :
13884 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013885else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013888
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013889 #include <math.h>
13890 #include <stdlib.h>
13891 int main() {
13892 /* Fail if the signs of log1p(-0.) and -0. can be
13893 distinguished. */
13894 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13895 return 0;
13896 else
13897 return 1;
13898 }
13899
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013900_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013901if ac_fn_c_try_run "$LINENO"; then :
13902 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013903else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013904 ac_cv_log1p_drops_zero_sign=yes
13905fi
13906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013908fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013909
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013910fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013911
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13913$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13914fi
13915if test "$ac_cv_log1p_drops_zero_sign" = yes
13916then
13917
13918$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13919
13920fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013921
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013922LIBS=$LIBS_SAVE
13923
Mark Dickinsona614f042009-11-28 12:48:43 +000013924# For multiprocessing module, check that sem_open
13925# actually works. For FreeBSD versions <= 7.2,
13926# the kernel module that provides POSIX semaphores
13927# isn't loaded by default, so an attempt to call
13928# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13930$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013931if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013933else
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013935 ac_cv_posix_semaphores_enabled=yes
13936else
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013938/* end confdefs.h. */
13939
13940#include <unistd.h>
13941#include <fcntl.h>
13942#include <stdio.h>
13943#include <semaphore.h>
13944#include <sys/stat.h>
13945
13946int main(void) {
13947 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13948 if (a == SEM_FAILED) {
13949 perror("sem_open");
13950 return 1;
13951 }
13952 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013953 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013954 return 0;
13955}
13956
13957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013958if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013959 ac_cv_posix_semaphores_enabled=yes
13960else
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13964 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013965fi
13966
13967
Mark Dickinsona614f042009-11-28 12:48:43 +000013968fi
13969
Matthias Kloseb9621712010-04-24 17:59:49 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13971$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013972if test $ac_cv_posix_semaphores_enabled = no
13973then
13974
Matthias Kloseb9621712010-04-24 17:59:49 +000013975$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013976
13977fi
13978
Mark Dickinson10683072009-04-18 21:18:19 +000013979# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13981$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013982if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013984else
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013986 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013987else
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013989/* end confdefs.h. */
13990
13991#include <unistd.h>
13992#include <fcntl.h>
13993#include <stdio.h>
13994#include <semaphore.h>
13995#include <sys/stat.h>
13996
13997int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013998 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013999 int count;
14000 int res;
14001 if(a==SEM_FAILED){
14002 perror("sem_open");
14003 return 1;
14004
14005 }
14006 res = sem_getvalue(a, &count);
14007 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014008 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014009 return res==-1 ? 1 : 0;
14010}
14011
Mark Dickinson10683072009-04-18 21:18:19 +000014012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014013if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014014 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014015else
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14019 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014020fi
14021
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014022
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014023fi
14024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14026$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014027if test $ac_cv_broken_sem_getvalue = yes
14028then
14029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014031
14032fi
14033
Mark Dickinsonbd792642009-03-18 20:06:12 +000014034# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14036$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014037# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014038if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014039 enableval=$enable_big_digits; case $enable_big_digits in
14040yes)
14041 enable_big_digits=30 ;;
14042no)
14043 enable_big_digits=15 ;;
1404415|30)
14045 ;;
14046*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014047 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 +000014048esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14050$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014051
14052cat >>confdefs.h <<_ACEOF
14053#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14054_ACEOF
14055
14056
14057else
Matthias Kloseb9621712010-04-24 17:59:49 +000014058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14059$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014060fi
14061
14062
Guido van Rossumef2255b2000-03-10 22:30:29 +000014063# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014064ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014065if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
14067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014069
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014070 wchar_h="yes"
14071
Guido van Rossumef2255b2000-03-10 22:30:29 +000014072else
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014074
14075fi
14076
Michael W. Hudson54241132001-12-07 15:38:26 +000014077
Martin v. Löwis11437992002-04-12 09:54:03 +000014078
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014079# determine wchar_t size
14080if test "$wchar_h" = yes
14081then
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14087$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014088if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014090else
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14092"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014093
Martin v. Löwis11437992002-04-12 09:54:03 +000014094else
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 if test "$ac_cv_type_wchar_t" = yes; then
14096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014098as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014099See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100 else
14101 ac_cv_sizeof_wchar_t=0
14102 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014104
Martin v. Löwis11437992002-04-12 09:54:03 +000014105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14107$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014108
14109
14110
Martin v. Löwis11437992002-04-12 09:54:03 +000014111cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014112#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014113_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014114
Michael W. Hudson54241132001-12-07 15:38:26 +000014115
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014116fi
14117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14119$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014120have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014122/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014123
14124#include <tcl.h>
14125#if TCL_UTF_MAX != 6
14126# error "NOT UCS4_TCL"
14127#endif
14128int
14129main ()
14130{
14131
14132 ;
14133 return 0;
14134}
14135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014136if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014137
14138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014140
14141 have_ucs4_tcl=yes
14142
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14146$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014147
Skip Montanaro6dead952003-09-25 14:50:04 +000014148# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014149if test "$wchar_h" = yes
14150then
14151 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14153$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014154 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014156else
14157
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014159 ac_cv_wchar_t_signed=yes
14160else
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014162/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014163
14164 #include <wchar.h>
14165 int main()
14166 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014167 /* Success: exit code 0 */
14168 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014169 }
14170
14171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014172if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014173 ac_cv_wchar_t_signed=yes
14174else
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14178 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014179fi
14180
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014181fi
14182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14184$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185fi
14186
Georg Brandl52d168a2008-01-07 18:10:24 +000014187# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014188if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014189 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014190then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014191 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014192
Matthias Kloseb9621712010-04-24 17:59:49 +000014193$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014194
Georg Brandl52d168a2008-01-07 18:10:24 +000014195else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014196 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014197fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14199$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014200
14201# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14203$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014204if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014205 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014206else
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 ac_cv_c_bigendian=unknown
14208 # See if we're dealing with a universal compiler.
14209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14210/* end confdefs.h. */
14211#ifndef __APPLE_CC__
14212 not a universal capable compiler
14213 #endif
14214 typedef int dummy;
14215
Skip Montanaro6dead952003-09-25 14:50:04 +000014216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014217if ac_fn_c_try_compile "$LINENO"; then :
14218
14219 # Check for potential -arch flags. It is not universal unless
14220 # there are at least two -arch flags with different values.
14221 ac_arch=
14222 ac_prev=
14223 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14224 if test -n "$ac_prev"; then
14225 case $ac_word in
14226 i?86 | x86_64 | ppc | ppc64)
14227 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14228 ac_arch=$ac_word
14229 else
14230 ac_cv_c_bigendian=universal
14231 break
14232 fi
14233 ;;
14234 esac
14235 ac_prev=
14236 elif test "x$ac_word" = "x-arch"; then
14237 ac_prev=arch
14238 fi
14239 done
14240fi
14241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14242 if test $ac_cv_c_bigendian = unknown; then
14243 # See if sys/param.h defines the BYTE_ORDER macro.
14244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014245/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014246#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014248
Martin v. Löwis11437992002-04-12 09:54:03 +000014249int
14250main ()
14251{
Matthias Kloseb9621712010-04-24 17:59:49 +000014252#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14253 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14254 && LITTLE_ENDIAN)
14255 bogus endian macros
14256 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014257
14258 ;
14259 return 0;
14260}
14261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014262if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014263 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014265/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014266#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014268
Martin v. Löwis11437992002-04-12 09:54:03 +000014269int
14270main ()
14271{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014272#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 not big endian
14274 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
14276 ;
14277 return 0;
14278}
14279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014280if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014281 ac_cv_c_bigendian=yes
14282else
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014286fi
14287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14288 fi
14289 if test $ac_cv_c_bigendian = unknown; then
14290 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014292/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014293#include <limits.h>
14294
Martin v. Löwis11437992002-04-12 09:54:03 +000014295int
14296main ()
14297{
Matthias Kloseb9621712010-04-24 17:59:49 +000014298#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14299 bogus endian macros
14300 #endif
14301
Martin v. Löwis11437992002-04-12 09:54:03 +000014302 ;
14303 return 0;
14304}
14305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014306if ac_fn_c_try_compile "$LINENO"; then :
14307 # It does; now see whether it defined to _BIG_ENDIAN or not.
14308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14309/* end confdefs.h. */
14310#include <limits.h>
14311
14312int
14313main ()
14314{
14315#ifndef _BIG_ENDIAN
14316 not big endian
14317 #endif
14318
14319 ;
14320 return 0;
14321}
14322_ACEOF
14323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014324 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014325else
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14329fi
14330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14331 fi
14332 if test $ac_cv_c_bigendian = unknown; then
14333 # Compile a test program.
14334 if test "$cross_compiling" = yes; then :
14335 # Try to guess by grepping values from an object file.
14336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337/* end confdefs.h. */
14338short int ascii_mm[] =
14339 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14340 short int ascii_ii[] =
14341 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14342 int use_ascii (int i) {
14343 return ascii_mm[i] + ascii_ii[i];
14344 }
14345 short int ebcdic_ii[] =
14346 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14347 short int ebcdic_mm[] =
14348 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14349 int use_ebcdic (int i) {
14350 return ebcdic_mm[i] + ebcdic_ii[i];
14351 }
14352 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353
Matthias Kloseb9621712010-04-24 17:59:49 +000014354int
14355main ()
14356{
14357return use_ascii (foo) == use_ebcdic (foo);
14358 ;
14359 return 0;
14360}
14361_ACEOF
14362if ac_fn_c_try_compile "$LINENO"; then :
14363 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14364 ac_cv_c_bigendian=yes
14365 fi
14366 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14367 if test "$ac_cv_c_bigendian" = unknown; then
14368 ac_cv_c_bigendian=no
14369 else
14370 # finding both strings is unlikely to happen, but who knows?
14371 ac_cv_c_bigendian=unknown
14372 fi
14373 fi
14374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014376else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014378/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014380int
14381main ()
14382{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 /* Are we little or big endian? From Harbison&Steele. */
14385 union
14386 {
14387 long int l;
14388 char c[sizeof (long int)];
14389 } u;
14390 u.l = 1;
14391 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014392
14393 ;
14394 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014395}
Martin v. Löwis11437992002-04-12 09:54:03 +000014396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014397if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014398 ac_cv_c_bigendian=no
14399else
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14403 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14409$as_echo "$ac_cv_c_bigendian" >&6; }
14410 case $ac_cv_c_bigendian in #(
14411 yes)
14412 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14413;; #(
14414 no)
14415 ;; #(
14416 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014419
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 ;; #(
14421 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014422 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014423 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014425
Michael W. Hudson54241132001-12-07 15:38:26 +000014426
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014427# ABI version string for Python extension modules. This appears between the
14428# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14429# from the following attributes which affect the ABI of this Python build (in
14430# this order):
14431#
14432# * The Python implementation (always 'cpython-' for us)
14433# * The major and minor version numbers
14434# * --with-pydebug (adds a 'd')
14435# * --with-pymalloc (adds a 'm')
14436# * --with-wide-unicode (adds a 'u')
14437#
14438# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014439# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14440# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014441
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14443$as_echo_n "checking ABIFLAGS... " >&6; }
14444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14445$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14447$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014448SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14450$as_echo "$SOABI" >&6; }
14451
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014452
14453case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014454 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014455 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14456 *)
14457 EXT_SUFFIX=${SHLIB_SUFFIX};;
14458esac
14459
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14461$as_echo_n "checking LDVERSION... " >&6; }
14462LDVERSION='$(VERSION)$(ABIFLAGS)'
14463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14464$as_echo "$LDVERSION" >&6; }
14465
doko@python.org87421192013-01-26 11:39:31 +010014466
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014467LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014468
14469
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014470# Check whether right shifting a negative integer extends the sign bit
14471# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14473$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014474if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014476else
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
Matthias Kloseb9621712010-04-24 17:59:49 +000014478if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014479 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014480else
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014482/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014483
14484int main()
14485{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014486 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014487}
14488
Martin v. Löwis11437992002-04-12 09:54:03 +000014489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014490if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014491 ac_cv_rshift_extends_sign=yes
14492else
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014497fi
14498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499fi
14500
Matthias Kloseb9621712010-04-24 17:59:49 +000014501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14502$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014503if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014504then
Martin v. Löwis11437992002-04-12 09:54:03 +000014505
Matthias Kloseb9621712010-04-24 17:59:49 +000014506$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014507
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014508fi
14509
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014510# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14512$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014513if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014515else
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014518/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014519#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014520int
14521main ()
14522{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014523
14524 FILE *f = fopen("/dev/null", "r");
14525 flockfile(f);
14526 getc_unlocked(f);
14527 funlockfile(f);
14528
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 ;
14530 return 0;
14531}
14532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014533if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014534 ac_cv_have_getc_unlocked=yes
14535else
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 ac_cv_have_getc_unlocked=no
14537fi
14538rm -f core conftest.err conftest.$ac_objext \
14539 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541
Matthias Kloseb9621712010-04-24 17:59:49 +000014542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14543$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014544if test "$ac_cv_have_getc_unlocked" = yes
14545then
Martin v. Löwis11437992002-04-12 09:54:03 +000014546
Matthias Kloseb9621712010-04-24 17:59:49 +000014547$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014548
14549fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014550
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014551# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014552# save the value of LIBS so we don't actually link Python with readline
14553LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014554
Gregory P. Smith18820942008-09-07 06:24:49 +000014555# On some systems we need to link readline to a termcap compatible
14556# library. NOTE: Keep the precedence of listed libraries synchronised
14557# with setup.py.
14558py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14560$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014561for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014562 if test -z "$py_libtermcap"; then
14563 READLINE_LIBS="-lreadline"
14564 else
14565 READLINE_LIBS="-lreadline -l$py_libtermcap"
14566 fi
14567 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014569/* end confdefs.h. */
14570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571/* Override any GCC internal prototype to avoid an error.
14572 Use char because int might match the return type of a GCC
14573 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014574#ifdef __cplusplus
14575extern "C"
14576#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014577char readline ();
14578int
14579main ()
14580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014582 ;
14583 return 0;
14584}
14585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014586if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014587 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014589rm -f core conftest.err conftest.$ac_objext \
14590 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014591 if test $py_cv_lib_readline = yes; then
14592 break
14593 fi
14594done
14595# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14596#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014597if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14599$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014600else
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14602$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014603
Matthias Kloseb9621712010-04-24 17:59:49 +000014604$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014605
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014606fi
14607
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014608# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14610$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014611if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014613else
14614 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014615LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014617/* end confdefs.h. */
14618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619/* Override any GCC internal prototype to avoid an error.
14620 Use char because int might match the return type of a GCC
14621 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014622#ifdef __cplusplus
14623extern "C"
14624#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014625char rl_callback_handler_install ();
14626int
14627main ()
14628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014630 ;
14631 return 0;
14632}
14633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014634if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014635 ac_cv_lib_readline_rl_callback_handler_install=yes
14636else
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014639rm -f core conftest.err conftest.$ac_objext \
14640 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014641LIBS=$ac_check_lib_save_LIBS
14642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14644$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014645if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014646
Matthias Kloseb9621712010-04-24 17:59:49 +000014647$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014648
14649fi
14650
14651
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014652# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014654/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014655#include <readline/readline.h>
14656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014657if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014658 have_readline=yes
14659else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014660 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014661
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014662fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014663rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014664if test $have_readline = yes
14665then
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014667/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014668#include <readline/readline.h>
14669
14670_ACEOF
14671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014673
Matthias Kloseb9621712010-04-24 17:59:49 +000014674$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014675
14676fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014677rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014680/* end confdefs.h. */
14681#include <readline/readline.h>
14682
14683_ACEOF
14684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014688
14689fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014690rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014691
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014692fi
14693
Martin v. Löwis0daad592001-09-30 21:09:59 +000014694# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14696$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014697if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014698 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014699else
Martin v. Löwis11437992002-04-12 09:54:03 +000014700 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014701LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705/* Override any GCC internal prototype to avoid an error.
14706 Use char because int might match the return type of a GCC
14707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014708#ifdef __cplusplus
14709extern "C"
14710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014711char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014712int
14713main ()
14714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014715return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 ;
14717 return 0;
14718}
14719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014722else
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014725rm -f core conftest.err conftest.$ac_objext \
14726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014727LIBS=$ac_check_lib_save_LIBS
14728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14730$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014731if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014734
Martin v. Löwis0daad592001-09-30 21:09:59 +000014735fi
14736
Michael W. Hudson54241132001-12-07 15:38:26 +000014737
Thomas Wouters89d996e2007-09-08 17:39:28 +000014738# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14740$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014741if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014743else
14744 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014745LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014747/* end confdefs.h. */
14748
14749/* Override any GCC internal prototype to avoid an error.
14750 Use char because int might match the return type of a GCC
14751 builtin and then its argument prototype would still apply. */
14752#ifdef __cplusplus
14753extern "C"
14754#endif
14755char rl_completion_display_matches_hook ();
14756int
14757main ()
14758{
14759return rl_completion_display_matches_hook ();
14760 ;
14761 return 0;
14762}
14763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014765 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14766else
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014769rm -f core conftest.err conftest.$ac_objext \
14770 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014771LIBS=$ac_check_lib_save_LIBS
14772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14774$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014775if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014776
Matthias Kloseb9621712010-04-24 17:59:49 +000014777$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014778
14779fi
14780
14781
Martin v. Löwis0daad592001-09-30 21:09:59 +000014782# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14784$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014785if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014787else
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014789LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793/* Override any GCC internal prototype to avoid an error.
14794 Use char because int might match the return type of a GCC
14795 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014796#ifdef __cplusplus
14797extern "C"
14798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014799char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014800int
14801main ()
14802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014804 ;
14805 return 0;
14806}
14807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014808if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014809 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014810else
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014813rm -f core conftest.err conftest.$ac_objext \
14814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014815LIBS=$ac_check_lib_save_LIBS
14816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14818$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014819if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014822
Guido van Rossum353ae582001-07-10 16:45:32 +000014823fi
14824
Jack Jansendd19cf82001-12-06 22:36:17 +000014825
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014826# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014828/* end confdefs.h. */
14829#include <readline/readline.h>
14830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014831if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014832 have_readline=yes
14833else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014834 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014835
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014836fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014837rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014838if test $have_readline = yes
14839then
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014841/* end confdefs.h. */
14842#include <readline/readline.h>
14843
14844_ACEOF
14845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014846 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014849
14850fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014851rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014852
14853fi
14854
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14856$as_echo_n "checking for append_history in -lreadline... " >&6; }
14857if ${ac_cv_lib_readline_append_history+:} false; then :
14858 $as_echo_n "(cached) " >&6
14859else
14860 ac_check_lib_save_LIBS=$LIBS
14861LIBS="-lreadline $READLINE_LIBS $LIBS"
14862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14863/* end confdefs.h. */
14864
14865/* Override any GCC internal prototype to avoid an error.
14866 Use char because int might match the return type of a GCC
14867 builtin and then its argument prototype would still apply. */
14868#ifdef __cplusplus
14869extern "C"
14870#endif
14871char append_history ();
14872int
14873main ()
14874{
14875return append_history ();
14876 ;
14877 return 0;
14878}
14879_ACEOF
14880if ac_fn_c_try_link "$LINENO"; then :
14881 ac_cv_lib_readline_append_history=yes
14882else
14883 ac_cv_lib_readline_append_history=no
14884fi
14885rm -f core conftest.err conftest.$ac_objext \
14886 conftest$ac_exeext conftest.$ac_ext
14887LIBS=$ac_check_lib_save_LIBS
14888fi
14889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14890$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14891if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14892
14893$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14894
14895fi
14896
14897
Martin v. Löwis82bca632006-02-10 20:49:30 +000014898# End of readline checks: restore LIBS
14899LIBS=$LIBS_no_readline
14900
Matthias Kloseb9621712010-04-24 17:59:49 +000014901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14902$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014903if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014904 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014905else
Martin v. Löwis11437992002-04-12 09:54:03 +000014906
Matthias Kloseb9621712010-04-24 17:59:49 +000014907if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014908 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014909else
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014911/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014912
14913int main()
14914{
14915 int val1 = nice(1);
14916 if (val1 != -1 && val1 == nice(2))
14917 exit(0);
14918 exit(1);
14919}
14920
Martin v. Löwis11437992002-04-12 09:54:03 +000014921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014922if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014923 ac_cv_broken_nice=yes
14924else
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014929fi
14930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931fi
14932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14934$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014935if test "$ac_cv_broken_nice" = yes
14936then
Martin v. Löwis11437992002-04-12 09:54:03 +000014937
Matthias Kloseb9621712010-04-24 17:59:49 +000014938$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014939
14940fi
14941
Matthias Kloseb9621712010-04-24 17:59:49 +000014942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14943$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014944if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014946else
Matthias Kloseb9621712010-04-24 17:59:49 +000014947 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014948 ac_cv_broken_poll=no
14949else
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014951/* end confdefs.h. */
14952
14953#include <poll.h>
14954
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014955int main()
14956{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014957 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014958 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014959
14960 close (42);
14961
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014962 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014963 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014964 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014965 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014966 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014967 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014968 return 1;
14969}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014970
14971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014972if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014973 ac_cv_broken_poll=yes
14974else
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14978 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014981fi
14982
Matthias Kloseb9621712010-04-24 17:59:49 +000014983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14984$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014985if test "$ac_cv_broken_poll" = yes
14986then
14987
Matthias Kloseb9621712010-04-24 17:59:49 +000014988$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014989
14990fi
14991
Brett Cannon43802422005-02-10 20:48:03 +000014992# 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 +000014993# (which is not required by ISO C or UNIX spec) and/or if we support
14994# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014995ac_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 +000014996#include <$ac_cv_struct_tm>
14997
Matthias Kloseb9621712010-04-24 17:59:49 +000014998"
Victor Stinnere0be4232011-10-25 13:06:09 +020014999if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015000
15001cat >>confdefs.h <<_ACEOF
15002#define HAVE_STRUCT_TM_TM_ZONE 1
15003_ACEOF
15004
15005
15006fi
15007
15008if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15009
Matthias Kloseb9621712010-04-24 17:59:49 +000015010$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015011
15012else
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15014"
Victor Stinnere0be4232011-10-25 13:06:09 +020015015if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017else
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019fi
15020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015022#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023_ACEOF
15024
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15026$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015027if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029else
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015031/* end confdefs.h. */
15032#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033#if !HAVE_DECL_TZNAME
15034extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015035#endif
15036
15037int
15038main ()
15039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015041 ;
15042 return 0;
15043}
15044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015045if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015046 ac_cv_var_tzname=yes
15047else
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015050rm -f core conftest.err conftest.$ac_objext \
15051 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15054$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015055 if test $ac_cv_var_tzname = yes; then
15056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015058
15059 fi
15060fi
15061
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015062
Martin v. Löwis1d459062005-03-14 21:23:33 +000015063# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15065$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015066if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015068else
15069
Matthias Kloseb9621712010-04-24 17:59:49 +000015070if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015071 ac_cv_working_tzset=no
15072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015074/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015075
15076#include <stdlib.h>
15077#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015078#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015079
15080#if HAVE_TZNAME
15081extern char *tzname[];
15082#endif
15083
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015084int main()
15085{
Brett Cannon18367812003-09-19 00:59:16 +000015086 /* Note that we need to ensure that not only does tzset(3)
15087 do 'something' with localtime, but it works as documented
15088 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015089 This includes making sure that tzname is set properly if
15090 tm->tm_zone does not exist since it is the alternative way
15091 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015092
15093 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015094 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015095 */
15096
Martin v. Löwis1d459062005-03-14 21:23:33 +000015097 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015098 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15099
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015100 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015101 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015102 if (localtime(&groundhogday)->tm_hour != 0)
15103 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015104#if HAVE_TZNAME
15105 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15106 if (strcmp(tzname[0], "UTC") ||
15107 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15108 exit(1);
15109#endif
Brett Cannon18367812003-09-19 00:59:16 +000015110
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015111 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015112 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015113 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015114 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015115#if HAVE_TZNAME
15116 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15117 exit(1);
15118#endif
Brett Cannon18367812003-09-19 00:59:16 +000015119
15120 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15121 tzset();
15122 if (localtime(&groundhogday)->tm_hour != 11)
15123 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015124#if HAVE_TZNAME
15125 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15126 exit(1);
15127#endif
15128
15129#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015130 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15131 exit(1);
15132 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15133 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015134#endif
Brett Cannon18367812003-09-19 00:59:16 +000015135
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015136 exit(0);
15137}
15138
15139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015140if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015141 ac_cv_working_tzset=yes
15142else
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15146 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015147fi
15148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149fi
15150
Matthias Kloseb9621712010-04-24 17:59:49 +000015151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15152$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015153if test "$ac_cv_working_tzset" = yes
15154then
15155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015157
15158fi
15159
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015160# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15162$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015163if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015165else
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015167/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015168#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015169int
15170main ()
15171{
15172
15173struct stat st;
15174st.st_mtim.tv_nsec = 1;
15175
15176 ;
15177 return 0;
15178}
15179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015181 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015182else
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15186fi
15187
Matthias Kloseb9621712010-04-24 17:59:49 +000015188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15189$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015190if test "$ac_cv_stat_tv_nsec" = yes
15191then
15192
Matthias Kloseb9621712010-04-24 17:59:49 +000015193$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015194
15195fi
15196
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015197# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15199$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015200if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015202else
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015204/* end confdefs.h. */
15205#include <sys/stat.h>
15206int
15207main ()
15208{
15209
15210struct stat st;
15211st.st_mtimespec.tv_nsec = 1;
15212
15213 ;
15214 return 0;
15215}
15216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015217if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015218 ac_cv_stat_tv_nsec2=yes
15219else
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15223fi
15224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15226$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015227if test "$ac_cv_stat_tv_nsec2" = yes
15228then
15229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015231
15232fi
15233
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015234# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015235ac_save_cppflags="$CPPFLAGS"
15236CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015237
15238for ac_header in curses.h ncurses.h
15239do :
15240 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15241ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15242if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15243 cat >>confdefs.h <<_ACEOF
15244#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15245_ACEOF
15246
15247fi
15248
15249done
15250
15251
15252# On Solaris, term.h requires curses.h
15253for ac_header in term.h
15254do :
15255 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15256#ifdef HAVE_CURSES_H
15257#include <curses.h>
15258#endif
15259
15260"
15261if test "x$ac_cv_header_term_h" = xyes; then :
15262 cat >>confdefs.h <<_ACEOF
15263#define HAVE_TERM_H 1
15264_ACEOF
15265
15266fi
15267
15268done
15269
15270
Jack Jansen666b1e72001-10-31 12:11:48 +000015271# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15273$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015274if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015275 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015276else
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015278/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015279#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015280int
15281main ()
15282{
Jack Jansen666b1e72001-10-31 12:11:48 +000015283
15284 int rtn;
15285 rtn = mvwdelch(0,0,0);
15286
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 ;
15288 return 0;
15289}
15290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015291if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015292 ac_cv_mvwdelch_is_expression=yes
15293else
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15297fi
15298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15300$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015301
15302if test "$ac_cv_mvwdelch_is_expression" = yes
15303then
Martin v. Löwis11437992002-04-12 09:54:03 +000015304
Matthias Kloseb9621712010-04-24 17:59:49 +000015305$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015306
15307fi
15308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15310$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015311if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015313else
Matthias Kloseb9621712010-04-24 17:59:49 +000015314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015315/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015316#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015317int
15318main ()
15319{
Jack Jansen666b1e72001-10-31 12:11:48 +000015320
15321 WINDOW *w;
15322 w->_flags = 0;
15323
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ;
15325 return 0;
15326}
15327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015328if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015329 ac_cv_window_has_flags=yes
15330else
Matthias Kloseb9621712010-04-24 17:59:49 +000015331 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15334fi
15335
Matthias Kloseb9621712010-04-24 17:59:49 +000015336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15337$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015338
Jack Jansen666b1e72001-10-31 12:11:48 +000015339
15340if test "$ac_cv_window_has_flags" = yes
15341then
Martin v. Löwis11437992002-04-12 09:54:03 +000015342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015344
15345fi
15346
Matthias Kloseb9621712010-04-24 17:59:49 +000015347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15348$as_echo_n "checking for is_term_resized... " >&6; }
15349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015350/* end confdefs.h. */
15351#include <curses.h>
15352int
15353main ()
15354{
15355void *x=is_term_resized
15356 ;
15357 return 0;
15358}
15359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015363
Matthias Kloseb159a552010-04-25 21:00:44 +000015364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015365$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015366else
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15368$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015369
15370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15372
Matthias Kloseb9621712010-04-24 17:59:49 +000015373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15374$as_echo_n "checking for resize_term... " >&6; }
15375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015376/* end confdefs.h. */
15377#include <curses.h>
15378int
15379main ()
15380{
15381void *x=resize_term
15382 ;
15383 return 0;
15384}
15385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015386if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015387
Matthias Kloseb9621712010-04-24 17:59:49 +000015388$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015389
Matthias Kloseb159a552010-04-25 21:00:44 +000015390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015391$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015392else
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15394$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015395
15396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15398
Matthias Kloseb9621712010-04-24 17:59:49 +000015399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15400$as_echo_n "checking for resizeterm... " >&6; }
15401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015402/* end confdefs.h. */
15403#include <curses.h>
15404int
15405main ()
15406{
15407void *x=resizeterm
15408 ;
15409 return 0;
15410}
15411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015412if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015413
Matthias Kloseb9621712010-04-24 17:59:49 +000015414$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015415
Matthias Kloseb159a552010-04-25 21:00:44 +000015416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015417$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015418else
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15420$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015421
15422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015424# last curses configure check
15425CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015426
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15428$as_echo "$as_me: checking for device files" >&6;}
15429
15430if test "x$cross_compiling" = xyes; then
15431 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15433$as_echo_n "checking for /dev/ptmx... " >&6; }
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15435$as_echo "not set" >&6; }
15436 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15437 fi
15438 if test "${ac_cv_file__dev_ptc+set}" != set; then
15439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15440$as_echo_n "checking for /dev/ptc... " >&6; }
15441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15442$as_echo "not set" >&6; }
15443 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15444 fi
15445fi
15446
Matthias Kloseb9621712010-04-24 17:59:49 +000015447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15448$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015449if ${ac_cv_file__dev_ptmx+:} false; then :
15450 $as_echo_n "(cached) " >&6
15451else
15452 test "$cross_compiling" = yes &&
15453 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15454if test -r "/dev/ptmx"; then
15455 ac_cv_file__dev_ptmx=yes
15456else
15457 ac_cv_file__dev_ptmx=no
15458fi
15459fi
15460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15461$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15462if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015463
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015464fi
15465
15466if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015469
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15472$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015473if ${ac_cv_file__dev_ptc+:} false; then :
15474 $as_echo_n "(cached) " >&6
15475else
15476 test "$cross_compiling" = yes &&
15477 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15478if test -r "/dev/ptc"; then
15479 ac_cv_file__dev_ptc=yes
15480else
15481 ac_cv_file__dev_ptc=no
15482fi
15483fi
15484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15485$as_echo "$ac_cv_file__dev_ptc" >&6; }
15486if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015487
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015488fi
15489
15490if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015491
Matthias Kloseb9621712010-04-24 17:59:49 +000015492$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015493
Neal Norwitz865400f2003-03-21 01:42:58 +000015494fi
15495
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015496if test "$have_long_long" = yes
15497then
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15499$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015500 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015502else
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015504 ac_cv_have_long_long_format="cross -- assuming no"
15505 if test x$GCC = xyes; then
15506 save_CFLAGS=$CFLAGS
15507 CFLAGS="$CFLAGS -Werror -Wformat"
15508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15509/* end confdefs.h. */
15510
15511 #include <stdio.h>
15512 #include <stddef.h>
15513
15514int
15515main ()
15516{
15517
15518 char *buffer;
15519 sprintf(buffer, "%lld", (long long)123);
15520 sprintf(buffer, "%lld", (long long)-123);
15521 sprintf(buffer, "%llu", (unsigned long long)123);
15522
15523 ;
15524 return 0;
15525}
15526_ACEOF
15527if ac_fn_c_try_compile "$LINENO"; then :
15528 ac_cv_have_long_long_format=yes
15529
15530fi
15531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15532 CFLAGS=$save_CFLAGS
15533 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015534else
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015536/* end confdefs.h. */
15537
15538 #include <stdio.h>
15539 #include <stddef.h>
15540 #include <string.h>
15541
15542 #ifdef HAVE_SYS_TYPES_H
15543 #include <sys/types.h>
15544 #endif
15545
15546 int main()
15547 {
15548 char buffer[256];
15549
15550 if (sprintf(buffer, "%lld", (long long)123) < 0)
15551 return 1;
15552 if (strcmp(buffer, "123"))
15553 return 1;
15554
15555 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15556 return 1;
15557 if (strcmp(buffer, "-123"))
15558 return 1;
15559
15560 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15561 return 1;
15562 if (strcmp(buffer, "123"))
15563 return 1;
15564
15565 return 0;
15566 }
15567
15568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015569if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015570 ac_cv_have_long_long_format=yes
15571else
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15575 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015576fi
15577
15578
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015579fi
15580
Matthias Kloseb9621712010-04-24 17:59:49 +000015581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15582$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015583fi
15584
Mark Dickinson89d7d412009-12-31 20:50:59 +000015585if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015586then
15587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015589
15590fi
15591
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015592if test $ac_sys_system = Darwin
15593then
15594 LIBS="$LIBS -framework CoreFoundation"
15595fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015596
Matthias Kloseb9621712010-04-24 17:59:49 +000015597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15598$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015599if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015600 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015601else
Matthias Kloseb9621712010-04-24 17:59:49 +000015602 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015603 ac_cv_have_size_t_format="cross -- assuming yes"
15604
Thomas Wouters477c8d52006-05-27 19:21:47 +000015605else
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015607/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015608
Thomas Wouters477c8d52006-05-27 19:21:47 +000015609#include <stdio.h>
15610#include <stddef.h>
15611#include <string.h>
15612
Christian Heimes2c181612007-12-17 20:04:13 +000015613#ifdef HAVE_SYS_TYPES_H
15614#include <sys/types.h>
15615#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015616
15617#ifdef HAVE_SSIZE_T
15618typedef ssize_t Py_ssize_t;
15619#elif SIZEOF_VOID_P == SIZEOF_LONG
15620typedef long Py_ssize_t;
15621#else
15622typedef int Py_ssize_t;
15623#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015624
Christian Heimes2c181612007-12-17 20:04:13 +000015625int main()
15626{
15627 char buffer[256];
15628
Thomas Wouters477c8d52006-05-27 19:21:47 +000015629 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15630 return 1;
15631
Thomas Wouters89f507f2006-12-13 04:49:30 +000015632 if (strcmp(buffer, "123"))
15633 return 1;
15634
15635 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15636 return 1;
15637
15638 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015639 return 1;
15640
15641 return 0;
15642}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015643
Thomas Wouters477c8d52006-05-27 19:21:47 +000015644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015645if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015646 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015647else
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015652fi
15653
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15656$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015657if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015658
Matthias Kloseb9621712010-04-24 17:59:49 +000015659$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015660
15661fi
15662
Matthias Kloseb9621712010-04-24 17:59:49 +000015663ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015664#ifdef HAVE_SYS_TYPES_H
15665#include <sys/types.h>
15666#endif
15667#ifdef HAVE_SYS_SOCKET_H
15668#include <sys/socket.h>
15669#endif
15670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671"
Victor Stinnere0be4232011-10-25 13:06:09 +020015672if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015673
Martin v. Löwis11437992002-04-12 09:54:03 +000015674else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015675
Matthias Kloseb9621712010-04-24 17:59:49 +000015676$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015677
15678fi
15679
Michael W. Hudson54241132001-12-07 15:38:26 +000015680
Matthias Kloseb9621712010-04-24 17:59:49 +000015681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15682$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015683if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015684 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015685else
Matthias Kloseb9621712010-04-24 17:59:49 +000015686 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015687 ac_cv_broken_mbstowcs=no
15688else
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015690/* end confdefs.h. */
15691
Stefan Krah19c21392012-11-22 23:47:32 +010015692#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015693#include<stdlib.h>
15694int main() {
15695 size_t len = -1;
15696 const char *str = "text";
15697 len = mbstowcs(NULL, str, 0);
15698 return (len != 4);
15699}
15700
15701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015702if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015703 ac_cv_broken_mbstowcs=no
15704else
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015709fi
15710
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015711fi
15712
Matthias Kloseb9621712010-04-24 17:59:49 +000015713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15714$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015715if test "$ac_cv_broken_mbstowcs" = yes
15716then
15717
Matthias Kloseb9621712010-04-24 17:59:49 +000015718$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015719
15720fi
15721
Antoine Pitroub52ec782009-01-25 16:34:23 +000015722# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15724$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015725
15726# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015727if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015728 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015729if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015730then
15731
Matthias Kloseb9621712010-04-24 17:59:49 +000015732$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015733
Matthias Kloseb9621712010-04-24 17:59:49 +000015734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15735$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015736fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015737if test "$withval" = no
15738then
15739
15740$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15741
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15743$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015744fi
15745
Antoine Pitrou042b1282010-08-13 21:15:58 +000015746else
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15748$as_echo "no value specified" >&6; }
15749fi
15750
Antoine Pitroub52ec782009-01-25 16:34:23 +000015751
Matthias Kloseb17289e2012-03-15 19:51:34 +010015752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15753$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15754if ${ac_cv_computed_gotos+:} false; then :
15755 $as_echo_n "(cached) " >&6
15756else
15757 if test "$cross_compiling" = yes; then :
15758 if test "${with_computed_gotos+set}" = set; then
15759 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15760 else
15761 ac_cv_computed_gotos=no
15762 fi
15763else
15764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15765/* end confdefs.h. */
15766
15767int main(int argc, char **argv)
15768{
15769 static void *targets[1] = { &&LABEL1 };
15770 goto LABEL2;
15771LABEL1:
15772 return 0;
15773LABEL2:
15774 goto *targets[0];
15775 return 1;
15776}
15777
15778_ACEOF
15779if ac_fn_c_try_run "$LINENO"; then :
15780 ac_cv_computed_gotos=yes
15781else
15782 ac_cv_computed_gotos=no
15783fi
15784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15785 conftest.$ac_objext conftest.beam conftest.$ac_ext
15786fi
15787
15788fi
15789
15790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15791$as_echo "$ac_cv_computed_gotos" >&6; }
15792case "$ac_cv_computed_gotos" in yes*)
15793
15794$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15795
15796esac
15797
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015798case $ac_sys_system in
15799AIX*)
15800
15801$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15802 ;;
15803esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015804
Michael W. Hudson54241132001-12-07 15:38:26 +000015805
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015806
15807
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015808for h in `(cd $srcdir;echo Python/thread_*.h)`
15809do
15810 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15811done
15812
Michael W. Hudson54241132001-12-07 15:38:26 +000015813
Ned Deily0db50cf2014-07-25 12:41:31 -070015814SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15816$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015817for dir in $SRCDIRS; do
15818 if test ! -d $dir; then
15819 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015820 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015821done
Matthias Kloseb9621712010-04-24 17:59:49 +000015822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15823$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015824
Stefan Krah1919b7e2012-03-21 18:25:23 +010015825# Availability of -O2:
15826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15827$as_echo_n "checking for -O2... " >&6; }
15828saved_cflags="$CFLAGS"
15829CFLAGS="-O2"
15830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15831/* end confdefs.h. */
15832
15833int
15834main ()
15835{
15836
15837
15838 ;
15839 return 0;
15840}
15841_ACEOF
15842if ac_fn_c_try_compile "$LINENO"; then :
15843 have_O2=yes
15844else
15845 have_O2=no
15846fi
15847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15849$as_echo "$have_O2" >&6; }
15850CFLAGS="$saved_cflags"
15851
15852# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15853# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15855$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15856saved_cflags="$CFLAGS"
15857CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15858if test "$have_O2" = no; then
15859 CFLAGS=""
15860fi
15861if test "$cross_compiling" = yes; then :
15862 have_glibc_memmove_bug=undefined
15863else
15864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15865/* end confdefs.h. */
15866
15867#include <stdio.h>
15868#include <stdlib.h>
15869#include <string.h>
15870void foo(void *p, void *q) { memmove(p, q, 19); }
15871int main() {
15872 char a[32] = "123456789000000000";
15873 foo(&a[9], a);
15874 if (strcmp(a, "123456789123456789000000000") != 0)
15875 return 1;
15876 foo(a, &a[9]);
15877 if (strcmp(a, "123456789000000000") != 0)
15878 return 1;
15879 return 0;
15880}
15881
15882_ACEOF
15883if ac_fn_c_try_run "$LINENO"; then :
15884 have_glibc_memmove_bug=no
15885else
15886 have_glibc_memmove_bug=yes
15887fi
15888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15889 conftest.$ac_objext conftest.beam conftest.$ac_ext
15890fi
15891
15892CFLAGS="$saved_cflags"
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15894$as_echo "$have_glibc_memmove_bug" >&6; }
15895if test "$have_glibc_memmove_bug" = yes; then
15896
15897$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15898
15899fi
15900
15901if test "$have_gcc_asm_for_x87" = yes; then
15902 # Some versions of gcc miscompile inline asm:
15903 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15904 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15905 case $CC in
15906 *gcc*)
15907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15908$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15909 saved_cflags="$CFLAGS"
15910 CFLAGS="-O2"
15911 if test "$cross_compiling" = yes; then :
15912 have_ipa_pure_const_bug=undefined
15913else
15914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15915/* end confdefs.h. */
15916
15917 __attribute__((noinline)) int
15918 foo(int *p) {
15919 int r;
15920 asm ( "movl \$6, (%1)\n\t"
15921 "xorl %0, %0\n\t"
15922 : "=r" (r) : "r" (p) : "memory"
15923 );
15924 return r;
15925 }
15926 int main() {
15927 int p = 8;
15928 if ((foo(&p) ? : p) != 6)
15929 return 1;
15930 return 0;
15931 }
15932
15933_ACEOF
15934if ac_fn_c_try_run "$LINENO"; then :
15935 have_ipa_pure_const_bug=no
15936else
15937 have_ipa_pure_const_bug=yes
15938fi
15939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15940 conftest.$ac_objext conftest.beam conftest.$ac_ext
15941fi
15942
15943 CFLAGS="$saved_cflags"
15944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15945$as_echo "$have_ipa_pure_const_bug" >&6; }
15946 if test "$have_ipa_pure_const_bug" = yes; then
15947
15948$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15949
15950 fi
15951 ;;
15952 esac
15953fi
15954
Victor Stinner4f5366e2015-01-09 02:13:19 +010015955# Check for stdatomic.h
15956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15957$as_echo_n "checking for stdatomic.h... " >&6; }
15958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15959/* end confdefs.h. */
15960
15961
15962 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015963 atomic_int value = ATOMIC_VAR_INIT(1);
15964 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015965 int main() {
15966 int loaded_value = atomic_load(&value);
15967 return 0;
15968 }
15969
15970
15971_ACEOF
15972if ac_fn_c_try_link "$LINENO"; then :
15973 have_stdatomic_h=yes
15974else
15975 have_stdatomic_h=no
15976fi
15977rm -f core conftest.err conftest.$ac_objext \
15978 conftest$ac_exeext conftest.$ac_ext
15979
15980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15981$as_echo "$have_stdatomic_h" >&6; }
15982
15983if test "$have_stdatomic_h" = yes; then
15984
15985$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15986
15987fi
15988
15989# Check for GCC >= 4.7 __atomic builtins
15990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15991$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15993/* end confdefs.h. */
15994
15995
15996 volatile int val = 1;
15997 int main() {
15998 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15999 return 0;
16000 }
16001
16002
16003_ACEOF
16004if ac_fn_c_try_link "$LINENO"; then :
16005 have_builtin_atomic=yes
16006else
16007 have_builtin_atomic=no
16008fi
16009rm -f core conftest.err conftest.$ac_objext \
16010 conftest$ac_exeext conftest.$ac_ext
16011
16012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16013$as_echo "$have_builtin_atomic" >&6; }
16014
16015if test "$have_builtin_atomic" = yes; then
16016
16017$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16018
16019fi
16020
Ned Deily322f5ba2013-11-21 23:01:59 -080016021# ensurepip option
16022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16023$as_echo_n "checking for ensurepip... " >&6; }
16024
16025# Check whether --with-ensurepip was given.
16026if test "${with_ensurepip+set}" = set; then :
16027 withval=$with_ensurepip;
16028else
16029 with_ensurepip=upgrade
16030fi
16031
16032case $with_ensurepip in #(
16033 yes|upgrade) :
16034 ENSUREPIP=upgrade ;; #(
16035 install) :
16036 ENSUREPIP=install ;; #(
16037 no) :
16038 ENSUREPIP=no ;; #(
16039 *) :
16040 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16041esac
16042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16043$as_echo "$ENSUREPIP" >&6; }
16044
16045
Victor Stinner35a97c02015-03-08 02:59:09 +010016046# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16048$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16050/* end confdefs.h. */
16051
16052
16053 #include <dirent.h>
16054
16055 int main() {
16056 struct dirent entry;
16057 return entry.d_type == DT_UNKNOWN;
16058 }
16059
16060
16061_ACEOF
16062if ac_fn_c_try_link "$LINENO"; then :
16063 have_dirent_d_type=yes
16064else
16065 have_dirent_d_type=no
16066fi
16067rm -f core conftest.err conftest.$ac_objext \
16068 conftest$ac_exeext conftest.$ac_ext
16069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16070$as_echo "$have_dirent_d_type" >&6; }
16071
16072if test "$have_dirent_d_type" = yes; then
16073
16074$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16075
16076fi
16077
Victor Stinner9eb57c52015-03-19 22:21:49 +010016078# check if the Linux getrandom() syscall is available
16079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16080$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16082/* end confdefs.h. */
16083
16084
16085 #include <sys/syscall.h>
16086
16087 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016088 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016089 const size_t buflen = sizeof(buffer);
16090 const int flags = 0;
Victor Stinner9eb57c52015-03-19 22:21:49 +010016091 /* ignore the result, Python checks for ENOSYS at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016092 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016093 return 0;
16094 }
16095
16096
16097_ACEOF
16098if ac_fn_c_try_link "$LINENO"; then :
16099 have_getrandom_syscall=yes
16100else
16101 have_getrandom_syscall=no
16102fi
16103rm -f core conftest.err conftest.$ac_objext \
16104 conftest$ac_exeext conftest.$ac_ext
16105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16106$as_echo "$have_getrandom_syscall" >&6; }
16107
16108if test "$have_getrandom_syscall" = yes; then
16109
16110$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16111
16112fi
16113
Victor Stinnerbae2d622015-10-01 09:47:30 +020016114# check if the getrandom() function is available
16115# the test was written for the Solaris function of <sys/random.h>
16116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16117$as_echo_n "checking for the getrandom() function... " >&6; }
16118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16119/* end confdefs.h. */
16120
16121
16122 #include <sys/random.h>
16123
16124 int main() {
16125 char buffer[1];
16126 const size_t buflen = sizeof(buffer);
16127 const int flags = 0;
16128 /* ignore the result, Python checks for ENOSYS at runtime */
16129 (void)getrandom(buffer, buflen, flags);
16130 return 0;
16131 }
16132
16133
16134_ACEOF
16135if ac_fn_c_try_link "$LINENO"; then :
16136 have_getrandom=yes
16137else
16138 have_getrandom=no
16139fi
16140rm -f core conftest.err conftest.$ac_objext \
16141 conftest$ac_exeext conftest.$ac_ext
16142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16143$as_echo "$have_getrandom" >&6; }
16144
16145if test "$have_getrandom" = yes; then
16146
16147$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16148
16149fi
16150
Guido van Rossum627b2d71993-12-24 10:39:16 +000016151# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016152ac_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 +000016153
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016154ac_config_files="$ac_config_files Modules/ld_so_aix"
16155
Martin v. Löwis11437992002-04-12 09:54:03 +000016156cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016157# This file is a shell script that caches the results of configure
16158# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016159# scripts and configure runs, see configure's option --config-cache.
16160# It is not useful on other systems. If it contains results you don't
16161# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016162#
Martin v. Löwis11437992002-04-12 09:54:03 +000016163# config.status only pays attention to the cache file if you give it
16164# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016165#
Skip Montanaro6dead952003-09-25 14:50:04 +000016166# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016167# loading this file, other *unset* `ac_cv_foo' will be assigned the
16168# following values.
16169
16170_ACEOF
16171
Guido van Rossumf78abae1997-01-21 22:02:36 +000016172# The following way of writing the cache mishandles newlines in values,
16173# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016175# Ultrix sh set writes to stderr and can't be redirected directly,
16176# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016177(
16178 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16179 eval ac_val=\$$ac_var
16180 case $ac_val in #(
16181 *${as_nl}*)
16182 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016183 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16184$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185 esac
16186 case $ac_var in #(
16187 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016188 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16189 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016190 esac ;;
16191 esac
16192 done
16193
Martin v. Löwis11437992002-04-12 09:54:03 +000016194 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16196 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016197 # `set' does not quote correctly, so add quotes: double-quote
16198 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016199 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016200 "s/'/'\\\\''/g;
16201 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016203 *)
16204 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016207 esac |
16208 sort
16209) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016210 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016214 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16215 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16217 :end' >>confcache
16218if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16219 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016220 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016221 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16222$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016223 if test ! -f "$cache_file" || test -h "$cache_file"; then
16224 cat confcache >"$cache_file"
16225 else
16226 case $cache_file in #(
16227 */* | ?:*)
16228 mv -f confcache "$cache_file"$$ &&
16229 mv -f "$cache_file"$$ "$cache_file" ;; #(
16230 *)
16231 mv -f confcache "$cache_file" ;;
16232 esac
16233 fi
16234 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016235 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016236 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16237$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016238 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016239fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016240rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016241
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016242test "x$prefix" = xNONE && prefix=$ac_default_prefix
16243# Let make expand exec_prefix.
16244test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016245
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016246DEFS=-DHAVE_CONFIG_H
16247
Skip Montanaro6dead952003-09-25 14:50:04 +000016248ac_libobjs=
16249ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016250U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016251for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16252 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016253 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016254 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016255 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16256 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016257 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16258 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016259done
16260LIBOBJS=$ac_libobjs
16261
16262LTLIBOBJS=$ac_ltlibobjs
16263
16264
Martin v. Löwis11437992002-04-12 09:54:03 +000016265
Matthias Kloseb9621712010-04-24 17:59:49 +000016266
Victor Stinnere0be4232011-10-25 13:06:09 +020016267: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016268ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016269ac_clean_files_save=$ac_clean_files
16270ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016271{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16272$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16273as_write_fail=0
16274cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016275#! $SHELL
16276# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016277# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016278# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016279# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016280
Martin v. Löwis11437992002-04-12 09:54:03 +000016281debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016282ac_cs_recheck=false
16283ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016284
Matthias Kloseb9621712010-04-24 17:59:49 +000016285SHELL=\${CONFIG_SHELL-$SHELL}
16286export SHELL
16287_ASEOF
16288cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16289## -------------------- ##
16290## M4sh Initialization. ##
16291## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293# Be more Bourne compatible
16294DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016295if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 emulate sh
16297 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016298 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016299 # is contrary to our usage. Disable this feature.
16300 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016302else
Matthias Kloseb9621712010-04-24 17:59:49 +000016303 case `(set -o) 2>/dev/null` in #(
16304 *posix*) :
16305 set -o posix ;; #(
16306 *) :
16307 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016309fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016310
16311
Matthias Kloseb9621712010-04-24 17:59:49 +000016312as_nl='
16313'
16314export as_nl
16315# Printing a long string crashes Solaris 7 /usr/bin/printf.
16316as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16317as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16318as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16319# Prefer a ksh shell builtin over an external printf program on Solaris,
16320# but without wasting forks for bash or zsh.
16321if test -z "$BASH_VERSION$ZSH_VERSION" \
16322 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16323 as_echo='print -r --'
16324 as_echo_n='print -rn --'
16325elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16326 as_echo='printf %s\n'
16327 as_echo_n='printf %s'
16328else
16329 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16330 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16331 as_echo_n='/usr/ucb/echo -n'
16332 else
16333 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16334 as_echo_n_body='eval
16335 arg=$1;
16336 case $arg in #(
16337 *"$as_nl"*)
16338 expr "X$arg" : "X\\(.*\\)$as_nl";
16339 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16340 esac;
16341 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16342 '
16343 export as_echo_n_body
16344 as_echo_n='sh -c $as_echo_n_body as_echo'
16345 fi
16346 export as_echo_body
16347 as_echo='sh -c $as_echo_body as_echo'
16348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016349
16350# The user is always right.
16351if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016352 PATH_SEPARATOR=:
16353 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16354 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16355 PATH_SEPARATOR=';'
16356 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359
16360# IFS
16361# We need space, tab and new line, in precisely that order. Quoting is
16362# there to prevent editors from complaining about space-tab.
16363# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16364# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016365IFS=" "" $as_nl"
16366
16367# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016368as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016369case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016370 *[\\/]* ) as_myself=$0 ;;
16371 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016372for as_dir in $PATH
16373do
16374 IFS=$as_save_IFS
16375 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016376 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016380 ;;
16381esac
16382# We did not find ourselves, most probably we were run as `sh COMMAND'
16383# in which case we are not to be found in the path.
16384if test "x$as_myself" = x; then
16385 as_myself=$0
16386fi
16387if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16389 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390fi
16391
Matthias Kloseb9621712010-04-24 17:59:49 +000016392# Unset variables that we do not need and which cause bugs (e.g. in
16393# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16394# suppresses any "Segmentation fault" message there. '((' could
16395# trigger a bug in pdksh 5.2.14.
16396for as_var in BASH_ENV ENV MAIL MAILPATH
16397do eval test x\${$as_var+set} = xset \
16398 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399done
16400PS1='$ '
16401PS2='> '
16402PS4='+ '
16403
16404# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016405LC_ALL=C
16406export LC_ALL
16407LANGUAGE=C
16408export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409
Matthias Kloseb9621712010-04-24 17:59:49 +000016410# CDPATH.
16411(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16412
16413
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016414# as_fn_error STATUS ERROR [LINENO LOG_FD]
16415# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016416# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16417# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016418# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016419as_fn_error ()
16420{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016421 as_status=$1; test $as_status -eq 0 && as_status=1
16422 if test "$4"; then
16423 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16424 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016425 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016426 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016427 as_fn_exit $as_status
16428} # as_fn_error
16429
16430
16431# as_fn_set_status STATUS
16432# -----------------------
16433# Set $? to STATUS, without forking.
16434as_fn_set_status ()
16435{
16436 return $1
16437} # as_fn_set_status
16438
16439# as_fn_exit STATUS
16440# -----------------
16441# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16442as_fn_exit ()
16443{
16444 set +e
16445 as_fn_set_status $1
16446 exit $1
16447} # as_fn_exit
16448
16449# as_fn_unset VAR
16450# ---------------
16451# Portably unset VAR.
16452as_fn_unset ()
16453{
16454 { eval $1=; unset $1;}
16455}
16456as_unset=as_fn_unset
16457# as_fn_append VAR VALUE
16458# ----------------------
16459# Append the text in VALUE to the end of the definition contained in VAR. Take
16460# advantage of any shell optimizations that allow amortized linear growth over
16461# repeated appends, instead of the typical quadratic growth present in naive
16462# implementations.
16463if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16464 eval 'as_fn_append ()
16465 {
16466 eval $1+=\$2
16467 }'
16468else
16469 as_fn_append ()
16470 {
16471 eval $1=\$$1\$2
16472 }
16473fi # as_fn_append
16474
16475# as_fn_arith ARG...
16476# ------------------
16477# Perform arithmetic evaluation on the ARGs, and store the result in the
16478# global $as_val. Take advantage of shells that can avoid forks. The arguments
16479# must be portable across $(()) and expr.
16480if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16481 eval 'as_fn_arith ()
16482 {
16483 as_val=$(( $* ))
16484 }'
16485else
16486 as_fn_arith ()
16487 {
16488 as_val=`expr "$@" || test $? -eq 1`
16489 }
16490fi # as_fn_arith
16491
16492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016493if expr a : '\(a\)' >/dev/null 2>&1 &&
16494 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16495 as_expr=expr
16496else
16497 as_expr=false
16498fi
16499
16500if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16501 as_basename=basename
16502else
16503 as_basename=false
16504fi
16505
Matthias Kloseb9621712010-04-24 17:59:49 +000016506if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16507 as_dirname=dirname
16508else
16509 as_dirname=false
16510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512as_me=`$as_basename -- "$0" ||
16513$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16514 X"$0" : 'X\(//\)$' \| \
16515 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016516$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016517 sed '/^.*\/\([^/][^/]*\)\/*$/{
16518 s//\1/
16519 q
16520 }
16521 /^X\/\(\/\/\)$/{
16522 s//\1/
16523 q
16524 }
16525 /^X\/\(\/\).*/{
16526 s//\1/
16527 q
16528 }
16529 s/.*/./; q'`
16530
Matthias Kloseb9621712010-04-24 17:59:49 +000016531# Avoid depending upon Character Ranges.
16532as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16533as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16534as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16535as_cr_digits='0123456789'
16536as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537
16538ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016539case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016541 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016543 xy) ECHO_C='\c';;
16544 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16545 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546 esac;;
16547*)
16548 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016549esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016550
Martin v. Löwis11437992002-04-12 09:54:03 +000016551rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552if test -d conf$$.dir; then
16553 rm -f conf$$.dir/conf$$.file
16554else
16555 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016556 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016558if (echo >conf$$.file) 2>/dev/null; then
16559 if ln -s conf$$.file conf$$ 2>/dev/null; then
16560 as_ln_s='ln -s'
16561 # ... but there are two gotchas:
16562 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16563 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016564 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016565 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016566 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016567 elif ln conf$$.file conf$$ 2>/dev/null; then
16568 as_ln_s=ln
16569 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016570 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016571 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016572else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016573 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016575rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16576rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016577
Matthias Kloseb9621712010-04-24 17:59:49 +000016578
16579# as_fn_mkdir_p
16580# -------------
16581# Create "$as_dir" as a directory, including parents if necessary.
16582as_fn_mkdir_p ()
16583{
16584
16585 case $as_dir in #(
16586 -*) as_dir=./$as_dir;;
16587 esac
16588 test -d "$as_dir" || eval $as_mkdir_p || {
16589 as_dirs=
16590 while :; do
16591 case $as_dir in #(
16592 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16593 *) as_qdir=$as_dir;;
16594 esac
16595 as_dirs="'$as_qdir' $as_dirs"
16596 as_dir=`$as_dirname -- "$as_dir" ||
16597$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16598 X"$as_dir" : 'X\(//\)[^/]' \| \
16599 X"$as_dir" : 'X\(//\)$' \| \
16600 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16601$as_echo X"$as_dir" |
16602 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16603 s//\1/
16604 q
16605 }
16606 /^X\(\/\/\)[^/].*/{
16607 s//\1/
16608 q
16609 }
16610 /^X\(\/\/\)$/{
16611 s//\1/
16612 q
16613 }
16614 /^X\(\/\).*/{
16615 s//\1/
16616 q
16617 }
16618 s/.*/./; q'`
16619 test -d "$as_dir" && break
16620 done
16621 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016622 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016623
16624
16625} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016626if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016627 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016628else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016629 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016630 as_mkdir_p=false
16631fi
16632
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016633
16634# as_fn_executable_p FILE
16635# -----------------------
16636# Test if FILE is an executable regular file.
16637as_fn_executable_p ()
16638{
16639 test -f "$1" && test -x "$1"
16640} # as_fn_executable_p
16641as_test_x='test -x'
16642as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016643
16644# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016645as_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 +000016646
16647# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016648as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016649
16650
Martin v. Löwis11437992002-04-12 09:54:03 +000016651exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016652## ----------------------------------- ##
16653## Main body of $CONFIG_STATUS script. ##
16654## ----------------------------------- ##
16655_ASEOF
16656test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016657
Matthias Kloseb9621712010-04-24 17:59:49 +000016658cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16659# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016660# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661# values after options handling.
16662ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016663This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016664generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016665
16666 CONFIG_FILES = $CONFIG_FILES
16667 CONFIG_HEADERS = $CONFIG_HEADERS
16668 CONFIG_LINKS = $CONFIG_LINKS
16669 CONFIG_COMMANDS = $CONFIG_COMMANDS
16670 $ $0 $@
16671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672on `(hostname || uname -n) 2>/dev/null | sed 1q`
16673"
16674
Martin v. Löwis11437992002-04-12 09:54:03 +000016675_ACEOF
16676
Matthias Kloseb9621712010-04-24 17:59:49 +000016677case $ac_config_files in *"
16678"*) set x $ac_config_files; shift; ac_config_files=$*;;
16679esac
16680
16681case $ac_config_headers in *"
16682"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16683esac
16684
16685
16686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016687# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016688config_files="$ac_config_files"
16689config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016692
Matthias Kloseb9621712010-04-24 17:59:49 +000016693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016694ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016695\`$as_me' instantiates files and other configuration actions
16696from templates according to the current configuration. Unless the files
16697and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016698
Matthias Kloseb9621712010-04-24 17:59:49 +000016699Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016700
16701 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016703 --config print configuration, then exit
16704 -q, --quiet, --silent
16705 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016706 -d, --debug don't remove temporary files
16707 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016708 --file=FILE[:TEMPLATE]
16709 instantiate the configuration file FILE
16710 --header=FILE[:TEMPLATE]
16711 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
16713Configuration files:
16714$config_files
16715
16716Configuration headers:
16717$config_headers
16718
Matthias Kloseb9621712010-04-24 17:59:49 +000016719Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016722cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16723ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016724ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016725python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016726configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016728
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016729Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016730This config.status script is free software; the Free Software Foundation
16731gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732
16733ac_pwd='$ac_pwd'
16734srcdir='$srcdir'
16735INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016736MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016737test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016738_ACEOF
16739
Matthias Kloseb9621712010-04-24 17:59:49 +000016740cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16741# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016742ac_need_defaults=:
16743while test $# != 0
16744do
16745 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016746 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16748 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016749 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016750 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016751 --*=)
16752 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16753 ac_optarg=
16754 ac_shift=:
16755 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016757 ac_option=$1
16758 ac_optarg=$2
16759 ac_shift=shift
16760 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016761 esac
16762
Skip Montanaro6dead952003-09-25 14:50:04 +000016763 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016764 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016765 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16766 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016767 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016768 $as_echo "$ac_cs_version"; exit ;;
16769 --config | --confi | --conf | --con | --co | --c )
16770 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016772 debug=: ;;
16773 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016774 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016775 case $ac_optarg in
16776 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016777 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016778 esac
16779 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 ac_need_defaults=false;;
16781 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016782 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016783 case $ac_optarg in
16784 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16785 esac
16786 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016787 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788 --he | --h)
16789 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016790 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016791Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016792 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016793 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016794 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16795 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16796 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016797
16798 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016799 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016800Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016801
Matthias Kloseb9621712010-04-24 17:59:49 +000016802 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016803 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016804
16805 esac
16806 shift
16807done
16808
Skip Montanaro6dead952003-09-25 14:50:04 +000016809ac_configure_extra_args=
16810
16811if $ac_cs_silent; then
16812 exec 6>/dev/null
16813 ac_configure_extra_args="$ac_configure_extra_args --silent"
16814fi
16815
16816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016817cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016818if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016819 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016820 shift
16821 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16822 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016823 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016824 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016825fi
16826
Martin v. Löwis11437992002-04-12 09:54:03 +000016827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016828cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016829exec 5>>config.log
16830{
16831 echo
16832 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16833## Running $as_me. ##
16834_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016835 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016836} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016841
Matthias Kloseb9621712010-04-24 17:59:49 +000016842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843
16844# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016845for ac_config_target in $ac_config_targets
16846do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847 case $ac_config_target in
16848 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16849 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16850 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016851 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16852 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16854 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016855 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016856 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016857 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858
Victor Stinnere0be4232011-10-25 13:06:09 +020016859 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016860 esac
16861done
16862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863
Martin v. Löwis11437992002-04-12 09:54:03 +000016864# If the user did not use the arguments to specify the items to instantiate,
16865# then the envvar interface is used. Set only those that are not.
16866# We use the long form for the default assignment because of an extremely
16867# bizarre bug on SunOS 4.1.3.
16868if $ac_need_defaults; then
16869 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16870 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16871fi
16872
Skip Montanaro6dead952003-09-25 14:50:04 +000016873# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016875# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876# Hook for its removal unless debugging.
16877# Note that there is a small window in which the directory will not be cleaned:
16878# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016879$debug ||
16880{
Victor Stinnere0be4232011-10-25 13:06:09 +020016881 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016882 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016883 : "${ac_tmp:=$tmp}"
16884 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016886 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016887}
Martin v. Löwis11437992002-04-12 09:54:03 +000016888# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016889
Martin v. Löwis11437992002-04-12 09:54:03 +000016890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016892 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016893} ||
16894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895 tmp=./conf$$-$RANDOM
16896 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016897} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016898ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016899
Matthias Kloseb9621712010-04-24 17:59:49 +000016900# Set up the scripts for CONFIG_FILES section.
16901# No need to generate them if there are no CONFIG_FILES.
16902# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016904
Matthias Kloseb9621712010-04-24 17:59:49 +000016905
16906ac_cr=`echo X | tr X '\015'`
16907# On cygwin, bash can eat \r inside `` if the user requested igncr.
16908# But we know of no other shell where ac_cr would be empty at this
16909# point, so we can use a bashism as a fallback.
16910if test "x$ac_cr" = x; then
16911 eval ac_cr=\$\'\\r\'
16912fi
16913ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16914if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016915 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016916else
16917 ac_cs_awk_cr=$ac_cr
16918fi
16919
Victor Stinnere0be4232011-10-25 13:06:09 +020016920echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016921_ACEOF
16922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923
Matthias Kloseb9621712010-04-24 17:59:49 +000016924{
16925 echo "cat >conf$$subs.awk <<_ACEOF" &&
16926 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16927 echo "_ACEOF"
16928} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016929 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16930ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931ac_delim='%!_!# '
16932for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016933 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016934 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935
Matthias Kloseb9621712010-04-24 17:59:49 +000016936 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16937 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016938 break
16939 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016940 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016941 else
16942 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016943 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016944done
Matthias Kloseb9621712010-04-24 17:59:49 +000016945rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016946
Matthias Kloseb9621712010-04-24 17:59:49 +000016947cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016948cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016950sed -n '
16951h
16952s/^/S["/; s/!.*/"]=/
16953p
16954g
16955s/^[^!]*!//
16956:repl
16957t repl
16958s/'"$ac_delim"'$//
16959t delim
16960:nl
16961h
16962s/\(.\{148\}\)..*/\1/
16963t more1
16964s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16965p
16966n
16967b repl
16968:more1
16969s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16970p
16971g
16972s/.\{148\}//
16973t nl
16974:delim
16975h
16976s/\(.\{148\}\)..*/\1/
16977t more2
16978s/["\\]/\\&/g; s/^/"/; s/$/"/
16979p
16980b
16981:more2
16982s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16983p
16984g
16985s/.\{148\}//
16986t delim
16987' <conf$$subs.awk | sed '
16988/^[^""]/{
16989 N
16990 s/\n//
16991}
16992' >>$CONFIG_STATUS || ac_write_fail=1
16993rm -f conf$$subs.awk
16994cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16995_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016996cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016997 for (key in S) S_is_set[key] = 1
16998 FS = ""
16999
17000}
17001{
17002 line = $ 0
17003 nfields = split(line, field, "@")
17004 substed = 0
17005 len = length(field[1])
17006 for (i = 2; i < nfields; i++) {
17007 key = field[i]
17008 keylen = length(key)
17009 if (S_is_set[key]) {
17010 value = S[key]
17011 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17012 len += length(value) + length(field[++i])
17013 substed = 1
17014 } else
17015 len += 1 + keylen
17016 }
17017
17018 print line
17019}
17020
17021_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017023cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17024if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17025 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17026else
17027 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017028fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017029 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017030_ACEOF
17031
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017032# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17033# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034# trailing colons and then remove the whole line if VPATH becomes empty
17035# (actually we leave an empty line to preserve line numbers).
17036if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017037 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17038h
17039s///
17040s/^/:/
17041s/[ ]*$/:/
17042s/:\$(srcdir):/:/g
17043s/:\${srcdir}:/:/g
17044s/:@srcdir@:/:/g
17045s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017047x
17048s/\(=[ ]*\).*/\1/
17049G
17050s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017051s/^[^=]*=[ ]*$//
17052}'
17053fi
17054
Matthias Kloseb9621712010-04-24 17:59:49 +000017055cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017056fi # test -n "$CONFIG_FILES"
17057
Matthias Kloseb9621712010-04-24 17:59:49 +000017058# Set up the scripts for CONFIG_HEADERS section.
17059# No need to generate them if there are no CONFIG_HEADERS.
17060# This happens for instance with `./config.status Makefile'.
17061if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017062cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017063BEGIN {
17064_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065
Matthias Kloseb9621712010-04-24 17:59:49 +000017066# Transform confdefs.h into an awk script `defines.awk', embedded as
17067# here-document in config.status, that substitutes the proper values into
17068# config.h.in to produce config.h.
17069
17070# Create a delimiter string that does not exist in confdefs.h, to ease
17071# handling of long lines.
17072ac_delim='%!_!# '
17073for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017074 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17075 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017076 break
17077 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017078 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017079 else
17080 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17081 fi
17082done
17083
17084# For the awk script, D is an array of macro values keyed by name,
17085# likewise P contains macro parameters if any. Preserve backslash
17086# newline sequences.
17087
17088ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17089sed -n '
17090s/.\{148\}/&'"$ac_delim"'/g
17091t rset
17092:rset
17093s/^[ ]*#[ ]*define[ ][ ]*/ /
17094t def
17095d
17096:def
17097s/\\$//
17098t bsnl
17099s/["\\]/\\&/g
17100s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17101D["\1"]=" \3"/p
17102s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17103d
17104:bsnl
17105s/["\\]/\\&/g
17106s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17107D["\1"]=" \3\\\\\\n"\\/p
17108t cont
17109s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17110t cont
17111d
17112:cont
17113n
17114s/.\{148\}/&'"$ac_delim"'/g
17115t clear
17116:clear
17117s/\\$//
17118t bsnlc
17119s/["\\]/\\&/g; s/^/"/; s/$/"/p
17120d
17121:bsnlc
17122s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17123b cont
17124' <confdefs.h | sed '
17125s/'"$ac_delim"'/"\\\
17126"/g' >>$CONFIG_STATUS || ac_write_fail=1
17127
17128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17129 for (key in D) D_is_set[key] = 1
17130 FS = ""
17131}
17132/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17133 line = \$ 0
17134 split(line, arg, " ")
17135 if (arg[1] == "#") {
17136 defundef = arg[2]
17137 mac1 = arg[3]
17138 } else {
17139 defundef = substr(arg[1], 2)
17140 mac1 = arg[2]
17141 }
17142 split(mac1, mac2, "(") #)
17143 macro = mac2[1]
17144 prefix = substr(line, 1, index(line, defundef) - 1)
17145 if (D_is_set[macro]) {
17146 # Preserve the white space surrounding the "#".
17147 print prefix "define", macro P[macro] D[macro]
17148 next
17149 } else {
17150 # Replace #undef with comments. This is necessary, for example,
17151 # in the case of _POSIX_SOURCE, which is predefined and required
17152 # on some systems where configure will not decide to define it.
17153 if (defundef == "undef") {
17154 print "/*", prefix defundef, macro, "*/"
17155 next
17156 }
17157 }
17158}
17159{ print }
17160_ACAWK
17161_ACEOF
17162cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017163 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017164fi # test -n "$CONFIG_HEADERS"
17165
17166
17167eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17168shift
17169for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170do
17171 case $ac_tag in
17172 :[FHLC]) ac_mode=$ac_tag; continue;;
17173 esac
17174 case $ac_mode$ac_tag in
17175 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017176 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177 :[FH]-) ac_tag=-:-;;
17178 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17179 esac
17180 ac_save_IFS=$IFS
17181 IFS=:
17182 set x $ac_tag
17183 IFS=$ac_save_IFS
17184 shift
17185 ac_file=$1
17186 shift
17187
17188 case $ac_mode in
17189 :L) ac_source=$1;;
17190 :[FH])
17191 ac_file_inputs=
17192 for ac_f
17193 do
17194 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017195 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196 *) # Look for the file first in the build tree, then in the source tree
17197 # (if the path is not absolute). The absolute path cannot be DOS-style,
17198 # because $ac_f cannot contain `:'.
17199 test -f "$ac_f" ||
17200 case $ac_f in
17201 [\\/$]*) false;;
17202 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17203 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017204 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017206 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17207 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017208 done
17209
17210 # Let's still pretend it is `configure' which instantiates (i.e., don't
17211 # use $as_me), people would be surprised to read:
17212 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017213 configure_input='Generated from '`
17214 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17215 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216 if test x"$ac_file" != x-; then
17217 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017218 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17219$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017221 # Neutralize special characters interpreted by sed in replacement strings.
17222 case $configure_input in #(
17223 *\&* | *\|* | *\\* )
17224 ac_sed_conf_input=`$as_echo "$configure_input" |
17225 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17226 *) ac_sed_conf_input=$configure_input;;
17227 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228
17229 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017230 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17231 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232 esac
17233 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017234 esac
17235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017237$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017238 X"$ac_file" : 'X\(//\)[^/]' \| \
17239 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017241$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17243 s//\1/
17244 q
17245 }
17246 /^X\(\/\/\)[^/].*/{
17247 s//\1/
17248 q
17249 }
17250 /^X\(\/\/\)$/{
17251 s//\1/
17252 q
17253 }
17254 /^X\(\/\).*/{
17255 s//\1/
17256 q
17257 }
17258 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017259 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017260 ac_builddir=.
17261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262case "$ac_dir" in
17263.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17264*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017265 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017266 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017267 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268 case $ac_top_builddir_sub in
17269 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17270 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17271 esac ;;
17272esac
17273ac_abs_top_builddir=$ac_pwd
17274ac_abs_builddir=$ac_pwd$ac_dir_suffix
17275# for backward compatibility:
17276ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017277
17278case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017280 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281 ac_top_srcdir=$ac_top_builddir_sub
17282 ac_abs_top_srcdir=$ac_pwd ;;
17283 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017284 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285 ac_top_srcdir=$srcdir
17286 ac_abs_top_srcdir=$srcdir ;;
17287 *) # Relative name.
17288 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17289 ac_top_srcdir=$ac_top_build_prefix$srcdir
17290 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017291esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017293
Martin v. Löwis11437992002-04-12 09:54:03 +000017294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295 case $ac_mode in
17296 :F)
17297 #
17298 # CONFIG_FILE
17299 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017300
17301 case $INSTALL in
17302 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017304 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017305 ac_MKDIR_P=$MKDIR_P
17306 case $MKDIR_P in
17307 [\\/$]* | ?:[\\/]* ) ;;
17308 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17309 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017310_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311
Matthias Kloseb9621712010-04-24 17:59:49 +000017312cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313# If the template does not know about datarootdir, expand it.
17314# FIXME: This hack should be removed a few years after 2.60.
17315ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017316ac_sed_dataroot='
17317/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318 p
17319 q
17320}
17321/@datadir@/p
17322/@docdir@/p
17323/@infodir@/p
17324/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017325/@mandir@/p'
17326case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327*datarootdir*) ac_datarootdir_seen=yes;;
17328*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17330$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333 ac_datarootdir_hack='
17334 s&@datadir@&$datadir&g
17335 s&@docdir@&$docdir&g
17336 s&@infodir@&$infodir&g
17337 s&@localedir@&$localedir&g
17338 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017339 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017340esac
17341_ACEOF
17342
17343# Neutralize VPATH when `$srcdir' = `.'.
17344# Shell code in configure.ac might set extrasub.
17345# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017346cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17347ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017348$extrasub
17349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017350cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017351:t
17352/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017353s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017355s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356s&@srcdir@&$ac_srcdir&;t t
17357s&@abs_srcdir@&$ac_abs_srcdir&;t t
17358s&@top_srcdir@&$ac_top_srcdir&;t t
17359s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17360s&@builddir@&$ac_builddir&;t t
17361s&@abs_builddir@&$ac_abs_builddir&;t t
17362s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17363s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017364s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017366"
Victor Stinnere0be4232011-10-25 13:06:09 +020017367eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17368 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017371 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17372 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17373 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017375which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017376$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017377which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017378
Victor Stinnere0be4232011-10-25 13:06:09 +020017379 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017381 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17382 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017383 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017384 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385 ;;
17386 :H)
17387 #
17388 # CONFIG_HEADER
17389 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017390 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017391 {
17392 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017393 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17394 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017395 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017396 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017397 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17398$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017399 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017400 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017401 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017402 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 fi
17404 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017405 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017406 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017407 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411
17412 esac
17413
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017414
17415 case $ac_file$ac_mode in
17416 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17417
17418 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419done # for ac_tag
17420
Guido van Rossum627b2d71993-12-24 10:39:16 +000017421
Matthias Kloseb9621712010-04-24 17:59:49 +000017422as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017423_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017424ac_clean_files=$ac_clean_files_save
17425
Matthias Kloseb9621712010-04-24 17:59:49 +000017426test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017427 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017428
Martin v. Löwis11437992002-04-12 09:54:03 +000017429
17430# configure is writing to config.log, and then calls config.status.
17431# config.status does its own redirection, appending to config.log.
17432# Unfortunately, on DOS this fails, as config.log is still kept open
17433# by configure, so config.status won't be able to write to it; its
17434# output is simply discarded. So we exec the FD to /dev/null,
17435# effectively closing config.log, so it can be properly (re)opened and
17436# appended to by config.status. When coming back to configure, we
17437# need to make the FD available again.
17438if test "$no_create" != yes; then
17439 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017440 ac_config_status_args=
17441 test "$silent" = yes &&
17442 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017443 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017444 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017445 exec 5>>config.log
17446 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17447 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017448 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017449fi
17450if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17452$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017453fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017454
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017455
Christian Heimes75ed8902013-11-20 01:11:18 +010017456echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017457if test ! -f Modules/Setup
17458then
17459 cp $srcdir/Modules/Setup.dist Modules/Setup
17460fi
17461
Christian Heimes75ed8902013-11-20 01:11:18 +010017462echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017463if test ! -f Modules/Setup.local
17464then
17465 echo "# Edit this file for local setup changes" >Modules/Setup.local
17466fi
17467
Christian Heimes75ed8902013-11-20 01:11:18 +010017468echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017469$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17470 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017471 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017472mv config.c Modules