blob: 43bf0f3fbc5ca53af0145ca6e26cd426687b5255 [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
Zachary Ware5af85642015-12-21 12:09:17 -0600804with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_cxx_main
806with_suffix
807enable_shared
808enable_profiling
809with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100810with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100811with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_libs
813with_system_expat
814with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100815with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000816enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700817with_tcltk_includes
818with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000819with_dbmliborder
820with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_threads
822with_thread
823enable_ipv6
824with_doc_strings
825with_tsc
826with_pymalloc
827with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_fpectl
829with_libm
830with_libc
831enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800833with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000834'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000835 ac_precious_vars='build_alias
836host_alias
837target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100838MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839CC
840CFLAGS
841LDFLAGS
842LIBS
843CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100844CPP
845PKG_CONFIG
846PKG_CONFIG_PATH
847PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848
Guido van Rossum627b2d71993-12-24 10:39:16 +0000849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000851ac_init_help=
852ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000853ac_unrecognized_opts=
854ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855# The variables have the same names as the options, with
856# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000857cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860no_recursion=
861prefix=NONE
862program_prefix=NONE
863program_suffix=NONE
864program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869x_includes=NONE
870x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000871
872# Installation directory options.
873# These are left unexpanded so users can "make install exec_prefix=/foo"
874# and all the variables that are supposed to be based on exec_prefix
875# by default will actually change.
876# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878bindir='${exec_prefix}/bin'
879sbindir='${exec_prefix}/sbin'
880libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881datarootdir='${prefix}/share'
882datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883sysconfdir='${prefix}/etc'
884sharedstatedir='${prefix}/com'
885localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886includedir='${prefix}/include'
887oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
889infodir='${datarootdir}/info'
890htmldir='${docdir}'
891dvidir='${docdir}'
892pdfdir='${docdir}'
893psdir='${docdir}'
894libdir='${exec_prefix}/lib'
895localedir='${datarootdir}/locale'
896mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000901do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 # If the previous option needs an argument, assign it.
903 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 ac_prev=
906 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200910 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
911 *=) ac_optarg= ;;
912 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Accept the important Cygnus configure options, so we can diagnose typos.
916
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 case $ac_dashdash$ac_option in
918 --)
919 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 -bindir | --bindir | --bindi | --bind | --bin | --bi)
922 ac_prev=bindir ;;
923 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 -cache-file | --cache-file | --cache-fil | --cache-fi \
932 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
933 ac_prev=cache_file ;;
934 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
935 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 cache_file=$ac_optarg ;;
937
938 --config-cache | -C)
939 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
947 | --dataroo | --dataro | --datar)
948 ac_prev=datarootdir ;;
949 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
950 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
951 datarootdir=$ac_optarg ;;
952
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000954 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000956 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200957 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 ac_useropt_orig=$ac_useropt
959 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
960 case $ac_user_opts in
961 *"
962"enable_$ac_useropt"
963"*) ;;
964 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
965 ac_unrecognized_sep=', ';;
966 esac
967 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000968
969 -docdir | --docdir | --docdi | --doc | --do)
970 ac_prev=docdir ;;
971 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
972 docdir=$ac_optarg ;;
973
974 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
975 ac_prev=dvidir ;;
976 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
977 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
979 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000980 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000981 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000982 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200983 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt_orig=$ac_useropt
985 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
986 case $ac_user_opts in
987 *"
988"enable_$ac_useropt"
989"*) ;;
990 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
991 ac_unrecognized_sep=', ';;
992 esac
993 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
996 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
997 | --exec | --exe | --ex)
998 ac_prev=exec_prefix ;;
999 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1000 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1001 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 # Obsolete; use --with-gas.
1006 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 -help | --help | --hel | --he | -h)
1009 ac_init_help=long ;;
1010 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1011 ac_init_help=recursive ;;
1012 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1013 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001020 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1021 ac_prev=htmldir ;;
1022 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1023 | --ht=*)
1024 htmldir=$ac_optarg ;;
1025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026 -includedir | --includedir | --includedi | --included | --include \
1027 | --includ | --inclu | --incl | --inc)
1028 ac_prev=includedir ;;
1029 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1030 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
1033 -infodir | --infodir | --infodi | --infod | --info | --inf)
1034 ac_prev=infodir ;;
1035 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
1038 -libdir | --libdir | --libdi | --libd)
1039 ac_prev=libdir ;;
1040 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1044 | --libexe | --libex | --libe)
1045 ac_prev=libexecdir ;;
1046 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1047 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 -localedir | --localedir | --localedi | --localed | --locale)
1051 ac_prev=localedir ;;
1052 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1053 localedir=$ac_optarg ;;
1054
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001056 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057 ac_prev=localstatedir ;;
1058 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
1062 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1063 ac_prev=mandir ;;
1064 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Obsolete; use --without-fp.
1069 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
1071 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 no_create=yes ;;
1074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1076 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1077 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1080 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1081 | --oldin | --oldi | --old | --ol | --o)
1082 ac_prev=oldincludedir ;;
1083 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1084 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1085 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1089 ac_prev=prefix ;;
1090 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1094 | --program-pre | --program-pr | --program-p)
1095 ac_prev=program_prefix ;;
1096 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1097 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1101 | --program-suf | --program-su | --program-s)
1102 ac_prev=program_suffix ;;
1103 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1104 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-transform-name | --program-transform-name \
1108 | --program-transform-nam | --program-transform-na \
1109 | --program-transform-n | --program-transform- \
1110 | --program-transform | --program-transfor \
1111 | --program-transfo | --program-transf \
1112 | --program-trans | --program-tran \
1113 | --progr-tra | --program-tr | --program-t)
1114 ac_prev=program_transform_name ;;
1115 -program-transform-name=* | --program-transform-name=* \
1116 | --program-transform-nam=* | --program-transform-na=* \
1117 | --program-transform-n=* | --program-transform-=* \
1118 | --program-transform=* | --program-transfor=* \
1119 | --program-transfo=* | --program-transf=* \
1120 | --program-trans=* | --program-tran=* \
1121 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001124 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1125 ac_prev=pdfdir ;;
1126 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1127 pdfdir=$ac_optarg ;;
1128
1129 -psdir | --psdir | --psdi | --psd | --ps)
1130 ac_prev=psdir ;;
1131 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1132 psdir=$ac_optarg ;;
1133
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1135 | -silent | --silent | --silen | --sile | --sil)
1136 silent=yes ;;
1137
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001138 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1139 ac_prev=sbindir ;;
1140 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1141 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143
1144 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1145 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1146 | --sharedst | --shareds | --shared | --share | --shar \
1147 | --sha | --sh)
1148 ac_prev=sharedstatedir ;;
1149 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1150 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1151 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1152 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155 -site | --site | --sit)
1156 ac_prev=site ;;
1157 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001159
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1161 ac_prev=srcdir ;;
1162 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1166 | --syscon | --sysco | --sysc | --sys | --sy)
1167 ac_prev=sysconfdir ;;
1168 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1169 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
1177 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1178 verbose=yes ;;
1179
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 -version | --version | --versio | --versi | --vers | -V)
1181 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
1183 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001187 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 ac_useropt_orig=$ac_useropt
1189 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1190 case $ac_user_opts in
1191 *"
1192"with_$ac_useropt"
1193"*) ;;
1194 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1195 ac_unrecognized_sep=', ';;
1196 esac
1197 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt_orig=$ac_useropt
1205 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206 case $ac_user_opts in
1207 *"
1208"with_$ac_useropt"
1209"*) ;;
1210 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1211 ac_unrecognized_sep=', ';;
1212 esac
1213 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215 --x)
1216 # Obsolete; use --with-x.
1217 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
1219 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1220 | --x-incl | --x-inc | --x-in | --x-i)
1221 ac_prev=x_includes ;;
1222 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1223 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
1226 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1227 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1228 ac_prev=x_libraries ;;
1229 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1230 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001233 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1234Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235 ;;
1236
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 *=*)
1238 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1239 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001240 case $ac_envvar in #(
1241 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001242 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 export $ac_envvar ;;
1246
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001247 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001252 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253 ;;
1254
1255 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001256done
1257
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261fi
1262
Matthias Kloseb9621712010-04-24 17:59:49 +00001263if test -n "$ac_unrecognized_opts"; then
1264 case $enable_option_checking in
1265 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1268 esac
1269fi
1270
1271# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1273 datadir sysconfdir sharedstatedir localstatedir includedir \
1274 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1275 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 # Remove trailing slashes.
1279 case $ac_val in
1280 */ )
1281 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1282 eval $ac_var=\$ac_val;;
1283 esac
1284 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001285 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 [\\/$]* | ?:[\\/]* ) continue;;
1287 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001288 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001290done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291
Martin v. Löwis11437992002-04-12 09:54:03 +00001292# There might be people who depend on the old broken behavior: `$host'
1293# used to hold the argument of --host etc.
1294# FIXME: To remove some day.
1295build=$build_alias
1296host=$host_alias
1297target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298
Martin v. Löwis11437992002-04-12 09:54:03 +00001299# FIXME: To remove some day.
1300if test "x$host_alias" != x; then
1301 if test "x$build_alias" = x; then
1302 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001303 elif test "x$build_alias" != "x$host_alias"; then
1304 cross_compiling=yes
1305 fi
1306fi
1307
1308ac_tool_prefix=
1309test -n "$host_alias" && ac_tool_prefix=$host_alias-
1310
1311test "$silent" = yes && exec 6>/dev/null
1312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001314ac_pwd=`pwd` && test -n "$ac_pwd" &&
1315ac_ls_di=`ls -di .` &&
1316ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001317 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001319 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320
1321
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322# Find the source files, if location was not specified.
1323if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001324 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001326 ac_confdir=`$as_dirname -- "$as_myself" ||
1327$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1328 X"$as_myself" : 'X\(//\)[^/]' \| \
1329 X"$as_myself" : 'X\(//\)$' \| \
1330 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1331$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1333 s//\1/
1334 q
1335 }
1336 /^X\(\/\/\)[^/].*/{
1337 s//\1/
1338 q
1339 }
1340 /^X\(\/\/\)$/{
1341 s//\1/
1342 q
1343 }
1344 /^X\(\/\).*/{
1345 s//\1/
1346 q
1347 }
1348 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001349 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001351 srcdir=..
1352 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001353else
1354 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356if test ! -r "$srcdir/$ac_unique_file"; then
1357 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001358 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001360ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1361ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001362 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 pwd)`
1364# When building in place, set srcdir=.
1365if test "$ac_abs_confdir" = "$ac_pwd"; then
1366 srcdir=.
1367fi
1368# Remove unnecessary trailing slashes from srcdir.
1369# Double slashes in file names in object file debugging info
1370# mess up M-x gdb in Emacs.
1371case $srcdir in
1372*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1373esac
1374for ac_var in $ac_precious_vars; do
1375 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1376 eval ac_env_${ac_var}_value=\$${ac_var}
1377 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1378 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1379done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001380
Martin v. Löwis11437992002-04-12 09:54:03 +00001381#
1382# Report the --help message.
1383#
1384if test "$ac_init_help" = "long"; then
1385 # Omit some internal or obsolete options to make the list less imposing.
1386 # This message is too long to be a string in the A/UX 3.1 sh.
1387 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001388\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001389
1390Usage: $0 [OPTION]... [VAR=VALUE]...
1391
1392To assign environment variables (e.g., CC, CFLAGS...), specify them as
1393VAR=VALUE. See below for descriptions of some of the useful variables.
1394
1395Defaults for the options are specified in brackets.
1396
1397Configuration:
1398 -h, --help display this help and exit
1399 --help=short display options specific to this package
1400 --help=recursive display the short help of all the included packages
1401 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001402 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 --cache-file=FILE cache test results in FILE [disabled]
1404 -C, --config-cache alias for \`--cache-file=config.cache'
1405 -n, --no-create do not create output files
1406 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1407
Martin v. Löwis11437992002-04-12 09:54:03 +00001408Installation directories:
1409 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001410 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001412 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413
1414By default, \`make install' will install all the files in
1415\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1416an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1417for instance \`--prefix=\$HOME'.
1418
1419For better control, use the options below.
1420
1421Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 --bindir=DIR user executables [EPREFIX/bin]
1423 --sbindir=DIR system admin executables [EPREFIX/sbin]
1424 --libexecdir=DIR program executables [EPREFIX/libexec]
1425 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1426 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1427 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1428 --libdir=DIR object code libraries [EPREFIX/lib]
1429 --includedir=DIR C header files [PREFIX/include]
1430 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1431 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1432 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1433 --infodir=DIR info documentation [DATAROOTDIR/info]
1434 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1435 --mandir=DIR man documentation [DATAROOTDIR/man]
1436 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1437 --htmldir=DIR html documentation [DOCDIR]
1438 --dvidir=DIR dvi documentation [DOCDIR]
1439 --pdfdir=DIR pdf documentation [DOCDIR]
1440 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001441_ACEOF
1442
1443 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001444
1445System types:
1446 --build=BUILD configure for building on BUILD [guessed]
1447 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001448_ACEOF
1449fi
1450
1451if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001452 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001453 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001454 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 cat <<\_ACEOF
1456
1457Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001459 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1460 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001461 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001462 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --enable-framework[=INSTALLDIR]
1464 Build (MacOSX|Darwin) framework
1465 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001466 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001467 --enable-loadable-sqlite-extensions
1468 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --enable-ipv6 Enable ipv6 (with ipv4) support
1470 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001471 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001473
1474Optional Packages:
1475 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1476 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001477 --with-universal-archs=ARCH
1478 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001479 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001480 --with-framework-name=FRAMEWORK
1481 specify an alternate name of the framework built
1482 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001484 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001485 --with-cxx-main=<compiler>
1486 compile main() and link python executable with C++
1487 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --with-suffix=.exe set executable suffix
1489 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001490 --with-hash-algorithm=[fnv|siphash24]
1491 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001492 --with-address-sanitizer
1493 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001495 --with-system-expat build pyexpat module using an installed expat
1496 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001497 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001498 --with-system-libmpdec build _decimal module using an installed libmpdec
1499 library
Ned Deilyd819b932013-09-06 01:07:05 -07001500 --with-tcltk-includes='-I...'
1501 override search for Tcl and Tk include files
1502 --with-tcltk-libs='-L...'
1503 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001504 --with-dbmliborder=db1:db2:...
1505 order to check db backends for dbm. Valid value is a
1506 colon separated string with the backend names
1507 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with(out)-threads[=DIRECTORY]
1510 disable/enable thread support
1511 --with(out)-thread[=DIRECTORY]
1512 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001514 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001516 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-fpectl enable SIGFPE catching
1518 --with-libm=STRING math library
1519 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001520 --with(out)-computed-gotos
1521 Use computed gotos in evaluation loop (enabled by
1522 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001523 --with(out)-ensurepip=[=upgrade]
1524 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001525
1526Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001527 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 CC C compiler command
1529 CFLAGS C compiler flags
1530 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1531 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001532 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001533 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001536 PKG_CONFIG path to pkg-config utility
1537 PKG_CONFIG_PATH
1538 directories to add to pkg-config's search path
1539 PKG_CONFIG_LIBDIR
1540 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Use these variables to override the choices made by `configure' or to help
1543it to find libraries and programs with nonstandard names/locations.
1544
Georg Brandle2e15612009-05-20 18:25:10 +00001545Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001546_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001548fi
1549
1550if test "$ac_init_help" = "recursive"; then
1551 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001553 test -d "$ac_dir" ||
1554 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1555 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_builddir=.
1557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558case "$ac_dir" in
1559.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1560*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001563 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564 case $ac_top_builddir_sub in
1565 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1566 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1567 esac ;;
1568esac
1569ac_abs_top_builddir=$ac_pwd
1570ac_abs_builddir=$ac_pwd$ac_dir_suffix
1571# for backward compatibility:
1572ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001573
1574case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 ac_top_srcdir=$ac_top_builddir_sub
1578 ac_abs_top_srcdir=$ac_pwd ;;
1579 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 ac_top_srcdir=$srcdir
1582 ac_abs_top_srcdir=$srcdir ;;
1583 *) # Relative name.
1584 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1585 ac_top_srcdir=$ac_top_build_prefix$srcdir
1586 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001587esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 cd "$ac_dir" || { ac_status=$?; continue; }
1591 # Check for guested configure.
1592 if test -f "$ac_srcdir/configure.gnu"; then
1593 echo &&
1594 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1595 elif test -f "$ac_srcdir/configure"; then
1596 echo &&
1597 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001599 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 fi || ac_status=$?
1601 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 done
1603fi
1604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001606if $ac_init_version; then
1607 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001608python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001609generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001611Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001612This configure script is free software; the Free Software Foundation
1613gives unlimited permission to copy, distribute and modify it.
1614_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001617
1618## ------------------------ ##
1619## Autoconf initialization. ##
1620## ------------------------ ##
1621
1622# ac_fn_c_try_compile LINENO
1623# --------------------------
1624# Try to compile conftest.$ac_ext, and return whether this succeeded.
1625ac_fn_c_try_compile ()
1626{
1627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628 rm -f conftest.$ac_objext
1629 if { { ac_try="$ac_compile"
1630case "(($ac_try" in
1631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632 *) ac_try_echo=$ac_try;;
1633esac
1634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635$as_echo "$ac_try_echo"; } >&5
1636 (eval "$ac_compile") 2>conftest.err
1637 ac_status=$?
1638 if test -s conftest.err; then
1639 grep -v '^ *+' conftest.err >conftest.er1
1640 cat conftest.er1 >&5
1641 mv -f conftest.er1 conftest.err
1642 fi
1643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1644 test $ac_status = 0; } && {
1645 test -z "$ac_c_werror_flag" ||
1646 test ! -s conftest.err
1647 } && test -s conftest.$ac_objext; then :
1648 ac_retval=0
1649else
1650 $as_echo "$as_me: failed program was:" >&5
1651sed 's/^/| /' conftest.$ac_ext >&5
1652
1653 ac_retval=1
1654fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001656 as_fn_set_status $ac_retval
1657
1658} # ac_fn_c_try_compile
1659
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001660# ac_fn_c_try_cpp LINENO
1661# ----------------------
1662# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1663ac_fn_c_try_cpp ()
1664{
1665 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666 if { { ac_try="$ac_cpp conftest.$ac_ext"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1681 test $ac_status = 0; } > conftest.i && {
1682 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 }; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
1692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_cpp
1696
Matthias Kloseb9621712010-04-24 17:59:49 +00001697# ac_fn_c_try_link LINENO
1698# -----------------------
1699# Try to link conftest.$ac_ext, and return whether this succeeded.
1700ac_fn_c_try_link ()
1701{
1702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1703 rm -f conftest.$ac_objext conftest$ac_exeext
1704 if { { ac_try="$ac_link"
1705case "(($ac_try" in
1706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1707 *) ac_try_echo=$ac_try;;
1708esac
1709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1710$as_echo "$ac_try_echo"; } >&5
1711 (eval "$ac_link") 2>conftest.err
1712 ac_status=$?
1713 if test -s conftest.err; then
1714 grep -v '^ *+' conftest.err >conftest.er1
1715 cat conftest.er1 >&5
1716 mv -f conftest.er1 conftest.err
1717 fi
1718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1719 test $ac_status = 0; } && {
1720 test -z "$ac_c_werror_flag" ||
1721 test ! -s conftest.err
1722 } && test -s conftest$ac_exeext && {
1723 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001724 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001725 }; then :
1726 ac_retval=0
1727else
1728 $as_echo "$as_me: failed program was:" >&5
1729sed 's/^/| /' conftest.$ac_ext >&5
1730
1731 ac_retval=1
1732fi
1733 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1734 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1735 # interfere with the next link command; also delete a directory that is
1736 # left behind by Apple's compiler. We do this before executing the actions.
1737 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001738 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001739 as_fn_set_status $ac_retval
1740
1741} # ac_fn_c_try_link
1742
Matthias Kloseb9621712010-04-24 17:59:49 +00001743# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1744# -------------------------------------------------------
1745# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1746# the include files in INCLUDES and setting the cache variable VAR
1747# accordingly.
1748ac_fn_c_check_header_mongrel ()
1749{
1750 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001751 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1753$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001754if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 $as_echo_n "(cached) " >&6
1756fi
1757eval ac_res=\$$3
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1759$as_echo "$ac_res" >&6; }
1760else
1761 # Is the header compilable?
1762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1763$as_echo_n "checking $2 usability... " >&6; }
1764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1765/* end confdefs.h. */
1766$4
1767#include <$2>
1768_ACEOF
1769if ac_fn_c_try_compile "$LINENO"; then :
1770 ac_header_compiler=yes
1771else
1772 ac_header_compiler=no
1773fi
1774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1776$as_echo "$ac_header_compiler" >&6; }
1777
1778# Is the header present?
1779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1780$as_echo_n "checking $2 presence... " >&6; }
1781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1782/* end confdefs.h. */
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_cpp "$LINENO"; then :
1786 ac_header_preproc=yes
1787else
1788 ac_header_preproc=no
1789fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001790rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1792$as_echo "$ac_header_preproc" >&6; }
1793
1794# So? What about this header?
1795case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1796 yes:no: )
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1798$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1800$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1801 ;;
1802 no:yes:* )
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1804$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1806$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1808$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1810$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1812$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001813( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001814## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001815## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001816 ) | sed "s/^/$as_me: WARNING: /" >&2
1817 ;;
1818esac
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001821if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001822 $as_echo_n "(cached) " >&6
1823else
1824 eval "$3=\$ac_header_compiler"
1825fi
1826eval ac_res=\$$3
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1828$as_echo "$ac_res" >&6; }
1829fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001830 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001831
1832} # ac_fn_c_check_header_mongrel
1833
1834# ac_fn_c_try_run LINENO
1835# ----------------------
1836# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1837# that executables *can* be run.
1838ac_fn_c_try_run ()
1839{
1840 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1841 if { { ac_try="$ac_link"
1842case "(($ac_try" in
1843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1844 *) ac_try_echo=$ac_try;;
1845esac
1846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1847$as_echo "$ac_try_echo"; } >&5
1848 (eval "$ac_link") 2>&5
1849 ac_status=$?
1850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1851 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1852 { { case "(($ac_try" in
1853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1854 *) ac_try_echo=$ac_try;;
1855esac
1856eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1857$as_echo "$ac_try_echo"; } >&5
1858 (eval "$ac_try") 2>&5
1859 ac_status=$?
1860 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1861 test $ac_status = 0; }; }; then :
1862 ac_retval=0
1863else
1864 $as_echo "$as_me: program exited with status $ac_status" >&5
1865 $as_echo "$as_me: failed program was:" >&5
1866sed 's/^/| /' conftest.$ac_ext >&5
1867
1868 ac_retval=$ac_status
1869fi
1870 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001872 as_fn_set_status $ac_retval
1873
1874} # ac_fn_c_try_run
1875
1876# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1877# -------------------------------------------------------
1878# Tests whether HEADER exists and can be compiled using the include files in
1879# INCLUDES, setting the cache variable VAR accordingly.
1880ac_fn_c_check_header_compile ()
1881{
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1884$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001885if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001886 $as_echo_n "(cached) " >&6
1887else
1888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889/* end confdefs.h. */
1890$4
1891#include <$2>
1892_ACEOF
1893if ac_fn_c_try_compile "$LINENO"; then :
1894 eval "$3=yes"
1895else
1896 eval "$3=no"
1897fi
1898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1899fi
1900eval ac_res=\$$3
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1902$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001903 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001904
1905} # ac_fn_c_check_header_compile
1906
Matthias Kloseb9621712010-04-24 17:59:49 +00001907# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1908# -------------------------------------------
1909# Tests whether TYPE exists after having included INCLUDES, setting cache
1910# variable VAR accordingly.
1911ac_fn_c_check_type ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001916if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001917 $as_echo_n "(cached) " >&6
1918else
1919 eval "$3=no"
1920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1921/* end confdefs.h. */
1922$4
1923int
1924main ()
1925{
1926if (sizeof ($2))
1927 return 0;
1928 ;
1929 return 0;
1930}
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939if (sizeof (($2)))
1940 return 0;
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946
1947else
1948 eval "$3=yes"
1949fi
1950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951fi
1952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1953fi
1954eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001957 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001958
1959} # ac_fn_c_check_type
1960
1961# ac_fn_c_find_uintX_t LINENO BITS VAR
1962# ------------------------------------
1963# Finds an unsigned integer type with width BITS, setting cache variable VAR
1964# accordingly.
1965ac_fn_c_find_uintX_t ()
1966{
1967 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1969$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001970if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001971 $as_echo_n "(cached) " >&6
1972else
1973 eval "$3=no"
1974 # Order is important - never check a type that is potentially smaller
1975 # than half of the expected target width.
1976 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1977 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1979/* end confdefs.h. */
1980$ac_includes_default
1981int
1982main ()
1983{
1984static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001985test_array [0] = 0;
1986return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001987
1988 ;
1989 return 0;
1990}
1991_ACEOF
1992if ac_fn_c_try_compile "$LINENO"; then :
1993 case $ac_type in #(
1994 uint$2_t) :
1995 eval "$3=yes" ;; #(
1996 *) :
1997 eval "$3=\$ac_type" ;;
1998esac
1999fi
2000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002001 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002002
2003else
2004 break
2005fi
2006 done
2007fi
2008eval ac_res=\$$3
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2010$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013} # ac_fn_c_find_uintX_t
2014
2015# ac_fn_c_find_intX_t LINENO BITS VAR
2016# -----------------------------------
2017# Finds a signed integer type with width BITS, setting cache variable VAR
2018# accordingly.
2019ac_fn_c_find_intX_t ()
2020{
2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2023$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002024if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002025 $as_echo_n "(cached) " >&6
2026else
2027 eval "$3=no"
2028 # Order is important - never check a type that is potentially smaller
2029 # than half of the expected target width.
2030 for ac_type in int$2_t 'int' 'long int' \
2031 'long long int' 'short int' 'signed char'; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002035 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002036int
2037main ()
2038{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002039static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002040test_array [0] = 0;
2041return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002042
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_compile "$LINENO"; then :
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002051 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002052int
2053main ()
2054{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002055static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002056 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002057test_array [0] = 0;
2058return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065
2066else
2067 case $ac_type in #(
2068 int$2_t) :
2069 eval "$3=yes" ;; #(
2070 *) :
2071 eval "$3=\$ac_type" ;;
2072esac
2073fi
2074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002077 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002078
2079else
2080 break
2081fi
2082 done
2083fi
2084eval ac_res=\$$3
2085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002087 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002088
2089} # ac_fn_c_find_intX_t
2090
2091# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2092# --------------------------------------------
2093# Tries to find the compile-time value of EXPR in a program that includes
2094# INCLUDES, setting VAR accordingly. Returns whether the value could be
2095# computed
2096ac_fn_c_compute_int ()
2097{
2098 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2099 if test "$cross_compiling" = yes; then
2100 # Depending upon the size, compute the lo and hi bounds.
2101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002108test_array [0] = 0;
2109return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_lo=0 ac_mid=0
2117 while :; do
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002125test_array [0] = 0;
2126return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002127
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_hi=$ac_mid; break
2134else
2135 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2136 if test $ac_lo -le $ac_mid; then
2137 ac_lo= ac_hi=
2138 break
2139 fi
2140 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 done
2144else
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h. */
2147$4
2148int
2149main ()
2150{
2151static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002152test_array [0] = 0;
2153return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002154
2155 ;
2156 return 0;
2157}
2158_ACEOF
2159if ac_fn_c_try_compile "$LINENO"; then :
2160 ac_hi=-1 ac_mid=-1
2161 while :; do
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165int
2166main ()
2167{
2168static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002169test_array [0] = 0;
2170return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002171
2172 ;
2173 return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_compile "$LINENO"; then :
2177 ac_lo=$ac_mid; break
2178else
2179 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2180 if test $ac_mid -le $ac_hi; then
2181 ac_lo= ac_hi=
2182 break
2183 fi
2184 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2185fi
2186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187 done
2188else
2189 ac_lo= ac_hi=
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192fi
2193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194# Binary search between lo and hi bounds.
2195while test "x$ac_lo" != "x$ac_hi"; do
2196 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199$4
2200int
2201main ()
2202{
2203static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002204test_array [0] = 0;
2205return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002206
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_compile "$LINENO"; then :
2212 ac_hi=$ac_mid
2213else
2214 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2215fi
2216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2217done
2218case $ac_lo in #((
2219?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2220'') ac_retval=1 ;;
2221esac
2222 else
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225$4
2226static long int longval () { return $2; }
2227static unsigned long int ulongval () { return $2; }
2228#include <stdio.h>
2229#include <stdlib.h>
2230int
2231main ()
2232{
2233
2234 FILE *f = fopen ("conftest.val", "w");
2235 if (! f)
2236 return 1;
2237 if (($2) < 0)
2238 {
2239 long int i = longval ();
2240 if (i != ($2))
2241 return 1;
2242 fprintf (f, "%ld", i);
2243 }
2244 else
2245 {
2246 unsigned long int i = ulongval ();
2247 if (i != ($2))
2248 return 1;
2249 fprintf (f, "%lu", i);
2250 }
2251 /* Do not output a trailing newline, as this causes \r\n confusion
2252 on some platforms. */
2253 return ferror (f) || fclose (f) != 0;
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_run "$LINENO"; then :
2260 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2261else
2262 ac_retval=1
2263fi
2264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2265 conftest.$ac_objext conftest.beam conftest.$ac_ext
2266rm -f conftest.val
2267
2268 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002270 as_fn_set_status $ac_retval
2271
2272} # ac_fn_c_compute_int
2273
2274# ac_fn_c_check_func LINENO FUNC VAR
2275# ----------------------------------
2276# Tests whether FUNC exists, setting the cache variable VAR accordingly
2277ac_fn_c_check_func ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2281$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002282if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2288 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2289#define $2 innocuous_$2
2290
2291/* System header to define __stub macros and hopefully few prototypes,
2292 which can conflict with char $2 (); below.
2293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2294 <limits.h> exists even on freestanding compilers. */
2295
2296#ifdef __STDC__
2297# include <limits.h>
2298#else
2299# include <assert.h>
2300#endif
2301
2302#undef $2
2303
2304/* Override any GCC internal prototype to avoid an error.
2305 Use char because int might match the return type of a GCC
2306 builtin and then its argument prototype would still apply. */
2307#ifdef __cplusplus
2308extern "C"
2309#endif
2310char $2 ();
2311/* The GNU C library defines this for functions which it implements
2312 to always fail with ENOSYS. Some functions are actually named
2313 something starting with __ and the normal name is an alias. */
2314#if defined __stub_$2 || defined __stub___$2
2315choke me
2316#endif
2317
2318int
2319main ()
2320{
2321return $2 ();
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_link "$LINENO"; then :
2327 eval "$3=yes"
2328else
2329 eval "$3=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext \
2332 conftest$ac_exeext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_func
2340
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002341# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2342# ---------------------------------------------
2343# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2344# accordingly.
2345ac_fn_c_check_decl ()
2346{
2347 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348 as_decl_name=`echo $2|sed 's/ *(.*//'`
2349 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2351$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2352if eval \${$3+:} false; then :
2353 $as_echo_n "(cached) " >&6
2354else
2355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h. */
2357$4
2358int
2359main ()
2360{
2361#ifndef $as_decl_name
2362#ifdef __cplusplus
2363 (void) $as_decl_use;
2364#else
2365 (void) $as_decl_name;
2366#endif
2367#endif
2368
2369 ;
2370 return 0;
2371}
2372_ACEOF
2373if ac_fn_c_try_compile "$LINENO"; then :
2374 eval "$3=yes"
2375else
2376 eval "$3=no"
2377fi
2378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2379fi
2380eval ac_res=\$$3
2381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2382$as_echo "$ac_res" >&6; }
2383 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2384
2385} # ac_fn_c_check_decl
2386
Matthias Kloseb9621712010-04-24 17:59:49 +00002387# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2388# ----------------------------------------------------
2389# Tries to find if the field MEMBER exists in type AGGR, after including
2390# INCLUDES, setting cache variable VAR accordingly.
2391ac_fn_c_check_member ()
2392{
2393 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2395$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002396if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002397 $as_echo_n "(cached) " >&6
2398else
2399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400/* end confdefs.h. */
2401$5
2402int
2403main ()
2404{
2405static $2 ac_aggr;
2406if (ac_aggr.$3)
2407return 0;
2408 ;
2409 return 0;
2410}
2411_ACEOF
2412if ac_fn_c_try_compile "$LINENO"; then :
2413 eval "$4=yes"
2414else
2415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h. */
2417$5
2418int
2419main ()
2420{
2421static $2 ac_aggr;
2422if (sizeof ac_aggr.$3)
2423return 0;
2424 ;
2425 return 0;
2426}
2427_ACEOF
2428if ac_fn_c_try_compile "$LINENO"; then :
2429 eval "$4=yes"
2430else
2431 eval "$4=no"
2432fi
2433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2434fi
2435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2436fi
2437eval ac_res=\$$4
2438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2439$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002440 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002441
2442} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002444This file contains any messages produced by compilers while
2445running configure, to aid debugging if configure makes a mistake.
2446
Yury Selivanov7aa53412015-05-30 10:57:56 -04002447It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002448generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002449
2450 $ $0 $@
2451
2452_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002453exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002454{
2455cat <<_ASUNAME
2456## --------- ##
2457## Platform. ##
2458## --------- ##
2459
2460hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2461uname -m = `(uname -m) 2>/dev/null || echo unknown`
2462uname -r = `(uname -r) 2>/dev/null || echo unknown`
2463uname -s = `(uname -s) 2>/dev/null || echo unknown`
2464uname -v = `(uname -v) 2>/dev/null || echo unknown`
2465
2466/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2467/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2468
2469/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2470/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2471/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002473/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2474/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2475/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2476
2477_ASUNAME
2478
2479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480for as_dir in $PATH
2481do
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002484 $as_echo "PATH: $as_dir"
2485 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002487
2488} >&5
2489
2490cat >&5 <<_ACEOF
2491
2492
2493## ----------- ##
2494## Core tests. ##
2495## ----------- ##
2496
2497_ACEOF
2498
2499
2500# Keep a trace of the command line.
2501# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002502# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002503# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002504# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002505ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002506ac_configure_args0=
2507ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002508ac_must_keep_next=false
2509for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002510do
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 for ac_arg
2512 do
2513 case $ac_arg in
2514 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2516 | -silent | --silent | --silen | --sile | --sil)
2517 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 esac
2521 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002526 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002528 case $ac_arg in
2529 *=* | --config-cache | -C | -disable-* | --disable-* \
2530 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2531 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2532 | -with-* | --with-* | -without-* | --without-* | --x)
2533 case "$ac_configure_args0 " in
2534 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2535 esac
2536 ;;
2537 -* ) ac_must_keep_next=true ;;
2538 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 ;;
2542 esac
2543 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002544done
Matthias Kloseb9621712010-04-24 17:59:49 +00002545{ ac_configure_args0=; unset ac_configure_args0;}
2546{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002547
2548# When interrupted or exit'd, cleanup temporary files, and complete
2549# config.log. We remove comments because anyway the quotes in there
2550# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551# WARNING: Use '\'' to represent an apostrophe within the trap.
2552# 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 +00002553trap 'exit_status=$?
2554 # Save into config.log some information that might help in debugging.
2555 {
2556 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002557
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002558 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002559## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002560## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 echo
2562 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563(
2564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2565 eval ac_val=\$$ac_var
2566 case $ac_val in #(
2567 *${as_nl}*)
2568 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002569 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2570$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 esac
2572 case $ac_var in #(
2573 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2575 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 esac ;;
2577 esac
2578 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2581 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 "s/'\''/'\''\\\\'\'''\''/g;
2584 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2585 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002586 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002588 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 esac |
2590 sort
2591)
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002593
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002595## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002596## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002597 echo
2598 for ac_var in $ac_subst_vars
2599 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 eval ac_val=\$$ac_var
2601 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002605 done | sort
2606 echo
2607
2608 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002609 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002611## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002612 echo
2613 for ac_var in $ac_subst_files
2614 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 eval ac_val=\$$ac_var
2616 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002620 done | sort
2621 echo
2622 fi
2623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002625 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002626## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 echo
2631 fi
2632 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 $as_echo "$as_me: caught signal $ac_signal"
2634 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636 rm -f core *.core core.conftest.* &&
2637 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002640for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002642done
2643ac_signal=0
2644
2645# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002647
Matthias Kloseb9621712010-04-24 17:59:49 +00002648$as_echo "/* confdefs.h */" > confdefs.h
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650# Predefined preprocessor variables.
2651
2652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_NAME "$PACKAGE_NAME"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_VERSION "$PACKAGE_VERSION"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_STRING "$PACKAGE_STRING"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2670_ACEOF
2671
Matthias Kloseb9621712010-04-24 17:59:49 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_URL "$PACKAGE_URL"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676
2677# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002678# Prefer an explicitly selected file to automatically selected ones.
2679ac_site_file1=NONE
2680ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002682 # We do not want a PATH search for config.site.
2683 case $CONFIG_SITE in #((
2684 -*) ac_site_file1=./$CONFIG_SITE;;
2685 */*) ac_site_file1=$CONFIG_SITE;;
2686 *) ac_site_file1=./$CONFIG_SITE;;
2687 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 ac_site_file1=$prefix/share/config.site
2690 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691else
Matthias Kloseb9621712010-04-24 17:59:49 +00002692 ac_site_file1=$ac_default_prefix/share/config.site
2693 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002695for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696do
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 test "x$ac_site_file" = xNONE && continue
2698 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2700$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002702 . "$ac_site_file" \
2703 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002706See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707 fi
2708done
2709
2710if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002711 # Some versions of bash will fail to source /dev/null (special files
2712 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2713 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2715$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2718 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 esac
2720 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721else
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2723$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 >$cache_file
2725fi
2726
2727# Check that the precious variables saved in the cache have kept the same
2728# value.
2729ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002730for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2732 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2734 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 case $ac_old_set,$ac_new_set in
2736 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2738$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 +00002739 ac_cache_corrupted=: ;;
2740 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2742$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 ac_cache_corrupted=: ;;
2744 ,);;
2745 *)
2746 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002747 # differences in whitespace do not lead to failure.
2748 ac_old_val_w=`echo x $ac_old_val`
2749 ac_new_val_w=`echo x $ac_new_val`
2750 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2752$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2753 ac_cache_corrupted=:
2754 else
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2756$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2757 eval $ac_var=\$ac_old_val
2758 fi
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2760$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2762$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002763 fi;;
2764 esac
2765 # Pass precious variables to config.status.
2766 if test "$ac_new_set" = set; then
2767 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002768 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 *) ac_arg=$ac_var=$ac_new_val ;;
2770 esac
2771 case " $ac_configure_args " in
2772 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002773 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 esac
2775 fi
2776done
2777if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2781$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002782 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002784## -------------------- ##
2785## Main body of script. ##
2786## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002787
Guido van Rossum7f43da71994-08-01 12:15:30 +00002788ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002789ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2792ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793
Guido van Rossum627b2d71993-12-24 10:39:16 +00002794
Michael W. Hudson54241132001-12-07 15:38:26 +00002795
Trent Nelson4d4ec652012-10-16 08:51:24 -04002796
Trent Nelson5595ab52012-10-17 04:47:31 -04002797if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002798 # If we're building out-of-tree, we need to make sure the following
2799 # resources get picked up before their $srcdir counterparts.
2800 # Objects/ -> typeslots.inc
2801 # Include/ -> Python-ast.h, graminit.h
2802 # Python/ -> importlib.h
2803 # (A side effect of this is that these resources will automatically be
2804 # regenerated when building out-of-tree, regardless of whether or not
2805 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2806 # off.)
2807 BASECPPFLAGS="-IObjects -IInclude -IPython"
2808else
2809 BASECPPFLAGS=""
2810fi
2811
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002812
2813
2814
2815
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002816if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002817then
2818# Extract the first word of "hg", so it can be a program name with args.
2819set dummy hg; ac_word=$2
2820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2821$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002822if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002823 $as_echo_n "(cached) " >&6
2824else
2825 if test -n "$HAS_HG"; then
2826 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2827else
2828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2829for as_dir in $PATH
2830do
2831 IFS=$as_save_IFS
2832 test -z "$as_dir" && as_dir=.
2833 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002835 ac_cv_prog_HAS_HG="found"
2836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2837 break 2
2838 fi
2839done
2840 done
2841IFS=$as_save_IFS
2842
2843 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2844fi
2845fi
2846HAS_HG=$ac_cv_prog_HAS_HG
2847if test -n "$HAS_HG"; then
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2849$as_echo "$HAS_HG" >&6; }
2850else
2851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2852$as_echo "no" >&6; }
2853fi
2854
2855
2856else
2857HAS_HG=no-repository
2858fi
2859if test $HAS_HG = found
2860then
2861 HGVERSION="hg id -i \$(srcdir)"
2862 HGTAG="hg id -t \$(srcdir)"
2863 HGBRANCH="hg id -b \$(srcdir)"
2864else
2865 HGVERSION=""
2866 HGTAG=""
2867 HGBRANCH=""
2868fi
2869
2870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002871ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002872
2873
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002874ac_aux_dir=
2875for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2876 if test -f "$ac_dir/install-sh"; then
2877 ac_aux_dir=$ac_dir
2878 ac_install_sh="$ac_aux_dir/install-sh -c"
2879 break
2880 elif test -f "$ac_dir/install.sh"; then
2881 ac_aux_dir=$ac_dir
2882 ac_install_sh="$ac_aux_dir/install.sh -c"
2883 break
2884 elif test -f "$ac_dir/shtool"; then
2885 ac_aux_dir=$ac_dir
2886 ac_install_sh="$ac_aux_dir/shtool install -c"
2887 break
2888 fi
2889done
2890if test -z "$ac_aux_dir"; then
2891 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2892fi
2893
2894# These three variables are undocumented and unsupported,
2895# and are intended to be withdrawn in a future Autoconf release.
2896# They can cause serious problems if a builder's source tree is in a directory
2897# whose full name contains unusual characters.
2898ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2899ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2900ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2901
2902
2903# Make sure we can run config.sub.
2904$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2905 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2906
2907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2908$as_echo_n "checking build system type... " >&6; }
2909if ${ac_cv_build+:} false; then :
2910 $as_echo_n "(cached) " >&6
2911else
2912 ac_build_alias=$build_alias
2913test "x$ac_build_alias" = x &&
2914 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2915test "x$ac_build_alias" = x &&
2916 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2917ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2918 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2919
2920fi
2921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2922$as_echo "$ac_cv_build" >&6; }
2923case $ac_cv_build in
2924*-*-*) ;;
2925*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2926esac
2927build=$ac_cv_build
2928ac_save_IFS=$IFS; IFS='-'
2929set x $ac_cv_build
2930shift
2931build_cpu=$1
2932build_vendor=$2
2933shift; shift
2934# Remember, the first character of IFS is used to create $*,
2935# except with old shells:
2936build_os=$*
2937IFS=$ac_save_IFS
2938case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2939
2940
2941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2942$as_echo_n "checking host system type... " >&6; }
2943if ${ac_cv_host+:} false; then :
2944 $as_echo_n "(cached) " >&6
2945else
2946 if test "x$host_alias" = x; then
2947 ac_cv_host=$ac_cv_build
2948else
2949 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2950 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2951fi
2952
2953fi
2954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2955$as_echo "$ac_cv_host" >&6; }
2956case $ac_cv_host in
2957*-*-*) ;;
2958*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2959esac
2960host=$ac_cv_host
2961ac_save_IFS=$IFS; IFS='-'
2962set x $ac_cv_host
2963shift
2964host_cpu=$1
2965host_vendor=$2
2966shift; shift
2967# Remember, the first character of IFS is used to create $*,
2968# except with old shells:
2969host_os=$*
2970IFS=$ac_save_IFS
2971case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2972
2973
2974
doko@python.orga10e4a92013-01-25 18:45:12 +01002975
2976
Ned Deilyfcbc2462014-08-22 13:32:49 -07002977# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2978rm -f pybuilddir.txt
2979
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002980if test "$cross_compiling" = yes; then
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2982$as_echo_n "checking for python interpreter for cross build... " >&6; }
2983 if test -z "$PYTHON_FOR_BUILD"; then
2984 for interp in python$PACKAGE_VERSION python3 python; do
2985 which $interp >/dev/null 2>&1 || continue
2986 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2987 break
2988 fi
2989 interp=
2990 done
2991 if test x$interp = x; then
2992 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2993 fi
2994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2995$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002996 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 +02002997 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002998elif test "$cross_compiling" = maybe; then
2999 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003000else
3001 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3002fi
3003
3004
Martin v. Löwis11437992002-04-12 09:54:03 +00003005
Benjamin Petersond23f8222009-04-05 19:13:16 +00003006if test "$prefix" != "/"; then
3007 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3008fi
3009
3010
Martin v. Löwis11437992002-04-12 09:54:03 +00003011
3012
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003013# We don't use PACKAGE_ variables, and they cause conflicts
3014# with other autoconf-based packages that include Python.h
3015grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3016rm confdefs.h
3017mv confdefs.h.new confdefs.h
3018
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003019
Yury Selivanov7aa53412015-05-30 10:57:56 -04003020VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003021
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003022# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003023
3024SOVERSION=1.0
3025
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003026# The later defininition of _XOPEN_SOURCE disables certain features
3027# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003030
3031
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003032# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3033# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3034# them.
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003037
3038
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003039# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3040# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3041# them.
3042
Matthias Kloseb9621712010-04-24 17:59:49 +00003043$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003044
3045
Martin v. Löwisd6320502004-08-12 13:45:08 +00003046# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3047# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3048
Matthias Kloseb9621712010-04-24 17:59:49 +00003049$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003050
3051
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003052# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3053# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3054# them.
3055
Matthias Kloseb9621712010-04-24 17:59:49 +00003056$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003057
3058
3059
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003060define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003061
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003062# Arguments passed to configure.
3063
3064CONFIG_ARGS="$ac_configure_args"
3065
Matthias Kloseb9621712010-04-24 17:59:49 +00003066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3067$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003069if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071 case $enableval in
3072 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003073 # Locate the best usable SDK, see Mac/README.txt for more
3074 # information
3075 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003076 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003077 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003078 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3079 if test ! -d "${enableval}"
3080 then
3081 enableval=/
3082 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003083 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003084 ;;
3085 esac
3086 case $enableval in
3087 no)
3088 UNIVERSALSDK=
3089 enable_universalsdk=
3090 ;;
3091 *)
3092 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003093 if test ! -d "${UNIVERSALSDK}"
3094 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003095 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003096 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003097 ;;
3098 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003099
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003100
Thomas Wouters477c8d52006-05-27 19:21:47 +00003101else
3102
3103 UNIVERSALSDK=
3104 enable_universalsdk=
3105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003107
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003108if test -n "${UNIVERSALSDK}"
3109then
Matthias Kloseb9621712010-04-24 17:59:49 +00003110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3111$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003112else
Matthias Kloseb9621712010-04-24 17:59:49 +00003113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3114$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003115fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003118
Ned Deily87adb6e2013-10-18 21:09:56 -07003119ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003120
Ned Deilycbfb9a52012-06-23 16:02:19 -07003121# For backward compatibility reasons we prefer to select '32-bit' if available,
3122# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003123UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003124if test "`uname -s`" = "Darwin"
3125then
3126 if test -n "${UNIVERSALSDK}"
3127 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003128 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003129 then
3130 UNIVERSAL_ARCHS="intel"
3131 fi
3132 fi
3133fi
3134
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003135
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3137$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003138
3139# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003140if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003141 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142 UNIVERSAL_ARCHS="$withval"
3143
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144fi
3145
Ned Deily87adb6e2013-10-18 21:09:56 -07003146if test -n "${UNIVERSALSDK}"
3147then
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3149$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3150else
3151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3152$as_echo "no" >&6; }
3153fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003154
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003155
3156# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003157if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003158 withval=$with_framework_name;
3159 PYTHONFRAMEWORK=${withval}
3160 PYTHONFRAMEWORKDIR=${withval}.framework
3161 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3162
3163else
3164
3165 PYTHONFRAMEWORK=Python
3166 PYTHONFRAMEWORKDIR=Python.framework
3167 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3168
3169fi
3170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003172if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003174 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003175 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003176 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003177 esac
3178 case $enableval in
3179 no)
3180 PYTHONFRAMEWORK=
3181 PYTHONFRAMEWORKDIR=no-framework
3182 PYTHONFRAMEWORKPREFIX=
3183 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184 FRAMEWORKINSTALLFIRST=
3185 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003186 FRAMEWORKALTINSTALLFIRST=
3187 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003188 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003189 if test "x${prefix}" = "xNONE"; then
3190 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3191 else
3192 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3193 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003194 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003195 ;;
3196 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003197 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003200 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003201 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3202 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003203 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003204 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003205
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 if test "x${prefix}" = "xNONE" ; then
3207 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003208
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 else
3210 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3211 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003212
3213 case "${enableval}" in
3214 /System*)
3215 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3216 if test "${prefix}" = "NONE" ; then
3217 # See below
3218 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3219 fi
3220 ;;
3221
3222 /Library*)
3223 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3224 ;;
3225
3226 */Library/Frameworks)
3227 MDIR="`dirname "${enableval}"`"
3228 MDIR="`dirname "${MDIR}"`"
3229 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3230
3231 if test "${prefix}" = "NONE"; then
3232 # User hasn't specified the
3233 # --prefix option, but wants to install
3234 # the framework in a non-default location,
3235 # ensure that the compatibility links get
3236 # installed relative to that prefix as well
3237 # instead of in /usr/local.
3238 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3239 fi
3240 ;;
3241
3242 *)
3243 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3244 ;;
3245 esac
3246
Jack Jansen127e56e2001-09-11 14:41:54 +00003247 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003248
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003249 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003250 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003255 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3256
3257 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3258
Jack Jansene578a632001-08-15 01:27:14 +00003259 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003260
Guido van Rossum563e7081996-09-10 18:20:48 +00003261else
Martin v. Löwis11437992002-04-12 09:54:03 +00003262
Jack Jansene578a632001-08-15 01:27:14 +00003263 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003264 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003265 PYTHONFRAMEWORKPREFIX=
3266 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003267 FRAMEWORKINSTALLFIRST=
3268 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003269 FRAMEWORKALTINSTALLFIRST=
3270 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003271 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003272 if test "x${prefix}" = "xNONE" ; then
3273 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3274 else
3275 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3276 fi
Jack Jansene578a632001-08-15 01:27:14 +00003277 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003278
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280fi
3281
Thomas Wouters477c8d52006-05-27 19:21:47 +00003282
3283
Michael W. Hudson54241132001-12-07 15:38:26 +00003284
3285
3286
3287
Jack Jansene578a632001-08-15 01:27:14 +00003288
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003289
3290
3291
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003292
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003293
Ned Deilyb8f944f2013-11-21 22:42:25 -08003294
Jack Jansene578a632001-08-15 01:27:14 +00003295##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003296## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003297## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003298##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003299# Set name for machine-dependent library files
3300
Matthias Kloseb9621712010-04-24 17:59:49 +00003301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3302$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003303if test -z "$MACHDEP"
3304then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003305 # avoid using uname for cross builds
3306 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003307 # ac_sys_system and ac_sys_release are used for setting
3308 # a lot of different things including 'define_xopen_source'
3309 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003310 case "$host" in
3311 *-*-linux*)
3312 ac_sys_system=Linux
3313 ;;
3314 *-*-cygwin*)
3315 ac_sys_system=Cygwin
3316 ;;
3317 *)
3318 # for now, limit cross builds to known configurations
3319 MACHDEP="unknown"
3320 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3321 esac
3322 ac_sys_release=
3323 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003324 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003325 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003326 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003327 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003328 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003329 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003330 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003331 fi
3332 ac_md_system=`echo $ac_sys_system |
3333 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3334 ac_md_release=`echo $ac_sys_release |
3335 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3336 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003337
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003338 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003339 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003340 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003341 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003342 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003343 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003344 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003345fi
Guido van Rossum91922671997-10-09 20:24:13 +00003346
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003347
3348if test "$cross_compiling" = yes; then
3349 case "$host" in
3350 *-*-linux*)
3351 case "$host_cpu" in
3352 arm*)
3353 _host_cpu=arm
3354 ;;
3355 *)
3356 _host_cpu=$host_cpu
3357 esac
3358 ;;
3359 *-*-cygwin*)
3360 _host_cpu=
3361 ;;
3362 *)
3363 # for now, limit cross builds to known configurations
3364 MACHDEP="unknown"
3365 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3366 esac
3367 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3368fi
3369
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003370# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3371# disable features if it is defined, without any means to access these
3372# features as extensions. For these systems, we skip the definition of
3373# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3374# some feature, make sure there is no alternative way to access this
3375# feature. Also, when using wildcards, make sure you have verified the
3376# need for not defining _XOPEN_SOURCE on all systems matching the
3377# wildcard, and that the wildcard does not include future systems
3378# (which may remove their limitations).
3379case $ac_sys_system/$ac_sys_release in
3380 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3381 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003382 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003383 # In addition, Stefan Krah confirms that issue #1244610 exists through
3384 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003385 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003386 define_xopen_source=no
3387 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3388 # also defined. This can be overridden by defining _BSD_SOURCE
3389 # As this has a different meaning on Linux, only define it on OpenBSD
3390
Matthias Kloseb9621712010-04-24 17:59:49 +00003391$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003392
3393 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003394 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003395 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3396 # also defined. This can be overridden by defining _BSD_SOURCE
3397 # As this has a different meaning on Linux, only define it on OpenBSD
3398
Matthias Kloseb9621712010-04-24 17:59:49 +00003399$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003400
3401 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003402 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3403 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3404 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003405 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 +00003406 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003407 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3408 # request to enable features supported by the standard as a request
3409 # to disable features not supported by the standard. The best way
3410 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3411 # entirely and define __EXTENSIONS__ instead.
3412 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003413 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003414 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3415 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003416 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003417 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003418 define_xopen_source=no;;
3419 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003420 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003421 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003422 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003423 # On FreeBSD 4, the math functions C89 does not cover are never defined
3424 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3425 FreeBSD/4.*)
3426 define_xopen_source=no;;
3427 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3428 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3429 # identifies itself as Darwin/7.*
3430 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3431 # disables platform specific features beyond repair.
3432 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3433 # has no effect, don't bother defining them
3434 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003435 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003436 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003437 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003438 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3439 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3440 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003441 AIX/4)
3442 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003443 AIX/5)
3444 if test `uname -r` -eq 1; then
3445 define_xopen_source=no
3446 fi
3447 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003448 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3449 # defining NI_NUMERICHOST.
3450 QNX/6.3.2)
3451 define_xopen_source=no
3452 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003453
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003454esac
3455
3456if test $define_xopen_source = yes
3457then
Victor Stinner14d098d2011-09-07 22:29:43 +02003458 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
Victor Stinner14d098d2011-09-07 22:29:43 +02003460$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003461
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003462
3463 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3464 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3465 # several APIs are not declared. Since this is also needed in some
3466 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003467
Matthias Kloseb9621712010-04-24 17:59:49 +00003468$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003469
3470
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003471
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003472$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003473
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003474fi
3475
Christian Heimes647cd872013-12-07 23:39:33 +01003476# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3477case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003478 hp*|HP*)
3479 define_stdc_a1=yes;;
3480 *)
3481 define_stdc_a1=no;;
3482esac
3483
3484if test $define_stdc_a1 = yes
3485then
Christian Heimes647cd872013-12-07 23:39:33 +01003486
3487$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3488
Christian Heimesb02bcae2013-12-08 15:21:08 +01003489fi
Christian Heimes647cd872013-12-07 23:39:33 +01003490
Guido van Rossum91922671997-10-09 20:24:13 +00003491#
3492# SGI compilers allow the specification of the both the ABI and the
3493# ISA on the command line. Depending on the values of these switches,
3494# different and often incompatable code will be generated.
3495#
3496# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3497# thus supply support for various ABI/ISA combinations. The MACHDEP
3498# variable is also adjusted.
3499#
3500
3501if test ! -z "$SGI_ABI"
3502then
3503 CC="cc $SGI_ABI"
3504 LDFLAGS="$SGI_ABI $LDFLAGS"
3505 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3508$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003509
Jack Jansen6b08a402004-06-03 12:41:45 +00003510# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3511# it may influence the way we can build extensions, so distutils
3512# needs to check it
3513
Thomas Wouters477c8d52006-05-27 19:21:47 +00003514
Jack Jansen6b08a402004-06-03 12:41:45 +00003515CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003516EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003517
Guido van Rossum627b2d71993-12-24 10:39:16 +00003518# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003519
3520# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3521# for debug/optimization stuff. BASECFLAGS is for flags that are required
3522# just to get things to compile and link. Users are free to override OPT
3523# when running configure or make. The build should not break if they do.
3524# BASECFLAGS should generally not be messed with, however.
3525
3526# XXX shouldn't some/most/all of this code be merged with the stuff later
3527# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3529$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003532if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003534 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003535 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003536 without_gcc=yes;;
3537 yes) CC=gcc
3538 without_gcc=no;;
3539 *) CC=$withval
3540 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003541 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003542else
Martin v. Löwis11437992002-04-12 09:54:03 +00003543
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003544 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003545 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003546 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003547 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003548 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003549fi
3550
Matthias Kloseb9621712010-04-24 17:59:49 +00003551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3552$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003553
Zachary Ware5af85642015-12-21 12:09:17 -06003554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3555$as_echo_n "checking for --with-icc... " >&6; }
3556
3557# Check whether --with-icc was given.
3558if test "${with_icc+set}" = set; then :
3559 withval=$with_icc;
3560 case $withval in
3561 no) CC=${CC:-cc}
3562 with_icc=no;;
3563 yes) CC=icc
3564 CXX=icpc
3565 with_icc=yes;;
3566 *) CC=$withval
3567 with_icc=$withval;;
3568 esac
3569else
3570
3571 with_icc=no
3572fi
3573
3574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3575$as_echo "$with_icc" >&6; }
3576
Guido van Rossum8b131c51995-03-09 14:10:13 +00003577# If the user switches compilers, we can't believe the cache
3578if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3579then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003580 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003581(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003582fi
3583
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003584# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3585# when the compiler supports them, but we don't always want -O2, and
3586# we set -g later.
3587if test -z "$CFLAGS"; then
3588 CFLAGS=
3589fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003590
3591if test "$ac_sys_system" = "Darwin"
3592then
3593 # Compiler selection on MacOSX is more complicated than
3594 # AC_PROG_CC can handle, see Mac/README.txt for more
3595 # information
3596 if test -z "${CC}"
3597 then
3598 found_gcc=
3599 found_clang=
3600 as_save_IFS=$IFS; IFS=:
3601 for as_dir in $PATH
3602 do
3603 IFS=$as_save_IFS
3604 if test -x $as_dir/gcc; then
3605 if test -z "${found_gcc}"; then
3606 found_gcc=$as_dir/gcc
3607 fi
3608 fi
3609 if test -x $as_dir/clang; then
3610 if test -z "${found_clang}"; then
3611 found_clang=$as_dir/clang
3612 fi
3613 fi
3614 done
3615 IFS=$as_save_IFS
3616
3617 if test -n "$found_gcc" -a -n "$found_clang"
3618 then
3619 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3620 then
3621 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3622$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3623 CC="$found_clang"
3624 CXX="$found_clang++"
3625 fi
3626
3627
3628 elif test -z "$found_gcc" -a -n "$found_clang"
3629 then
3630 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3631$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3632 CC="$found_clang"
3633 CXX="$found_clang++"
3634
3635 elif test -z "$found_gcc" -a -z "$found_clang"
3636 then
3637 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3638 if test -n "${found_clang}"
3639 then
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3641$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3642 CC="${found_clang}"
3643 CXX="`/usr/bin/xcrun -find clang++`"
3644
3645 # else: use default behaviour
3646 fi
3647 fi
3648 fi
3649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003650ac_ext=c
3651ac_cpp='$CPP $CPPFLAGS'
3652ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3653ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3654ac_compiler_gnu=$ac_cv_c_compiler_gnu
3655if test -n "$ac_tool_prefix"; then
3656 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3657set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3659$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003660if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003662else
3663 if test -n "$CC"; then
3664 ac_cv_prog_CC="$CC" # Let the user override the test.
3665else
Martin v. Löwis11437992002-04-12 09:54:03 +00003666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 $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 +00003675 break 2
3676 fi
3677done
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003680
Jack Jansendd19cf82001-12-06 22:36:17 +00003681fi
3682fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003684if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3686$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003687else
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3689$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690fi
3691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692
Martin v. Löwis11437992002-04-12 09:54:03 +00003693fi
3694if test -z "$ac_cv_prog_CC"; then
3695 ac_ct_CC=$CC
3696 # Extract the first word of "gcc", so it can be a program name with args.
3697set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3699$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003700if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003702else
3703 if test -n "$ac_ct_CC"; then
3704 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3705else
3706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3707for as_dir in $PATH
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 $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 +00003715 break 2
3716 fi
3717done
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003720
3721fi
3722fi
3723ac_ct_CC=$ac_cv_prog_ac_ct_CC
3724if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3726$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003727else
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3729$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003730fi
3731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732 if test "x$ac_ct_CC" = x; then
3733 CC=""
3734 else
3735 case $cross_compiling:$ac_tool_warned in
3736yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739ac_tool_warned=yes ;;
3740esac
3741 CC=$ac_ct_CC
3742 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003743else
3744 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003745fi
3746
Jack Jansendd19cf82001-12-06 22:36:17 +00003747if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748 if test -n "$ac_tool_prefix"; then
3749 # 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 +00003750set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003753if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003755else
3756 if test -n "$CC"; then
3757 ac_cv_prog_CC="$CC" # Let the user override the test.
3758else
Martin v. Löwis11437992002-04-12 09:54:03 +00003759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3760for as_dir in $PATH
3761do
3762 IFS=$as_save_IFS
3763 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 $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 +00003768 break 2
3769 fi
3770done
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
3774fi
3775fi
3776CC=$ac_cv_prog_CC
3777if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3779$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003780else
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3782$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
3784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003787fi
3788if test -z "$CC"; then
3789 # Extract the first word of "cc", so it can be a program name with args.
3790set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3792$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003793if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
3796 if test -n "$CC"; then
3797 ac_cv_prog_CC="$CC" # Let the user override the test.
3798else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003799 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3801for as_dir in $PATH
3802do
3803 IFS=$as_save_IFS
3804 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3808 ac_prog_rejected=yes
3809 continue
3810 fi
3811 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 $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 +00003813 break 2
3814 fi
3815done
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003819if test $ac_prog_rejected = yes; then
3820 # We found a bogon in the path, so make sure we never use it.
3821 set dummy $ac_cv_prog_CC
3822 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003823 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003824 # We chose a different compiler from the bogus one.
3825 # However, it has the same basename, so the bogon will be chosen
3826 # first if we set CC to just the basename; use the full file name.
3827 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003828 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003829 fi
3830fi
3831fi
3832fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003833CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003834if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3836$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003837else
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3839$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003840fi
3841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843fi
3844if test -z "$CC"; then
3845 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003847 do
3848 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3849set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3851$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003852if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854else
3855 if test -n "$CC"; then
3856 ac_cv_prog_CC="$CC" # Let the user override the test.
3857else
Martin v. Löwis11437992002-04-12 09:54:03 +00003858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3859for as_dir in $PATH
3860do
3861 IFS=$as_save_IFS
3862 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 $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 +00003867 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003868 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003869done
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003872
3873fi
3874fi
3875CC=$ac_cv_prog_CC
3876if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3878$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879else
Matthias Kloseb9621712010-04-24 17:59:49 +00003880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3881$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003882fi
3883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 test -n "$CC" && break
3886 done
3887fi
3888if test -z "$CC"; then
3889 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003891do
3892 # Extract the first word of "$ac_prog", so it can be a program name with args.
3893set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3895$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003896if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003897 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003898else
3899 if test -n "$ac_ct_CC"; then
3900 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3901else
3902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3903for as_dir in $PATH
3904do
3905 IFS=$as_save_IFS
3906 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003907 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 $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 +00003911 break 2
3912 fi
3913done
Matthias Kloseb9621712010-04-24 17:59:49 +00003914 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003916
Martin v. Löwis11437992002-04-12 09:54:03 +00003917fi
3918fi
3919ac_ct_CC=$ac_cv_prog_ac_ct_CC
3920if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3922$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003923else
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3925$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003926fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 test -n "$ac_ct_CC" && break
3930done
Michael W. Hudson54241132001-12-07 15:38:26 +00003931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932 if test "x$ac_ct_CC" = x; then
3933 CC=""
3934 else
3935 case $cross_compiling:$ac_tool_warned in
3936yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003937{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3938$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939ac_tool_warned=yes ;;
3940esac
3941 CC=$ac_ct_CC
3942 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003943fi
3944
3945fi
3946
3947
Matthias Kloseb9621712010-04-24 17:59:49 +00003948test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003950as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003951See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003952
3953# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003954$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3955set X $ac_compile
3956ac_compiler=$2
3957for ac_option in --version -v -V -qversion; do
3958 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959case "(($ac_try" in
3960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3961 *) ac_try_echo=$ac_try;;
3962esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3964$as_echo "$ac_try_echo"; } >&5
3965 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003966 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 if test -s conftest.err; then
3968 sed '10a\
3969... rest of stderr output deleted ...
3970 10q' conftest.err >conftest.er1
3971 cat conftest.er1 >&5
3972 fi
3973 rm -f conftest.er1 conftest.err
3974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3975 test $ac_status = 0; }
3976done
Martin v. Löwis11437992002-04-12 09:54:03 +00003977
Matthias Kloseb9621712010-04-24 17:59:49 +00003978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003979/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003980
Martin v. Löwis11437992002-04-12 09:54:03 +00003981int
3982main ()
3983{
3984
3985 ;
3986 return 0;
3987}
3988_ACEOF
3989ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003990ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003991# Try to create an executable without -o first, disregard a.out.
3992# It will help us diagnose broken compilers, and finding out an intuition
3993# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3995$as_echo_n "checking whether the C compiler works... " >&6; }
3996ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3997
3998# The possible output files:
3999ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001ac_rmfiles=
4002for ac_file in $ac_files
4003do
4004 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4007 esac
4008done
4009rm -f $ac_rmfiles
4010
Matthias Kloseb9621712010-04-24 17:59:49 +00004011if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4017$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4021 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4023# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4024# in a Makefile. We should not override ac_cv_exeext if it was cached,
4025# so that the user can short-circuit this test for compilers unknown to
4026# Autoconf.
4027for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004028do
4029 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032 ;;
4033 [ab].out )
4034 # We found the default executable, but exeext='' is most
4035 # certainly right.
4036 break;;
4037 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039 then :; else
4040 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4041 fi
4042 # We set ac_cv_exeext here because the later test for it is not
4043 # safe: cross compilers may not add the suffix if given an `-o'
4044 # argument, so we may need to know it at that point already.
4045 # Even if this section looks crufty: it has the advantage of
4046 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047 break;;
4048 * )
4049 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004050 esac
4051done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004052test "$ac_cv_exeext" = no && ac_cv_exeext=
4053
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004054else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055 ac_file=''
4056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004057if test -z "$ac_file"; then :
4058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4059$as_echo "no" >&6; }
4060$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004061sed 's/^/| /' conftest.$ac_ext >&5
4062
Matthias Kloseb9621712010-04-24 17:59:49 +00004063{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004065as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004066See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004067else
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4069$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4072$as_echo_n "checking for C compiler default output file name... " >&6; }
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4074$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004075ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004076
Matthias Kloseb9621712010-04-24 17:59:49 +00004077rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004078ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4080$as_echo_n "checking for suffix of executables... " >&6; }
4081if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004089 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004092 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4093# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4094# work properly (i.e., refer to `conftest.exe'), while it won't with
4095# `rm'.
4096for ac_file in conftest.exe conftest conftest.*; do
4097 test -f "$ac_file" || continue
4098 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004100 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4101 break;;
4102 * ) break;;
4103 esac
4104done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004105else
Matthias Kloseb9621712010-04-24 17:59:49 +00004106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004108as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004109See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004111rm -f conftest conftest$ac_cv_exeext
4112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4113$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004114
4115rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004116EXEEXT=$ac_cv_exeext
4117ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4119/* end confdefs.h. */
4120#include <stdio.h>
4121int
4122main ()
4123{
4124FILE *f = fopen ("conftest.out", "w");
4125 return ferror (f) || fclose (f) != 0;
4126
4127 ;
4128 return 0;
4129}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004131ac_clean_files="$ac_clean_files conftest.out"
4132# Check that the compiler produces executables we can run. If not, either
4133# the compiler is broken, or we cross compile.
4134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4135$as_echo_n "checking whether we are cross compiling... " >&6; }
4136if test "$cross_compiling" != yes; then
4137 { { ac_try="$ac_link"
4138case "(($ac_try" in
4139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4140 *) ac_try_echo=$ac_try;;
4141esac
4142eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4143$as_echo "$ac_try_echo"; } >&5
4144 (eval "$ac_link") 2>&5
4145 ac_status=$?
4146 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4147 test $ac_status = 0; }
4148 if { ac_try='./conftest$ac_cv_exeext'
4149 { { case "(($ac_try" in
4150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4151 *) ac_try_echo=$ac_try;;
4152esac
4153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4154$as_echo "$ac_try_echo"; } >&5
4155 (eval "$ac_try") 2>&5
4156 ac_status=$?
4157 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4158 test $ac_status = 0; }; }; then
4159 cross_compiling=no
4160 else
4161 if test "$cross_compiling" = maybe; then
4162 cross_compiling=yes
4163 else
4164 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004166as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004167If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004168See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 fi
4170 fi
4171fi
4172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4173$as_echo "$cross_compiling" >&6; }
4174
4175rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4176ac_clean_files=$ac_clean_files_save
4177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4178$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004179if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 $as_echo_n "(cached) " >&6
4181else
4182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004183/* end confdefs.h. */
4184
4185int
4186main ()
4187{
4188
4189 ;
4190 return 0;
4191}
4192_ACEOF
4193rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004194if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195case "(($ac_try" in
4196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4197 *) ac_try_echo=$ac_try;;
4198esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004199eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4200$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4204 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205 for ac_file in conftest.o conftest.obj conftest.*; do
4206 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004209 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4210 break;;
4211 esac
4212done
4213else
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004215sed 's/^/| /' conftest.$ac_ext >&5
4216
Matthias Kloseb9621712010-04-24 17:59:49 +00004217{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4218$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004219as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004220See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004221fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004222rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4225$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004226OBJEXT=$ac_cv_objext
4227ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4229$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004230if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004232else
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004235
Martin v. Löwis11437992002-04-12 09:54:03 +00004236int
4237main ()
4238{
4239#ifndef __GNUC__
4240 choke me
4241#endif
4242
4243 ;
4244 return 0;
4245}
4246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 ac_compiler_gnu=yes
4249else
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004253ac_cv_c_compiler_gnu=$ac_compiler_gnu
4254
4255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4257$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4258if test $ac_compiler_gnu = yes; then
4259 GCC=yes
4260else
4261 GCC=
4262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004263ac_test_CFLAGS=${CFLAGS+set}
4264ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4266$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004267if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004269else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_save_c_werror_flag=$ac_c_werror_flag
4271 ac_c_werror_flag=yes
4272 ac_cv_prog_cc_g=no
4273 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004276
Martin v. Löwis11437992002-04-12 09:54:03 +00004277int
4278main ()
4279{
4280
4281 ;
4282 return 0;
4283}
4284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004285if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004286 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287else
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 CFLAGS=""
4289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290/* end confdefs.h. */
4291
4292int
4293main ()
4294{
4295
4296 ;
4297 return 0;
4298}
4299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004300if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301
Matthias Kloseb9621712010-04-24 17:59:49 +00004302else
4303 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306/* end confdefs.h. */
4307
4308int
4309main ()
4310{
4311
4312 ;
4313 return 0;
4314}
4315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004316if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4324 ac_c_werror_flag=$ac_save_c_werror_flag
4325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4327$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004328if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004329 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004330elif test $ac_cv_prog_cc_g = yes; then
4331 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004332 CFLAGS="-g -O2"
4333 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004334 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004335 fi
4336else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004337 if test "$GCC" = yes; then
4338 CFLAGS="-O2"
4339 else
4340 CFLAGS=
4341 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4344$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004345if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004347else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004349ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004351/* end confdefs.h. */
4352#include <stdarg.h>
4353#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004354struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004355/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4356struct buf { int x; };
4357FILE * (*rcsopen) (struct buf *, struct stat *, int);
4358static char *e (p, i)
4359 char **p;
4360 int i;
4361{
4362 return p[i];
4363}
4364static char *f (char * (*g) (char **, int), char **p, ...)
4365{
4366 char *s;
4367 va_list v;
4368 va_start (v,p);
4369 s = g (p, va_arg (v,int));
4370 va_end (v);
4371 return s;
4372}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004373
4374/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4375 function prototypes and stuff, but not '\xHH' hex character constants.
4376 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004378 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4379 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004381int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4384 inside strings and character constants. */
4385#define FOO(x) 'x'
4386int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4387
Skip Montanaro6dead952003-09-25 14:50:04 +00004388int test (int i, double x);
4389struct s1 {int (*f) (int a);};
4390struct s2 {int (*f) (double a);};
4391int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4392int argc;
4393char **argv;
4394int
4395main ()
4396{
4397return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4398 ;
4399 return 0;
4400}
4401_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4403 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004404do
4405 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409rm -f core conftest.err conftest.$ac_objext
4410 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004411done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004413CC=$ac_save_CC
4414
4415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416# AC_CACHE_VAL
4417case "x$ac_cv_prog_cc_c89" in
4418 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4420$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4423$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004424 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4427$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004428esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004429if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004430
Matthias Kloseb9621712010-04-24 17:59:49 +00004431fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004432
Martin v. Löwis11437992002-04-12 09:54:03 +00004433ac_ext=c
4434ac_cpp='$CPP $CPPFLAGS'
4435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4437ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004438
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004439ac_ext=c
4440ac_cpp='$CPP $CPPFLAGS'
4441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4443ac_compiler_gnu=$ac_cv_c_compiler_gnu
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4445$as_echo_n "checking how to run the C preprocessor... " >&6; }
4446# On Suns, sometimes $CPP names a directory.
4447if test -n "$CPP" && test -d "$CPP"; then
4448 CPP=
4449fi
4450if test -z "$CPP"; then
4451 if ${ac_cv_prog_CPP+:} false; then :
4452 $as_echo_n "(cached) " >&6
4453else
4454 # Double quotes because CPP needs to be expanded
4455 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4456 do
4457 ac_preproc_ok=false
4458for ac_c_preproc_warn_flag in '' yes
4459do
4460 # Use a header file that comes with gcc, so configuring glibc
4461 # with a fresh cross-compiler works.
4462 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4463 # <limits.h> exists even on freestanding compilers.
4464 # On the NeXT, cc -E runs the code through the compiler's parser,
4465 # not just through cpp. "Syntax error" is here to catch this case.
4466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4467/* end confdefs.h. */
4468#ifdef __STDC__
4469# include <limits.h>
4470#else
4471# include <assert.h>
4472#endif
4473 Syntax error
4474_ACEOF
4475if ac_fn_c_try_cpp "$LINENO"; then :
4476
4477else
4478 # Broken: fails on valid input.
4479continue
4480fi
4481rm -f conftest.err conftest.i conftest.$ac_ext
4482
4483 # OK, works on sane cases. Now check whether nonexistent headers
4484 # can be detected and how.
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#include <ac_nonexistent.h>
4488_ACEOF
4489if ac_fn_c_try_cpp "$LINENO"; then :
4490 # Broken: success on invalid input.
4491continue
4492else
4493 # Passes both tests.
4494ac_preproc_ok=:
4495break
4496fi
4497rm -f conftest.err conftest.i conftest.$ac_ext
4498
4499done
4500# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4501rm -f conftest.i conftest.err conftest.$ac_ext
4502if $ac_preproc_ok; then :
4503 break
4504fi
4505
4506 done
4507 ac_cv_prog_CPP=$CPP
4508
4509fi
4510 CPP=$ac_cv_prog_CPP
4511else
4512 ac_cv_prog_CPP=$CPP
4513fi
4514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4515$as_echo "$CPP" >&6; }
4516ac_preproc_ok=false
4517for ac_c_preproc_warn_flag in '' yes
4518do
4519 # Use a header file that comes with gcc, so configuring glibc
4520 # with a fresh cross-compiler works.
4521 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4522 # <limits.h> exists even on freestanding compilers.
4523 # On the NeXT, cc -E runs the code through the compiler's parser,
4524 # not just through cpp. "Syntax error" is here to catch this case.
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526/* end confdefs.h. */
4527#ifdef __STDC__
4528# include <limits.h>
4529#else
4530# include <assert.h>
4531#endif
4532 Syntax error
4533_ACEOF
4534if ac_fn_c_try_cpp "$LINENO"; then :
4535
4536else
4537 # Broken: fails on valid input.
4538continue
4539fi
4540rm -f conftest.err conftest.i conftest.$ac_ext
4541
4542 # OK, works on sane cases. Now check whether nonexistent headers
4543 # can be detected and how.
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546#include <ac_nonexistent.h>
4547_ACEOF
4548if ac_fn_c_try_cpp "$LINENO"; then :
4549 # Broken: success on invalid input.
4550continue
4551else
4552 # Passes both tests.
4553ac_preproc_ok=:
4554break
4555fi
4556rm -f conftest.err conftest.i conftest.$ac_ext
4557
4558done
4559# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4560rm -f conftest.i conftest.err conftest.$ac_ext
4561if $ac_preproc_ok; then :
4562
4563else
4564 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4566as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4567See \`config.log' for more details" "$LINENO" 5; }
4568fi
4569
4570ac_ext=c
4571ac_cpp='$CPP $CPPFLAGS'
4572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4574ac_compiler_gnu=$ac_cv_c_compiler_gnu
4575
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4577$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4578if ${ac_cv_path_GREP+:} false; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 if test -z "$GREP"; then
4582 ac_path_GREP_found=false
4583 # Loop through the user's path and test for each of PROGNAME-LIST
4584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4585for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4586do
4587 IFS=$as_save_IFS
4588 test -z "$as_dir" && as_dir=.
4589 for ac_prog in grep ggrep; do
4590 for ac_exec_ext in '' $ac_executable_extensions; do
4591 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4592 as_fn_executable_p "$ac_path_GREP" || continue
4593# Check for GNU ac_path_GREP and select it if it is found.
4594 # Check for GNU $ac_path_GREP
4595case `"$ac_path_GREP" --version 2>&1` in
4596*GNU*)
4597 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4598*)
4599 ac_count=0
4600 $as_echo_n 0123456789 >"conftest.in"
4601 while :
4602 do
4603 cat "conftest.in" "conftest.in" >"conftest.tmp"
4604 mv "conftest.tmp" "conftest.in"
4605 cp "conftest.in" "conftest.nl"
4606 $as_echo 'GREP' >> "conftest.nl"
4607 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4608 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4609 as_fn_arith $ac_count + 1 && ac_count=$as_val
4610 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4611 # Best one so far, save it but keep looking for a better one
4612 ac_cv_path_GREP="$ac_path_GREP"
4613 ac_path_GREP_max=$ac_count
4614 fi
4615 # 10*(2^10) chars as input seems more than enough
4616 test $ac_count -gt 10 && break
4617 done
4618 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4619esac
4620
4621 $ac_path_GREP_found && break 3
4622 done
4623 done
4624 done
4625IFS=$as_save_IFS
4626 if test -z "$ac_cv_path_GREP"; then
4627 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4628 fi
4629else
4630 ac_cv_path_GREP=$GREP
4631fi
4632
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4635$as_echo "$ac_cv_path_GREP" >&6; }
4636 GREP="$ac_cv_path_GREP"
4637
4638
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004639
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004640
4641
Matthias Kloseb9621712010-04-24 17:59:49 +00004642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4643$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004645# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004646if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004647 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648
4649 case $withval in
4650 no) with_cxx_main=no
4651 MAINCC='$(CC)';;
4652 yes) with_cxx_main=yes
4653 MAINCC='$(CXX)';;
4654 *) with_cxx_main=yes
4655 MAINCC=$withval
4656 if test -z "$CXX"
4657 then
4658 CXX=$withval
4659 fi;;
4660 esac
4661else
4662
4663 with_cxx_main=no
4664 MAINCC='$(CC)'
4665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004666fi
4667
Matthias Kloseb9621712010-04-24 17:59:49 +00004668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4669$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004670
4671preset_cxx="$CXX"
4672if test -z "$CXX"
4673then
4674 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004675 gcc) if test -n "$ac_tool_prefix"; then
4676 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4677set dummy ${ac_tool_prefix}g++; ac_word=$2
4678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4679$as_echo_n "checking for $ac_word... " >&6; }
4680if ${ac_cv_path_CXX+:} false; then :
4681 $as_echo_n "(cached) " >&6
4682else
4683 case $CXX in
4684 [\\/]* | ?:[\\/]*)
4685 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4686 ;;
4687 *)
4688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4689for as_dir in notfound
4690do
4691 IFS=$as_save_IFS
4692 test -z "$as_dir" && as_dir=.
4693 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004695 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4697 break 2
4698 fi
4699done
4700 done
4701IFS=$as_save_IFS
4702
4703 ;;
4704esac
4705fi
4706CXX=$ac_cv_path_CXX
4707if test -n "$CXX"; then
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4709$as_echo "$CXX" >&6; }
4710else
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4712$as_echo "no" >&6; }
4713fi
4714
4715
4716fi
4717if test -z "$ac_cv_path_CXX"; then
4718 ac_pt_CXX=$CXX
4719 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004723if ${ac_cv_path_ac_pt_CXX+:} false; then :
4724 $as_echo_n "(cached) " >&6
4725else
4726 case $ac_pt_CXX in
4727 [\\/]* | ?:[\\/]*)
4728 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4729 ;;
4730 *)
4731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in notfound
4733do
4734 IFS=$as_save_IFS
4735 test -z "$as_dir" && as_dir=.
4736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004738 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4740 break 2
4741 fi
4742done
4743 done
4744IFS=$as_save_IFS
4745
4746 ;;
4747esac
4748fi
4749ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4750if test -n "$ac_pt_CXX"; then
4751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4752$as_echo "$ac_pt_CXX" >&6; }
4753else
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
4756fi
4757
4758 if test "x$ac_pt_CXX" = x; then
4759 CXX="g++"
4760 else
4761 case $cross_compiling:$ac_tool_warned in
4762yes:)
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4764$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4765ac_tool_warned=yes ;;
4766esac
4767 CXX=$ac_pt_CXX
4768 fi
4769else
4770 CXX="$ac_cv_path_CXX"
4771fi
4772 ;;
4773 cc) if test -n "$ac_tool_prefix"; then
4774 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4775set dummy ${ac_tool_prefix}c++; ac_word=$2
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004778if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004780else
4781 case $CXX in
4782 [\\/]* | ?:[\\/]*)
4783 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4784 ;;
4785 *)
4786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4787for as_dir in notfound
4788do
4789 IFS=$as_save_IFS
4790 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795 break 2
4796 fi
4797done
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004799IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801 ;;
4802esac
4803fi
4804CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004805if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4807$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004808else
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4810$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004812
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813
4814fi
4815if test -z "$ac_cv_path_CXX"; then
4816 ac_pt_CXX=$CXX
4817 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4820$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004822 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004825 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826 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 +00004827 ;;
4828 *)
4829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4830for as_dir in notfound
4831do
4832 IFS=$as_save_IFS
4833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838 break 2
4839 fi
4840done
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004842IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844 ;;
4845esac
4846fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004847ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4848if test -n "$ac_pt_CXX"; then
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4850$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004851else
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4853$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004855
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856 if test "x$ac_pt_CXX" = x; then
4857 CXX="c++"
4858 else
4859 case $cross_compiling:$ac_tool_warned in
4860yes:)
4861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4863ac_tool_warned=yes ;;
4864esac
4865 CXX=$ac_pt_CXX
4866 fi
4867else
4868 CXX="$ac_cv_path_CXX"
4869fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004870 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004871 clang|*/clang) if test -n "$ac_tool_prefix"; then
4872 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4873set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if ${ac_cv_path_CXX+:} false; then :
4877 $as_echo_n "(cached) " >&6
4878else
4879 case $CXX in
4880 [\\/]* | ?:[\\/]*)
4881 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4882 ;;
4883 *)
4884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885for as_dir in notfound
4886do
4887 IFS=$as_save_IFS
4888 test -z "$as_dir" && as_dir=.
4889 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004891 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893 break 2
4894 fi
4895done
4896 done
4897IFS=$as_save_IFS
4898
Ned Deilycbfb9a52012-06-23 16:02:19 -07004899 ;;
4900esac
4901fi
4902CXX=$ac_cv_path_CXX
4903if test -n "$CXX"; then
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4905$as_echo "$CXX" >&6; }
4906else
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908$as_echo "no" >&6; }
4909fi
4910
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004911
4912fi
4913if test -z "$ac_cv_path_CXX"; then
4914 ac_pt_CXX=$CXX
4915 # Extract the first word of "clang++", so it can be a program name with args.
4916set dummy clang++; ac_word=$2
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918$as_echo_n "checking for $ac_word... " >&6; }
4919if ${ac_cv_path_ac_pt_CXX+:} false; then :
4920 $as_echo_n "(cached) " >&6
4921else
4922 case $ac_pt_CXX in
4923 [\\/]* | ?:[\\/]*)
4924 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4925 ;;
4926 *)
4927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4928for as_dir in notfound
4929do
4930 IFS=$as_save_IFS
4931 test -z "$as_dir" && as_dir=.
4932 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004934 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4936 break 2
4937 fi
4938done
4939 done
4940IFS=$as_save_IFS
4941
4942 ;;
4943esac
4944fi
4945ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4946if test -n "$ac_pt_CXX"; then
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4948$as_echo "$ac_pt_CXX" >&6; }
4949else
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954 if test "x$ac_pt_CXX" = x; then
4955 CXX="clang++"
4956 else
4957 case $cross_compiling:$ac_tool_warned in
4958yes:)
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4960$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4961ac_tool_warned=yes ;;
4962esac
4963 CXX=$ac_pt_CXX
4964 fi
4965else
4966 CXX="$ac_cv_path_CXX"
4967fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004968 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004969 icc|*/icc) if test -n "$ac_tool_prefix"; then
4970 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4971set dummy ${ac_tool_prefix}icpc; ac_word=$2
4972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4973$as_echo_n "checking for $ac_word... " >&6; }
4974if ${ac_cv_path_CXX+:} false; then :
4975 $as_echo_n "(cached) " >&6
4976else
4977 case $CXX in
4978 [\\/]* | ?:[\\/]*)
4979 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4980 ;;
4981 *)
4982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4983for as_dir in notfound
4984do
4985 IFS=$as_save_IFS
4986 test -z "$as_dir" && as_dir=.
4987 for ac_exec_ext in '' $ac_executable_extensions; do
4988 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4989 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4990 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4991 break 2
4992 fi
4993done
4994 done
4995IFS=$as_save_IFS
4996
4997 ;;
4998esac
4999fi
5000CXX=$ac_cv_path_CXX
5001if test -n "$CXX"; then
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5003$as_echo "$CXX" >&6; }
5004else
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5006$as_echo "no" >&6; }
5007fi
5008
5009
5010fi
5011if test -z "$ac_cv_path_CXX"; then
5012 ac_pt_CXX=$CXX
5013 # Extract the first word of "icpc", so it can be a program name with args.
5014set dummy icpc; ac_word=$2
5015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5016$as_echo_n "checking for $ac_word... " >&6; }
5017if ${ac_cv_path_ac_pt_CXX+:} false; then :
5018 $as_echo_n "(cached) " >&6
5019else
5020 case $ac_pt_CXX in
5021 [\\/]* | ?:[\\/]*)
5022 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5023 ;;
5024 *)
5025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5026for as_dir in notfound
5027do
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
5030 for ac_exec_ext in '' $ac_executable_extensions; do
5031 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5032 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5034 break 2
5035 fi
5036done
5037 done
5038IFS=$as_save_IFS
5039
5040 ;;
5041esac
5042fi
5043ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5044if test -n "$ac_pt_CXX"; then
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5046$as_echo "$ac_pt_CXX" >&6; }
5047else
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5049$as_echo "no" >&6; }
5050fi
5051
5052 if test "x$ac_pt_CXX" = x; then
5053 CXX="icpc"
5054 else
5055 case $cross_compiling:$ac_tool_warned in
5056yes:)
5057{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5058$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5059ac_tool_warned=yes ;;
5060esac
5061 CXX=$ac_pt_CXX
5062 fi
5063else
5064 CXX="$ac_cv_path_CXX"
5065fi
5066 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005067 esac
5068 if test "$CXX" = "notfound"
5069 then
5070 CXX=""
5071 fi
5072fi
5073if test -z "$CXX"
5074then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005075 if test -n "$ac_tool_prefix"; then
5076 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5077 do
5078 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5079set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5081$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005082if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005084else
5085 if test -n "$CXX"; then
5086 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5087else
5088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089for as_dir in $PATH
5090do
5091 IFS=$as_save_IFS
5092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005095 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005097 break 2
5098 fi
5099done
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102
5103fi
5104fi
5105CXX=$ac_cv_prog_CXX
5106if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5108$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005109else
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5111$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005112fi
5113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005115 test -n "$CXX" && break
5116 done
5117fi
5118if test -z "$CXX"; then
5119 ac_ct_CXX=$CXX
5120 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5121do
5122 # Extract the first word of "$ac_prog", so it can be a program name with args.
5123set dummy $ac_prog; ac_word=$2
5124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5125$as_echo_n "checking for $ac_word... " >&6; }
5126if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5127 $as_echo_n "(cached) " >&6
5128else
5129 if test -n "$ac_ct_CXX"; then
5130 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5131else
5132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5133for as_dir in $PATH
5134do
5135 IFS=$as_save_IFS
5136 test -z "$as_dir" && as_dir=.
5137 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005139 ac_cv_prog_ac_ct_CXX="$ac_prog"
5140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5141 break 2
5142 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005143done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005144 done
5145IFS=$as_save_IFS
5146
5147fi
5148fi
5149ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5150if test -n "$ac_ct_CXX"; then
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5152$as_echo "$ac_ct_CXX" >&6; }
5153else
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5155$as_echo "no" >&6; }
5156fi
5157
5158
5159 test -n "$ac_ct_CXX" && break
5160done
5161
5162 if test "x$ac_ct_CXX" = x; then
5163 CXX="notfound"
5164 else
5165 case $cross_compiling:$ac_tool_warned in
5166yes:)
5167{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5168$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5169ac_tool_warned=yes ;;
5170esac
5171 CXX=$ac_ct_CXX
5172 fi
5173fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005174
5175 if test "$CXX" = "notfound"
5176 then
5177 CXX=""
5178 fi
5179fi
5180if test "$preset_cxx" != "$CXX"
5181then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005182 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005183
5184 By default, distutils will build C++ extension modules with \"$CXX\".
5185 If this is not intended, then set CXX on the configure command line.
5186 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005187$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005188
5189 By default, distutils will build C++ extension modules with \"$CXX\".
5190 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005191 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005192fi
5193
5194
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005195MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5196
5197
5198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5199$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5200cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005201#undef bfin
5202#undef cris
5203#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005205#undef hppa
5206#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005208#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005209#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005210#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005211#undef unix
5212#if defined(__linux__)
5213# if defined(__x86_64__) && defined(__LP64__)
5214 x86_64-linux-gnu
5215# elif defined(__x86_64__) && defined(__ILP32__)
5216 x86_64-linux-gnux32
5217# elif defined(__i386__)
5218 i386-linux-gnu
5219# elif defined(__aarch64__) && defined(__AARCH64EL__)
5220# if defined(__ILP32__)
5221 aarch64_ilp32-linux-gnu
5222# else
5223 aarch64-linux-gnu
5224# endif
5225# elif defined(__aarch64__) && defined(__AARCH64EB__)
5226# if defined(__ILP32__)
5227 aarch64_be_ilp32-linux-gnu
5228# else
5229 aarch64_be-linux-gnu
5230# endif
5231# elif defined(__alpha__)
5232 alpha-linux-gnu
5233# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5234# if defined(__ARMEL__)
5235 arm-linux-gnueabihf
5236# else
5237 armeb-linux-gnueabihf
5238# endif
5239# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5240# if defined(__ARMEL__)
5241 arm-linux-gnueabi
5242# else
5243 armeb-linux-gnueabi
5244# endif
5245# elif defined(__hppa__)
5246 hppa-linux-gnu
5247# elif defined(__ia64__)
5248 ia64-linux-gnu
5249# elif defined(__m68k__) && !defined(__mcoldfire__)
5250 m68k-linux-gnu
5251# elif defined(__mips_hard_float) && defined(_MIPSEL)
5252# if _MIPS_SIM == _ABIO32
5253 mipsel-linux-gnu
5254# elif _MIPS_SIM == _ABIN32
5255 mips64el-linux-gnuabin32
5256# elif _MIPS_SIM == _ABI64
5257 mips64el-linux-gnuabi64
5258# else
5259# error unknown platform triplet
5260# endif
5261# elif defined(__mips_hard_float)
5262# if _MIPS_SIM == _ABIO32
5263 mips-linux-gnu
5264# elif _MIPS_SIM == _ABIN32
5265 mips64-linux-gnuabin32
5266# elif _MIPS_SIM == _ABI64
5267 mips64-linux-gnuabi64
5268# else
5269# error unknown platform triplet
5270# endif
5271# elif defined(__or1k__)
5272 or1k-linux-gnu
5273# elif defined(__powerpc__) && defined(__SPE__)
5274 powerpc-linux-gnuspe
5275# elif defined(__powerpc64__)
5276# if defined(__LITTLE_ENDIAN__)
5277 powerpc64le-linux-gnu
5278# else
5279 powerpc64-linux-gnu
5280# endif
5281# elif defined(__powerpc__)
5282 powerpc-linux-gnu
5283# elif defined(__s390x__)
5284 s390x-linux-gnu
5285# elif defined(__s390__)
5286 s390-linux-gnu
5287# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5288 sh4-linux-gnu
5289# elif defined(__sparc__) && defined(__arch64__)
5290 sparc64-linux-gnu
5291# elif defined(__sparc__)
5292 sparc-linux-gnu
5293# else
5294# error unknown platform triplet
5295# endif
5296#elif defined(__FreeBSD_kernel__)
5297# if defined(__LP64__)
5298 x86_64-kfreebsd-gnu
5299# elif defined(__i386__)
5300 i386-kfreebsd-gnu
5301# else
5302# error unknown platform triplet
5303# endif
5304#elif defined(__gnu_hurd__)
5305 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005306#elif defined(__APPLE__)
5307 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005308#else
5309# error unknown platform triplet
5310#endif
5311
5312EOF
5313
5314if $CPP conftest.c >conftest.out 2>/dev/null; then
5315 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5317$as_echo "$PLATFORM_TRIPLET" >&6; }
5318else
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5320$as_echo "none" >&6; }
5321fi
5322rm -f conftest.c conftest.out
5323
5324if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5325 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5326 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5327 fi
5328fi
5329PLATDIR=plat-$MACHDEP
5330
5331
5332
5333
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5335$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5336save_LDFLAGS="$LDFLAGS"
5337LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005338
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5340/* end confdefs.h. */
5341
5342int
5343main ()
5344{
5345
5346 ;
5347 return 0;
5348}
5349_ACEOF
5350if ac_fn_c_try_link "$LINENO"; then :
5351 NO_AS_NEEDED="-Wl,--no-as-needed"
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5353$as_echo "yes" >&6; }
5354else
5355 NO_AS_NEEDED=""
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357$as_echo "no" >&6; }
5358fi
5359rm -f core conftest.err conftest.$ac_objext \
5360 conftest$ac_exeext conftest.$ac_ext
5361LDFLAGS="$save_LDFLAGS"
5362
5363
5364
5365# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5368$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005369if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371else
5372 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5373 then ac_cv_path_EGREP="$GREP -E"
5374 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 # Loop through the user's path and test for each of PROGNAME-LIST
5378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5380do
5381 IFS=$as_save_IFS
5382 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 for ac_prog in egrep; do
5384 for ac_exec_ext in '' $ac_executable_extensions; do
5385 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005386 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005387# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 # Check for GNU $ac_path_EGREP
5389case `"$ac_path_EGREP" --version 2>&1` in
5390*GNU*)
5391 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5392*)
5393 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 while :
5396 do
5397 cat "conftest.in" "conftest.in" >"conftest.tmp"
5398 mv "conftest.tmp" "conftest.in"
5399 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5402 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5405 # Best one so far, save it but keep looking for a better one
5406 ac_cv_path_EGREP="$ac_path_EGREP"
5407 ac_path_EGREP_max=$ac_count
5408 fi
5409 # 10*(2^10) chars as input seems more than enough
5410 test $ac_count -gt 10 && break
5411 done
5412 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5413esac
5414
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $ac_path_EGREP_found && break 3
5416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005421 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 +00005422 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423else
5424 ac_cv_path_EGREP=$EGREP
5425fi
5426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 fi
5428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5430$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005432
5433
Matthias Kloseb9621712010-04-24 17:59:49 +00005434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5435$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005436if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 $as_echo_n "(cached) " >&6
5438else
5439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005441#include <stdlib.h>
5442#include <stdarg.h>
5443#include <string.h>
5444#include <float.h>
5445
5446int
5447main ()
5448{
5449
5450 ;
5451 return 0;
5452}
5453_ACEOF
5454if ac_fn_c_try_compile "$LINENO"; then :
5455 ac_cv_header_stdc=yes
5456else
5457 ac_cv_header_stdc=no
5458fi
5459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5460
5461if test $ac_cv_header_stdc = yes; then
5462 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005466
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005471else
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005473fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005474rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
Matthias Kloseb9621712010-04-24 17:59:49 +00005476fi
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5481/* end confdefs.h. */
5482#include <stdlib.h>
5483
5484_ACEOF
5485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5486 $EGREP "free" >/dev/null 2>&1; then :
5487
5488else
5489 ac_cv_header_stdc=no
5490fi
5491rm -f conftest*
5492
5493fi
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5497 if test "$cross_compiling" = yes; then :
5498 :
5499else
5500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5501/* end confdefs.h. */
5502#include <ctype.h>
5503#include <stdlib.h>
5504#if ((' ' & 0x0FF) == 0x020)
5505# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5506# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5507#else
5508# define ISLOWER(c) \
5509 (('a' <= (c) && (c) <= 'i') \
5510 || ('j' <= (c) && (c) <= 'r') \
5511 || ('s' <= (c) && (c) <= 'z'))
5512# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5513#endif
5514
5515#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5516int
5517main ()
5518{
5519 int i;
5520 for (i = 0; i < 256; i++)
5521 if (XOR (islower (i), ISLOWER (i))
5522 || toupper (i) != TOUPPER (i))
5523 return 2;
5524 return 0;
5525}
5526_ACEOF
5527if ac_fn_c_try_run "$LINENO"; then :
5528
5529else
5530 ac_cv_header_stdc=no
5531fi
5532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5533 conftest.$ac_objext conftest.beam conftest.$ac_ext
5534fi
5535
5536fi
5537fi
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5539$as_echo "$ac_cv_header_stdc" >&6; }
5540if test $ac_cv_header_stdc = yes; then
5541
5542$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5543
5544fi
5545
5546# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5547for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5548 inttypes.h stdint.h unistd.h
5549do :
5550 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5551ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5552"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005553if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 cat >>confdefs.h <<_ACEOF
5555#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5556_ACEOF
5557
5558fi
5559
5560done
5561
5562
5563
5564 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 +02005565if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 MINIX=yes
5567else
5568 MINIX=
5569fi
5570
5571
5572 if test "$MINIX" = yes; then
5573
5574$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5575
5576
5577$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5578
5579
5580$as_echo "#define _MINIX 1" >>confdefs.h
5581
5582 fi
5583
5584
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5586$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005587if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 $as_echo_n "(cached) " >&6
5589else
5590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5591/* end confdefs.h. */
5592
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005593# define __EXTENSIONS__ 1
5594 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005595int
5596main ()
5597{
5598
5599 ;
5600 return 0;
5601}
5602_ACEOF
5603if ac_fn_c_try_compile "$LINENO"; then :
5604 ac_cv_safe_to_define___extensions__=yes
5605else
5606 ac_cv_safe_to_define___extensions__=no
5607fi
5608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5609fi
5610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5611$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5612 test $ac_cv_safe_to_define___extensions__ = yes &&
5613 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5614
5615 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5616
5617 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5618
5619 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5620
5621 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5622
5623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625# Check for unsupported systems
5626case $ac_sys_system/$ac_sys_release in
5627atheos*|Linux*/1*)
5628 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5629 echo See README for details.
5630 exit 1;;
5631esac
5632
5633
Matthias Kloseb9621712010-04-24 17:59:49 +00005634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5635$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636
5637# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005638if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639 withval=$with_suffix;
5640 case $withval in
5641 no) EXEEXT=;;
5642 yes) EXEEXT=.exe;;
5643 *) EXEEXT=$withval;;
5644 esac
5645fi
5646
Matthias Kloseb9621712010-04-24 17:59:49 +00005647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5648$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649
5650# Test whether we're running on a non-case-sensitive system, in which
5651# case we give a warning if no ext is given
5652
Matthias Kloseb9621712010-04-24 17:59:49 +00005653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5654$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655if test ! -d CaseSensitiveTestDir; then
5656mkdir CaseSensitiveTestDir
5657fi
5658
5659if test -d casesensitivetestdir
5660then
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5662$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 BUILDEXEEXT=.exe
5664else
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 BUILDEXEEXT=$EXEEXT
5668fi
5669rmdir CaseSensitiveTestDir
5670
5671case $MACHDEP in
5672bsdos*)
5673 case $CC in
5674 gcc) CC="$CC -D_HAVE_BSDI";;
5675 esac;;
5676esac
5677
5678case $ac_sys_system in
5679hp*|HP*)
5680 case $CC in
5681 cc|*/cc) CC="$CC -Ae";;
5682 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683esac
5684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5687$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688if test -z "$LIBRARY"
5689then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005690 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5693$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694
5695# LDLIBRARY is the name of the library to link against (as opposed to the
5696# name of the library into which to insert object files). BLDLIBRARY is also
5697# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5698# is blank as the main program is not linked directly against LDLIBRARY.
5699# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5700# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5701# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5702# DLLLIBRARY is the shared (i.e., DLL) library.
5703#
5704# RUNSHARED is used to run shared python without installed libraries
5705#
5706# INSTSONAME is the name of the shared library that will be use to install
5707# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005708#
5709# LDVERSION is the shared library version number, normally the Python version
5710# with the ABI build flags appended.
5711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
5713
5714
5715
5716
5717
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719LDLIBRARY="$LIBRARY"
5720BLDLIBRARY='$(LDLIBRARY)'
5721INSTSONAME='$(LDLIBRARY)'
5722DLLLIBRARY=''
5723LDLIBRARYDIR=''
5724RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005725LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
5727# LINKCC is the command that links the python executable -- default is $(CC).
5728# If CXX is set, and if it is needed to link a main function that was
5729# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5730# python might then depend on the C++ runtime
5731# This is altered for AIX in order to build the export list before
5732# linking.
5733
Matthias Kloseb9621712010-04-24 17:59:49 +00005734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5735$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736if test -z "$LINKCC"
5737then
5738 LINKCC='$(PURIFY) $(MAINCC)'
5739 case $ac_sys_system in
5740 AIX*)
5741 exp_extra="\"\""
5742 if test $ac_sys_release -ge 5 -o \
5743 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5744 exp_extra="."
5745 fi
5746 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747 QNX*)
5748 # qcc must be used because the other compilers do not
5749 # support -N.
5750 LINKCC=qcc;;
5751 esac
5752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5754$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755
5756# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5757# make sure we default having it set to "no": this is used by
5758# distutils.unixccompiler to know if it should add --enable-new-dtags
5759# to linker command lines, and failing to detect GNU ld simply results
5760# in the same bahaviour as before.
5761
Matthias Kloseb9621712010-04-24 17:59:49 +00005762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5763$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764ac_prog=ld
5765if test "$GCC" = yes; then
5766 ac_prog=`$CC -print-prog-name=ld`
5767fi
5768case `"$ac_prog" -V 2>&1 < /dev/null` in
5769 *GNU*)
5770 GNULD=yes;;
5771 *)
5772 GNULD=no;;
5773esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5775$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5778$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005779if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005780 $as_echo_n "(cached) " >&6
5781else
5782 ac_cv_c_inline=no
5783for ac_kw in inline __inline__ __inline; do
5784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5785/* end confdefs.h. */
5786#ifndef __cplusplus
5787typedef int foo_t;
5788static $ac_kw foo_t static_foo () {return 0; }
5789$ac_kw foo_t foo () {return 0; }
5790#endif
5791
5792_ACEOF
5793if ac_fn_c_try_compile "$LINENO"; then :
5794 ac_cv_c_inline=$ac_kw
5795fi
5796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5797 test "$ac_cv_c_inline" != no && break
5798done
5799
5800fi
5801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5802$as_echo "$ac_cv_c_inline" >&6; }
5803
5804case $ac_cv_c_inline in
5805 inline | yes) ;;
5806 *)
5807 case $ac_cv_c_inline in
5808 no) ac_val=;;
5809 *) ac_val=$ac_cv_c_inline;;
5810 esac
5811 cat >>confdefs.h <<_ACEOF
5812#ifndef __cplusplus
5813#define inline $ac_val
5814#endif
5815_ACEOF
5816 ;;
5817esac
5818
5819if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005820
5821$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005822
5823
5824fi
5825
5826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5828$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005830if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831 enableval=$enable_shared;
5832fi
5833
5834
5835if test -z "$enable_shared"
5836then
5837 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005838 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839 enable_shared="yes";;
5840 *)
5841 enable_shared="no";;
5842 esac
5843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5845$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5848$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005850if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005851 enableval=$enable_profiling;
5852fi
5853
5854if test "x$enable_profiling" = xyes; then
5855 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005856 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858/* end confdefs.h. */
5859int main() { return 0; }
5860_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005861if ac_fn_c_try_link "$LINENO"; then :
5862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005864 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866rm -f core conftest.err conftest.$ac_objext \
5867 conftest$ac_exeext conftest.$ac_ext
5868 CC="$ac_save_cc"
5869else
5870 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5873$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874
doko@ubuntu.comba015832012-06-30 16:52:05 +02005875if test "x$enable_profiling" = xyes; then
5876 BASECFLAGS="-pg $BASECFLAGS"
5877 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878fi
5879
Matthias Kloseb9621712010-04-24 17:59:49 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5881$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882
5883# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5884# library that we build, but we do not want to link against it (we
5885# will find it with a -framework option). For this reason there is an
5886# extra variable BLDLIBRARY against which Python and the extension
5887# modules are linked, BLDLIBRARY. This is normally the same as
5888# LDLIBRARY, but empty for MacOSX framework builds.
5889if test "$enable_framework"
5890then
5891 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005892 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 BLDLIBRARY=''
5894else
5895 BLDLIBRARY='$(LDLIBRARY)'
5896fi
5897
5898# Other platforms follow
5899if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005900 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901
Matthias Kloseb9621712010-04-24 17:59:49 +00005902$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903
5904 case $ac_sys_system in
5905 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005906 LDLIBRARY='libpython$(LDVERSION).dll.a'
5907 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ;;
5909 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).so'
5911 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005912 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005914 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005915 then
5916 PY3LIBRARY=libpython3.so
5917 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005919 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).so'
5921 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005924 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005925 then
5926 PY3LIBRARY=libpython3.so
5927 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
5929 hp*|HP*)
5930 case `uname -m` in
5931 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005932 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
5934 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 ;;
5937 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005938 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005939 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 LDLIBRARY='libpython$(LDVERSION).dylib'
5943 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005944 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005946 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005948 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005949 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950
5951 esac
5952else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005953 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 case $ac_sys_system in
5955 CYGWIN*)
5956 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005957 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 ;;
5959 esac
5960fi
5961
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005962if test "$cross_compiling" = yes; then
5963 RUNSHARED=
5964fi
5965
Matthias Kloseb9621712010-04-24 17:59:49 +00005966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5967$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968
5969if test -n "$ac_tool_prefix"; then
5970 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5971set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005974if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976else
5977 if test -n "$RANLIB"; then
5978 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5979else
5980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5981for as_dir in $PATH
5982do
5983 IFS=$as_save_IFS
5984 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989 break 2
5990 fi
5991done
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993IFS=$as_save_IFS
5994
5995fi
5996fi
5997RANLIB=$ac_cv_prog_RANLIB
5998if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6000$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001else
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004fi
6005
6006
6007fi
6008if test -z "$ac_cv_prog_RANLIB"; then
6009 ac_ct_RANLIB=$RANLIB
6010 # Extract the first word of "ranlib", so it can be a program name with args.
6011set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6013$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006014if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016else
6017 if test -n "$ac_ct_RANLIB"; then
6018 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6019else
6020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021for as_dir in $PATH
6022do
6023 IFS=$as_save_IFS
6024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006026 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006029 break 2
6030 fi
6031done
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033IFS=$as_save_IFS
6034
6035fi
6036fi
6037ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6038if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6040$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041else
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6043$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
6045
6046 if test "x$ac_ct_RANLIB" = x; then
6047 RANLIB=":"
6048 else
6049 case $cross_compiling:$ac_tool_warned in
6050yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006051{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6052$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053ac_tool_warned=yes ;;
6054esac
6055 RANLIB=$ac_ct_RANLIB
6056 fi
6057else
6058 RANLIB="$ac_cv_prog_RANLIB"
6059fi
6060
6061
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006062if test -n "$ac_tool_prefix"; then
6063 for ac_prog in ar aal
6064 do
6065 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6066set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6068$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006069if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006070 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071else
6072 if test -n "$AR"; then
6073 ac_cv_prog_AR="$AR" # Let the user override the test.
6074else
6075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6076for as_dir in $PATH
6077do
6078 IFS=$as_save_IFS
6079 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006080 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006081 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006082 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084 break 2
6085 fi
6086done
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088IFS=$as_save_IFS
6089
6090fi
6091fi
6092AR=$ac_cv_prog_AR
6093if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6095$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096else
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6098$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099fi
6100
6101
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006102 test -n "$AR" && break
6103 done
6104fi
6105if test -z "$AR"; then
6106 ac_ct_AR=$AR
6107 for ac_prog in ar aal
6108do
6109 # Extract the first word of "$ac_prog", so it can be a program name with args.
6110set dummy $ac_prog; ac_word=$2
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6112$as_echo_n "checking for $ac_word... " >&6; }
6113if ${ac_cv_prog_ac_ct_AR+:} false; then :
6114 $as_echo_n "(cached) " >&6
6115else
6116 if test -n "$ac_ct_AR"; then
6117 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6118else
6119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH
6121do
6122 IFS=$as_save_IFS
6123 test -z "$as_dir" && as_dir=.
6124 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006125 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006126 ac_cv_prog_ac_ct_AR="$ac_prog"
6127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6128 break 2
6129 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006131 done
6132IFS=$as_save_IFS
6133
6134fi
6135fi
6136ac_ct_AR=$ac_cv_prog_ac_ct_AR
6137if test -n "$ac_ct_AR"; then
6138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6139$as_echo "$ac_ct_AR" >&6; }
6140else
6141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146 test -n "$ac_ct_AR" && break
6147done
6148
6149 if test "x$ac_ct_AR" = x; then
6150 AR="ar"
6151 else
6152 case $cross_compiling:$ac_tool_warned in
6153yes:)
6154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6156ac_tool_warned=yes ;;
6157esac
6158 AR=$ac_ct_AR
6159 fi
6160fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161
6162
6163# tweak ARFLAGS only if the user didn't set it on the command line
6164
6165if test -z "$ARFLAGS"
6166then
6167 ARFLAGS="rc"
6168fi
6169
doko@ubuntu.com58844492012-06-30 18:25:32 +02006170if test -n "$ac_tool_prefix"; then
6171 for ac_prog in readelf
6172 do
6173 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6174set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
6177if ${ac_cv_prog_READELF+:} false; then :
6178 $as_echo_n "(cached) " >&6
6179else
6180 if test -n "$READELF"; then
6181 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6182else
6183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6184for as_dir in $PATH
6185do
6186 IFS=$as_save_IFS
6187 test -z "$as_dir" && as_dir=.
6188 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006189 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006190 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6192 break 2
6193 fi
6194done
6195 done
6196IFS=$as_save_IFS
6197
6198fi
6199fi
6200READELF=$ac_cv_prog_READELF
6201if test -n "$READELF"; then
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6203$as_echo "$READELF" >&6; }
6204else
6205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206$as_echo "no" >&6; }
6207fi
6208
6209
6210 test -n "$READELF" && break
6211 done
6212fi
6213if test -z "$READELF"; then
6214 ac_ct_READELF=$READELF
6215 for ac_prog in readelf
6216do
6217 # Extract the first word of "$ac_prog", so it can be a program name with args.
6218set dummy $ac_prog; ac_word=$2
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6220$as_echo_n "checking for $ac_word... " >&6; }
6221if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6222 $as_echo_n "(cached) " >&6
6223else
6224 if test -n "$ac_ct_READELF"; then
6225 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6226else
6227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228for as_dir in $PATH
6229do
6230 IFS=$as_save_IFS
6231 test -z "$as_dir" && as_dir=.
6232 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006233 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006234 ac_cv_prog_ac_ct_READELF="$ac_prog"
6235 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6236 break 2
6237 fi
6238done
6239 done
6240IFS=$as_save_IFS
6241
6242fi
6243fi
6244ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6245if test -n "$ac_ct_READELF"; then
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6247$as_echo "$ac_ct_READELF" >&6; }
6248else
6249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6250$as_echo "no" >&6; }
6251fi
6252
6253
6254 test -n "$ac_ct_READELF" && break
6255done
6256
6257 if test "x$ac_ct_READELF" = x; then
6258 READELF=":"
6259 else
6260 case $cross_compiling:$ac_tool_warned in
6261yes:)
6262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6264ac_tool_warned=yes ;;
6265esac
6266 READELF=$ac_ct_READELF
6267 fi
6268fi
6269
6270if test "$cross_compiling" = yes; then
6271 case "$READELF" in
6272 readelf|:)
6273 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6274 ;;
6275 esac
6276fi
6277
6278
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279
Matthias Klosec4c48422012-10-21 23:05:35 +02006280for ac_prog in python$PACKAGE_VERSION python3 python
6281do
6282 # Extract the first word of "$ac_prog", so it can be a program name with args.
6283set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6285$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006286if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006287 $as_echo_n "(cached) " >&6
6288else
Matthias Klosec4c48422012-10-21 23:05:35 +02006289 if test -n "$PYTHON"; then
6290 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006291else
6292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6293for as_dir in $PATH
6294do
6295 IFS=$as_save_IFS
6296 test -z "$as_dir" && as_dir=.
6297 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006298 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006299 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006300 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6301 break 2
6302 fi
6303done
6304 done
6305IFS=$as_save_IFS
6306
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006307fi
6308fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006309PYTHON=$ac_cv_prog_PYTHON
6310if test -n "$PYTHON"; then
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6312$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006313else
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6315$as_echo "no" >&6; }
6316fi
6317
6318
Matthias Klosec4c48422012-10-21 23:05:35 +02006319 test -n "$PYTHON" && break
6320done
6321test -n "$PYTHON" || PYTHON="not-found"
6322
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006323if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006324 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6325else
6326 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006327fi
6328
6329
Kushal Das02d23a22014-04-15 23:50:06 +05306330for ac_prog in python$PACKAGE_VERSION python3 python
6331do
6332 # Extract the first word of "$ac_prog", so it can be a program name with args.
6333set dummy $ac_prog; ac_word=$2
6334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6335$as_echo_n "checking for $ac_word... " >&6; }
6336if ${ac_cv_prog_PYTHON+:} false; then :
6337 $as_echo_n "(cached) " >&6
6338else
6339 if test -n "$PYTHON"; then
6340 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6341else
6342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6343for as_dir in $PATH
6344do
6345 IFS=$as_save_IFS
6346 test -z "$as_dir" && as_dir=.
6347 for ac_exec_ext in '' $ac_executable_extensions; do
6348 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6349 ac_cv_prog_PYTHON="$ac_prog"
6350 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6351 break 2
6352 fi
6353done
6354 done
6355IFS=$as_save_IFS
6356
6357fi
6358fi
6359PYTHON=$ac_cv_prog_PYTHON
6360if test -n "$PYTHON"; then
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6362$as_echo "$PYTHON" >&6; }
6363else
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6365$as_echo "no" >&6; }
6366fi
6367
6368
6369 test -n "$PYTHON" && break
6370done
6371test -n "$PYTHON" || PYTHON="not-found"
6372
6373if test "$PYTHON" = not-found; then
6374 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6375else
6376 OPCODEHGEN="$PYTHON"
6377fi
6378
6379
6380
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381case $MACHDEP in
6382bsdos*|hp*|HP*)
6383 # install -d does not work on BSDI or HP-UX
6384 if test -z "$INSTALL"
6385 then
6386 INSTALL="${srcdir}/install-sh -c"
6387 fi
6388esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006389# Find a good install program. We prefer a C program (faster),
6390# so one script is as good as another. But avoid the broken or
6391# incompatible versions:
6392# SysV /etc/install, /usr/sbin/install
6393# SunOS /usr/etc/install
6394# IRIX /sbin/install
6395# AIX /bin/install
6396# AmigaOS /C/install, which installs bootblocks on floppy discs
6397# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6398# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6399# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6400# OS/2's system install, which has a completely different semantic
6401# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006402# Reject install programs that cannot install multiple files.
6403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6404$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006406if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006407 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408else
6409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6410for as_dir in $PATH
6411do
6412 IFS=$as_save_IFS
6413 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006414 # Account for people who put trailing slashes in PATH elements.
6415case $as_dir/ in #((
6416 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006418 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419 /usr/ucb/* ) ;;
6420 *)
6421 # OSF1 and SCO ODT 3.0 have their own names for install.
6422 # Don't use installbsd from OSF since it installs stuff as root
6423 # by default.
6424 for ac_prog in ginstall scoinst install; do
6425 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006426 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427 if test $ac_prog = install &&
6428 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6429 # AIX install. It has an incompatible calling convention.
6430 :
6431 elif test $ac_prog = install &&
6432 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6433 # program-specific install script used by HP pwplus--don't use.
6434 :
6435 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006436 rm -rf conftest.one conftest.two conftest.dir
6437 echo one > conftest.one
6438 echo two > conftest.two
6439 mkdir conftest.dir
6440 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6441 test -s conftest.one && test -s conftest.two &&
6442 test -s conftest.dir/conftest.one &&
6443 test -s conftest.dir/conftest.two
6444 then
6445 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6446 break 3
6447 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006448 fi
6449 fi
6450 done
6451 done
6452 ;;
6453esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006454
6455 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006456IFS=$as_save_IFS
6457
Matthias Kloseb9621712010-04-24 17:59:49 +00006458rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006459
6460fi
6461 if test "${ac_cv_path_install+set}" = set; then
6462 INSTALL=$ac_cv_path_install
6463 else
6464 # As a last resort, use the slow shell script. Don't cache a
6465 # value for INSTALL within a source directory, because that will
6466 # break other packages using the cache if that directory is
6467 # removed, or if the value is a relative name.
6468 INSTALL=$ac_install_sh
6469 fi
6470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6472$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473
6474# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6475# It thinks the first close brace ends the variable substitution.
6476test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6477
6478test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6479
6480test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6481
Matthias Klose93a0ef12012-03-15 18:08:34 +01006482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6483$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6484if test -z "$MKDIR_P"; then
6485 if ${ac_cv_path_mkdir+:} false; then :
6486 $as_echo_n "(cached) " >&6
6487else
6488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6489for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6490do
6491 IFS=$as_save_IFS
6492 test -z "$as_dir" && as_dir=.
6493 for ac_prog in mkdir gmkdir; do
6494 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006495 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006496 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6497 'mkdir (GNU coreutils) '* | \
6498 'mkdir (coreutils) '* | \
6499 'mkdir (fileutils) '4.1*)
6500 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6501 break 3;;
6502 esac
6503 done
6504 done
6505 done
6506IFS=$as_save_IFS
6507
6508fi
6509
6510 test -d ./--version && rmdir ./--version
6511 if test "${ac_cv_path_mkdir+set}" = set; then
6512 MKDIR_P="$ac_cv_path_mkdir -p"
6513 else
6514 # As a last resort, use the slow shell script. Don't cache a
6515 # value for MKDIR_P within a source directory, because that will
6516 # break other packages using the cache if that directory is
6517 # removed, or if the value is a relative name.
6518 MKDIR_P="$ac_install_sh -d"
6519 fi
6520fi
6521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6522$as_echo "$MKDIR_P" >&6; }
6523
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524
6525# Not every filesystem supports hard links
6526
6527if test -z "$LN" ; then
6528 case $ac_sys_system in
6529 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530 *) LN=ln;;
6531 esac
6532fi
6533
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006534# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006535
6536ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006537
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006538# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6540$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541
6542# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006543if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544 withval=$with_pydebug;
6545if test "$withval" != no
6546then
6547
Matthias Kloseb9621712010-04-24 17:59:49 +00006548$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549
Matthias Kloseb9621712010-04-24 17:59:49 +00006550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6551$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006552 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006553 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006554else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6555$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556fi
6557else
Matthias Kloseb9621712010-04-24 17:59:49 +00006558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006560fi
6561
6562
Brett Cannon7188a3e2015-09-18 15:13:44 -07006563# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006564
6565
6566
6567
6568
6569
Brett Cannon7188a3e2015-09-18 15:13:44 -07006570# Extract the first word of "llvm-profdata", so it can be a program name with args.
6571set dummy llvm-profdata; ac_word=$2
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6573$as_echo_n "checking for $ac_word... " >&6; }
6574if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6575 $as_echo_n "(cached) " >&6
6576else
6577 if test -n "$LLVM_PROF_FOUND"; then
6578 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6579else
6580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in $PATH
6582do
6583 IFS=$as_save_IFS
6584 test -z "$as_dir" && as_dir=.
6585 for ac_exec_ext in '' $ac_executable_extensions; do
6586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587 ac_cv_prog_LLVM_PROF_FOUND="found"
6588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589 break 2
6590 fi
6591done
6592 done
6593IFS=$as_save_IFS
6594
6595 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6596fi
6597fi
6598LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6599if test -n "$LLVM_PROF_FOUND"; then
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6601$as_echo "$LLVM_PROF_FOUND" >&6; }
6602else
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
6607
6608LLVM_PROF_ERR=no
6609case $CC in
6610 *clang*)
6611 # Any changes made here should be reflected in the GCC+Darwin case below
6612 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6613 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6614 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6615 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6616 if test $LLVM_PROF_FOUND = not-found
6617 then
6618 LLVM_PROF_ERR=yes
6619 fi
6620 ;;
6621 *gcc*)
6622 case $ac_sys_system in
6623 Darwin*)
6624 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6625 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6626 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6627 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6628 if test $LLVM_PROF_FOUND = not-found
6629 then
6630 LLVM_PROF_ERR=yes
6631 fi
6632 ;;
6633 *)
6634 PGO_PROF_GEN_FLAG="-fprofile-generate"
6635 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6636 LLVM_PROF_MERGER="true"
6637 LLVM_PROF_FILE=""
6638 ;;
6639 esac
6640 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006641 *icc*)
6642 PGO_PROF_GEN_FLAG="-prof-gen"
6643 PGO_PROF_USE_FLAG="-prof-use"
6644 LLVM_PROF_MERGER="true"
6645 LLVM_PROF_FILE=""
6646 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647esac
6648
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6650# merged with this chunk of code?
6651
6652# Optimizer/debugger flags
6653# ------------------------
6654# (The following bit of code is complicated enough - please keep things
6655# indented properly. Just pretend you're editing Python code. ;-)
6656
6657# There are two parallel sets of case statements below, one that checks to
6658# see if OPT was set and one that does BASECFLAGS setting based upon
6659# compiler and platform. BASECFLAGS tweaks need to be made even if the
6660# user set OPT.
6661
6662# tweak OPT based on compiler and platform, only if the user didn't set
6663# it on the command line
6664
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006665if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006666then
6667 case $GCC in
6668 yes)
6669 if test "$CC" != 'g++' ; then
6670 STRICT_PROTO="-Wstrict-prototypes"
6671 fi
6672 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6673 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6674 WRAP="-fwrapv"
6675 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006676
6677 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006678 case $CC in
6679 *clang*) WRAP="-fwrapv"
6680 ;;
6681 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683 case $ac_cv_prog_cc_g in
6684 yes)
6685 if test "$Py_DEBUG" = 'true' ; then
6686 # Optimization messes up debuggers, so turn it off for
6687 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006688 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6689 OPT="-g -Og -Wall $STRICT_PROTO"
6690 else
6691 OPT="-g -O0 -Wall $STRICT_PROTO"
6692 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006693 else
6694 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6695 fi
6696 ;;
6697 *)
6698 OPT="-O3 -Wall $STRICT_PROTO"
6699 ;;
6700 esac
6701 case $ac_sys_system in
6702 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6703 ;;
6704 esac
6705 ;;
6706
6707 *)
6708 OPT="-O"
6709 ;;
6710 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711fi
6712
6713
6714
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716# The -arch flags for universal builds on OSX
6717UNIVERSAL_ARCH_FLAGS=
6718
6719
6720# tweak BASECFLAGS based on compiler and platform
6721case $GCC in
6722yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006723 # Python doesn't violate C99 aliasing rules, but older versions of
6724 # GCC produce warnings for legal Python code. Enable
6725 # -fno-strict-aliasing on versions of GCC that support but produce
6726 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6728$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729 ac_save_cc="$CC"
6730 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006731 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006732 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006734else
Matthias Kloseb9621712010-04-24 17:59:49 +00006735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006737
Matthias Kloseb159a552010-04-25 21:00:44 +00006738
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006739int
6740main ()
6741{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006742
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006743 ;
6744 return 0;
6745}
Matthias Kloseb159a552010-04-25 21:00:44 +00006746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006748if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006749
6750 CC="$ac_save_cc -fstrict-aliasing"
6751 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006753/* end confdefs.h. */
6754
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006755 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006756int
6757main ()
6758{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006759double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006760 ;
6761 return 0;
6762}
Matthias Kloseb159a552010-04-25 21:00:44 +00006763
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006765if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006766
6767 ac_cv_no_strict_aliasing=no
6768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769else
Matthias Kloseb159a552010-04-25 21:00:44 +00006770
6771 ac_cv_no_strict_aliasing=yes
6772
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006773fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006775
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006776else
Matthias Kloseb159a552010-04-25 21:00:44 +00006777
6778 ac_cv_no_strict_aliasing=no
6779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006782fi
6783
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006784 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006785 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6787$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006788 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789 then
6790 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6791 fi
6792
Zachary Ware5af85642015-12-21 12:09:17 -06006793 # ICC doesn't recognize the option, but only emits a warning
6794 ## XXX does it emit an unused result warning and can it be disabled?
6795 case "$CC" in
6796 *icc*)
6797 ac_cv_disable_unused_result_warning=no
6798 ;;
6799 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6801$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6802 ac_save_cc="$CC"
6803 CC="$CC -Wunused-result -Werror"
6804 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006805 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006806 $as_echo_n "(cached) " >&6
6807else
6808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6809/* end confdefs.h. */
6810
6811
6812int
6813main ()
6814{
6815
6816 ;
6817 return 0;
6818}
6819
6820_ACEOF
6821if ac_fn_c_try_compile "$LINENO"; then :
6822
6823 ac_cv_disable_unused_result_warning=yes
6824
6825else
6826
6827 ac_cv_disable_unused_result_warning=no
6828
6829fi
6830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6831fi
6832
6833 CFLAGS="$save_CFLAGS"
6834 CC="$ac_save_cc"
6835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6836$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006837 ;;
6838 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006839
6840 if test $ac_cv_disable_unused_result_warning = yes
6841 then
6842 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6843 fi
6844
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6846$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6847 ac_save_cc="$CC"
6848 CC="$CC -Werror=declaration-after-statement"
6849 save_CFLAGS="$CFLAGS"
6850 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6851 $as_echo_n "(cached) " >&6
6852else
6853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6854/* end confdefs.h. */
6855
6856
6857int
6858main ()
6859{
6860
6861 ;
6862 return 0;
6863}
6864
6865_ACEOF
6866if ac_fn_c_try_compile "$LINENO"; then :
6867
6868 ac_cv_declaration_after_statement_warning=yes
6869
6870else
6871
6872 ac_cv_declaration_after_statement_warning=no
6873
6874fi
6875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6876fi
6877
6878 CFLAGS="$save_CFLAGS"
6879 CC="$ac_save_cc"
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6881$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6882
6883 if test $ac_cv_declaration_after_statement_warning = yes
6884 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006885 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006886 fi
6887
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6889$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6890 ac_save_cc="$CC"
6891 CC="$CC -Wsign-compare"
6892 save_CFLAGS="$CFLAGS"
6893 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6894 $as_echo_n "(cached) " >&6
6895else
6896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6897/* end confdefs.h. */
6898
6899
6900int
6901main ()
6902{
6903
6904 ;
6905 return 0;
6906}
6907
6908_ACEOF
6909if ac_fn_c_try_compile "$LINENO"; then :
6910
6911 ac_cv_enable_sign_compare_warning=yes
6912
6913else
6914
6915 ac_cv_enable_sign_compare_warning=no
6916
6917fi
6918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6919fi
6920
6921 CFLAGS="$save_CFLAGS"
6922 CC="$ac_save_cc"
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6924$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6925
6926 if test $ac_cv_enable_sign_compare_warning = yes
6927 then
6928 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6929 fi
6930
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6932$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6933 ac_save_cc="$CC"
6934 CC="$CC -Wunreachable-code"
6935 save_CFLAGS="$CFLAGS"
6936 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6937 $as_echo_n "(cached) " >&6
6938else
6939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6940/* end confdefs.h. */
6941
6942
6943int
6944main ()
6945{
6946
6947 ;
6948 return 0;
6949}
6950
6951_ACEOF
6952if ac_fn_c_try_compile "$LINENO"; then :
6953
6954 ac_cv_enable_unreachable_code_warning=yes
6955
6956else
6957
6958 ac_cv_enable_unreachable_code_warning=no
6959
6960fi
6961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6962fi
6963
6964 CFLAGS="$save_CFLAGS"
6965 CC="$ac_save_cc"
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6967$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6968
6969 # Don't enable unreachable code warning in debug mode, since it usually
6970 # results in non-standard code paths.
6971 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6972 then
6973 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6974 fi
6975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6977 # support. Without this, treatment of subnormals doesn't follow
6978 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006979 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980 alpha*)
6981 BASECFLAGS="$BASECFLAGS -mieee"
6982 ;;
6983 esac
6984
6985 case $ac_sys_system in
6986 SCO_SV*)
6987 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6988 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006989
6990 # is there any other compiler on Darwin besides gcc?
6991 Darwin*)
6992 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6993 # used to be here, but non-Apple gcc doesn't accept them.
6994 if test "${CC}" = gcc
6995 then
6996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006997$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006998 case "${UNIVERSALSDK}" in
6999 */MacOSX10.4u.sdk)
7000 # Build using 10.4 SDK, force usage of gcc when the
7001 # compiler is gcc, otherwise the user will get very
7002 # confusing error messages when building on OSX 10.6
7003 CC=gcc-4.0
7004 CPP=cpp-4.0
7005 ;;
7006 esac
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007008$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007009 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010
Ned Deily87adb6e2013-10-18 21:09:56 -07007011 if test "${enable_universalsdk}"
7012 then
7013 case "$UNIVERSAL_ARCHS" in
7014 32-bit)
7015 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7016 LIPO_32BIT_FLAGS=""
7017 ARCH_RUN_32BIT=""
7018 ;;
7019 64-bit)
7020 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7021 LIPO_32BIT_FLAGS=""
7022 ARCH_RUN_32BIT="true"
7023 ;;
7024 all)
7025 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7026 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7027 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7028 ;;
7029 intel)
7030 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7031 LIPO_32BIT_FLAGS="-extract i386"
7032 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7033 ;;
7034 intel-32)
7035 UNIVERSAL_ARCH_FLAGS="-arch i386"
7036 LIPO_32BIT_FLAGS=""
7037 ARCH_RUN_32BIT=""
7038 ;;
7039 3-way)
7040 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7041 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7042 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7043 ;;
7044 *)
7045 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7046 ;;
7047 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048
Ned Deily87adb6e2013-10-18 21:09:56 -07007049 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7050 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7051 if test "${UNIVERSALSDK}" != "/"
7052 then
7053 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7054 fi
7055 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007056
Ned Deily87adb6e2013-10-18 21:09:56 -07007057 # Calculate an appropriate deployment target for this build:
7058 # The deployment target value is used explicitly to enable certain
7059 # features are enabled (such as builtin libedit support for readline)
7060 # through the use of Apple's Availabiliy Macros and is used as a
7061 # component of the string returned by distutils.get_platform().
7062 #
7063 # Use the value from:
7064 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7065 # 2. the operating system version of the build machine if >= 10.6
7066 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7067 # below to pick either 10.3, 10.4, or 10.5 as the target.
7068 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007069
Ned Deily87adb6e2013-10-18 21:09:56 -07007070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7071$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007072 cur_target_major=`sw_vers -productVersion | \
7073 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7074 cur_target_minor=`sw_vers -productVersion | \
7075 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7076 cur_target="${cur_target_major}.${cur_target_minor}"
7077 if test ${cur_target_major} -eq 10 && \
7078 test ${cur_target_minor} -ge 3 && \
7079 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007080 then
Ned Deily36820b62014-06-25 13:44:22 -07007081 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007082 cur_target=10.3
7083 if test ${enable_universalsdk}
7084 then
7085 case "$UNIVERSAL_ARCHS" in
7086 all|3-way|intel|64-bit)
7087 # These configurations were first supported in 10.5
7088 cur_target='10.5'
7089 ;;
7090 esac
7091 else
7092 if test `/usr/bin/arch` = "i386"
7093 then
7094 # 10.4 was the first release to support Intel archs
7095 cur_target="10.4"
7096 fi
7097 fi
7098 fi
7099 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007100
Ned Deily87adb6e2013-10-18 21:09:56 -07007101 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7102 # environment with a value that is the same as what we'll use
7103 # in the Makefile to ensure that we'll get the same compiler
7104 # environment during configure and build time.
7105 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7106 export MACOSX_DEPLOYMENT_TARGET
7107 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7109$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007110
Ned Deily87adb6e2013-10-18 21:09:56 -07007111 # end of Darwin* tests
7112 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007113 esac
7114 ;;
7115
7116*)
7117 case $ac_sys_system in
7118 OpenUNIX*|UnixWare*)
7119 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7120 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007121 SCO_SV*)
7122 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7123 ;;
7124 esac
7125 ;;
7126esac
7127
Zachary Ware5af85642015-12-21 12:09:17 -06007128# ICC needs -fp-model strict or floats behave badly
7129case "$CC" in
7130*icc*)
7131 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7132 ;;
7133esac
7134
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007135if test "$Py_DEBUG" = 'true'; then
7136 :
7137else
7138 OPT="-DNDEBUG $OPT"
7139fi
7140
7141if test "$ac_arch_flags"
7142then
7143 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7144fi
7145
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007146# On some compilers, pthreads are available without further options
7147# (e.g. MacOS X). On some of these systems, the compiler will not
7148# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7149# So we have to see first whether pthreads are available without
7150# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7152$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007153if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007155else
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007157 ac_cv_pthread_is_default=no
7158else
Matthias Kloseb9621712010-04-24 17:59:49 +00007159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007160/* end confdefs.h. */
7161
Stefan Krah7dba5942012-11-22 22:49:11 +01007162#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007163#include <pthread.h>
7164
7165void* routine(void* p){return NULL;}
7166
7167int main(){
7168 pthread_t p;
7169 if(pthread_create(&p,NULL,routine,NULL)!=0)
7170 return 1;
7171 (void)pthread_detach(p);
7172 return 0;
7173}
7174
7175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007176if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007177
7178 ac_cv_pthread_is_default=yes
7179 ac_cv_kthread=no
7180 ac_cv_pthread=no
7181
7182else
Matthias Kloseb9621712010-04-24 17:59:49 +00007183 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7186 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007187fi
7188
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190fi
7191
Matthias Kloseb9621712010-04-24 17:59:49 +00007192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7193$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007194
7195
7196if test $ac_cv_pthread_is_default = yes
7197then
7198 ac_cv_kpthread=no
7199else
7200# -Kpthread, if available, provides the right #defines
7201# and linker options to make pthread_create available
7202# Some compilers won't report that they do not support -Kpthread,
7203# so we need to run a program to see whether it really made the
7204# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7206$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007207if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007208 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007209else
7210 ac_save_cc="$CC"
7211CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007212if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007213 ac_cv_kpthread=no
7214else
Matthias Kloseb9621712010-04-24 17:59:49 +00007215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007216/* end confdefs.h. */
7217
Stefan Krah7dba5942012-11-22 22:49:11 +01007218#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007219#include <pthread.h>
7220
7221void* routine(void* p){return NULL;}
7222
7223int main(){
7224 pthread_t p;
7225 if(pthread_create(&p,NULL,routine,NULL)!=0)
7226 return 1;
7227 (void)pthread_detach(p);
7228 return 0;
7229}
7230
7231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007232if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007233 ac_cv_kpthread=yes
7234else
Matthias Kloseb9621712010-04-24 17:59:49 +00007235 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7238 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007239fi
7240
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007241CC="$ac_save_cc"
7242fi
7243
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7245$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007246fi
7247
7248if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7249then
7250# -Kthread, if available, provides the right #defines
7251# and linker options to make pthread_create available
7252# Some compilers won't report that they do not support -Kthread,
7253# so we need to run a program to see whether it really made the
7254# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7256$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007257if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007259else
7260 ac_save_cc="$CC"
7261CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007262if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263 ac_cv_kthread=no
7264else
Matthias Kloseb9621712010-04-24 17:59:49 +00007265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266/* end confdefs.h. */
7267
Stefan Krah7dba5942012-11-22 22:49:11 +01007268#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269#include <pthread.h>
7270
7271void* routine(void* p){return NULL;}
7272
7273int main(){
7274 pthread_t p;
7275 if(pthread_create(&p,NULL,routine,NULL)!=0)
7276 return 1;
7277 (void)pthread_detach(p);
7278 return 0;
7279}
7280
7281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007282if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007283 ac_cv_kthread=yes
7284else
Matthias Kloseb9621712010-04-24 17:59:49 +00007285 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007289fi
7290
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291CC="$ac_save_cc"
7292fi
7293
Matthias Kloseb9621712010-04-24 17:59:49 +00007294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7295$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296fi
7297
7298if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7299then
7300# -pthread, if available, provides the right #defines
7301# and linker options to make pthread_create available
7302# Some compilers won't report that they do not support -pthread,
7303# so we need to run a program to see whether it really made the
7304# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7306$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007307if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007308 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007309else
7310 ac_save_cc="$CC"
7311CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007312if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007313 ac_cv_pthread=no
7314else
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316/* end confdefs.h. */
7317
Stefan Krah7dba5942012-11-22 22:49:11 +01007318#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007319#include <pthread.h>
7320
7321void* routine(void* p){return NULL;}
7322
7323int main(){
7324 pthread_t p;
7325 if(pthread_create(&p,NULL,routine,NULL)!=0)
7326 return 1;
7327 (void)pthread_detach(p);
7328 return 0;
7329}
7330
7331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007332if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007333 ac_cv_pthread=yes
7334else
Matthias Kloseb9621712010-04-24 17:59:49 +00007335 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7338 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007339fi
7340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341CC="$ac_save_cc"
7342fi
7343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7345$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346fi
7347
7348# If we have set a CC compiler flag for thread support then
7349# check if it works for CXX, too.
7350ac_cv_cxx_thread=no
7351if test ! -z "$CXX"
7352then
Matthias Kloseb9621712010-04-24 17:59:49 +00007353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7354$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355ac_save_cxx="$CXX"
7356
7357if test "$ac_cv_kpthread" = "yes"
7358then
7359 CXX="$CXX -Kpthread"
7360 ac_cv_cxx_thread=yes
7361elif test "$ac_cv_kthread" = "yes"
7362then
7363 CXX="$CXX -Kthread"
7364 ac_cv_cxx_thread=yes
7365elif test "$ac_cv_pthread" = "yes"
7366then
7367 CXX="$CXX -pthread"
7368 ac_cv_cxx_thread=yes
7369fi
7370
7371if test $ac_cv_cxx_thread = yes
7372then
7373 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7374 $CXX -c conftest.$ac_ext 2>&5
7375 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7376 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7377 then
7378 ac_cv_cxx_thread=yes
7379 else
7380 ac_cv_cxx_thread=no
7381 fi
7382 rm -fr conftest*
7383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7385$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386fi
7387CXX="$ac_save_cxx"
7388
7389
7390# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7392$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007393if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395else
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397/* end confdefs.h. */
7398#include <stdlib.h>
7399#include <stdarg.h>
7400#include <string.h>
7401#include <float.h>
7402
7403int
7404main ()
7405{
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007411if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007412 ac_cv_header_stdc=yes
7413else
Matthias Kloseb9621712010-04-24 17:59:49 +00007414 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417
7418if test $ac_cv_header_stdc = yes; then
7419 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007421/* end confdefs.h. */
7422#include <string.h>
7423
7424_ACEOF
7425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007426 $EGREP "memchr" >/dev/null 2>&1; then :
7427
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428else
7429 ac_cv_header_stdc=no
7430fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007431rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432
7433fi
7434
7435if test $ac_cv_header_stdc = yes; then
7436 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438/* end confdefs.h. */
7439#include <stdlib.h>
7440
7441_ACEOF
7442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007443 $EGREP "free" >/dev/null 2>&1; then :
7444
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445else
7446 ac_cv_header_stdc=no
7447fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007448rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449
7450fi
7451
7452if test $ac_cv_header_stdc = yes; then
7453 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007454 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455 :
7456else
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007458/* end confdefs.h. */
7459#include <ctype.h>
7460#include <stdlib.h>
7461#if ((' ' & 0x0FF) == 0x020)
7462# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7463# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7464#else
7465# define ISLOWER(c) \
7466 (('a' <= (c) && (c) <= 'i') \
7467 || ('j' <= (c) && (c) <= 'r') \
7468 || ('s' <= (c) && (c) <= 'z'))
7469# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7470#endif
7471
7472#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7473int
7474main ()
7475{
7476 int i;
7477 for (i = 0; i < 256; i++)
7478 if (XOR (islower (i), ISLOWER (i))
7479 || toupper (i) != TOUPPER (i))
7480 return 2;
7481 return 0;
7482}
7483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007484if ac_fn_c_try_run "$LINENO"; then :
7485
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007486else
Matthias Kloseb9621712010-04-24 17:59:49 +00007487 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491fi
7492
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493fi
7494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7496$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497if test $ac_cv_header_stdc = yes; then
7498
Matthias Kloseb9621712010-04-24 17:59:49 +00007499$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500
7501fi
7502
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007503for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007504fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007505ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007506sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007507unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007508poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007509sys/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 +01007510sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007511sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007512sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007513sys/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 -07007514libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007515bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7516sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007517do :
7518 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7519ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007520if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007521 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007522#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007523_ACEOF
7524
7525fi
7526
Guido van Rossum627b2d71993-12-24 10:39:16 +00007527done
7528
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007529ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007530for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7533$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007534if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007536else
Matthias Kloseb9621712010-04-24 17:59:49 +00007537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007538/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007539#include <sys/types.h>
7540#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007541
Martin v. Löwis11437992002-04-12 09:54:03 +00007542int
7543main ()
7544{
7545if ((DIR *) 0)
7546return 0;
7547 ;
7548 return 0;
7549}
7550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007558eval ac_res=\$$as_ac_Header
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7560$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007561if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007562 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007563#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007564_ACEOF
7565
7566ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007567fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007568
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007569done
7570# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7571if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7573$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007574if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007576else
Martin v. Löwis11437992002-04-12 09:54:03 +00007577 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007581/* Override any GCC internal prototype to avoid an error.
7582 Use char because int might match the return type of a GCC
7583 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007584#ifdef __cplusplus
7585extern "C"
7586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007587char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007588int
7589main ()
7590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007592 ;
7593 return 0;
7594}
7595_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007596for ac_lib in '' dir; do
7597 if test -z "$ac_lib"; then
7598 ac_res="none required"
7599 else
7600 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007601 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007606rm -f core conftest.err conftest.$ac_objext \
7607 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007608 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611done
Victor Stinnere0be4232011-10-25 13:06:09 +02007612if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007614else
7615 ac_cv_search_opendir=no
7616fi
7617rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007618LIBS=$ac_func_search_save_LIBS
7619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7621$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007622ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007623if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007624 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007625
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007626fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007627
Michael W. Hudson54241132001-12-07 15:38:26 +00007628else
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7630$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007631if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007633else
7634 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007638/* Override any GCC internal prototype to avoid an error.
7639 Use char because int might match the return type of a GCC
7640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007641#ifdef __cplusplus
7642extern "C"
7643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007644char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007645int
7646main ()
7647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 ;
7650 return 0;
7651}
7652_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653for ac_lib in '' x; do
7654 if test -z "$ac_lib"; then
7655 ac_res="none required"
7656 else
7657 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007658 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007663rm -f core conftest.err conftest.$ac_objext \
7664 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007665 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668done
Victor Stinnere0be4232011-10-25 13:06:09 +02007669if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671else
7672 ac_cv_search_opendir=no
7673fi
7674rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007675LIBS=$ac_func_search_save_LIBS
7676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7678$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007680if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007682
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007683fi
7684
7685fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007686
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7688$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007689if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007691else
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007693/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007694#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007695int
7696main ()
7697{
7698return makedev(0, 0);
7699 ;
7700 return 0;
7701}
7702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007703if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007704 ac_cv_header_sys_types_h_makedev=yes
7705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007708rm -f core conftest.err conftest.$ac_objext \
7709 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007710
7711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7713$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007714
7715if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007716ac_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 +02007717if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007718
Matthias Kloseb9621712010-04-24 17:59:49 +00007719$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007720
7721fi
7722
7723
7724
7725 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 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 +02007727if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007728
Matthias Kloseb9621712010-04-24 17:59:49 +00007729$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007730
7731fi
7732
7733
7734 fi
7735fi
7736
Michael W. Hudson54241132001-12-07 15:38:26 +00007737
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007738# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7739for ac_header in net/if.h
7740do :
7741 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7742#ifdef STDC_HEADERS
7743# include <stdlib.h>
7744# include <stddef.h>
7745#else
7746# ifdef HAVE_STDLIB_H
7747# include <stdlib.h>
7748# endif
7749#endif
7750#ifdef HAVE_SYS_SOCKET_H
7751# include <sys/socket.h>
7752#endif
7753
7754"
Victor Stinnere0be4232011-10-25 13:06:09 +02007755if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007756 cat >>confdefs.h <<_ACEOF
7757#define HAVE_NET_IF_H 1
7758_ACEOF
7759
7760fi
7761
7762done
7763
7764
Martin v. Löwis11017b12006-01-14 18:12:57 +00007765# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007766for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007767do :
7768 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 +00007769#ifdef HAVE_ASM_TYPES_H
7770#include <asm/types.h>
7771#endif
7772#ifdef HAVE_SYS_SOCKET_H
7773#include <sys/socket.h>
7774#endif
7775
Matthias Kloseb9621712010-04-24 17:59:49 +00007776"
Victor Stinnere0be4232011-10-25 13:06:09 +02007777if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007778 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007779#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007780_ACEOF
7781
7782fi
7783
7784done
7785
7786
Charles-François Natali47413c12011-10-06 19:47:44 +02007787# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007788for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007789do :
7790 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7791ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7792#ifdef HAVE_SYS_SOCKET_H
7793#include <sys/socket.h>
7794#endif
7795
7796"
7797if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7798 cat >>confdefs.h <<_ACEOF
7799#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7800_ACEOF
7801
7802fi
7803
7804done
7805
7806
Guido van Rossum627b2d71993-12-24 10:39:16 +00007807# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007808was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7810$as_echo_n "checking for clock_t in time.h... " >&6; }
7811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007812/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007813#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007814
7815_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007818 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007819else
Martin v. Löwis11437992002-04-12 09:54:03 +00007820
7821
Matthias Kloseb9621712010-04-24 17:59:49 +00007822$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007823
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007824
Guido van Rossum627b2d71993-12-24 10:39:16 +00007825fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007826rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007827
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7829$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007830
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7832$as_echo_n "checking for makedev... " >&6; }
7833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007834/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007835
Jesus Cea740f53a2010-04-28 11:35:30 +00007836#if defined(MAJOR_IN_MKDEV)
7837#include <sys/mkdev.h>
7838#elif defined(MAJOR_IN_SYSMACROS)
7839#include <sys/sysmacros.h>
7840#else
7841#include <sys/types.h>
7842#endif
7843
Neal Norwitz11690112002-07-30 01:08:28 +00007844int
7845main ()
7846{
Jesus Cea740f53a2010-04-28 11:35:30 +00007847
7848 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007849 ;
7850 return 0;
7851}
Matthias Kloseb159a552010-04-25 21:00:44 +00007852
Neal Norwitz11690112002-07-30 01:08:28 +00007853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007854if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007855 ac_cv_has_makedev=yes
7856else
Matthias Kloseb9621712010-04-24 17:59:49 +00007857 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007859rm -f core conftest.err conftest.$ac_objext \
7860 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7862$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007863if test "$ac_cv_has_makedev" = "yes"; then
7864
Matthias Kloseb9621712010-04-24 17:59:49 +00007865$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007866
7867fi
7868
Christian Heimes985ecdc2013-11-20 11:46:18 +01007869# byte swapping
7870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7871$as_echo_n "checking for le64toh... " >&6; }
7872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7873/* end confdefs.h. */
7874
7875#ifdef HAVE_ENDIAN_H
7876#include <endian.h>
7877#elif defined(HAVE_SYS_ENDIAN_H)
7878#include <sys/endian.h>
7879#endif
7880
7881int
7882main ()
7883{
7884
7885 le64toh(1)
7886 ;
7887 return 0;
7888}
7889
7890_ACEOF
7891if ac_fn_c_try_link "$LINENO"; then :
7892 ac_cv_has_le64toh=yes
7893else
7894 ac_cv_has_le64toh=no
7895fi
7896rm -f core conftest.err conftest.$ac_objext \
7897 conftest$ac_exeext conftest.$ac_ext
7898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7899$as_echo "$ac_cv_has_le64toh" >&6; }
7900if test "$ac_cv_has_le64toh" = "yes"; then
7901
7902$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7903
7904fi
7905
Martin v. Löwis399a6892002-10-04 10:22:02 +00007906# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7907# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7908# defined, but the compiler does not support pragma redefine_extname,
7909# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7910# structures (such as rlimit64) without declaring them. As a
7911# work-around, disable LFS on such configurations
7912
7913use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7915$as_echo_n "checking Solaris LFS bug... " >&6; }
7916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007917/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007918
7919#define _LARGEFILE_SOURCE 1
7920#define _FILE_OFFSET_BITS 64
7921#include <sys/resource.h>
7922
Martin v. Löwis399a6892002-10-04 10:22:02 +00007923int
7924main ()
7925{
7926struct rlimit foo;
7927 ;
7928 return 0;
7929}
7930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007931if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007932 sol_lfs_bug=no
7933else
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7938$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007939if test "$sol_lfs_bug" = "yes"; then
7940 use_lfs=no
7941fi
7942
7943if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007944# Two defines needed to enable largefile support on various platforms
7945# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007946case $ac_sys_system/$ac_sys_release in
7947AIX*)
7948
7949$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7950
7951 ;;
7952esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007953
Matthias Kloseb9621712010-04-24 17:59:49 +00007954$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007955
7956
Matthias Kloseb9621712010-04-24 17:59:49 +00007957$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007958
Martin v. Löwis399a6892002-10-04 10:22:02 +00007959fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007960
Guido van Rossum84e7b241996-08-19 21:59:00 +00007961# Add some code to confdefs.h so that the test for off_t works on SCO
7962cat >> confdefs.h <<\EOF
7963#if defined(SCO_DS)
7964#undef _OFF_T
7965#endif
7966EOF
7967
Guido van Rossumef2255b2000-03-10 22:30:29 +00007968# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007969ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007970if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007971
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007972else
Martin v. Löwis11437992002-04-12 09:54:03 +00007973
7974cat >>confdefs.h <<_ACEOF
7975#define mode_t int
7976_ACEOF
7977
7978fi
7979
Matthias Kloseb9621712010-04-24 17:59:49 +00007980ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007981if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007982
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007983else
Martin v. Löwis11437992002-04-12 09:54:03 +00007984
7985cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007987_ACEOF
7988
7989fi
7990
Matthias Kloseb9621712010-04-24 17:59:49 +00007991ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007992if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007993
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007994else
Martin v. Löwis11437992002-04-12 09:54:03 +00007995
7996cat >>confdefs.h <<_ACEOF
7997#define pid_t int
7998_ACEOF
7999
8000fi
8001
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008002
Martin v. Löwis11437992002-04-12 09:54:03 +00008003cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008004#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008005_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008006
Matthias Kloseb9621712010-04-24 17:59:49 +00008007ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008008if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008009
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008010else
Martin v. Löwis11437992002-04-12 09:54:03 +00008011
8012cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008014_ACEOF
8015
8016fi
8017
Matthias Kloseb9621712010-04-24 17:59:49 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8019$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008020if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008022else
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008024/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008025#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008026
8027_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030 ac_cv_type_uid_t=yes
8031else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008032 ac_cv_type_uid_t=no
8033fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008034rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8038$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008039if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008040
Matthias Kloseb9621712010-04-24 17:59:49 +00008041$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008042
8043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008045
8046fi
8047
Mark Dickinson983bc162012-12-02 12:11:38 +00008048
8049# There are two separate checks for each of the exact-width integer types we
8050# need. First we check whether the type is available using the usual
8051# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8052# and <stdint.h> where available). We then also use the special type checks of
8053# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8054# directly, #define's uint32_t to be a suitable type.
8055
8056ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8057if test "x$ac_cv_type_uint32_t" = xyes; then :
8058
8059$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8060
8061fi
8062
Matthias Kloseb9621712010-04-24 17:59:49 +00008063ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8064case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008065 no|yes) ;; #(
8066 *)
8067
Matthias Kloseb9621712010-04-24 17:59:49 +00008068$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008069
8070
8071cat >>confdefs.h <<_ACEOF
8072#define uint32_t $ac_cv_c_uint32_t
8073_ACEOF
8074;;
8075 esac
8076
Mark Dickinson983bc162012-12-02 12:11:38 +00008077
8078ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8079if test "x$ac_cv_type_uint64_t" = xyes; then :
8080
8081$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8082
8083fi
8084
Matthias Kloseb9621712010-04-24 17:59:49 +00008085ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8086case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008087 no|yes) ;; #(
8088 *)
8089
Matthias Kloseb9621712010-04-24 17:59:49 +00008090$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008091
8092
8093cat >>confdefs.h <<_ACEOF
8094#define uint64_t $ac_cv_c_uint64_t
8095_ACEOF
8096;;
8097 esac
8098
Mark Dickinson983bc162012-12-02 12:11:38 +00008099
8100ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8101if test "x$ac_cv_type_int32_t" = xyes; then :
8102
8103$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8104
8105fi
8106
Matthias Kloseb9621712010-04-24 17:59:49 +00008107ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8108case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008109 no|yes) ;; #(
8110 *)
8111
8112cat >>confdefs.h <<_ACEOF
8113#define int32_t $ac_cv_c_int32_t
8114_ACEOF
8115;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008116esac
8117
Mark Dickinson983bc162012-12-02 12:11:38 +00008118
8119ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8120if test "x$ac_cv_type_int64_t" = xyes; then :
8121
8122$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8123
8124fi
8125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8127case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008128 no|yes) ;; #(
8129 *)
8130
8131cat >>confdefs.h <<_ACEOF
8132#define int64_t $ac_cv_c_int64_t
8133_ACEOF
8134;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008135esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008136
Mark Dickinson983bc162012-12-02 12:11:38 +00008137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008139if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008142
8143fi
8144
Stefan Krah1919b7e2012-03-21 18:25:23 +01008145ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8146if test "x$ac_cv_type___uint128_t" = xyes; then :
8147
8148$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8149
8150fi
8151
Jack Jansendd19cf82001-12-06 22:36:17 +00008152
Michael W. Hudson54241132001-12-07 15:38:26 +00008153# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008154# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155# The cast to long int works around a bug in the HP C Compiler
8156# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8157# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8158# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8160$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008161if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008162 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 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 +00008165
Martin v. Löwis11437992002-04-12 09:54:03 +00008166else
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 if test "$ac_cv_type_int" = yes; then
8168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008170as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008171See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172 else
8173 ac_cv_sizeof_int=0
8174 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008176
Martin v. Löwis11437992002-04-12 09:54:03 +00008177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8179$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180
8181
8182
Martin v. Löwis11437992002-04-12 09:54:03 +00008183cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008184#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008185_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008186
8187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188# The cast to long int works around a bug in the HP C Compiler
8189# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8190# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8191# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8193$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008194if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008195 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008196else
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 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 +00008198
Martin v. Löwis11437992002-04-12 09:54:03 +00008199else
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 if test "$ac_cv_type_long" = yes; then
8201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8202$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008203as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008204See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 else
8206 ac_cv_sizeof_long=0
8207 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008209
Martin v. Löwis11437992002-04-12 09:54:03 +00008210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8212$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213
8214
8215
Martin v. Löwis11437992002-04-12 09:54:03 +00008216cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008217#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008218_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008219
8220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221# The cast to long int works around a bug in the HP C Compiler
8222# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8223# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8224# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8226$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008227if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 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 +00008231
Martin v. Löwis11437992002-04-12 09:54:03 +00008232else
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 if test "$ac_cv_type_void_p" = yes; then
8234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008236as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008237See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238 else
8239 ac_cv_sizeof_void_p=0
8240 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008242
Martin v. Löwis11437992002-04-12 09:54:03 +00008243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8245$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246
8247
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008250#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008251_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008252
8253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254# The cast to long int works around a bug in the HP C Compiler
8255# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8256# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8257# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8259$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008260if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008262else
Matthias Kloseb9621712010-04-24 17:59:49 +00008263 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 +00008264
Martin v. Löwis11437992002-04-12 09:54:03 +00008265else
Matthias Kloseb9621712010-04-24 17:59:49 +00008266 if test "$ac_cv_type_short" = yes; then
8267 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008269as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008270See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271 else
8272 ac_cv_sizeof_short=0
8273 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008275
Martin v. Löwis11437992002-04-12 09:54:03 +00008276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8278$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279
8280
8281
Martin v. Löwis11437992002-04-12 09:54:03 +00008282cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008283#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008284_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008285
8286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287# The cast to long int works around a bug in the HP C Compiler
8288# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8289# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8290# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8292$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008293if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008295else
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 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 +00008297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298else
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 if test "$ac_cv_type_float" = yes; then
8300 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008302as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008303See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304 else
8305 ac_cv_sizeof_float=0
8306 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8311$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312
8313
8314
Martin v. Löwis11437992002-04-12 09:54:03 +00008315cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008316#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008317_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008318
8319
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320# The cast to long int works around a bug in the HP C Compiler
8321# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8322# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8323# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8325$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008326if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008328else
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 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 +00008330
Martin v. Löwis11437992002-04-12 09:54:03 +00008331else
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 if test "$ac_cv_type_double" = yes; then
8333 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008335as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008336See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008337 else
8338 ac_cv_sizeof_double=0
8339 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8344$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345
8346
8347
Martin v. Löwis11437992002-04-12 09:54:03 +00008348cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008349#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008350_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008351
8352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353# The cast to long int works around a bug in the HP C Compiler
8354# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8355# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8356# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8358$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008359if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008361else
Matthias Kloseb9621712010-04-24 17:59:49 +00008362 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 +00008363
Martin v. Löwis11437992002-04-12 09:54:03 +00008364else
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 if test "$ac_cv_type_fpos_t" = yes; then
8366 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8367$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008368as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008369See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008370 else
8371 ac_cv_sizeof_fpos_t=0
8372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008374
Martin v. Löwis11437992002-04-12 09:54:03 +00008375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8377$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378
8379
8380
Martin v. Löwis11437992002-04-12 09:54:03 +00008381cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008382#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008383_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008384
Michael W. Hudson54241132001-12-07 15:38:26 +00008385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386# The cast to long int works around a bug in the HP C Compiler
8387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8389# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8391$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008392if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008394else
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 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 +00008396
Martin v. Löwis18e16552006-02-15 17:27:45 +00008397else
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 if test "$ac_cv_type_size_t" = yes; then
8399 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008401as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008402See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403 else
8404 ac_cv_sizeof_size_t=0
8405 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008407
Martin v. Löwis18e16552006-02-15 17:27:45 +00008408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8410$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411
8412
8413
Martin v. Löwis18e16552006-02-15 17:27:45 +00008414cat >>confdefs.h <<_ACEOF
8415#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8416_ACEOF
8417
8418
Christian Heimes400adb02008-02-01 08:12:03 +00008419# The cast to long int works around a bug in the HP C Compiler
8420# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8421# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8422# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8424$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008425if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008427else
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 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 +00008429
Christian Heimes400adb02008-02-01 08:12:03 +00008430else
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 if test "$ac_cv_type_pid_t" = yes; then
8432 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8433$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008434as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008435See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008436 else
8437 ac_cv_sizeof_pid_t=0
8438 fi
8439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008440
Christian Heimes400adb02008-02-01 08:12:03 +00008441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8443$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008444
8445
8446
8447cat >>confdefs.h <<_ACEOF
8448#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8449_ACEOF
8450
8451
Michael W. Hudson54241132001-12-07 15:38:26 +00008452
Matthias Kloseb9621712010-04-24 17:59:49 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8454$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008455have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008458
Martin v. Löwis11437992002-04-12 09:54:03 +00008459int
8460main ()
8461{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008462long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 ;
8464 return 0;
8465}
8466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008468
8469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008471
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008472 have_long_long=yes
8473
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8477$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008478if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479# The cast to long int works around a bug in the HP C Compiler
8480# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8481# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8482# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8484$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008485if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 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 +00008489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490else
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 if test "$ac_cv_type_long_long" = yes; then
8492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8493$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008494as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008495See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496 else
8497 ac_cv_sizeof_long_long=0
8498 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8503$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504
8505
8506
Martin v. Löwis11437992002-04-12 09:54:03 +00008507cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008508#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008509_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008510
Michael W. Hudson54241132001-12-07 15:38:26 +00008511
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008512fi
8513
Matthias Kloseb9621712010-04-24 17:59:49 +00008514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8515$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008516have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008518/* end confdefs.h. */
8519
8520int
8521main ()
8522{
8523long double x; x = (long double)0;
8524 ;
8525 return 0;
8526}
8527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008528if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008529
8530
Matthias Kloseb9621712010-04-24 17:59:49 +00008531$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008532
8533 have_long_double=yes
8534
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008535fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8538$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008539if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008540# The cast to long int works around a bug in the HP C Compiler
8541# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8542# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8543# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8545$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008546if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008548else
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 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 +00008550
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008551else
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 if test "$ac_cv_type_long_double" = 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 (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008556See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008557 else
8558 ac_cv_sizeof_long_double=0
8559 fi
8560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008561
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8564$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008565
8566
8567
8568cat >>confdefs.h <<_ACEOF
8569#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8570_ACEOF
8571
8572
8573fi
8574
8575
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8577$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008578have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008580/* end confdefs.h. */
8581
8582int
8583main ()
8584{
8585_Bool x; x = (_Bool)0;
8586 ;
8587 return 0;
8588}
8589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008590if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008591
8592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008594
8595 have_c99_bool=yes
8596
Thomas Woutersb2137042007-02-01 18:02:27 +00008597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8600$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008601if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602# The cast to long int works around a bug in the HP C Compiler
8603# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8604# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8605# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8607$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008608if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008610else
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 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 +00008612
Thomas Woutersb2137042007-02-01 18:02:27 +00008613else
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 if test "$ac_cv_type__Bool" = 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 (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008618See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619 else
8620 ac_cv_sizeof__Bool=0
8621 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623
Thomas Woutersb2137042007-02-01 18:02:27 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8626$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627
8628
8629
Thomas Woutersb2137042007-02-01 18:02:27 +00008630cat >>confdefs.h <<_ACEOF
8631#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8632_ACEOF
8633
8634
8635fi
8636
Matthias Kloseb9621712010-04-24 17:59:49 +00008637ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008638 #include <stdint.h>
8639 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008640 #ifdef HAVE_INTTYPES_H
8641 #include <inttypes.h>
8642 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008643"
Victor Stinnere0be4232011-10-25 13:06:09 +02008644if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008645
8646cat >>confdefs.h <<_ACEOF
8647#define HAVE_UINTPTR_T 1
8648_ACEOF
8649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650# The cast to long int works around a bug in the HP C Compiler
8651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8653# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8655$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008656if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008658else
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 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 +00008660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 if test "$ac_cv_type_uintptr_t" = yes; then
8663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008665as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008666See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667 else
8668 ac_cv_sizeof_uintptr_t=0
8669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008671
Martin v. Löwis11437992002-04-12 09:54:03 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8674$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675
8676
8677
Martin v. Löwis11437992002-04-12 09:54:03 +00008678cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008679#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008680_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008681
Michael W. Hudson54241132001-12-07 15:38:26 +00008682
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008683fi
8684
Thomas Wouters89f507f2006-12-13 04:49:30 +00008685
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008686# The cast to long int works around a bug in the HP C Compiler
8687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8691$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008692if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008694else
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008696#ifdef HAVE_SYS_TYPES_H
8697#include <sys/types.h>
8698#endif
8699
Matthias Kloseb9621712010-04-24 17:59:49 +00008700"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008701
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008702else
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 if test "$ac_cv_type_off_t" = yes; then
8704 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008706as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008707See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008708 else
8709 ac_cv_sizeof_off_t=0
8710 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008712
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8715$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008716
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008717
8718
Martin v. Löwis11437992002-04-12 09:54:03 +00008719cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008720#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008721_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008722
Michael W. Hudson54241132001-12-07 15:38:26 +00008723
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008724
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8726$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008727if test "$have_long_long" = yes
8728then
8729if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008730 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008733
Matthias Kloseb9621712010-04-24 17:59:49 +00008734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8735$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8738$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008739fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8742$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008743fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008744
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008745# The cast to long int works around a bug in the HP C Compiler
8746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8748# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8750$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008751if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008753else
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008755#ifdef HAVE_SYS_TYPES_H
8756#include <sys/types.h>
8757#endif
8758#ifdef HAVE_TIME_H
8759#include <time.h>
8760#endif
8761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008763
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764else
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 if test "$ac_cv_type_time_t" = yes; then
8766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008768as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008769See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008770 else
8771 ac_cv_sizeof_time_t=0
8772 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8777$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008778
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008779
8780
Martin v. Löwis11437992002-04-12 09:54:03 +00008781cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008782#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008783_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008784
Michael W. Hudson54241132001-12-07 15:38:26 +00008785
8786
Trent Mick635f6fb2000-08-23 21:33:05 +00008787# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008788ac_save_cc="$CC"
8789if test "$ac_cv_kpthread" = "yes"
8790then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008791elif test "$ac_cv_kthread" = "yes"
8792then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008793elif test "$ac_cv_pthread" = "yes"
8794then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008795fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8798$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008799have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008801/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008802
8803 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008804int
8805main ()
8806{
Guido van Rossum12580492000-09-24 16:47:19 +00008807pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008808 ;
8809 return 0;
8810}
Matthias Kloseb159a552010-04-25 21:00:44 +00008811
Martin v. Löwis11437992002-04-12 09:54:03 +00008812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008813if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008814 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8818$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008819if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8823# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8825$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008826if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008828else
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008830#ifdef HAVE_PTHREAD_H
8831#include <pthread.h>
8832#endif
8833
Matthias Kloseb9621712010-04-24 17:59:49 +00008834"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008835
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008836else
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 if test "$ac_cv_type_pthread_t" = yes; then
8838 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008840as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008841See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008842 else
8843 ac_cv_sizeof_pthread_t=0
8844 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008846
Trent Mick635f6fb2000-08-23 21:33:05 +00008847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8849$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851
8852
Martin v. Löwis11437992002-04-12 09:54:03 +00008853cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008854#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008855_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008856
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008857
Trent Mick635f6fb2000-08-23 21:33:05 +00008858fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008859CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008860
Michael W. Hudson54241132001-12-07 15:38:26 +00008861
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008862case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008863 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008864 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8865 ;;
8866 Darwin/*)
8867 OTHER_LIBTOOL_OPT=""
8868 ;;
8869esac
8870
8871
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008872
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008873case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008874 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008875 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8876 if test "${enable_universalsdk}"; then
8877 :
8878 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008879 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008880 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008881 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008882 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008883 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008884 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008885 if test ${gcc_version} '<' 4.0
8886 then
8887 LIBTOOL_CRUFT="-lcc_dynamic"
8888 else
8889 LIBTOOL_CRUFT=""
8890 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008892 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008895/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008896
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008897 #include <unistd.h>
8898 int main(int argc, char*argv[])
8899 {
8900 if (sizeof(long) == 4) {
8901 return 0;
8902 } else {
8903 return 1;
8904 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008905 }
8906
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008908if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008909 ac_osx_32bit=yes
8910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008915fi
8916
8917
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008918 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008919 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008920 i386)
8921 MACOSX_DEFAULT_ARCH="i386"
8922 ;;
8923 ppc)
8924 MACOSX_DEFAULT_ARCH="ppc"
8925 ;;
8926 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008927 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008928 ;;
8929 esac
8930 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008931 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008932 i386)
8933 MACOSX_DEFAULT_ARCH="x86_64"
8934 ;;
8935 ppc)
8936 MACOSX_DEFAULT_ARCH="ppc64"
8937 ;;
8938 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008939 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008940 ;;
8941 esac
8942
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008943 fi
8944
8945 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008946 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008947 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008948esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8950$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008951if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008952then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008953 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008954 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008955 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008956
Matthias Kloseb9621712010-04-24 17:59:49 +00008957$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008958
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8960$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008961 if test $enable_shared = "yes"
8962 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008963 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 +00008964 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008965else
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8967$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008968fi
8969
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8971$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008972case $ac_sys_system/$ac_sys_release in
8973 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008974
Matthias Kloseb9621712010-04-24 17:59:49 +00008975$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008976
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8978$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008979 ;;
8980 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8982$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008983 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008984esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008985
Guido van Rossum0a516c91994-09-12 10:58:40 +00008986# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008987
Michael W. Hudson54241132001-12-07 15:38:26 +00008988
8989
8990
8991
Benjamin Peterson99f03762010-04-11 22:15:28 +00008992
Thomas Wouters477c8d52006-05-27 19:21:47 +00008993
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008994# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8995# -- usually .so, .sl on HP-UX, .dll on Cygwin
8996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8997$as_echo_n "checking the extension of shared libraries... " >&6; }
8998if test -z "$SHLIB_SUFFIX"; then
8999 case $ac_sys_system in
9000 hp*|HP*)
9001 case `uname -m` in
9002 ia64) SHLIB_SUFFIX=.so;;
9003 *) SHLIB_SUFFIX=.sl;;
9004 esac
9005 ;;
9006 CYGWIN*) SHLIB_SUFFIX=.dll;;
9007 *) SHLIB_SUFFIX=.so;;
9008 esac
9009fi
9010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9011$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009012
Guido van Rossum0a516c91994-09-12 10:58:40 +00009013# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009014# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009015# (Shared libraries in this instance are shared modules to be loaded into
9016# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9018$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009019if test -z "$LDSHARED"
9020then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009021 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009022 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009023 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009024 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009025 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009026 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009027 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009029 if test "$GCC" = "yes" ; then
9030 LDSHARED='$(CC) -shared'
9031 LDCXXSHARED='$(CXX) -shared'
9032 else
9033 LDSHARED='$(CC) -G'
9034 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009035 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009036 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009037 if test "$GCC" = "yes" ; then
9038 LDSHARED='$(CC) -shared'
9039 LDCXXSHARED='$(CXX) -shared'
9040 else
9041 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009042 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009043 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009044 LDSHARED='$(CC) -bundle'
9045 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009046 if test "$enable_framework" ; then
9047 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009048 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9049 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009050 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009051 else
9052 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009053 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009054 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009055 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009056 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009057 LDSHARED='$(CC) -bundle'
9058 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009059 if test "$enable_framework" ; then
9060 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009061 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9062 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009063 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009064 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009065 # No framework, use the Python app as bundle-loader
9066 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009067 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009068 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009069 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009070 Darwin/*)
9071 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9072 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009073
Ned Deily36820b62014-06-25 13:44:22 -07009074 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9075 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9076 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9077 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9078 if test ${dep_target_major} -eq 10 && \
9079 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009080 then
Ned Deily36820b62014-06-25 13:44:22 -07009081 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009082 LDSHARED='$(CC) -bundle'
9083 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009084 if test "$enable_framework" ; then
9085 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009086 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9087 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009088 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009089 else
9090 # No framework, use the Python app as bundle-loader
9091 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9092 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009093 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009094 fi
Ned Deily36820b62014-06-25 13:44:22 -07009095 else
9096 # building for OS X 10.3 and later
9097 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9098 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9099 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009100 fi
9101 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009102 Linux*|GNU*|QNX*)
9103 LDSHARED='$(CC) -shared'
9104 LDCXXSHARED='$(CXX) -shared';;
9105 BSD/OS*/4*)
9106 LDSHARED="gcc -shared"
9107 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009108 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009109 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009110 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009111 LDSHARED='$(CC) -shared'
9112 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009113 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009114 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009115 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009116 OpenBSD*)
9117 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9118 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009119 LDSHARED='$(CC) -shared $(CCSHARED)'
9120 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009121 else
9122 case `uname -r` in
9123 [01].* | 2.[0-7] | 2.[0-7].*)
9124 LDSHARED="ld -Bshareable ${LDFLAGS}"
9125 ;;
9126 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009127 LDSHARED='$(CC) -shared $(CCSHARED)'
9128 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009129 ;;
9130 esac
9131 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009132 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009133 LDSHARED='$(CC) -shared'
9134 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009135 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009136 if test "$GCC" = "yes" ; then
9137 LDSHARED='$(CC) -shared'
9138 LDCXXSHARED='$(CXX) -shared'
9139 else
9140 LDSHARED='$(CC) -G'
9141 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009142 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009143 SCO_SV*)
9144 LDSHARED='$(CC) -Wl,-G,-Bexport'
9145 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9146 CYGWIN*)
9147 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9148 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009149 *) LDSHARED="ld";;
9150 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9153$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009154LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009155BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009156# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009157# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9159$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009160if test -z "$CCSHARED"
9161then
Guido van Rossum07397971997-04-29 21:49:50 +00009162 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009163 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009164 then CCSHARED="-fPIC";
9165 elif test `uname -p` = sparc;
9166 then CCSHARED="-xcode=pic32";
9167 else CCSHARED="-Kpic";
9168 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009169 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009170 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009171 else CCSHARED="+z";
9172 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009173 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009174 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009175 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009176 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009177 if test "$GCC" = "yes"
9178 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009179 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009180 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009181 SCO_SV*)
9182 if test "$GCC" = "yes"
9183 then CCSHARED="-fPIC"
9184 else CCSHARED="-Kpic -belf"
9185 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009186 IRIX*/6*) case $CC in
9187 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009188 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009189 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009190 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9193$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009194# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009195# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9197$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009198if test -z "$LINKFORSHARED"
9199then
Guido van Rossum07397971997-04-29 21:49:50 +00009200 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009201 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009202 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009203 LINKFORSHARED="-Wl,-E -Wl,+s";;
9204# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009205 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009206 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009207 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009209 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009210
9211 # Issue #18075: the default maximum stack size (8MBytes) is too
9212 # small for the default recursion limit. Increase the stack size
9213 # to ensure that tests don't crash
9214 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9215
Jack Jansene578a632001-08-15 01:27:14 +00009216 if test "$enable_framework"
9217 then
Jack Jansenda49e192005-01-07 13:08:22 +00009218 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009219 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009220 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009221 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009222 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009223 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009224 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009225 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9226 then
9227 LINKFORSHARED="-Wl,--export-dynamic"
9228 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009229 SunOS/5*) case $CC in
9230 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009231 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009232 then
9233 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009234 fi;;
9235 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009236 CYGWIN*)
9237 if test $enable_shared = "no"
9238 then
9239 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9240 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009241 QNX*)
9242 # -Wl,-E causes the symbols to be added to the dynamic
9243 # symbol table so that they can be found when a module
9244 # is loaded. -N 2048K causes the stack size to be set
9245 # to 2048 kilobytes so that the stack doesn't overflow
9246 # when running test_compile.py.
9247 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009248 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9251$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009252
Michael W. Hudson54241132001-12-07 15:38:26 +00009253
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009254
Matthias Kloseb9621712010-04-24 17:59:49 +00009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9256$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009257if test ! "$LIBRARY" = "$LDLIBRARY"
9258then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009259 case $ac_sys_system in
9260 CYGWIN*)
9261 # Cygwin needs CCSHARED when building extension DLLs
9262 # but not when building the interpreter DLL.
9263 CFLAGSFORSHARED='';;
9264 *)
9265 CFLAGSFORSHARED='$(CCSHARED)'
9266 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9269$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009270
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009271# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9272# library (with --enable-shared).
9273# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009274# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9275# if it is not required, since it creates a dependency of the shared library
9276# to LIBS. This, in turn, means that applications linking the shared libpython
9277# don't need to link LIBS explicitly. The default should be only changed
9278# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009279
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9281$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009282case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009283 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009284 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009285esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9287$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009288
9289
Guido van Rossum627b2d71993-12-24 10:39:16 +00009290# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9292$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009293if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009294 $as_echo_n "(cached) " >&6
9295else
9296 ac_check_lib_save_LIBS=$LIBS
9297LIBS="-lsendfile $LIBS"
9298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9299/* end confdefs.h. */
9300
9301/* Override any GCC internal prototype to avoid an error.
9302 Use char because int might match the return type of a GCC
9303 builtin and then its argument prototype would still apply. */
9304#ifdef __cplusplus
9305extern "C"
9306#endif
9307char sendfile ();
9308int
9309main ()
9310{
9311return sendfile ();
9312 ;
9313 return 0;
9314}
9315_ACEOF
9316if ac_fn_c_try_link "$LINENO"; then :
9317 ac_cv_lib_sendfile_sendfile=yes
9318else
9319 ac_cv_lib_sendfile_sendfile=no
9320fi
9321rm -f core conftest.err conftest.$ac_objext \
9322 conftest$ac_exeext conftest.$ac_ext
9323LIBS=$ac_check_lib_save_LIBS
9324fi
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9326$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009327if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009328 cat >>confdefs.h <<_ACEOF
9329#define HAVE_LIBSENDFILE 1
9330_ACEOF
9331
9332 LIBS="-lsendfile $LIBS"
9333
9334fi
9335
Matthias Kloseb9621712010-04-24 17:59:49 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9337$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009338if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009339 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009340else
Martin v. Löwis11437992002-04-12 09:54:03 +00009341 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009342LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346/* Override any GCC internal prototype to avoid an error.
9347 Use char because int might match the return type of a GCC
9348 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009349#ifdef __cplusplus
9350extern "C"
9351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009352char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009353int
9354main ()
9355{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 ;
9358 return 0;
9359}
9360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009363else
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009366rm -f core conftest.err conftest.$ac_objext \
9367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009368LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9371$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009372if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 cat >>confdefs.h <<_ACEOF
9374#define HAVE_LIBDL 1
9375_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009376
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009377 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009378
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009379fi
9380 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9382$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009383if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009384 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009385else
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009387LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391/* Override any GCC internal prototype to avoid an error.
9392 Use char because int might match the return type of a GCC
9393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009394#ifdef __cplusplus
9395extern "C"
9396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009397char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009398int
9399main ()
9400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +00009407 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009408else
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +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öwis11437992002-04-12 09:54:03 +00009413LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9416$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009417if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 cat >>confdefs.h <<_ACEOF
9419#define HAVE_LIBDLD 1
9420_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009421
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009422 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009423
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009424fi
9425 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9427$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9428if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9429 $as_echo_n "(cached) " >&6
9430else
9431 ac_check_lib_save_LIBS=$LIBS
9432LIBS="-lcrypto $LIBS"
9433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9434/* end confdefs.h. */
9435
9436/* Override any GCC internal prototype to avoid an error.
9437 Use char because int might match the return type of a GCC
9438 builtin and then its argument prototype would still apply. */
9439#ifdef __cplusplus
9440extern "C"
9441#endif
9442char RAND_egd ();
9443int
9444main ()
9445{
9446return RAND_egd ();
9447 ;
9448 return 0;
9449}
9450_ACEOF
9451if ac_fn_c_try_link "$LINENO"; then :
9452 ac_cv_lib_crypto_RAND_egd=yes
9453else
9454 ac_cv_lib_crypto_RAND_egd=no
9455fi
9456rm -f core conftest.err conftest.$ac_objext \
9457 conftest$ac_exeext conftest.$ac_ext
9458LIBS=$ac_check_lib_save_LIBS
9459fi
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9461$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9462if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9463
9464$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9465
9466fi
9467
Martin v. Löwis519adae2003-09-20 10:47:47 +00009468
Georg Brandlb1441c72009-01-03 22:33:39 +00009469# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009470if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9472$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009473if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009474 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009475else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009476 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480/* Override any GCC internal prototype to avoid an error.
9481 Use char because int might match the return type of a GCC
9482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009483#ifdef __cplusplus
9484extern "C"
9485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009486char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009487int
9488main ()
9489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 ;
9492 return 0;
9493}
9494_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009495for ac_lib in '' pthread rt posix4; do
9496 if test -z "$ac_lib"; then
9497 ac_res="none required"
9498 else
9499 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009500 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009501 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009505rm -f core conftest.err conftest.$ac_objext \
9506 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009507 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510done
Victor Stinnere0be4232011-10-25 13:06:09 +02009511if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513else
9514 ac_cv_search_sem_init=no
9515fi
9516rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009517LIBS=$ac_func_search_save_LIBS
9518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9520$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009522if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009524
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009525fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009526 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009527 # posix4 on Solaris 2.6
9528 # pthread (first!) on Linux
9529fi
9530
Martin v. Löwis19d17342003-06-14 21:03:05 +00009531# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9533$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009534if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009536else
9537 ac_check_lib_save_LIBS=$LIBS
9538LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009540/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009542/* Override any GCC internal prototype to avoid an error.
9543 Use char because int might match the return type of a GCC
9544 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009545#ifdef __cplusplus
9546extern "C"
9547#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009548char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009549int
9550main ()
9551{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009552return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009553 ;
9554 return 0;
9555}
9556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009557if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009558 ac_cv_lib_intl_textdomain=yes
9559else
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009562rm -f core conftest.err conftest.$ac_objext \
9563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009564LIBS=$ac_check_lib_save_LIBS
9565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9567$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009568if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009569
Matthias Kloseb9621712010-04-24 17:59:49 +00009570$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009571
Brett Cannonc6d936e2009-06-07 20:09:53 +00009572 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009573fi
9574
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009575
9576# checks for system dependent C++ extensions support
9577case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009578 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9579$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009581/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009582
Georg Brandl59e87bd2011-02-15 19:48:59 +00009583 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009584int
9585main ()
9586{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009587loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 ;
9589 return 0;
9590}
Matthias Kloseb159a552010-04-25 21:00:44 +00009591
Martin v. Löwis11437992002-04-12 09:54:03 +00009592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009593if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009594
Matthias Kloseb159a552010-04-25 21:00:44 +00009595
Matthias Kloseb9621712010-04-24 17:59:49 +00009596$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009597
Matthias Kloseb159a552010-04-25 21:00:44 +00009598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009599$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009600
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009601else
Matthias Kloseb159a552010-04-25 21:00:44 +00009602
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009604$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009605
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009607rm -f core conftest.err conftest.$ac_objext \
9608 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009609 *) ;;
9610esac
9611
Christian Heimes985ecdc2013-11-20 11:46:18 +01009612# check for systems that require aligned memory access
9613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9614$as_echo_n "checking aligned memory access is required... " >&6; }
9615if test "$cross_compiling" = yes; then :
9616 aligned_required=yes
9617else
9618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9619/* end confdefs.h. */
9620
9621int main()
9622{
9623 char s[16];
9624 int i, *p1, *p2;
9625 for (i=0; i < 16; i++)
9626 s[i] = i;
9627 p1 = (int*)(s+1);
9628 p2 = (int*)(s+2);
9629 if (*p1 == *p2)
9630 return 1;
9631 return 0;
9632}
9633
9634_ACEOF
9635if ac_fn_c_try_run "$LINENO"; then :
9636 aligned_required=no
9637else
9638 aligned_required=yes
9639fi
9640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9641 conftest.$ac_objext conftest.beam conftest.$ac_ext
9642fi
9643
9644
9645if test "$aligned_required" = yes ; then
9646
9647$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9648
9649fi
9650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9651$as_echo "$aligned_required" >&6; }
9652
9653
9654# str, bytes and memoryview hash algorithm
9655
9656
9657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9658$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9659
9660# Check whether --with-hash_algorithm was given.
9661if test "${with_hash_algorithm+set}" = set; then :
9662 withval=$with_hash_algorithm;
9663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9664$as_echo "$withval" >&6; }
9665case "$withval" in
9666 siphash24)
9667 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9668
9669 ;;
9670 fnv)
9671 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9672
9673 ;;
9674 *)
9675 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9676 ;;
9677esac
9678
9679else
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9681$as_echo "default" >&6; }
9682fi
9683
9684
Charles-François Natalid30b0222014-05-08 23:08:51 +01009685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9686$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9687
9688# Check whether --with-address_sanitizer was given.
9689if test "${with_address_sanitizer+set}" = set; then :
9690 withval=$with_address_sanitizer;
9691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9692$as_echo "$withval" >&6; }
9693BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9694LDFLAGS="-fsanitize=address $LDFLAGS"
9695
9696else
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9698$as_echo "no" >&6; }
9699fi
9700
9701
Guido van Rossum70c7f481998-03-26 18:44:10 +00009702# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9704$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009705if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009707else
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009709LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713/* Override any GCC internal prototype to avoid an error.
9714 Use char because int might match the return type of a GCC
9715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716#ifdef __cplusplus
9717extern "C"
9718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009719char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009720int
9721main ()
9722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ;
9725 return 0;
9726}
9727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009730else
Matthias Kloseb9621712010-04-24 17:59:49 +00009731 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009733rm -f core conftest.err conftest.$ac_objext \
9734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009735LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9738$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009739if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009740 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009741fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009742 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9744$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009745if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009747else
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009749LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753/* Override any GCC internal prototype to avoid an error.
9754 Use char because int might match the return type of a GCC
9755 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009756#ifdef __cplusplus
9757extern "C"
9758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009759char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009760int
9761main ()
9762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ;
9765 return 0;
9766}
9767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009768if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009770else
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009773rm -f core conftest.err conftest.$ac_objext \
9774 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009775LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9778$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009779if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009780 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009781fi
9782 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009783
Matthias Kloseb9621712010-04-24 17:59:49 +00009784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9785$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009788if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9791$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009792LIBS="$withval $LIBS"
9793
9794else
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797fi
9798
Guido van Rossum7f43da71994-08-01 12:15:30 +00009799
Victor Stinner8291b5e2015-03-20 16:03:14 +01009800
9801
9802
9803
9804
9805
9806
9807if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9808 if test -n "$ac_tool_prefix"; then
9809 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9810set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9812$as_echo_n "checking for $ac_word... " >&6; }
9813if ${ac_cv_path_PKG_CONFIG+:} false; then :
9814 $as_echo_n "(cached) " >&6
9815else
9816 case $PKG_CONFIG in
9817 [\\/]* | ?:[\\/]*)
9818 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9819 ;;
9820 *)
9821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9822for as_dir in $PATH
9823do
9824 IFS=$as_save_IFS
9825 test -z "$as_dir" && as_dir=.
9826 for ac_exec_ext in '' $ac_executable_extensions; do
9827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9828 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9830 break 2
9831 fi
9832done
9833 done
9834IFS=$as_save_IFS
9835
9836 ;;
9837esac
9838fi
9839PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9840if test -n "$PKG_CONFIG"; then
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9842$as_echo "$PKG_CONFIG" >&6; }
9843else
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9845$as_echo "no" >&6; }
9846fi
9847
9848
9849fi
9850if test -z "$ac_cv_path_PKG_CONFIG"; then
9851 ac_pt_PKG_CONFIG=$PKG_CONFIG
9852 # Extract the first word of "pkg-config", so it can be a program name with args.
9853set dummy pkg-config; ac_word=$2
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9855$as_echo_n "checking for $ac_word... " >&6; }
9856if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9857 $as_echo_n "(cached) " >&6
9858else
9859 case $ac_pt_PKG_CONFIG in
9860 [\\/]* | ?:[\\/]*)
9861 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9862 ;;
9863 *)
9864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9865for as_dir in $PATH
9866do
9867 IFS=$as_save_IFS
9868 test -z "$as_dir" && as_dir=.
9869 for ac_exec_ext in '' $ac_executable_extensions; do
9870 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9871 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9873 break 2
9874 fi
9875done
9876 done
9877IFS=$as_save_IFS
9878
9879 ;;
9880esac
9881fi
9882ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9883if test -n "$ac_pt_PKG_CONFIG"; then
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9885$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9886else
9887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
9889fi
9890
9891 if test "x$ac_pt_PKG_CONFIG" = x; then
9892 PKG_CONFIG=""
9893 else
9894 case $cross_compiling:$ac_tool_warned in
9895yes:)
9896{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9897$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9898ac_tool_warned=yes ;;
9899esac
9900 PKG_CONFIG=$ac_pt_PKG_CONFIG
9901 fi
9902else
9903 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9904fi
9905
9906fi
9907if test -n "$PKG_CONFIG"; then
9908 _pkg_min_version=0.9.0
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9910$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9911 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9913$as_echo "yes" >&6; }
9914 else
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9916$as_echo "no" >&6; }
9917 PKG_CONFIG=""
9918 fi
9919fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009920
9921# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9923$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009924
9925# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009926if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009927 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009928else
9929 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009930fi
9931
9932
Matthias Kloseb9621712010-04-24 17:59:49 +00009933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9934$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009935
9936# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9938$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009939
9940# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009941if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009942 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009943else
9944 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009945fi
9946
9947
9948if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009949 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9950else
9951 LIBFFI_INCLUDEDIR=""
9952fi
9953
9954
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9956$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009957
Stefan Krah60187b52012-03-23 19:06:27 +01009958# Check for use of the system libmpdec library
9959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9960$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9961
9962# Check whether --with-system_libmpdec was given.
9963if test "${with_system_libmpdec+set}" = set; then :
9964 withval=$with_system_libmpdec;
9965else
9966 with_system_libmpdec="no"
9967fi
9968
9969
9970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9971$as_echo "$with_system_libmpdec" >&6; }
9972
Benjamin Peterson076ed002010-10-31 17:11:02 +00009973# Check for support for loadable sqlite extensions
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9975$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9976# Check whether --enable-loadable-sqlite-extensions was given.
9977if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9978 enableval=$enable_loadable_sqlite_extensions;
9979else
9980 enable_loadable_sqlite_extensions="no"
9981fi
9982
9983
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9985$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9986
Ned Deilyd819b932013-09-06 01:07:05 -07009987# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9988
9989
9990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9991$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9992
9993# Check whether --with-tcltk-includes was given.
9994if test "${with_tcltk_includes+set}" = set; then :
9995 withval=$with_tcltk_includes;
9996else
9997 with_tcltk_includes="default"
9998fi
9999
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10001$as_echo "$with_tcltk_includes" >&6; }
10002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10003$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10004
10005# Check whether --with-tcltk-libs was given.
10006if test "${with_tcltk_libs+set}" = set; then :
10007 withval=$with_tcltk_libs;
10008else
10009 with_tcltk_libs="default"
10010fi
10011
10012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10013$as_echo "$with_tcltk_libs" >&6; }
10014if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10015then
10016 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10017 then
10018 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10019 fi
10020 TCLTK_INCLUDES=""
10021 TCLTK_LIBS=""
10022else
10023 TCLTK_INCLUDES="$with_tcltk_includes"
10024 TCLTK_LIBS="$with_tcltk_libs"
10025fi
10026
Matthias Klose55708cc2009-04-30 08:06:49 +000010027# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10029$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010030
10031# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010032if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010033 withval=$with_dbmliborder;
10034if test x$with_dbmliborder = xyes
10035then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010036as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010037else
10038 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10039 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10040 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010041 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010042 fi
10043 done
10044fi
10045fi
10046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10048$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010049
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010050# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010051
10052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10054$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010057if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058 withval=$with_signal_module;
10059fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010060
10061
10062if test -z "$with_signal_module"
10063then with_signal_module="yes"
10064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10066$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010067
10068if test "${with_signal_module}" = "yes"; then
10069 USE_SIGNAL_MODULE=""
10070 SIGNAL_OBJS=""
10071else
10072 USE_SIGNAL_MODULE="#"
10073 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10074fi
10075
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010076# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010077
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010078USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010080
Martin v. Löwis11437992002-04-12 09:54:03 +000010081
10082# Templates for things AC_DEFINEd more than once.
10083# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010084
10085
Martin v. Löwis11437992002-04-12 09:54:03 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10088$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010091if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092 withval=$with_threads;
10093fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010094
10095
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010096# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010099if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100 withval=$with_thread; with_threads=$with_thread
10101fi
10102
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010103
10104if test -z "$with_threads"
10105then with_threads="yes"
10106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10108$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010109
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010110
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010111if test "$with_threads" = "no"
10112then
10113 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010114elif test "$ac_cv_pthread_is_default" = yes
10115then
Matthias Kloseb9621712010-04-24 17:59:49 +000010116 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010117
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010118 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010119 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010120
10121 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010123elif test "$ac_cv_kpthread" = "yes"
10124then
10125 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010126 if test "$ac_cv_cxx_thread" = "yes"; then
10127 CXX="$CXX -Kpthread"
10128 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010130
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010131 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010132 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010133elif test "$ac_cv_kthread" = "yes"
10134then
10135 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010136 if test "$ac_cv_cxx_thread" = "yes"; then
10137 CXX="$CXX -Kthread"
10138 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010140
10141 posix_threads=yes
10142 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010143elif test "$ac_cv_pthread" = "yes"
10144then
10145 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010146 if test "$ac_cv_cxx_thread" = "yes"; then
10147 CXX="$CXX -pthread"
10148 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010150
10151 posix_threads=yes
10152 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010153else
10154 if test ! -z "$with_threads" -a -d "$with_threads"
10155 then LDFLAGS="$LDFLAGS -L$with_threads"
10156 fi
10157 if test ! -z "$withval" -a -d "$withval"
10158 then LDFLAGS="$LDFLAGS -L$withval"
10159 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010160
10161 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010162 # define _POSIX_THREADS in unistd.h. Some apparently don't
10163 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10165$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010167/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010168
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010169#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010170#ifdef _POSIX_THREADS
10171yes
10172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010173
10174_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010175if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010176 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010177 unistd_defines_pthreads=yes
10178else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010179 unistd_defines_pthreads=no
10180fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010181rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010182
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10184$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010185
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010187
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010188 # Just looking for pthread_create in libpthread is not enough:
10189 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10190 # So we really have to include pthread.h, and then link.
10191 _libs=$LIBS
10192 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10194$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010196/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010197
10198#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010199#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010200
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010201void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010202int
10203main ()
10204{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010205
10206pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 ;
10208 return 0;
10209}
10210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010211if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010212
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10214$as_echo "yes" >&6; }
10215 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010216
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010217 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010218 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010219else
Martin v. Löwis11437992002-04-12 09:54:03 +000010220
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010221 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010223if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010225
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010226 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010227 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010228else
Guido van Rossumad678af1998-10-02 14:42:15 +000010229
Matthias Kloseb9621712010-04-24 17:59:49 +000010230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10231$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010232if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010234else
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010236LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240/* Override any GCC internal prototype to avoid an error.
10241 Use char because int might match the return type of a GCC
10242 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010243#ifdef __cplusplus
10244extern "C"
10245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010246char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010247int
10248main ()
10249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 ;
10252 return 0;
10253}
10254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010255if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010257else
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010260rm -f core conftest.err conftest.$ac_objext \
10261 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010262LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10265$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010266if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010268
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010269 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010270 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010271 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010272else
Greg Steinadf63d62000-07-05 10:38:09 +000010273
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10275$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010276if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010278else
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010280LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284/* Override any GCC internal prototype to avoid an error.
10285 Use char because int might match the return type of a GCC
10286 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010287#ifdef __cplusplus
10288extern "C"
10289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010290char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010291int
10292main ()
10293{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 ;
10296 return 0;
10297}
10298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010299if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010301else
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010304rm -f core conftest.err conftest.$ac_objext \
10305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010306LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10309$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010310if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010312
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010313 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010314 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010315 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010316else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010317
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10319$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010320if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010322else
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010324LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328/* Override any GCC internal prototype to avoid an error.
10329 Use char because int might match the return type of a GCC
10330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010331#ifdef __cplusplus
10332extern "C"
10333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010334char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010335int
10336main ()
10337{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 ;
10340 return 0;
10341}
10342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010345else
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010348rm -f core conftest.err conftest.$ac_objext \
10349 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010350LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10353$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010354if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010356
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010357 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010358 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010359 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010360else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010361
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10363$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010364if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010366else
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010368LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372/* Override any GCC internal prototype to avoid an error.
10373 Use char because int might match the return type of a GCC
10374 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010375#ifdef __cplusplus
10376extern "C"
10377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010378char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010379int
10380main ()
10381{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 ;
10384 return 0;
10385}
10386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010387if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010389else
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010392rm -f core conftest.err conftest.$ac_objext \
10393 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010394LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10397$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010398if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010400
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010401 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010402 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010403 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010404else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010405
Martin v. Löwis130fb172001-07-19 11:00:41 +000010406 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010407fi
10408
Guido van Rossum627b2d71993-12-24 10:39:16 +000010409
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010410fi
10411
Guido van Rossum0be3e491997-05-22 20:33:33 +000010412fi
10413
Guido van Rossum49545951997-12-02 19:28:29 +000010414fi
10415
Guido van Rossumb93a8621998-05-07 13:27:32 +000010416fi
10417
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010419rm -f core conftest.err conftest.$ac_objext \
10420 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010421
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10423$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010424if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010426else
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010428LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432/* Override any GCC internal prototype to avoid an error.
10433 Use char because int might match the return type of a GCC
10434 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010435#ifdef __cplusplus
10436extern "C"
10437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010438char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010439int
10440main ()
10441{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ;
10444 return 0;
10445}
10446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010447if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010449else
Matthias Kloseb9621712010-04-24 17:59:49 +000010450 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010452rm -f core conftest.err conftest.$ac_objext \
10453 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010454LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10457$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010458if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010460
Martin v. Löwis130fb172001-07-19 11:00:41 +000010461 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010462 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010463 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010464fi
10465
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010466
Neal Norwitza978ab02002-11-02 16:58:05 +000010467 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10469$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010470if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010472else
Martin v. Löwis11437992002-04-12 09:54:03 +000010473 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010474LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478/* Override any GCC internal prototype to avoid an error.
10479 Use char because int might match the return type of a GCC
10480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010481#ifdef __cplusplus
10482extern "C"
10483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010484char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010485int
10486main ()
10487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010489 ;
10490 return 0;
10491}
10492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010493if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010494 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010495else
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010498rm -f core conftest.err conftest.$ac_objext \
10499 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010500LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10503$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010504if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010506
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010507 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010508 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010509 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010510fi
10511
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010512 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010513fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010514
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010515if test "$posix_threads" = "yes"; then
10516 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010517
Matthias Kloseb9621712010-04-24 17:59:49 +000010518$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010519
10520 fi
10521
10522 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10523 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010524 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010525$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010526
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010527 ;;
10528 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010529$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010530
10531 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010532 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010533$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010534
10535 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010536 esac
10537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10539$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010540 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010542else
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010544 ac_cv_pthread_system_supported=no
10545else
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010547/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010548
10549 #include <stdio.h>
10550 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010551 void *foo(void *parm) {
10552 return NULL;
10553 }
10554 main() {
10555 pthread_attr_t attr;
10556 pthread_t id;
10557 if (pthread_attr_init(&attr)) exit(-1);
10558 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10559 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10560 exit(0);
10561 }
10562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010563if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010564 ac_cv_pthread_system_supported=yes
10565else
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10569 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010570fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572
Guido van Rossum627b2d71993-12-24 10:39:16 +000010573fi
10574
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10576$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010577 if test "$ac_cv_pthread_system_supported" = "yes"; then
10578
Matthias Kloseb9621712010-04-24 17:59:49 +000010579$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010580
10581 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 for ac_func in pthread_sigmask
10583do :
10584 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010585if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010586 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010587#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010588_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010589 case $ac_sys_system in
10590 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591
Matthias Kloseb9621712010-04-24 17:59:49 +000010592$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010593
10594 ;;
10595 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596fi
10597done
10598
Christian Heimesf77b4b22013-08-21 13:26:05 +020010599 for ac_func in pthread_atfork
10600do :
10601 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10602if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10603 cat >>confdefs.h <<_ACEOF
10604#define HAVE_PTHREAD_ATFORK 1
10605_ACEOF
10606
10607fi
10608done
10609
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610fi
10611
10612
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010614
Matthias Kloseb9621712010-04-24 17:59:49 +000010615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10616$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010617# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010618if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010620 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010623 ipv6=no
10624 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10626$as_echo "yes" >&6; }
10627 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010628
10629 ipv6=yes
10630 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632else
Martin v. Löwis11437992002-04-12 09:54:03 +000010633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010636 /* AF_INET6 available check */
10637#include <sys/types.h>
10638#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010639int
10640main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010641{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010642int domain = AF_INET6;
10643 ;
10644 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645}
Martin v. Löwis11437992002-04-12 09:54:03 +000010646_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010647if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10650$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010651 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010652
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653else
Matthias Kloseb159a552010-04-25 21:00:44 +000010654
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10656$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010657 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010658
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010662if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10664$as_echo_n "checking if RFC2553 API is available... " >&6; }
10665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010666/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010667
10668 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010669#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010670int
10671main ()
10672{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010673struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010674 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 ;
10676 return 0;
10677}
Matthias Kloseb159a552010-04-25 21:00:44 +000010678
Martin v. Löwis11437992002-04-12 09:54:03 +000010679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010680if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010681
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010683$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010684 ipv6=yes
10685
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010686else
Matthias Kloseb159a552010-04-25 21:00:44 +000010687
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010689$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010690 ipv6=no
10691
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010694fi
10695
10696if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010698
10699fi
10700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701fi
10702
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010703
10704ipv6type=unknown
10705ipv6lib=none
10706ipv6trylibc=no
10707
10708if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10710$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010711 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10712 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010713 case $i in
10714 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010716/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718#include <netinet/in.h>
10719#ifdef IPV6_INRIA_VERSION
10720yes
10721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010722_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010725 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010727rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728
10729 ;;
10730 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010733
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734#include <netinet/in.h>
10735#ifdef __KAME__
10736yes
10737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010738_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741 ipv6type=$i;
10742 ipv6lib=inet6
10743 ipv6libdir=/usr/local/v6/lib
10744 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010745fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010746rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747
10748 ;;
10749 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010751/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010752
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753#include <features.h>
10754#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10755yes
10756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010757_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760 ipv6type=$i;
10761 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010763rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764
10765 ;;
10766 linux-inet6)
10767 if test -d /usr/inet6; then
10768 ipv6type=$i
10769 ipv6lib=inet6
10770 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010771 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772 fi
10773 ;;
10774 solaris)
10775 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010776 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777 ipv6type=$i
10778 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779 fi
10780 fi
10781 ;;
10782 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010784/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010785
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786#include <sys/param.h>
10787#ifdef _TOSHIBA_INET6
10788yes
10789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010790_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793 ipv6type=$i;
10794 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010795 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010797rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798
10799 ;;
10800 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010802/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010803
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804#include </usr/local/v6/include/sys/v6config.h>
10805#ifdef __V6D__
10806yes
10807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010808_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811 ipv6type=$i;
10812 ipv6lib=v6;
10813 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010814 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010816rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817
10818 ;;
10819 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823#include <sys/param.h>
10824#ifdef _ZETA_MINAMI_INET6
10825yes
10826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010827_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010830 ipv6type=$i;
10831 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010832 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010834rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835
10836 ;;
10837 esac
10838 if test "$ipv6type" != "unknown"; then
10839 break
10840 fi
10841 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10843$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844fi
10845
10846if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10847 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10848 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10849 echo "using lib$ipv6lib"
10850 else
10851 if test $ipv6trylibc = "yes"; then
10852 echo "using libc"
10853 else
10854 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10855 echo "You need to fetch lib$ipv6lib.a from appropriate"
10856 echo 'ipv6 kit and compile beforehand.'
10857 exit 1
10858 fi
10859 fi
10860fi
10861
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10863$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10865/* end confdefs.h. */
10866 /* CAN_RAW_FD_FRAMES available check */
10867#include <linux/can/raw.h>
10868int
10869main ()
10870{
10871int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10872 ;
10873 return 0;
10874}
10875_ACEOF
10876if ac_fn_c_try_compile "$LINENO"; then :
10877
10878
10879$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10880
10881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10882$as_echo "yes" >&6; }
10883
10884else
10885
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10887$as_echo "no" >&6; }
10888
10889fi
10890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10893$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010895/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010896
10897 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010898int
10899main ()
10900{
10901FSIORefNum fRef = 0
10902 ;
10903 return 0;
10904}
Matthias Kloseb159a552010-04-25 21:00:44 +000010905
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010907if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010908
Matthias Kloseb159a552010-04-25 21:00:44 +000010909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10913$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010914
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010915else
Matthias Kloseb159a552010-04-25 21:00:44 +000010916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10918$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010919
10920fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10922
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010923# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10925$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010928if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010929 withval=$with_doc_strings;
10930fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010931
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010932
10933if test -z "$with_doc_strings"
10934then with_doc_strings="yes"
10935fi
10936if test "$with_doc_strings" != "no"
10937then
10938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010940
10941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10943$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010944
Antoine Pitrou042b1282010-08-13 21:15:58 +000010945# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10947$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010952if test "$withval" != no
10953then
10954
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10958$as_echo "yes" >&6; }
10959else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10960$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010961fi
10962else
Matthias Kloseb9621712010-04-24 17:59:49 +000010963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10964$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965fi
10966
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010967
10968# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10970$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010973if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974 withval=$with_pymalloc;
10975fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010976
Neil Schemenauera35c6882001-02-27 04:45:05 +000010977
Neil Schemenauer16c22972002-03-22 15:34:49 +000010978if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010979then
10980 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010981fi
10982if test "$with_pymalloc" != "no"
10983then
Martin v. Löwis11437992002-04-12 09:54:03 +000010984
Matthias Kloseb9621712010-04-24 17:59:49 +000010985$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010986
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010987 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10990$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010991
Benjamin Peterson05159c42009-12-03 03:01:27 +000010992# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10994$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010995
10996# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010997if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010998 withval=$with_valgrind;
10999else
11000 with_valgrind=no
11001fi
11002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11004$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011005if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 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 +020011007if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011008
Matthias Kloseb9621712010-04-24 17:59:49 +000011009$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011010
11011else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011012 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011013
11014fi
11015
11016
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011017 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011018fi
11019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011020# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011021
Guido van Rossum98935bf2001-09-05 19:13:16 +000011022DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011023
Guido van Rossume97ee181999-12-20 21:27:22 +000011024# the dlopen() function means we might want to use dynload_shlib.o. some
11025# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011026for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011027do :
11028 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011029if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011031#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011032_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011033
Guido van Rossume97ee181999-12-20 21:27:22 +000011034fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011035done
Guido van Rossume97ee181999-12-20 21:27:22 +000011036
Michael W. Hudson54241132001-12-07 15:38:26 +000011037
Guido van Rossume97ee181999-12-20 21:27:22 +000011038# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11039# loading of modules.
11040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11042$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011043if test -z "$DYNLOADFILE"
11044then
11045 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011046 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11047 if test "$ac_cv_func_dlopen" = yes
11048 then DYNLOADFILE="dynload_shlib.o"
11049 else DYNLOADFILE="dynload_aix.o"
11050 fi
11051 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011052 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011053 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11054 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011055 *)
11056 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11057 # out any dynamic loading
11058 if test "$ac_cv_func_dlopen" = yes
11059 then DYNLOADFILE="dynload_shlib.o"
11060 else DYNLOADFILE="dynload_stub.o"
11061 fi
11062 ;;
11063 esac
11064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11066$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011067if test "$DYNLOADFILE" != "dynload_stub.o"
11068then
Martin v. Löwis11437992002-04-12 09:54:03 +000011069
Matthias Kloseb9621712010-04-24 17:59:49 +000011070$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011071
11072fi
11073
Neil Schemenauer4e425612001-06-19 15:44:15 +000011074# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11075
Michael W. Hudson54241132001-12-07 15:38:26 +000011076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11078$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011079if test -z "$MACHDEP_OBJS"
11080then
Jack Jansene578a632001-08-15 01:27:14 +000011081 MACHDEP_OBJS=$extra_machdep_objs
11082else
11083 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011084fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011085if test -z "$MACHDEP_OBJS"; then
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11087$as_echo "none" >&6; }
11088else
11089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11090$as_echo "$MACHDEP_OBJS" >&6; }
11091fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011092
Guido van Rossum627b2d71993-12-24 10:39:16 +000011093# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011094for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011095 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011096 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011097 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011098 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011099 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011100 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011101 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11102 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011103 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011104 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011105 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011106 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011107 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011108 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011109 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11110 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011111 sigaction sigaltstack siginterrupt sigpending sigrelse \
11112 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011113 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011114 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011115 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011116do :
11117 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11118ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011119if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011121#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011122_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011123
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011124fi
11125done
11126
Michael W. Hudson54241132001-12-07 15:38:26 +000011127
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011128ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11129 #include <dirent.h>
11130"
11131if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11132
11133$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11134
11135fi
11136
11137
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011138# For some functions, having a definition is not sufficient, since
11139# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11141$as_echo_n "checking for chroot... " >&6; }
11142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011143/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011144#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011145int
11146main ()
11147{
11148void *x=chroot
11149 ;
11150 return 0;
11151}
11152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011154
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011156
Matthias Kloseb159a552010-04-25 21:00:44 +000011157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011158$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011159else
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11161$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011162
11163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11166$as_echo_n "checking for link... " >&6; }
11167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011169#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011170int
11171main ()
11172{
11173void *x=link
11174 ;
11175 return 0;
11176}
11177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011179
Matthias Kloseb9621712010-04-24 17:59:49 +000011180$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011181
Matthias Kloseb159a552010-04-25 21:00:44 +000011182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011183$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011184else
Matthias Kloseb9621712010-04-24 17:59:49 +000011185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11186$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011187
11188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11191$as_echo_n "checking for symlink... " >&6; }
11192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011193/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011194#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011195int
11196main ()
11197{
11198void *x=symlink
11199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011206
Matthias Kloseb159a552010-04-25 21:00:44 +000011207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011208$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011209else
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011212
11213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11216$as_echo_n "checking for fchdir... " >&6; }
11217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011218/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011219#include <unistd.h>
11220int
11221main ()
11222{
11223void *x=fchdir
11224 ;
11225 return 0;
11226}
11227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011228if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011231
Matthias Kloseb159a552010-04-25 21:00:44 +000011232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011233$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011234else
Matthias Kloseb9621712010-04-24 17:59:49 +000011235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11236$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011237
11238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11241$as_echo_n "checking for fsync... " >&6; }
11242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011243/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011244#include <unistd.h>
11245int
11246main ()
11247{
11248void *x=fsync
11249 ;
11250 return 0;
11251}
11252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011253if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011256
Matthias Kloseb159a552010-04-25 21:00:44 +000011257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011258$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011259else
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011262
11263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11266$as_echo_n "checking for fdatasync... " >&6; }
11267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011268/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011269#include <unistd.h>
11270int
11271main ()
11272{
11273void *x=fdatasync
11274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011281
Matthias Kloseb159a552010-04-25 21:00:44 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011284else
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011287
11288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11291$as_echo_n "checking for epoll... " >&6; }
11292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011293/* end confdefs.h. */
11294#include <sys/epoll.h>
11295int
11296main ()
11297{
11298void *x=epoll_create
11299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011306
Matthias Kloseb159a552010-04-25 21:00:44 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011309else
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11311$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011312
11313fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11316$as_echo_n "checking for epoll_create1... " >&6; }
11317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11318/* end confdefs.h. */
11319#include <sys/epoll.h>
11320int
11321main ()
11322{
11323void *x=epoll_create1
11324 ;
11325 return 0;
11326}
11327_ACEOF
11328if ac_fn_c_try_compile "$LINENO"; then :
11329
11330$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11331
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11333$as_echo "yes" >&6; }
11334else
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
11337
11338fi
11339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11341$as_echo_n "checking for kqueue... " >&6; }
11342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011343/* end confdefs.h. */
11344
11345#include <sys/types.h>
11346#include <sys/event.h>
11347
11348int
11349main ()
11350{
11351int x=kqueue()
11352 ;
11353 return 0;
11354}
11355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011356if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011359
Matthias Kloseb159a552010-04-25 21:00:44 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011362else
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011365
11366fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11369$as_echo_n "checking for prlimit... " >&6; }
11370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11371/* end confdefs.h. */
11372
11373#include <sys/time.h>
11374#include <sys/resource.h>
11375
11376int
11377main ()
11378{
11379void *x=prlimit
11380 ;
11381 return 0;
11382}
11383_ACEOF
11384if ac_fn_c_try_compile "$LINENO"; then :
11385
11386$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11387
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11389$as_echo "yes" >&6; }
11390else
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
11393
11394fi
11395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11396
Martin v. Löwisd5843682002-11-21 20:41:28 +000011397# On some systems (eg. FreeBSD 5), we would find a definition of the
11398# functions ctermid_r, setgroups in the library, but no prototype
11399# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11400# address to avoid compiler warnings and potential miscompilations
11401# because of the missing prototypes.
11402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11404$as_echo_n "checking for ctermid_r... " >&6; }
11405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011406/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011407
Martin v. Löwisd5843682002-11-21 20:41:28 +000011408#include <stdio.h>
11409
Martin v. Löwisd5843682002-11-21 20:41:28 +000011410int
11411main ()
11412{
11413void* p = ctermid_r
11414 ;
11415 return 0;
11416}
11417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011421
Matthias Kloseb159a552010-04-25 21:00:44 +000011422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011423$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011424else
Matthias Kloseb9621712010-04-24 17:59:49 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11426$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011427
11428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11430
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11432$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011433if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011434 $as_echo_n "(cached) " >&6
11435else
11436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011437/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011438#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011439int
11440main ()
11441{
11442void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011443
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011444 ;
11445 return 0;
11446}
11447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011448if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011449 ac_cv_flock_decl=yes
11450else
11451 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011452
11453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011455
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011456fi
11457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11458$as_echo "$ac_cv_flock_decl" >&6; }
11459if test "x${ac_cv_flock_decl}" = xyes; then
11460 for ac_func in flock
11461do :
11462 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011463if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011464 cat >>confdefs.h <<_ACEOF
11465#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011466_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011467
Antoine Pitroua3000072010-09-07 14:52:42 +000011468else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011470$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011471if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011472 $as_echo_n "(cached) " >&6
11473else
11474 ac_check_lib_save_LIBS=$LIBS
11475LIBS="-lbsd $LIBS"
11476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477/* end confdefs.h. */
11478
11479/* 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. */
11482#ifdef __cplusplus
11483extern "C"
11484#endif
11485char flock ();
11486int
11487main ()
11488{
11489return flock ();
11490 ;
11491 return 0;
11492}
11493_ACEOF
11494if ac_fn_c_try_link "$LINENO"; then :
11495 ac_cv_lib_bsd_flock=yes
11496else
11497 ac_cv_lib_bsd_flock=no
11498fi
11499rm -f core conftest.err conftest.$ac_objext \
11500 conftest$ac_exeext conftest.$ac_ext
11501LIBS=$ac_check_lib_save_LIBS
11502fi
11503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11504$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011505if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011506 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011507
11508
11509$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11510
11511
11512fi
11513
11514
11515fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011516done
11517
Antoine Pitroua3000072010-09-07 14:52:42 +000011518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11521$as_echo_n "checking for getpagesize... " >&6; }
11522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011523/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011524
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011525#include <unistd.h>
11526
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011527int
11528main ()
11529{
11530void* p = getpagesize
11531 ;
11532 return 0;
11533}
11534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011536
Matthias Kloseb9621712010-04-24 17:59:49 +000011537$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011538
Matthias Kloseb159a552010-04-25 21:00:44 +000011539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011540$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011541else
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11543$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011544
11545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011547
Victor Stinner984890f2011-11-24 13:53:38 +010011548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11549$as_echo_n "checking for broken unsetenv... " >&6; }
11550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11551/* end confdefs.h. */
11552
11553#include <stdlib.h>
11554
11555int
11556main ()
11557{
11558int res = unsetenv("DUMMY")
11559 ;
11560 return 0;
11561}
11562_ACEOF
11563if ac_fn_c_try_compile "$LINENO"; then :
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11565$as_echo "no" >&6; }
11566else
11567
11568$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11569
11570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11571$as_echo "yes" >&6; }
11572
11573fi
11574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11575
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011576for ac_prog in true
11577do
11578 # Extract the first word of "$ac_prog", so it can be a program name with args.
11579set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11581$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011582if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011584else
11585 if test -n "$TRUE"; then
11586 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11587else
11588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11589for as_dir in $PATH
11590do
11591 IFS=$as_save_IFS
11592 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011593 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011595 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 $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 +000011597 break 2
11598 fi
11599done
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011602
11603fi
11604fi
11605TRUE=$ac_cv_prog_TRUE
11606if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11608$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011612fi
11613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011614
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011615 test -n "$TRUE" && break
11616done
11617test -n "$TRUE" || TRUE="/bin/true"
11618
11619
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11621$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011624else
11625 ac_check_lib_save_LIBS=$LIBS
11626LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011628/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630/* Override any GCC internal prototype to avoid an error.
11631 Use char because int might match the return type of a GCC
11632 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011633#ifdef __cplusplus
11634extern "C"
11635#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011636char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011637int
11638main ()
11639{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011641 ;
11642 return 0;
11643}
11644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011645if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011646 ac_cv_lib_c_inet_aton=yes
11647else
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011650rm -f core conftest.err conftest.$ac_objext \
11651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011652LIBS=$ac_check_lib_save_LIBS
11653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11655$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011656if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011657 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011658else
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11660$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011661if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011663else
11664 ac_check_lib_save_LIBS=$LIBS
11665LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011667/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011669/* Override any GCC internal prototype to avoid an error.
11670 Use char because int might match the return type of a GCC
11671 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011672#ifdef __cplusplus
11673extern "C"
11674#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011675char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011676int
11677main ()
11678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011680 ;
11681 return 0;
11682}
11683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011685 ac_cv_lib_resolv_inet_aton=yes
11686else
Matthias Kloseb9621712010-04-24 17:59:49 +000011687 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011689rm -f core conftest.err conftest.$ac_objext \
11690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011691LIBS=$ac_check_lib_save_LIBS
11692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11694$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011695if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011696 cat >>confdefs.h <<_ACEOF
11697#define HAVE_LIBRESOLV 1
11698_ACEOF
11699
11700 LIBS="-lresolv $LIBS"
11701
11702fi
11703
11704
11705fi
11706
11707
Christian Heimesd0764e22007-12-04 15:00:33 +000011708# On Tru64, chflags seems to be present, but calling it will
11709# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11711$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011712if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011714else
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011716 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011717else
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011719/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011720
Christian Heimesd0764e22007-12-04 15:00:33 +000011721#include <sys/stat.h>
11722#include <unistd.h>
11723int main(int argc, char*argv[])
11724{
11725 if(chflags(argv[0], 0) != 0)
11726 return 1;
11727 return 0;
11728}
Ned Deily3eb67d52011-06-28 00:00:28 -070011729
Christian Heimesd0764e22007-12-04 15:00:33 +000011730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011732 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011733else
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011738fi
11739
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011740
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11743$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011744if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011746if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011747 ac_cv_have_chflags="yes"
11748else
11749 ac_cv_have_chflags="no"
11750fi
11751
11752fi
11753if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011754
Matthias Kloseb9621712010-04-24 17:59:49 +000011755$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011756
11757fi
11758
Matthias Kloseb9621712010-04-24 17:59:49 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11760$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011761if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011765 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011766else
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011768/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011769
Christian Heimesd0764e22007-12-04 15:00:33 +000011770#include <sys/stat.h>
11771#include <unistd.h>
11772int main(int argc, char*argv[])
11773{
11774 if(lchflags(argv[0], 0) != 0)
11775 return 1;
11776 return 0;
11777}
Ned Deily3eb67d52011-06-28 00:00:28 -070011778
Christian Heimesd0764e22007-12-04 15:00:33 +000011779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011781 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011787fi
11788
11789
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11792$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011793if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011795if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011796 ac_cv_have_lchflags="yes"
11797else
11798 ac_cv_have_lchflags="no"
11799fi
11800
11801fi
11802if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011803
Matthias Kloseb9621712010-04-24 17:59:49 +000011804$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011805
11806fi
11807
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011808case $ac_sys_system/$ac_sys_release in
11809Darwin/*)
11810 _CUR_CFLAGS="${CFLAGS}"
11811 _CUR_LDFLAGS="${LDFLAGS}"
11812 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11813 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11814 ;;
11815esac
11816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11818$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011819if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011821else
11822 ac_check_lib_save_LIBS=$LIBS
11823LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011825/* end confdefs.h. */
11826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011827/* Override any GCC internal prototype to avoid an error.
11828 Use char because int might match the return type of a GCC
11829 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011830#ifdef __cplusplus
11831extern "C"
11832#endif
11833char inflateCopy ();
11834int
11835main ()
11836{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011838 ;
11839 return 0;
11840}
11841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011842if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011843 ac_cv_lib_z_inflateCopy=yes
11844else
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011847rm -f core conftest.err conftest.$ac_objext \
11848 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011849LIBS=$ac_check_lib_save_LIBS
11850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11852$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011853if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011856
11857fi
11858
11859
11860case $ac_sys_system/$ac_sys_release in
11861Darwin/*)
11862 CFLAGS="${_CUR_CFLAGS}"
11863 LDFLAGS="${_CUR_LDFLAGS}"
11864 ;;
11865esac
11866
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11868$as_echo_n "checking for hstrerror... " >&6; }
11869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011870/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011871
Martin v. Löwise9416172003-05-03 10:12:45 +000011872#include <netdb.h>
11873
Martin v. Löwise9416172003-05-03 10:12:45 +000011874int
11875main ()
11876{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011877void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011878 ;
11879 return 0;
11880}
11881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011885
Matthias Kloseb159a552010-04-25 21:00:44 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011887$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11890$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011891
11892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011893rm -f core conftest.err conftest.$ac_objext \
11894 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011895
Matthias Kloseb9621712010-04-24 17:59:49 +000011896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11897$as_echo_n "checking for inet_aton... " >&6; }
11898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011899/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011900
Martin v. Löwis86d66262006-02-17 08:40:11 +000011901#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011902#include <sys/socket.h>
11903#include <netinet/in.h>
11904#include <arpa/inet.h>
11905
Martin v. Löwise9416172003-05-03 10:12:45 +000011906int
11907main ()
11908{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011909void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011910 ;
11911 return 0;
11912}
11913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011915
Matthias Kloseb9621712010-04-24 17:59:49 +000011916$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011917
Matthias Kloseb159a552010-04-25 21:00:44 +000011918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011919$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011920else
Matthias Kloseb9621712010-04-24 17:59:49 +000011921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11922$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011923
11924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011925rm -f core conftest.err conftest.$ac_objext \
11926 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11929$as_echo_n "checking for inet_pton... " >&6; }
11930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011931/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011932
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011933#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011934#include <sys/socket.h>
11935#include <netinet/in.h>
11936#include <arpa/inet.h>
11937
Martin v. Löwise9416172003-05-03 10:12:45 +000011938int
11939main ()
11940{
11941void* p = inet_pton
11942 ;
11943 return 0;
11944}
11945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011946if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011947
Matthias Kloseb9621712010-04-24 17:59:49 +000011948$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011949
Matthias Kloseb159a552010-04-25 21:00:44 +000011950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011951$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011952else
Matthias Kloseb9621712010-04-24 17:59:49 +000011953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11954$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011955
11956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011958
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011959# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11961$as_echo_n "checking for setgroups... " >&6; }
11962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011963/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011964
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011965#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011966#ifdef HAVE_GRP_H
11967#include <grp.h>
11968#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011969
Martin v. Löwisd5843682002-11-21 20:41:28 +000011970int
11971main ()
11972{
11973void* p = setgroups
11974 ;
11975 return 0;
11976}
11977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011981
Matthias Kloseb159a552010-04-25 21:00:44 +000011982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011983$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011984else
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11986$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011987
11988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011990
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011991# check for openpty and forkpty
11992
11993for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011994do :
11995 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011996if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011997 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011998#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011999_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012001else
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12003$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012004if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012006else
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012008LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012012/* Override any GCC internal prototype to avoid an error.
12013 Use char because int might match the return type of a GCC
12014 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012015#ifdef __cplusplus
12016extern "C"
12017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012018char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012019int
12020main ()
12021{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012022return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012023 ;
12024 return 0;
12025}
12026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012027if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012028 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012029else
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012032rm -f core conftest.err conftest.$ac_objext \
12033 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012034LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12037$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012038if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012040 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12043$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012044if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012046else
12047 ac_check_lib_save_LIBS=$LIBS
12048LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012050/* end confdefs.h. */
12051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052/* Override any GCC internal prototype to avoid an error.
12053 Use char because int might match the return type of a GCC
12054 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012055#ifdef __cplusplus
12056extern "C"
12057#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012058char openpty ();
12059int
12060main ()
12061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012063 ;
12064 return 0;
12065}
12066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012068 ac_cv_lib_bsd_openpty=yes
12069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012072rm -f core conftest.err conftest.$ac_objext \
12073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012074LIBS=$ac_check_lib_save_LIBS
12075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12077$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012078if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012080 LIBS="$LIBS -lbsd"
12081fi
12082
12083
12084fi
12085
Fred Drake8cef4cf2000-06-28 16:40:38 +000012086
12087fi
12088done
12089
12090for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012091do :
12092 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012093if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012094 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012095#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012096_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012097
Fred Drake8cef4cf2000-06-28 16:40:38 +000012098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12100$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012101if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012103else
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012105LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109/* Override any GCC internal prototype to avoid an error.
12110 Use char because int might match the return type of a GCC
12111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012112#ifdef __cplusplus
12113extern "C"
12114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012115char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012116int
12117main ()
12118{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012119return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 ;
12121 return 0;
12122}
12123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012126else
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012129rm -f core conftest.err conftest.$ac_objext \
12130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012131LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12134$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012135if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012137 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012138else
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12140$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012141if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012143else
12144 ac_check_lib_save_LIBS=$LIBS
12145LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012147/* end confdefs.h. */
12148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012149/* Override any GCC internal prototype to avoid an error.
12150 Use char because int might match the return type of a GCC
12151 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012152#ifdef __cplusplus
12153extern "C"
12154#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012155char forkpty ();
12156int
12157main ()
12158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012160 ;
12161 return 0;
12162}
12163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012164if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012165 ac_cv_lib_bsd_forkpty=yes
12166else
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012169rm -f core conftest.err conftest.$ac_objext \
12170 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012171LIBS=$ac_check_lib_save_LIBS
12172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12174$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012175if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012177 LIBS="$LIBS -lbsd"
12178fi
12179
12180
12181fi
12182
Fred Drake8cef4cf2000-06-28 16:40:38 +000012183
12184fi
12185done
12186
Jack Jansendd19cf82001-12-06 22:36:17 +000012187
Christian Heimesb186d002008-03-18 15:15:01 +000012188# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012189for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012190do :
12191 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012193 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012194#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012195_ACEOF
12196
12197fi
12198done
12199
12200
Michael W. Hudson54241132001-12-07 15:38:26 +000012201# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012202for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012203do :
12204 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12205ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012206if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012208#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012209_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012210
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012211fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012212done
12213
Michael W. Hudson54241132001-12-07 15:38:26 +000012214
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012215ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012216if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012217 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012218
Martin v. Löwis1142de32002-03-29 16:28:31 +000012219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012221 *" dup2.$ac_objext "* ) ;;
12222 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012224esac
12225
Martin v. Löwis1142de32002-03-29 16:28:31 +000012226fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012227
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012228ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012229if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012230 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12231
12232else
12233 case " $LIBOBJS " in
12234 *" strdup.$ac_objext "* ) ;;
12235 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12236 ;;
12237esac
12238
12239fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012240
12241
12242for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012243do :
12244 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012245if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012246 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012247#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012250/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012251#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012252int
12253main ()
12254{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012255getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 ;
12257 return 0;
12258}
12259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
Matthias Kloseb9621712010-04-24 17:59:49 +000012262$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012263
Guido van Rossum627b2d71993-12-24 10:39:16 +000012264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012266
Guido van Rossum627b2d71993-12-24 10:39:16 +000012267fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012268done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012269
Jack Jansen150753c2003-03-29 22:07:47 +000012270for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012271do :
12272 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012273if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012274 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012275#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012278/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012279#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012280int
12281main ()
12282{
12283setpgrp(0,0);
12284 ;
12285 return 0;
12286}
12287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012289
Matthias Kloseb9621712010-04-24 17:59:49 +000012290$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012291
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012294
12295fi
12296done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012297
Thomas Wouters3a584202000-08-05 23:28:51 +000012298for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012299do :
12300 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012301if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012303#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012306/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012307#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012308int
12309main ()
12310{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012311gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 ;
12313 return 0;
12314}
12315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012316if ac_fn_c_try_compile "$LINENO"; then :
12317
Guido van Rossum627b2d71993-12-24 10:39:16 +000012318else
Skip Montanaro6dead952003-09-25 14:50:04 +000012319
Matthias Kloseb9621712010-04-24 17:59:49 +000012320$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012321
Martin v. Löwis11437992002-04-12 09:54:03 +000012322
Guido van Rossum627b2d71993-12-24 10:39:16 +000012323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012325
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012326fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012327done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012328
Michael W. Hudson54241132001-12-07 15:38:26 +000012329
Victor Stinnere0be4232011-10-25 13:06:09 +020012330for ac_func in clock_gettime
12331do :
12332 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12333if test "x$ac_cv_func_clock_gettime" = xyes; then :
12334 cat >>confdefs.h <<_ACEOF
12335#define HAVE_CLOCK_GETTIME 1
12336_ACEOF
12337
12338else
12339
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12341$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12342if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12343 $as_echo_n "(cached) " >&6
12344else
12345 ac_check_lib_save_LIBS=$LIBS
12346LIBS="-lrt $LIBS"
12347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12348/* end confdefs.h. */
12349
12350/* Override any GCC internal prototype to avoid an error.
12351 Use char because int might match the return type of a GCC
12352 builtin and then its argument prototype would still apply. */
12353#ifdef __cplusplus
12354extern "C"
12355#endif
12356char clock_gettime ();
12357int
12358main ()
12359{
12360return clock_gettime ();
12361 ;
12362 return 0;
12363}
12364_ACEOF
12365if ac_fn_c_try_link "$LINENO"; then :
12366 ac_cv_lib_rt_clock_gettime=yes
12367else
12368 ac_cv_lib_rt_clock_gettime=no
12369fi
12370rm -f core conftest.err conftest.$ac_objext \
12371 conftest$ac_exeext conftest.$ac_ext
12372LIBS=$ac_check_lib_save_LIBS
12373fi
12374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12375$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12376if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12377
Victor Stinner7efb8332014-08-29 15:41:08 +020012378 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012379 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12380
12381
12382$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12383
12384
12385fi
12386
12387
12388fi
12389done
12390
12391
12392for ac_func in clock_getres
12393do :
12394 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12395if test "x$ac_cv_func_clock_getres" = xyes; then :
12396 cat >>confdefs.h <<_ACEOF
12397#define HAVE_CLOCK_GETRES 1
12398_ACEOF
12399
12400else
12401
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12403$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12404if ${ac_cv_lib_rt_clock_getres+:} false; then :
12405 $as_echo_n "(cached) " >&6
12406else
12407 ac_check_lib_save_LIBS=$LIBS
12408LIBS="-lrt $LIBS"
12409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12410/* end confdefs.h. */
12411
12412/* Override any GCC internal prototype to avoid an error.
12413 Use char because int might match the return type of a GCC
12414 builtin and then its argument prototype would still apply. */
12415#ifdef __cplusplus
12416extern "C"
12417#endif
12418char clock_getres ();
12419int
12420main ()
12421{
12422return clock_getres ();
12423 ;
12424 return 0;
12425}
12426_ACEOF
12427if ac_fn_c_try_link "$LINENO"; then :
12428 ac_cv_lib_rt_clock_getres=yes
12429else
12430 ac_cv_lib_rt_clock_getres=no
12431fi
12432rm -f core conftest.err conftest.$ac_objext \
12433 conftest$ac_exeext conftest.$ac_ext
12434LIBS=$ac_check_lib_save_LIBS
12435fi
12436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12437$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12438if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12439
12440 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12441
12442
12443fi
12444
12445
12446fi
12447done
12448
12449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12451$as_echo_n "checking for major... " >&6; }
12452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012453/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012454
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012455#if defined(MAJOR_IN_MKDEV)
12456#include <sys/mkdev.h>
12457#elif defined(MAJOR_IN_SYSMACROS)
12458#include <sys/sysmacros.h>
12459#else
12460#include <sys/types.h>
12461#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012462
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012463int
12464main ()
12465{
12466
12467 makedev(major(0),minor(0));
12468
12469 ;
12470 return 0;
12471}
12472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012473if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012474
12475
Matthias Kloseb9621712010-04-24 17:59:49 +000012476$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012477
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12479$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012480
12481else
Skip Montanaro6dead952003-09-25 14:50:04 +000012482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12484$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012485
12486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012487rm -f core conftest.err conftest.$ac_objext \
12488 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012489
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012490# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012491# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12493$as_echo_n "checking for getaddrinfo... " >&6; }
12494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012495/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012496
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012497#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012498#include <sys/socket.h>
12499#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012500#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012501
Martin v. Löwis11437992002-04-12 09:54:03 +000012502int
12503main ()
12504{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012505getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 ;
12507 return 0;
12508}
12509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012510if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012511 have_getaddrinfo=yes
12512else
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012515rm -f core conftest.err conftest.$ac_objext \
12516 conftest$ac_exeext conftest.$ac_ext
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12518$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012519if test $have_getaddrinfo = yes
12520then
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12522$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012523 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012525else
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012527
12528if test "${enable_ipv6+set}" = set; then
12529 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12530else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012531 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012532fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012535/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012536
Stefan Krah19c21392012-11-22 23:47:32 +010012537#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012538#include <sys/types.h>
12539#include <netdb.h>
12540#include <string.h>
12541#include <sys/socket.h>
12542#include <netinet/in.h>
12543
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012544int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012545{
12546 int passive, gaierr, inet4 = 0, inet6 = 0;
12547 struct addrinfo hints, *ai, *aitop;
12548 char straddr[INET6_ADDRSTRLEN], strport[16];
12549
12550 for (passive = 0; passive <= 1; passive++) {
12551 memset(&hints, 0, sizeof(hints));
12552 hints.ai_family = AF_UNSPEC;
12553 hints.ai_flags = passive ? AI_PASSIVE : 0;
12554 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012555 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012556 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12557 (void)gai_strerror(gaierr);
12558 goto bad;
12559 }
12560 for (ai = aitop; ai; ai = ai->ai_next) {
12561 if (ai->ai_addr == NULL ||
12562 ai->ai_addrlen == 0 ||
12563 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12564 straddr, sizeof(straddr), strport, sizeof(strport),
12565 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12566 goto bad;
12567 }
12568 switch (ai->ai_family) {
12569 case AF_INET:
12570 if (strcmp(strport, "54321") != 0) {
12571 goto bad;
12572 }
12573 if (passive) {
12574 if (strcmp(straddr, "0.0.0.0") != 0) {
12575 goto bad;
12576 }
12577 } else {
12578 if (strcmp(straddr, "127.0.0.1") != 0) {
12579 goto bad;
12580 }
12581 }
12582 inet4++;
12583 break;
12584 case AF_INET6:
12585 if (strcmp(strport, "54321") != 0) {
12586 goto bad;
12587 }
12588 if (passive) {
12589 if (strcmp(straddr, "::") != 0) {
12590 goto bad;
12591 }
12592 } else {
12593 if (strcmp(straddr, "::1") != 0) {
12594 goto bad;
12595 }
12596 }
12597 inet6++;
12598 break;
12599 case AF_UNSPEC:
12600 goto bad;
12601 break;
12602 default:
12603 /* another family support? */
12604 break;
12605 }
12606 }
12607 }
12608
12609 if (!(inet4 == 0 || inet4 == 2))
12610 goto bad;
12611 if (!(inet6 == 0 || inet6 == 2))
12612 goto bad;
12613
12614 if (aitop)
12615 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012616 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012617
12618 bad:
12619 if (aitop)
12620 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012621 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012622}
12623
Martin v. Löwis11437992002-04-12 09:54:03 +000012624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012625if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012626 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012627else
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012634fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012635
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12639$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12640
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012641if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012642then
12643 if test $ipv6 = yes
12644 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012645 echo 'Fatal: You must get working getaddrinfo() function.'
12646 echo ' or you can specify "--disable-ipv6"'.
12647 exit 1
12648 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012649else
Martin v. Löwis11437992002-04-12 09:54:03 +000012650
Matthias Kloseb9621712010-04-24 17:59:49 +000012651$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012652
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012653fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012654
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012655for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012656do :
12657 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012658if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012659 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012660#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012661_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012662
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012663fi
12664done
12665
Michael W. Hudson54241132001-12-07 15:38:26 +000012666
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12669$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012670if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672else
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012674/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012675#include <sys/types.h>
12676#include <sys/time.h>
12677#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679int
12680main ()
12681{
12682if ((struct tm *) 0)
12683return 0;
12684 ;
12685 return 0;
12686}
12687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012688if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012689 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012690else
Matthias Kloseb9621712010-04-24 17:59:49 +000012691 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12696$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012697if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012700
12701fi
12702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12704$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012705if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012707else
Matthias Kloseb9621712010-04-24 17:59:49 +000012708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012709/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012710#include <sys/types.h>
12711#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012712
Martin v. Löwis11437992002-04-12 09:54:03 +000012713int
12714main ()
12715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716struct tm tm;
12717 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 ;
12720 return 0;
12721}
12722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012723if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012724 ac_cv_struct_tm=time.h
12725else
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12731$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012732if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012733
Matthias Kloseb9621712010-04-24 17:59:49 +000012734$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012735
12736fi
12737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738ac_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 +000012739#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741"
Victor Stinnere0be4232011-10-25 13:06:09 +020012742if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012743
12744cat >>confdefs.h <<_ACEOF
12745#define HAVE_STRUCT_TM_TM_ZONE 1
12746_ACEOF
12747
12748
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012749fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012750
Martin v. Löwis11437992002-04-12 09:54:03 +000012751if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12752
Matthias Kloseb9621712010-04-24 17:59:49 +000012753$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012754
12755else
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12757"
Victor Stinnere0be4232011-10-25 13:06:09 +020012758if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012760else
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762fi
12763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012764cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012765#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766_ACEOF
12767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12769$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012770if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772else
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012775#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776#if !HAVE_DECL_TZNAME
12777extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012779
Martin v. Löwis11437992002-04-12 09:54:03 +000012780int
12781main ()
12782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012783return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ;
12785 return 0;
12786}
12787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012788if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789 ac_cv_var_tzname=yes
12790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012793rm -f core conftest.err conftest.$ac_objext \
12794 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12797$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012798 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012801
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012802 fi
12803fi
12804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805ac_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 +020012806if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012807
12808cat >>confdefs.h <<_ACEOF
12809#define HAVE_STRUCT_STAT_ST_RDEV 1
12810_ACEOF
12811
12812
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012813fi
12814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815ac_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 +020012816if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012817
Martin v. Löwis11437992002-04-12 09:54:03 +000012818cat >>confdefs.h <<_ACEOF
12819#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12820_ACEOF
12821
12822
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012823fi
12824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825ac_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 +020012826if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012827
12828cat >>confdefs.h <<_ACEOF
12829#define HAVE_STRUCT_STAT_ST_FLAGS 1
12830_ACEOF
12831
12832
12833fi
12834
Matthias Kloseb9621712010-04-24 17:59:49 +000012835ac_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 +020012836if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012837
12838cat >>confdefs.h <<_ACEOF
12839#define HAVE_STRUCT_STAT_ST_GEN 1
12840_ACEOF
12841
12842
12843fi
12844
Matthias Kloseb9621712010-04-24 17:59:49 +000012845ac_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 +020012846if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012847
12848cat >>confdefs.h <<_ACEOF
12849#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12850_ACEOF
12851
12852
12853fi
12854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855ac_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 +020012856if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012857
Martin v. Löwis11437992002-04-12 09:54:03 +000012858cat >>confdefs.h <<_ACEOF
12859#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12860_ACEOF
12861
12862
Matthias Kloseb9621712010-04-24 17:59:49 +000012863$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012864
12865else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012867 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12869 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012870esac
12871
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012872fi
12873
Michael W. Hudson54241132001-12-07 15:38:26 +000012874
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12877$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012878if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012880else
Matthias Kloseb159a552010-04-25 21:00:44 +000012881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012883/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012884#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012885int
12886main ()
12887{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012888return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 ;
12890 return 0;
12891}
12892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012893if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894 ac_cv_header_time_altzone=yes
12895else
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900fi
12901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12903$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012904if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012907
12908fi
12909
Guido van Rossumda88dad1995-01-26 00:46:29 +000012910was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12912$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012914/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012915
12916#include <sys/types.h>
12917#include <sys/select.h>
12918#include <sys/time.h>
12919
Martin v. Löwis11437992002-04-12 09:54:03 +000012920int
12921main ()
12922{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923;
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ;
12925 return 0;
12926}
12927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012929
12930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012933 was_it_defined=yes
12934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12938$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939
Matthias Kloseb9621712010-04-24 17:59:49 +000012940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12941$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012942if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012944else
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012946/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012947#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012948int
12949main ()
12950{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012951struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 ;
12953 return 0;
12954}
12955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012957 ac_cv_struct_addrinfo=yes
12958else
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12962fi
12963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12965$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012966if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012969
12970fi
12971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12973$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012974if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012976else
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012978/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012979
12980# include <sys/types.h>
12981# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012982int
12983main ()
12984{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012985struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 ;
12987 return 0;
12988}
12989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012990if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012991 ac_cv_struct_sockaddr_storage=yes
12992else
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12996fi
12997
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12999$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013000if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013003
13004fi
13005
Guido van Rossum627b2d71993-12-24 10:39:16 +000013006# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13009$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013010if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013015$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013016int
13017main ()
13018{
13019static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013020test_array [0] = 0;
13021return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013022
13023 ;
13024 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013025}
Martin v. Löwis11437992002-04-12 09:54:03 +000013026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013027if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013028 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013029else
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13035$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013036if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013038
13039fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13042$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013043if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013045else
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013047/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048
Martin v. Löwis11437992002-04-12 09:54:03 +000013049int
13050main ()
13051{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013052
Martin v. Löwis11437992002-04-12 09:54:03 +000013053#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013054 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013055 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013056 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058 char const *const *pcpcc;
13059 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 /* NEC SVR4.0.2 mips cc rejects this. */
13061 struct point {int x, y;};
13062 static struct point const zero = {0,0};
13063 /* AIX XL C 1.02.0.0 rejects this.
13064 It does not let you subtract one const X* pointer from another in
13065 an arm of an if-expression whose if-part is not a constant
13066 expression */
13067 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070 ++pcpcc;
13071 ppc = (char**) pcpcc;
13072 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013073 { /* SCO 3.2v4 cc rejects this sort of thing. */
13074 char tx;
13075 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013077
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 }
13081 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13082 int x[] = {25, 17};
13083 const int *foo = &x[0];
13084 ++foo;
13085 }
13086 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13087 typedef const int *iptr;
13088 iptr p = 0;
13089 ++p;
13090 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013091 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013092 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013093 struct s { int j; const int *ap[3]; } bx;
13094 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013095 }
13096 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13097 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013098 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013099 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013100 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013101#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013102
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 ;
13104 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013105}
Martin v. Löwis11437992002-04-12 09:54:03 +000013106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013107if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108 ac_cv_c_const=yes
13109else
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13115$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013116if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119
13120fi
13121
Michael W. Hudson54241132001-12-07 15:38:26 +000013122
Guido van Rossumda88dad1995-01-26 00:46:29 +000013123works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13125$as_echo_n "checking for working volatile... " >&6; }
13126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013127/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013128
Martin v. Löwis11437992002-04-12 09:54:03 +000013129int
13130main ()
13131{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013132volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013133 ;
13134 return 0;
13135}
13136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013137if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013138 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013139else
Skip Montanaro6dead952003-09-25 14:50:04 +000013140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013142
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013143
Guido van Rossum627b2d71993-12-24 10:39:16 +000013144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13147$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013148
Guido van Rossumda88dad1995-01-26 00:46:29 +000013149works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13151$as_echo_n "checking for working signed char... " >&6; }
13152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013153/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013154
Martin v. Löwis11437992002-04-12 09:54:03 +000013155int
13156main ()
13157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013158signed char c;
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 :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013164 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013165else
Skip Montanaro6dead952003-09-25 14:50:04 +000013166
Matthias Kloseb9621712010-04-24 17:59:49 +000013167$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013168
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013169
Guido van Rossum7f43da71994-08-01 12:15:30 +000013170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13173$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013174
Guido van Rossumda88dad1995-01-26 00:46:29 +000013175have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13177$as_echo_n "checking for prototypes... " >&6; }
13178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013179/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013180int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013181int
13182main ()
13183{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013184return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 ;
13186 return 0;
13187}
13188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013189if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013192
Matthias Kloseb159a552010-04-25 21:00:44 +000013193 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13197$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013198
Guido van Rossumda88dad1995-01-26 00:46:29 +000013199works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13201$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013203/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013204
13205#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013206int foo(int x, ...) {
13207 va_list va;
13208 va_start(va, x);
13209 va_arg(va, int);
13210 va_arg(va, char *);
13211 va_arg(va, double);
13212 return 0;
13213}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013214
Martin v. Löwis11437992002-04-12 09:54:03 +000013215int
13216main ()
13217{
Guido van Rossum90eea071996-08-30 20:58:57 +000013218return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 ;
13220 return 0;
13221}
13222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013224
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013227
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013228 works=yes
13229
Guido van Rossum627b2d71993-12-24 10:39:16 +000013230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13233$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013234
Martin v. Löwisd6320502004-08-12 13:45:08 +000013235# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13237$as_echo_n "checking for socketpair... " >&6; }
13238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013239/* end confdefs.h. */
13240
13241#include <sys/types.h>
13242#include <sys/socket.h>
13243
13244int
13245main ()
13246{
13247void *x=socketpair
13248 ;
13249 return 0;
13250}
13251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013252if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013255
Matthias Kloseb159a552010-04-25 21:00:44 +000013256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013257$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13260$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013261
13262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013264
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013265# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13267$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013269/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013270#include <sys/types.h>
13271#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013272int
13273main ()
13274{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275struct sockaddr x;
13276x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 ;
13278 return 0;
13279}
13280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013281if ac_fn_c_try_compile "$LINENO"; then :
13282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13283$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013286
13287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13289$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013290
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013293
Guido van Rossumda88dad1995-01-26 00:46:29 +000013294va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13296$as_echo_n "checking whether va_list is an array... " >&6; }
13297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013298/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299
13300#ifdef HAVE_STDARG_PROTOTYPES
13301#include <stdarg.h>
13302#else
13303#include <varargs.h>
13304#endif
13305
Martin v. Löwis11437992002-04-12 09:54:03 +000013306int
13307main ()
13308{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013309va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 ;
13311 return 0;
13312}
13313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013314if ac_fn_c_try_compile "$LINENO"; then :
13315
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316else
Skip Montanaro6dead952003-09-25 14:50:04 +000013317
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Guido van Rossumda88dad1995-01-26 00:46:29 +000013321 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013322
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13326$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013328# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013329
13330
Matthias Kloseb9621712010-04-24 17:59:49 +000013331ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013332if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13337$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013338 OLD_CFLAGS=$CFLAGS
13339 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013341/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013342
13343# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
Martin v. Löwis11437992002-04-12 09:54:03 +000013345int
13346main ()
13347{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013348
13349 char *name;
13350 struct hostent *he, *res;
13351 char buffer[2048];
13352 int buflen = 2048;
13353 int h_errnop;
13354
13355 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013356
13357 ;
13358 return 0;
13359}
13360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013364
Martin v. Löwis11437992002-04-12 09:54:03 +000013365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13369$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013370
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013371else
Skip Montanaro6dead952003-09-25 14:50:04 +000013372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13374$as_echo "no" >&6; }
13375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13376$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013378/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013379
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013380# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
Martin v. Löwis11437992002-04-12 09:54:03 +000013382int
13383main ()
13384{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013385
13386 char *name;
13387 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013388 char buffer[2048];
13389 int buflen = 2048;
13390 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013391
Matthias Kloseb159a552010-04-25 21:00:44 +000013392 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013393
13394 ;
13395 return 0;
13396}
13397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013401
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Matthias Kloseb159a552010-04-25 21:00:44 +000013403$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013404
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13406$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013408else
Skip Montanaro6dead952003-09-25 14:50:04 +000013409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13411$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13413$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13415/* end confdefs.h. */
13416
13417# include <netdb.h>
13418
13419int
13420main ()
13421{
13422
13423 char *name;
13424 struct hostent *he;
13425 struct hostent_data data;
13426
13427 (void) gethostbyname_r(name, he, &data);
13428
13429 ;
13430 return 0;
13431}
13432_ACEOF
13433if ac_fn_c_try_compile "$LINENO"; then :
13434
13435 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13436
13437
13438$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13439
13440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13441$as_echo "yes" >&6; }
13442
13443else
13444
13445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13446$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013447
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013450
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013456 CFLAGS=$OLD_CFLAGS
13457
13458else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 for ac_func in gethostbyname
13461do :
13462 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013463if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013465#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013466_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013468fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013469done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013470
Michael W. Hudson54241132001-12-07 15:38:26 +000013471
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013472fi
13473
Michael W. Hudson54241132001-12-07 15:38:26 +000013474
13475
13476
13477
13478
13479
Guido van Rossum627b2d71993-12-24 10:39:16 +000013480# checks for system services
13481# (none yet)
13482
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013484ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013485if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013486
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013487else
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13489$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013490if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013492else
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013494LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013498/* Override any GCC internal prototype to avoid an error.
13499 Use char because int might match the return type of a GCC
13500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013501#ifdef __cplusplus
13502extern "C"
13503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013504char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013505int
13506main ()
13507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 ;
13510 return 0;
13511}
13512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013515else
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013518rm -f core conftest.err conftest.$ac_objext \
13519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013520LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13523$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013524if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 cat >>confdefs.h <<_ACEOF
13526#define HAVE_LIBIEEE 1
13527_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013529 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013530
Guido van Rossum627b2d71993-12-24 10:39:16 +000013531fi
13532
Michael W. Hudson54241132001-12-07 15:38:26 +000013533
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013534fi
13535
Michael W. Hudson54241132001-12-07 15:38:26 +000013536
Guido van Rossum7f253911997-05-09 02:42:48 +000013537# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13539$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013542if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013544if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013545then
13546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13550$as_echo "yes" >&6; }
13551else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13552$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013553fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013554else
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13556$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013557fi
13558
Guido van Rossum7f253911997-05-09 02:42:48 +000013559
Guido van Rossum7f43da71994-08-01 12:15:30 +000013560# check for --with-libm=...
13561
Guido van Rossum563e7081996-09-10 18:20:48 +000013562case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013563Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013564*) LIBM=-lm
13565esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13567$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013570if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013571 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013572if test "$withval" = no
13573then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13575$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013576elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013577then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13579$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013580else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013581fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013582else
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13584$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013585fi
13586
Guido van Rossum7f43da71994-08-01 12:15:30 +000013587
13588# check for --with-libc=...
13589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13591$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013593# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013594if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013595 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013596if test "$withval" = no
13597then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13599$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013600elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013601then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13603$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013604else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013605fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013606else
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13608$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609fi
13610
Guido van Rossum7f43da71994-08-01 12:15:30 +000013611
Stefan Krah1919b7e2012-03-21 18:25:23 +010013612# **************************************
13613# * Check for gcc x64 inline assembler *
13614# **************************************
13615
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13617$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13619/* end confdefs.h. */
13620
13621int
13622main ()
13623{
13624
13625 __asm__ __volatile__ ("movq %rcx, %rax");
13626
13627 ;
13628 return 0;
13629}
13630_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013631if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013632 have_gcc_asm_for_x64=yes
13633else
13634 have_gcc_asm_for_x64=no
13635fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013636rm -f core conftest.err conftest.$ac_objext \
13637 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13639$as_echo "$have_gcc_asm_for_x64" >&6; }
13640if test "$have_gcc_asm_for_x64" = yes
13641then
13642
13643$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13644
13645fi
13646
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013647# **************************************************
13648# * Check for various properties of floating point *
13649# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13652$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013653if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013655else
13656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013658 ac_cv_little_endian_double=no
13659else
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013661/* end confdefs.h. */
13662
13663#include <string.h>
13664int main() {
13665 double x = 9006104071832581.0;
13666 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13667 return 0;
13668 else
13669 return 1;
13670}
13671
13672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013673if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013674 ac_cv_little_endian_double=yes
13675else
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013680fi
13681
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013682fi
13683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13685$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013686if test "$ac_cv_little_endian_double" = yes
13687then
13688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013690
13691fi
13692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13694$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013695if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013697else
13698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013700 ac_cv_big_endian_double=no
13701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013703/* end confdefs.h. */
13704
13705#include <string.h>
13706int main() {
13707 double x = 9006104071832581.0;
13708 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13709 return 0;
13710 else
13711 return 1;
13712}
13713
13714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013715if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013716 ac_cv_big_endian_double=yes
13717else
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013722fi
13723
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013724fi
13725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13727$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013728if test "$ac_cv_big_endian_double" = yes
13729then
13730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013732
13733fi
13734
13735# Some ARM platforms use a mixed-endian representation for doubles.
13736# While Python doesn't currently have full support for these platforms
13737# (see e.g., issue 1762561), we can at least make sure that float <-> string
13738# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13740$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013741if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013743else
13744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013746 ac_cv_mixed_endian_double=no
13747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013749/* end confdefs.h. */
13750
13751#include <string.h>
13752int main() {
13753 double x = 9006104071832581.0;
13754 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13755 return 0;
13756 else
13757 return 1;
13758}
13759
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013762 ac_cv_mixed_endian_double=yes
13763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013768fi
13769
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013770fi
13771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13773$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013774if test "$ac_cv_mixed_endian_double" = yes
13775then
13776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013778
13779fi
13780
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013781# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013782# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013783# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013784# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013785# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013786# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013787
13788# This inline assembler syntax may also work for suncc and icc,
13789# so we try it on all platforms.
13790
Matthias Kloseb9621712010-04-24 17:59:49 +000013791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13792$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013794/* end confdefs.h. */
13795
13796int
13797main ()
13798{
13799
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013800 unsigned short cw;
13801 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13802 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803
13804 ;
13805 return 0;
13806}
13807_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013808if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013809 have_gcc_asm_for_x87=yes
13810else
Matthias Kloseb9621712010-04-24 17:59:49 +000013811 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013812fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013813rm -f core conftest.err conftest.$ac_objext \
13814 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13816$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013817if test "$have_gcc_asm_for_x87" = yes
13818then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013821
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013822fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013823
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13825$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13827/* end confdefs.h. */
13828
13829int
13830main ()
13831{
13832
13833 unsigned int fpcr;
13834 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13835 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13836
13837 ;
13838 return 0;
13839}
13840_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013841if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013842 have_gcc_asm_for_mc68881=yes
13843else
13844 have_gcc_asm_for_mc68881=no
13845fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013846rm -f core conftest.err conftest.$ac_objext \
13847 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13849$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13850if test "$have_gcc_asm_for_mc68881" = yes
13851then
13852
13853$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13854
13855fi
13856
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013857# Detect whether system arithmetic is subject to x87-style double
13858# rounding issues. The result of this test has little meaning on non
13859# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13860# mode is round-to-nearest and double rounding issues are present, and
13861# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13863$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013864# $BASECFLAGS may affect the result
13865ac_save_cc="$CC"
13866CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013867if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013868 ac_cv_x87_double_rounding=no
13869else
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013871/* end confdefs.h. */
13872
13873#include <stdlib.h>
13874#include <math.h>
13875int main() {
13876 volatile double x, y, z;
13877 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13878 x = 0.99999999999999989; /* 1-2**-53 */
13879 y = 1./x;
13880 if (y != 1.)
13881 exit(0);
13882 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13883 x = 1e16;
13884 y = 2.99999;
13885 z = x + y;
13886 if (z != 1e16+4.)
13887 exit(0);
13888 /* both tests show evidence of double rounding */
13889 exit(1);
13890}
13891
13892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013893if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013894 ac_cv_x87_double_rounding=no
13895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013900fi
13901
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13904$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013905if test "$ac_cv_x87_double_rounding" = yes
13906then
13907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013909
13910fi
13911
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013912# ************************************
13913# * Check for mathematical functions *
13914# ************************************
13915
13916LIBS_SAVE=$LIBS
13917LIBS="$LIBS $LIBM"
13918
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013919for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13920do :
13921 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13922ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013923if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013924 cat >>confdefs.h <<_ACEOF
13925#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13926_ACEOF
13927
13928fi
13929done
13930
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013931for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013932do :
13933 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13934ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013935if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013936 cat >>confdefs.h <<_ACEOF
13937#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13938_ACEOF
13939
13940fi
13941done
13942
13943ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13944"
Victor Stinnere0be4232011-10-25 13:06:09 +020013945if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013946 ac_have_decl=1
13947else
13948 ac_have_decl=0
13949fi
13950
13951cat >>confdefs.h <<_ACEOF
13952#define HAVE_DECL_ISINF $ac_have_decl
13953_ACEOF
13954ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13955"
Victor Stinnere0be4232011-10-25 13:06:09 +020013956if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013957 ac_have_decl=1
13958else
13959 ac_have_decl=0
13960fi
13961
13962cat >>confdefs.h <<_ACEOF
13963#define HAVE_DECL_ISNAN $ac_have_decl
13964_ACEOF
13965ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13966"
Victor Stinnere0be4232011-10-25 13:06:09 +020013967if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013968 ac_have_decl=1
13969else
13970 ac_have_decl=0
13971fi
13972
13973cat >>confdefs.h <<_ACEOF
13974#define HAVE_DECL_ISFINITE $ac_have_decl
13975_ACEOF
13976
13977
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013978# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13979# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13981$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013982if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013984else
13985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013987 ac_cv_tanh_preserves_zero_sign=no
13988else
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013990/* end confdefs.h. */
13991
13992#include <math.h>
13993#include <stdlib.h>
13994int main() {
13995 /* return 0 if either negative zeros don't exist
13996 on this platform or if negative zeros exist
13997 and tanh(-0.) == -0. */
13998 if (atan2(0., -1.) == atan2(-0., -1.) ||
13999 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14000 else exit(1);
14001}
14002
14003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014004if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014005 ac_cv_tanh_preserves_zero_sign=yes
14006else
Matthias Kloseb9621712010-04-24 17:59:49 +000014007 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14010 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014011fi
14012
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014013fi
14014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14016$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014017if test "$ac_cv_tanh_preserves_zero_sign" = yes
14018then
14019
Matthias Kloseb9621712010-04-24 17:59:49 +000014020$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014021
14022fi
14023
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014024if test "$ac_cv_func_log1p" = yes
14025then
14026 # On some versions of AIX, log1p(-0.) returns 0. instead of
14027 # -0. See issue #9920.
14028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14029$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014030 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014031 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014032else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014033
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014034 if test "$cross_compiling" = yes; then :
14035 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014036else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14038/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014039
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014040 #include <math.h>
14041 #include <stdlib.h>
14042 int main() {
14043 /* Fail if the signs of log1p(-0.) and -0. can be
14044 distinguished. */
14045 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14046 return 0;
14047 else
14048 return 1;
14049 }
14050
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014051_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014052if ac_fn_c_try_run "$LINENO"; then :
14053 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014054else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014055 ac_cv_log1p_drops_zero_sign=yes
14056fi
14057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014059fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014060
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014061fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014062
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14064$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14065fi
14066if test "$ac_cv_log1p_drops_zero_sign" = yes
14067then
14068
14069$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14070
14071fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014072
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014073LIBS=$LIBS_SAVE
14074
Mark Dickinsona614f042009-11-28 12:48:43 +000014075# For multiprocessing module, check that sem_open
14076# actually works. For FreeBSD versions <= 7.2,
14077# the kernel module that provides POSIX semaphores
14078# isn't loaded by default, so an attempt to call
14079# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14081$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014084else
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014086 ac_cv_posix_semaphores_enabled=yes
14087else
Matthias Kloseb9621712010-04-24 17:59:49 +000014088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014089/* end confdefs.h. */
14090
14091#include <unistd.h>
14092#include <fcntl.h>
14093#include <stdio.h>
14094#include <semaphore.h>
14095#include <sys/stat.h>
14096
14097int main(void) {
14098 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14099 if (a == SEM_FAILED) {
14100 perror("sem_open");
14101 return 1;
14102 }
14103 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014104 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014105 return 0;
14106}
14107
14108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014109if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014110 ac_cv_posix_semaphores_enabled=yes
14111else
Matthias Kloseb9621712010-04-24 17:59:49 +000014112 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14115 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014116fi
14117
14118
Mark Dickinsona614f042009-11-28 12:48:43 +000014119fi
14120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14122$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014123if test $ac_cv_posix_semaphores_enabled = no
14124then
14125
Matthias Kloseb9621712010-04-24 17:59:49 +000014126$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014127
14128fi
14129
Mark Dickinson10683072009-04-18 21:18:19 +000014130# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14132$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014133if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014137 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014138else
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014140/* end confdefs.h. */
14141
14142#include <unistd.h>
14143#include <fcntl.h>
14144#include <stdio.h>
14145#include <semaphore.h>
14146#include <sys/stat.h>
14147
14148int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014149 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014150 int count;
14151 int res;
14152 if(a==SEM_FAILED){
14153 perror("sem_open");
14154 return 1;
14155
14156 }
14157 res = sem_getvalue(a, &count);
14158 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014159 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014160 return res==-1 ? 1 : 0;
14161}
14162
Mark Dickinson10683072009-04-18 21:18:19 +000014163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014164if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014165 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014171fi
14172
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014174fi
14175
Matthias Kloseb9621712010-04-24 17:59:49 +000014176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14177$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178if test $ac_cv_broken_sem_getvalue = yes
14179then
14180
Matthias Kloseb9621712010-04-24 17:59:49 +000014181$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182
14183fi
14184
Mark Dickinsonbd792642009-03-18 20:06:12 +000014185# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14187$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014188# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014189if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014190 enableval=$enable_big_digits; case $enable_big_digits in
14191yes)
14192 enable_big_digits=30 ;;
14193no)
14194 enable_big_digits=15 ;;
1419515|30)
14196 ;;
14197*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014198 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 +000014199esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14201$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014202
14203cat >>confdefs.h <<_ACEOF
14204#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14205_ACEOF
14206
14207
14208else
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14210$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014211fi
14212
14213
Guido van Rossumef2255b2000-03-10 22:30:29 +000014214# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014215ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014216if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014217
14218
Matthias Kloseb9621712010-04-24 17:59:49 +000014219$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014220
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014221 wchar_h="yes"
14222
Guido van Rossumef2255b2000-03-10 22:30:29 +000014223else
Martin v. Löwis11437992002-04-12 09:54:03 +000014224 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014225
14226fi
14227
Michael W. Hudson54241132001-12-07 15:38:26 +000014228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014230# determine wchar_t size
14231if test "$wchar_h" = yes
14232then
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14235# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14236# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14238$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014239if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14243"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
Martin v. Löwis11437992002-04-12 09:54:03 +000014245else
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 if test "$ac_cv_type_wchar_t" = yes; then
14247 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14248$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014249as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014250See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251 else
14252 ac_cv_sizeof_wchar_t=0
14253 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014255
Martin v. Löwis11437992002-04-12 09:54:03 +000014256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14258$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259
14260
14261
Martin v. Löwis11437992002-04-12 09:54:03 +000014262cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014263#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014264_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014265
Michael W. Hudson54241132001-12-07 15:38:26 +000014266
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014267fi
14268
Matthias Kloseb9621712010-04-24 17:59:49 +000014269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14270$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014271have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014273/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014274
14275#include <tcl.h>
14276#if TCL_UTF_MAX != 6
14277# error "NOT UCS4_TCL"
14278#endif
14279int
14280main ()
14281{
14282
14283 ;
14284 return 0;
14285}
14286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014288
14289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014291
14292 have_ucs4_tcl=yes
14293
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14297$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014298
Skip Montanaro6dead952003-09-25 14:50:04 +000014299# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014300if test "$wchar_h" = yes
14301then
14302 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14304$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014305 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014307else
14308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014310 ac_cv_wchar_t_signed=yes
14311else
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014313/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014314
14315 #include <wchar.h>
14316 int main()
14317 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014318 /* Success: exit code 0 */
14319 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014320 }
14321
14322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014323if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014324 ac_cv_wchar_t_signed=yes
14325else
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14329 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014330fi
14331
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014332fi
14333
Matthias Kloseb9621712010-04-24 17:59:49 +000014334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14335$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336fi
14337
Georg Brandl52d168a2008-01-07 18:10:24 +000014338# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014339if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014340 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014341then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014342 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014345
Georg Brandl52d168a2008-01-07 18:10:24 +000014346else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014347 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014348fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14350$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014351
14352# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14354$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014355if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014357else
Matthias Kloseb9621712010-04-24 17:59:49 +000014358 ac_cv_c_bigendian=unknown
14359 # See if we're dealing with a universal compiler.
14360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14361/* end confdefs.h. */
14362#ifndef __APPLE_CC__
14363 not a universal capable compiler
14364 #endif
14365 typedef int dummy;
14366
Skip Montanaro6dead952003-09-25 14:50:04 +000014367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014368if ac_fn_c_try_compile "$LINENO"; then :
14369
14370 # Check for potential -arch flags. It is not universal unless
14371 # there are at least two -arch flags with different values.
14372 ac_arch=
14373 ac_prev=
14374 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14375 if test -n "$ac_prev"; then
14376 case $ac_word in
14377 i?86 | x86_64 | ppc | ppc64)
14378 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14379 ac_arch=$ac_word
14380 else
14381 ac_cv_c_bigendian=universal
14382 break
14383 fi
14384 ;;
14385 esac
14386 ac_prev=
14387 elif test "x$ac_word" = "x-arch"; then
14388 ac_prev=arch
14389 fi
14390 done
14391fi
14392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14393 if test $ac_cv_c_bigendian = unknown; then
14394 # See if sys/param.h defines the BYTE_ORDER macro.
14395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014396/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014397#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014399
Martin v. Löwis11437992002-04-12 09:54:03 +000014400int
14401main ()
14402{
Matthias Kloseb9621712010-04-24 17:59:49 +000014403#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14404 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14405 && LITTLE_ENDIAN)
14406 bogus endian macros
14407 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
14409 ;
14410 return 0;
14411}
14412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014413if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014414 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014416/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014417#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014419
Martin v. Löwis11437992002-04-12 09:54:03 +000014420int
14421main ()
14422{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014423#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 not big endian
14425 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014426
14427 ;
14428 return 0;
14429}
14430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014431if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014432 ac_cv_c_bigendian=yes
14433else
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014437fi
14438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14439 fi
14440 if test $ac_cv_c_bigendian = unknown; then
14441 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014443/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014444#include <limits.h>
14445
Martin v. Löwis11437992002-04-12 09:54:03 +000014446int
14447main ()
14448{
Matthias Kloseb9621712010-04-24 17:59:49 +000014449#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14450 bogus endian macros
14451 #endif
14452
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 ;
14454 return 0;
14455}
14456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014457if ac_fn_c_try_compile "$LINENO"; then :
14458 # It does; now see whether it defined to _BIG_ENDIAN or not.
14459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14460/* end confdefs.h. */
14461#include <limits.h>
14462
14463int
14464main ()
14465{
14466#ifndef _BIG_ENDIAN
14467 not big endian
14468 #endif
14469
14470 ;
14471 return 0;
14472}
14473_ACEOF
14474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014476else
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14480fi
14481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14482 fi
14483 if test $ac_cv_c_bigendian = unknown; then
14484 # Compile a test program.
14485 if test "$cross_compiling" = yes; then :
14486 # Try to guess by grepping values from an object file.
14487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14488/* end confdefs.h. */
14489short int ascii_mm[] =
14490 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14491 short int ascii_ii[] =
14492 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14493 int use_ascii (int i) {
14494 return ascii_mm[i] + ascii_ii[i];
14495 }
14496 short int ebcdic_ii[] =
14497 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14498 short int ebcdic_mm[] =
14499 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14500 int use_ebcdic (int i) {
14501 return ebcdic_mm[i] + ebcdic_ii[i];
14502 }
14503 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504
Matthias Kloseb9621712010-04-24 17:59:49 +000014505int
14506main ()
14507{
14508return use_ascii (foo) == use_ebcdic (foo);
14509 ;
14510 return 0;
14511}
14512_ACEOF
14513if ac_fn_c_try_compile "$LINENO"; then :
14514 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14515 ac_cv_c_bigendian=yes
14516 fi
14517 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14518 if test "$ac_cv_c_bigendian" = unknown; then
14519 ac_cv_c_bigendian=no
14520 else
14521 # finding both strings is unlikely to happen, but who knows?
14522 ac_cv_c_bigendian=unknown
14523 fi
14524 fi
14525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014527else
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014529/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014531int
14532main ()
14533{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 /* Are we little or big endian? From Harbison&Steele. */
14536 union
14537 {
14538 long int l;
14539 char c[sizeof (long int)];
14540 } u;
14541 u.l = 1;
14542 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014543
14544 ;
14545 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014546}
Martin v. Löwis11437992002-04-12 09:54:03 +000014547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014548if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014549 ac_cv_c_bigendian=no
14550else
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14554 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14560$as_echo "$ac_cv_c_bigendian" >&6; }
14561 case $ac_cv_c_bigendian in #(
14562 yes)
14563 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14564;; #(
14565 no)
14566 ;; #(
14567 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014568
Matthias Kloseb9621712010-04-24 17:59:49 +000014569$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 ;; #(
14572 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014573 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014574 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014576
Michael W. Hudson54241132001-12-07 15:38:26 +000014577
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014578# ABI version string for Python extension modules. This appears between the
14579# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14580# from the following attributes which affect the ABI of this Python build (in
14581# this order):
14582#
14583# * The Python implementation (always 'cpython-' for us)
14584# * The major and minor version numbers
14585# * --with-pydebug (adds a 'd')
14586# * --with-pymalloc (adds a 'm')
14587# * --with-wide-unicode (adds a 'u')
14588#
14589# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014590# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14591# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014592
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14594$as_echo_n "checking ABIFLAGS... " >&6; }
14595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14596$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14598$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014599SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14601$as_echo "$SOABI" >&6; }
14602
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014603
14604case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014605 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014606 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14607 *)
14608 EXT_SUFFIX=${SHLIB_SUFFIX};;
14609esac
14610
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14612$as_echo_n "checking LDVERSION... " >&6; }
14613LDVERSION='$(VERSION)$(ABIFLAGS)'
14614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14615$as_echo "$LDVERSION" >&6; }
14616
doko@python.org87421192013-01-26 11:39:31 +010014617
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014618LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014619
14620
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014621# Check whether right shifting a negative integer extends the sign bit
14622# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14624$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014625if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014627else
Martin v. Löwis11437992002-04-12 09:54:03 +000014628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014630 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014631else
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014633/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014634
14635int main()
14636{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014637 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014638}
14639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014641if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014642 ac_cv_rshift_extends_sign=yes
14643else
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014648fi
14649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650fi
14651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14653$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014654if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014655then
Martin v. Löwis11437992002-04-12 09:54:03 +000014656
Matthias Kloseb9621712010-04-24 17:59:49 +000014657$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014658
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014659fi
14660
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014661# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14663$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014664if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014666else
Martin v. Löwis11437992002-04-12 09:54:03 +000014667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014669/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014670#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014671int
14672main ()
14673{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014674
14675 FILE *f = fopen("/dev/null", "r");
14676 flockfile(f);
14677 getc_unlocked(f);
14678 funlockfile(f);
14679
Martin v. Löwis11437992002-04-12 09:54:03 +000014680 ;
14681 return 0;
14682}
14683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014684if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014685 ac_cv_have_getc_unlocked=yes
14686else
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 ac_cv_have_getc_unlocked=no
14688fi
14689rm -f core conftest.err conftest.$ac_objext \
14690 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14694$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014695if test "$ac_cv_have_getc_unlocked" = yes
14696then
Martin v. Löwis11437992002-04-12 09:54:03 +000014697
Matthias Kloseb9621712010-04-24 17:59:49 +000014698$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014699
14700fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014701
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014702# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014703# save the value of LIBS so we don't actually link Python with readline
14704LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014705
Gregory P. Smith18820942008-09-07 06:24:49 +000014706# On some systems we need to link readline to a termcap compatible
14707# library. NOTE: Keep the precedence of listed libraries synchronised
14708# with setup.py.
14709py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14711$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014712for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014713 if test -z "$py_libtermcap"; then
14714 READLINE_LIBS="-lreadline"
14715 else
14716 READLINE_LIBS="-lreadline -l$py_libtermcap"
14717 fi
14718 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014720/* end confdefs.h. */
14721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722/* Override any GCC internal prototype to avoid an error.
14723 Use char because int might match the return type of a GCC
14724 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014725#ifdef __cplusplus
14726extern "C"
14727#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014728char readline ();
14729int
14730main ()
14731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014733 ;
14734 return 0;
14735}
14736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014737if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014738 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014740rm -f core conftest.err conftest.$ac_objext \
14741 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014742 if test $py_cv_lib_readline = yes; then
14743 break
14744 fi
14745done
14746# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14747#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014748if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14750$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014751else
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14753$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014754
Matthias Kloseb9621712010-04-24 17:59:49 +000014755$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014756
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014757fi
14758
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014759# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14761$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014762if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014763 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014764else
14765 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014766LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014768/* end confdefs.h. */
14769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770/* Override any GCC internal prototype to avoid an error.
14771 Use char because int might match the return type of a GCC
14772 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014773#ifdef __cplusplus
14774extern "C"
14775#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014776char rl_callback_handler_install ();
14777int
14778main ()
14779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014781 ;
14782 return 0;
14783}
14784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014785if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014786 ac_cv_lib_readline_rl_callback_handler_install=yes
14787else
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014790rm -f core conftest.err conftest.$ac_objext \
14791 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014792LIBS=$ac_check_lib_save_LIBS
14793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14795$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014796if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014799
14800fi
14801
14802
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014803# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014805/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014806#include <readline/readline.h>
14807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014808if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014809 have_readline=yes
14810else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014811 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014812
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014813fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014814rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014815if test $have_readline = yes
14816then
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014818/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014819#include <readline/readline.h>
14820
14821_ACEOF
14822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014823 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014824
Matthias Kloseb9621712010-04-24 17:59:49 +000014825$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014826
14827fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014828rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014829
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014831/* end confdefs.h. */
14832#include <readline/readline.h>
14833
14834_ACEOF
14835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014839
14840fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014841rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014842
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014843fi
14844
Martin v. Löwis0daad592001-09-30 21:09:59 +000014845# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14847$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014848if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014849 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014850else
Martin v. Löwis11437992002-04-12 09:54:03 +000014851 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014852LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014856/* Override any GCC internal prototype to avoid an error.
14857 Use char because int might match the return type of a GCC
14858 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014859#ifdef __cplusplus
14860extern "C"
14861#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014862char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014863int
14864main ()
14865{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 ;
14868 return 0;
14869}
14870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014871if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014872 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014873else
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014876rm -f core conftest.err conftest.$ac_objext \
14877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014878LIBS=$ac_check_lib_save_LIBS
14879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14881$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014882if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014883
Matthias Kloseb9621712010-04-24 17:59:49 +000014884$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014885
Martin v. Löwis0daad592001-09-30 21:09:59 +000014886fi
14887
Michael W. Hudson54241132001-12-07 15:38:26 +000014888
Thomas Wouters89d996e2007-09-08 17:39:28 +000014889# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14891$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014892if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014893 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014894else
14895 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014896LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014898/* end confdefs.h. */
14899
14900/* Override any GCC internal prototype to avoid an error.
14901 Use char because int might match the return type of a GCC
14902 builtin and then its argument prototype would still apply. */
14903#ifdef __cplusplus
14904extern "C"
14905#endif
14906char rl_completion_display_matches_hook ();
14907int
14908main ()
14909{
14910return rl_completion_display_matches_hook ();
14911 ;
14912 return 0;
14913}
14914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014915if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014916 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14917else
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014920rm -f core conftest.err conftest.$ac_objext \
14921 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014922LIBS=$ac_check_lib_save_LIBS
14923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14925$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014926if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014927
Matthias Kloseb9621712010-04-24 17:59:49 +000014928$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014929
14930fi
14931
14932
Martin v. Löwis0daad592001-09-30 21:09:59 +000014933# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14935$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014936if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014938else
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014940LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944/* Override any GCC internal prototype to avoid an error.
14945 Use char because int might match the return type of a GCC
14946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014947#ifdef __cplusplus
14948extern "C"
14949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014950char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014951int
14952main ()
14953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ;
14956 return 0;
14957}
14958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014961else
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014964rm -f core conftest.err conftest.$ac_objext \
14965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014966LIBS=$ac_check_lib_save_LIBS
14967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14969$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014970if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014971
Matthias Kloseb9621712010-04-24 17:59:49 +000014972$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014973
Guido van Rossum353ae582001-07-10 16:45:32 +000014974fi
14975
Jack Jansendd19cf82001-12-06 22:36:17 +000014976
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014977# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014979/* end confdefs.h. */
14980#include <readline/readline.h>
14981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014982if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014983 have_readline=yes
14984else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014985 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014986
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014987fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014988rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014989if test $have_readline = yes
14990then
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014992/* end confdefs.h. */
14993#include <readline/readline.h>
14994
14995_ACEOF
14996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014998
Matthias Kloseb9621712010-04-24 17:59:49 +000014999$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015000
15001fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015002rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015003
15004fi
15005
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15007$as_echo_n "checking for append_history in -lreadline... " >&6; }
15008if ${ac_cv_lib_readline_append_history+:} false; then :
15009 $as_echo_n "(cached) " >&6
15010else
15011 ac_check_lib_save_LIBS=$LIBS
15012LIBS="-lreadline $READLINE_LIBS $LIBS"
15013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15014/* end confdefs.h. */
15015
15016/* Override any GCC internal prototype to avoid an error.
15017 Use char because int might match the return type of a GCC
15018 builtin and then its argument prototype would still apply. */
15019#ifdef __cplusplus
15020extern "C"
15021#endif
15022char append_history ();
15023int
15024main ()
15025{
15026return append_history ();
15027 ;
15028 return 0;
15029}
15030_ACEOF
15031if ac_fn_c_try_link "$LINENO"; then :
15032 ac_cv_lib_readline_append_history=yes
15033else
15034 ac_cv_lib_readline_append_history=no
15035fi
15036rm -f core conftest.err conftest.$ac_objext \
15037 conftest$ac_exeext conftest.$ac_ext
15038LIBS=$ac_check_lib_save_LIBS
15039fi
15040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15041$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15042if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15043
15044$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15045
15046fi
15047
15048
Martin v. Löwis82bca632006-02-10 20:49:30 +000015049# End of readline checks: restore LIBS
15050LIBS=$LIBS_no_readline
15051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15053$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015054if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015056else
Martin v. Löwis11437992002-04-12 09:54:03 +000015057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015059 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015060else
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015062/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015063
15064int main()
15065{
15066 int val1 = nice(1);
15067 if (val1 != -1 && val1 == nice(2))
15068 exit(0);
15069 exit(1);
15070}
15071
Martin v. Löwis11437992002-04-12 09:54:03 +000015072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015073if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015074 ac_cv_broken_nice=yes
15075else
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015080fi
15081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082fi
15083
Matthias Kloseb9621712010-04-24 17:59:49 +000015084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15085$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015086if test "$ac_cv_broken_nice" = yes
15087then
Martin v. Löwis11437992002-04-12 09:54:03 +000015088
Matthias Kloseb9621712010-04-24 17:59:49 +000015089$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015090
15091fi
15092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15094$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015095if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015097else
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015099 ac_cv_broken_poll=no
15100else
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015102/* end confdefs.h. */
15103
15104#include <poll.h>
15105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015106int main()
15107{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015108 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015109 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015110
15111 close (42);
15112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015113 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015114 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015115 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015116 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015117 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015118 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015119 return 1;
15120}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015121
15122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015123if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015124 ac_cv_broken_poll=yes
15125else
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15129 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015132fi
15133
Matthias Kloseb9621712010-04-24 17:59:49 +000015134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15135$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015136if test "$ac_cv_broken_poll" = yes
15137then
15138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015140
15141fi
15142
Brett Cannon43802422005-02-10 20:48:03 +000015143# 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 +000015144# (which is not required by ISO C or UNIX spec) and/or if we support
15145# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015146ac_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 +000015147#include <$ac_cv_struct_tm>
15148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149"
Victor Stinnere0be4232011-10-25 13:06:09 +020015150if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015151
15152cat >>confdefs.h <<_ACEOF
15153#define HAVE_STRUCT_TM_TM_ZONE 1
15154_ACEOF
15155
15156
15157fi
15158
15159if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15160
Matthias Kloseb9621712010-04-24 17:59:49 +000015161$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015162
15163else
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15165"
Victor Stinnere0be4232011-10-25 13:06:09 +020015166if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168else
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170fi
15171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015173#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174_ACEOF
15175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15177$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015178if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180else
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015182/* end confdefs.h. */
15183#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184#if !HAVE_DECL_TZNAME
15185extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015186#endif
15187
15188int
15189main ()
15190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015192 ;
15193 return 0;
15194}
15195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015196if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015197 ac_cv_var_tzname=yes
15198else
Matthias Kloseb9621712010-04-24 17:59:49 +000015199 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015201rm -f core conftest.err conftest.$ac_objext \
15202 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15205$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015206 if test $ac_cv_var_tzname = yes; then
15207
Matthias Kloseb9621712010-04-24 17:59:49 +000015208$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015209
15210 fi
15211fi
15212
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015213
Martin v. Löwis1d459062005-03-14 21:23:33 +000015214# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15216$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015217if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015219else
15220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015222 ac_cv_working_tzset=no
15223else
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015225/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015226
15227#include <stdlib.h>
15228#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015229#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015230
15231#if HAVE_TZNAME
15232extern char *tzname[];
15233#endif
15234
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015235int main()
15236{
Brett Cannon18367812003-09-19 00:59:16 +000015237 /* Note that we need to ensure that not only does tzset(3)
15238 do 'something' with localtime, but it works as documented
15239 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015240 This includes making sure that tzname is set properly if
15241 tm->tm_zone does not exist since it is the alternative way
15242 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015243
15244 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015245 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015246 */
15247
Martin v. Löwis1d459062005-03-14 21:23:33 +000015248 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015249 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15250
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015251 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015252 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015253 if (localtime(&groundhogday)->tm_hour != 0)
15254 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015255#if HAVE_TZNAME
15256 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15257 if (strcmp(tzname[0], "UTC") ||
15258 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15259 exit(1);
15260#endif
Brett Cannon18367812003-09-19 00:59:16 +000015261
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015262 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015263 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015264 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015265 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015266#if HAVE_TZNAME
15267 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15268 exit(1);
15269#endif
Brett Cannon18367812003-09-19 00:59:16 +000015270
15271 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15272 tzset();
15273 if (localtime(&groundhogday)->tm_hour != 11)
15274 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015275#if HAVE_TZNAME
15276 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15277 exit(1);
15278#endif
15279
15280#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015281 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15282 exit(1);
15283 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15284 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015285#endif
Brett Cannon18367812003-09-19 00:59:16 +000015286
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015287 exit(0);
15288}
15289
15290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015291if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015292 ac_cv_working_tzset=yes
15293else
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15297 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015298fi
15299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300fi
15301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15303$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015304if test "$ac_cv_working_tzset" = yes
15305then
15306
Matthias Kloseb9621712010-04-24 17:59:49 +000015307$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015308
15309fi
15310
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015311# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15313$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015314if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015316else
Matthias Kloseb9621712010-04-24 17:59:49 +000015317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015318/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015319#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015320int
15321main ()
15322{
15323
15324struct stat st;
15325st.st_mtim.tv_nsec = 1;
15326
15327 ;
15328 return 0;
15329}
15330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015332 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015333else
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15337fi
15338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15340$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015341if test "$ac_cv_stat_tv_nsec" = yes
15342then
15343
Matthias Kloseb9621712010-04-24 17:59:49 +000015344$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015345
15346fi
15347
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015348# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15350$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015351if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015353else
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015355/* end confdefs.h. */
15356#include <sys/stat.h>
15357int
15358main ()
15359{
15360
15361struct stat st;
15362st.st_mtimespec.tv_nsec = 1;
15363
15364 ;
15365 return 0;
15366}
15367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015369 ac_cv_stat_tv_nsec2=yes
15370else
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15374fi
15375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15377$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015378if test "$ac_cv_stat_tv_nsec2" = yes
15379then
15380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015382
15383fi
15384
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015385# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015386ac_save_cppflags="$CPPFLAGS"
15387CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015388
15389for ac_header in curses.h ncurses.h
15390do :
15391 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15392ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15393if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15394 cat >>confdefs.h <<_ACEOF
15395#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15396_ACEOF
15397
15398fi
15399
15400done
15401
15402
15403# On Solaris, term.h requires curses.h
15404for ac_header in term.h
15405do :
15406 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15407#ifdef HAVE_CURSES_H
15408#include <curses.h>
15409#endif
15410
15411"
15412if test "x$ac_cv_header_term_h" = xyes; then :
15413 cat >>confdefs.h <<_ACEOF
15414#define HAVE_TERM_H 1
15415_ACEOF
15416
15417fi
15418
15419done
15420
15421
Jack Jansen666b1e72001-10-31 12:11:48 +000015422# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15424$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015425if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015426 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015427else
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015429/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015430#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015431int
15432main ()
15433{
Jack Jansen666b1e72001-10-31 12:11:48 +000015434
15435 int rtn;
15436 rtn = mvwdelch(0,0,0);
15437
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 ;
15439 return 0;
15440}
15441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015442if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015443 ac_cv_mvwdelch_is_expression=yes
15444else
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15448fi
15449
Matthias Kloseb9621712010-04-24 17:59:49 +000015450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15451$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015452
15453if test "$ac_cv_mvwdelch_is_expression" = yes
15454then
Martin v. Löwis11437992002-04-12 09:54:03 +000015455
Matthias Kloseb9621712010-04-24 17:59:49 +000015456$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015457
15458fi
15459
Matthias Kloseb9621712010-04-24 17:59:49 +000015460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15461$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015462if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015463 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015464else
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015466/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015467#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015468int
15469main ()
15470{
Jack Jansen666b1e72001-10-31 12:11:48 +000015471
15472 WINDOW *w;
15473 w->_flags = 0;
15474
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 ;
15476 return 0;
15477}
15478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015479if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015480 ac_cv_window_has_flags=yes
15481else
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15485fi
15486
Matthias Kloseb9621712010-04-24 17:59:49 +000015487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15488$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015489
Jack Jansen666b1e72001-10-31 12:11:48 +000015490
15491if test "$ac_cv_window_has_flags" = yes
15492then
Martin v. Löwis11437992002-04-12 09:54:03 +000015493
Matthias Kloseb9621712010-04-24 17:59:49 +000015494$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015495
15496fi
15497
Matthias Kloseb9621712010-04-24 17:59:49 +000015498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15499$as_echo_n "checking for is_term_resized... " >&6; }
15500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015501/* end confdefs.h. */
15502#include <curses.h>
15503int
15504main ()
15505{
15506void *x=is_term_resized
15507 ;
15508 return 0;
15509}
15510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015512
Matthias Kloseb9621712010-04-24 17:59:49 +000015513$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015514
Matthias Kloseb159a552010-04-25 21:00:44 +000015515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015516$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015517else
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15519$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015520
15521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15523
Matthias Kloseb9621712010-04-24 17:59:49 +000015524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15525$as_echo_n "checking for resize_term... " >&6; }
15526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015527/* end confdefs.h. */
15528#include <curses.h>
15529int
15530main ()
15531{
15532void *x=resize_term
15533 ;
15534 return 0;
15535}
15536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015537if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015538
Matthias Kloseb9621712010-04-24 17:59:49 +000015539$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015540
Matthias Kloseb159a552010-04-25 21:00:44 +000015541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015542$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015543else
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15545$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015546
15547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15551$as_echo_n "checking for resizeterm... " >&6; }
15552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015553/* end confdefs.h. */
15554#include <curses.h>
15555int
15556main ()
15557{
15558void *x=resizeterm
15559 ;
15560 return 0;
15561}
15562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015563if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015566
Matthias Kloseb159a552010-04-25 21:00:44 +000015567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015568$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015569else
Matthias Kloseb9621712010-04-24 17:59:49 +000015570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15571$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015572
15573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015575# last curses configure check
15576CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015577
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15579$as_echo "$as_me: checking for device files" >&6;}
15580
15581if test "x$cross_compiling" = xyes; then
15582 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15584$as_echo_n "checking for /dev/ptmx... " >&6; }
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15586$as_echo "not set" >&6; }
15587 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15588 fi
15589 if test "${ac_cv_file__dev_ptc+set}" != set; then
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15591$as_echo_n "checking for /dev/ptc... " >&6; }
15592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15593$as_echo "not set" >&6; }
15594 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15595 fi
15596fi
15597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15599$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015600if ${ac_cv_file__dev_ptmx+:} false; then :
15601 $as_echo_n "(cached) " >&6
15602else
15603 test "$cross_compiling" = yes &&
15604 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15605if test -r "/dev/ptmx"; then
15606 ac_cv_file__dev_ptmx=yes
15607else
15608 ac_cv_file__dev_ptmx=no
15609fi
15610fi
15611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15612$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15613if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015614
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015615fi
15616
15617if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015618
Matthias Kloseb9621712010-04-24 17:59:49 +000015619$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015620
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15623$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015624if ${ac_cv_file__dev_ptc+:} false; then :
15625 $as_echo_n "(cached) " >&6
15626else
15627 test "$cross_compiling" = yes &&
15628 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15629if test -r "/dev/ptc"; then
15630 ac_cv_file__dev_ptc=yes
15631else
15632 ac_cv_file__dev_ptc=no
15633fi
15634fi
15635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15636$as_echo "$ac_cv_file__dev_ptc" >&6; }
15637if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015638
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015639fi
15640
15641if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015644
Neal Norwitz865400f2003-03-21 01:42:58 +000015645fi
15646
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015647if test "$have_long_long" = yes
15648then
Matthias Kloseb9621712010-04-24 17:59:49 +000015649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15650$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015651 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015653else
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015655 ac_cv_have_long_long_format="cross -- assuming no"
15656 if test x$GCC = xyes; then
15657 save_CFLAGS=$CFLAGS
15658 CFLAGS="$CFLAGS -Werror -Wformat"
15659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15660/* end confdefs.h. */
15661
15662 #include <stdio.h>
15663 #include <stddef.h>
15664
15665int
15666main ()
15667{
15668
15669 char *buffer;
15670 sprintf(buffer, "%lld", (long long)123);
15671 sprintf(buffer, "%lld", (long long)-123);
15672 sprintf(buffer, "%llu", (unsigned long long)123);
15673
15674 ;
15675 return 0;
15676}
15677_ACEOF
15678if ac_fn_c_try_compile "$LINENO"; then :
15679 ac_cv_have_long_long_format=yes
15680
15681fi
15682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15683 CFLAGS=$save_CFLAGS
15684 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015685else
Matthias Kloseb9621712010-04-24 17:59:49 +000015686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015687/* end confdefs.h. */
15688
15689 #include <stdio.h>
15690 #include <stddef.h>
15691 #include <string.h>
15692
15693 #ifdef HAVE_SYS_TYPES_H
15694 #include <sys/types.h>
15695 #endif
15696
15697 int main()
15698 {
15699 char buffer[256];
15700
15701 if (sprintf(buffer, "%lld", (long long)123) < 0)
15702 return 1;
15703 if (strcmp(buffer, "123"))
15704 return 1;
15705
15706 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15707 return 1;
15708 if (strcmp(buffer, "-123"))
15709 return 1;
15710
15711 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15712 return 1;
15713 if (strcmp(buffer, "123"))
15714 return 1;
15715
15716 return 0;
15717 }
15718
15719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015720if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015721 ac_cv_have_long_long_format=yes
15722else
Matthias Kloseb9621712010-04-24 17:59:49 +000015723 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015727fi
15728
15729
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015730fi
15731
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15733$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015734fi
15735
Mark Dickinson89d7d412009-12-31 20:50:59 +000015736if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015737then
15738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015740
15741fi
15742
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015743if test $ac_sys_system = Darwin
15744then
15745 LIBS="$LIBS -framework CoreFoundation"
15746fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15749$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015750if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015752else
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015754 ac_cv_have_size_t_format="cross -- assuming yes"
15755
Thomas Wouters477c8d52006-05-27 19:21:47 +000015756else
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015758/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015759
Thomas Wouters477c8d52006-05-27 19:21:47 +000015760#include <stdio.h>
15761#include <stddef.h>
15762#include <string.h>
15763
Christian Heimes2c181612007-12-17 20:04:13 +000015764#ifdef HAVE_SYS_TYPES_H
15765#include <sys/types.h>
15766#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015767
15768#ifdef HAVE_SSIZE_T
15769typedef ssize_t Py_ssize_t;
15770#elif SIZEOF_VOID_P == SIZEOF_LONG
15771typedef long Py_ssize_t;
15772#else
15773typedef int Py_ssize_t;
15774#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015775
Christian Heimes2c181612007-12-17 20:04:13 +000015776int main()
15777{
15778 char buffer[256];
15779
Thomas Wouters477c8d52006-05-27 19:21:47 +000015780 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15781 return 1;
15782
Thomas Wouters89f507f2006-12-13 04:49:30 +000015783 if (strcmp(buffer, "123"))
15784 return 1;
15785
15786 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15787 return 1;
15788
15789 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015790 return 1;
15791
15792 return 0;
15793}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015794
Thomas Wouters477c8d52006-05-27 19:21:47 +000015795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015796if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015797 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015798else
Matthias Kloseb9621712010-04-24 17:59:49 +000015799 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015803fi
15804
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15807$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015808if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015809
Matthias Kloseb9621712010-04-24 17:59:49 +000015810$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015811
15812fi
15813
Matthias Kloseb9621712010-04-24 17:59:49 +000015814ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015815#ifdef HAVE_SYS_TYPES_H
15816#include <sys/types.h>
15817#endif
15818#ifdef HAVE_SYS_SOCKET_H
15819#include <sys/socket.h>
15820#endif
15821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822"
Victor Stinnere0be4232011-10-25 13:06:09 +020015823if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015824
Martin v. Löwis11437992002-04-12 09:54:03 +000015825else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015828
15829fi
15830
Michael W. Hudson54241132001-12-07 15:38:26 +000015831
Matthias Kloseb9621712010-04-24 17:59:49 +000015832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15833$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015834if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015836else
Matthias Kloseb9621712010-04-24 17:59:49 +000015837 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015838 ac_cv_broken_mbstowcs=no
15839else
Matthias Kloseb9621712010-04-24 17:59:49 +000015840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015841/* end confdefs.h. */
15842
Stefan Krah19c21392012-11-22 23:47:32 +010015843#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015844#include<stdlib.h>
15845int main() {
15846 size_t len = -1;
15847 const char *str = "text";
15848 len = mbstowcs(NULL, str, 0);
15849 return (len != 4);
15850}
15851
15852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015853if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015854 ac_cv_broken_mbstowcs=no
15855else
Matthias Kloseb9621712010-04-24 17:59:49 +000015856 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015860fi
15861
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015862fi
15863
Matthias Kloseb9621712010-04-24 17:59:49 +000015864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15865$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015866if test "$ac_cv_broken_mbstowcs" = yes
15867then
15868
Matthias Kloseb9621712010-04-24 17:59:49 +000015869$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015870
15871fi
15872
Antoine Pitroub52ec782009-01-25 16:34:23 +000015873# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15875$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015876
15877# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015878if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015879 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015880if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015881then
15882
Matthias Kloseb9621712010-04-24 17:59:49 +000015883$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15886$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015887fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015888if test "$withval" = no
15889then
15890
15891$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15892
Matthias Kloseb9621712010-04-24 17:59:49 +000015893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15894$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015895fi
15896
Antoine Pitrou042b1282010-08-13 21:15:58 +000015897else
15898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15899$as_echo "no value specified" >&6; }
15900fi
15901
Antoine Pitroub52ec782009-01-25 16:34:23 +000015902
Matthias Kloseb17289e2012-03-15 19:51:34 +010015903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15904$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15905if ${ac_cv_computed_gotos+:} false; then :
15906 $as_echo_n "(cached) " >&6
15907else
15908 if test "$cross_compiling" = yes; then :
15909 if test "${with_computed_gotos+set}" = set; then
15910 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15911 else
15912 ac_cv_computed_gotos=no
15913 fi
15914else
15915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15916/* end confdefs.h. */
15917
15918int main(int argc, char **argv)
15919{
15920 static void *targets[1] = { &&LABEL1 };
15921 goto LABEL2;
15922LABEL1:
15923 return 0;
15924LABEL2:
15925 goto *targets[0];
15926 return 1;
15927}
15928
15929_ACEOF
15930if ac_fn_c_try_run "$LINENO"; then :
15931 ac_cv_computed_gotos=yes
15932else
15933 ac_cv_computed_gotos=no
15934fi
15935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15936 conftest.$ac_objext conftest.beam conftest.$ac_ext
15937fi
15938
15939fi
15940
15941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15942$as_echo "$ac_cv_computed_gotos" >&6; }
15943case "$ac_cv_computed_gotos" in yes*)
15944
15945$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15946
15947esac
15948
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015949case $ac_sys_system in
15950AIX*)
15951
15952$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15953 ;;
15954esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015955
Michael W. Hudson54241132001-12-07 15:38:26 +000015956
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015957
15958
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015959for h in `(cd $srcdir;echo Python/thread_*.h)`
15960do
15961 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15962done
15963
Michael W. Hudson54241132001-12-07 15:38:26 +000015964
Ned Deily0db50cf2014-07-25 12:41:31 -070015965SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15967$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015968for dir in $SRCDIRS; do
15969 if test ! -d $dir; then
15970 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015971 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015972done
Matthias Kloseb9621712010-04-24 17:59:49 +000015973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15974$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015975
Stefan Krah1919b7e2012-03-21 18:25:23 +010015976# Availability of -O2:
15977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15978$as_echo_n "checking for -O2... " >&6; }
15979saved_cflags="$CFLAGS"
15980CFLAGS="-O2"
15981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15982/* end confdefs.h. */
15983
15984int
15985main ()
15986{
15987
15988
15989 ;
15990 return 0;
15991}
15992_ACEOF
15993if ac_fn_c_try_compile "$LINENO"; then :
15994 have_O2=yes
15995else
15996 have_O2=no
15997fi
15998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16000$as_echo "$have_O2" >&6; }
16001CFLAGS="$saved_cflags"
16002
16003# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16004# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16006$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16007saved_cflags="$CFLAGS"
16008CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16009if test "$have_O2" = no; then
16010 CFLAGS=""
16011fi
16012if test "$cross_compiling" = yes; then :
16013 have_glibc_memmove_bug=undefined
16014else
16015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16016/* end confdefs.h. */
16017
16018#include <stdio.h>
16019#include <stdlib.h>
16020#include <string.h>
16021void foo(void *p, void *q) { memmove(p, q, 19); }
16022int main() {
16023 char a[32] = "123456789000000000";
16024 foo(&a[9], a);
16025 if (strcmp(a, "123456789123456789000000000") != 0)
16026 return 1;
16027 foo(a, &a[9]);
16028 if (strcmp(a, "123456789000000000") != 0)
16029 return 1;
16030 return 0;
16031}
16032
16033_ACEOF
16034if ac_fn_c_try_run "$LINENO"; then :
16035 have_glibc_memmove_bug=no
16036else
16037 have_glibc_memmove_bug=yes
16038fi
16039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16040 conftest.$ac_objext conftest.beam conftest.$ac_ext
16041fi
16042
16043CFLAGS="$saved_cflags"
16044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16045$as_echo "$have_glibc_memmove_bug" >&6; }
16046if test "$have_glibc_memmove_bug" = yes; then
16047
16048$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16049
16050fi
16051
16052if test "$have_gcc_asm_for_x87" = yes; then
16053 # Some versions of gcc miscompile inline asm:
16054 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16055 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16056 case $CC in
16057 *gcc*)
16058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16059$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16060 saved_cflags="$CFLAGS"
16061 CFLAGS="-O2"
16062 if test "$cross_compiling" = yes; then :
16063 have_ipa_pure_const_bug=undefined
16064else
16065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16066/* end confdefs.h. */
16067
16068 __attribute__((noinline)) int
16069 foo(int *p) {
16070 int r;
16071 asm ( "movl \$6, (%1)\n\t"
16072 "xorl %0, %0\n\t"
16073 : "=r" (r) : "r" (p) : "memory"
16074 );
16075 return r;
16076 }
16077 int main() {
16078 int p = 8;
16079 if ((foo(&p) ? : p) != 6)
16080 return 1;
16081 return 0;
16082 }
16083
16084_ACEOF
16085if ac_fn_c_try_run "$LINENO"; then :
16086 have_ipa_pure_const_bug=no
16087else
16088 have_ipa_pure_const_bug=yes
16089fi
16090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16091 conftest.$ac_objext conftest.beam conftest.$ac_ext
16092fi
16093
16094 CFLAGS="$saved_cflags"
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16096$as_echo "$have_ipa_pure_const_bug" >&6; }
16097 if test "$have_ipa_pure_const_bug" = yes; then
16098
16099$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16100
16101 fi
16102 ;;
16103 esac
16104fi
16105
Victor Stinner4f5366e2015-01-09 02:13:19 +010016106# Check for stdatomic.h
16107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16108$as_echo_n "checking for stdatomic.h... " >&6; }
16109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16110/* end confdefs.h. */
16111
16112
16113 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016114 atomic_int value = ATOMIC_VAR_INIT(1);
16115 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016116 int main() {
16117 int loaded_value = atomic_load(&value);
16118 return 0;
16119 }
16120
16121
16122_ACEOF
16123if ac_fn_c_try_link "$LINENO"; then :
16124 have_stdatomic_h=yes
16125else
16126 have_stdatomic_h=no
16127fi
16128rm -f core conftest.err conftest.$ac_objext \
16129 conftest$ac_exeext conftest.$ac_ext
16130
16131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16132$as_echo "$have_stdatomic_h" >&6; }
16133
16134if test "$have_stdatomic_h" = yes; then
16135
16136$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16137
16138fi
16139
16140# Check for GCC >= 4.7 __atomic builtins
16141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16142$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16144/* end confdefs.h. */
16145
16146
16147 volatile int val = 1;
16148 int main() {
16149 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16150 return 0;
16151 }
16152
16153
16154_ACEOF
16155if ac_fn_c_try_link "$LINENO"; then :
16156 have_builtin_atomic=yes
16157else
16158 have_builtin_atomic=no
16159fi
16160rm -f core conftest.err conftest.$ac_objext \
16161 conftest$ac_exeext conftest.$ac_ext
16162
16163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16164$as_echo "$have_builtin_atomic" >&6; }
16165
16166if test "$have_builtin_atomic" = yes; then
16167
16168$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16169
16170fi
16171
Ned Deily322f5ba2013-11-21 23:01:59 -080016172# ensurepip option
16173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16174$as_echo_n "checking for ensurepip... " >&6; }
16175
16176# Check whether --with-ensurepip was given.
16177if test "${with_ensurepip+set}" = set; then :
16178 withval=$with_ensurepip;
16179else
16180 with_ensurepip=upgrade
16181fi
16182
16183case $with_ensurepip in #(
16184 yes|upgrade) :
16185 ENSUREPIP=upgrade ;; #(
16186 install) :
16187 ENSUREPIP=install ;; #(
16188 no) :
16189 ENSUREPIP=no ;; #(
16190 *) :
16191 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16192esac
16193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16194$as_echo "$ENSUREPIP" >&6; }
16195
16196
Victor Stinner35a97c02015-03-08 02:59:09 +010016197# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16199$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201/* end confdefs.h. */
16202
16203
16204 #include <dirent.h>
16205
16206 int main() {
16207 struct dirent entry;
16208 return entry.d_type == DT_UNKNOWN;
16209 }
16210
16211
16212_ACEOF
16213if ac_fn_c_try_link "$LINENO"; then :
16214 have_dirent_d_type=yes
16215else
16216 have_dirent_d_type=no
16217fi
16218rm -f core conftest.err conftest.$ac_objext \
16219 conftest$ac_exeext conftest.$ac_ext
16220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16221$as_echo "$have_dirent_d_type" >&6; }
16222
16223if test "$have_dirent_d_type" = yes; then
16224
16225$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16226
16227fi
16228
Victor Stinner9eb57c52015-03-19 22:21:49 +010016229# check if the Linux getrandom() syscall is available
16230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16231$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16233/* end confdefs.h. */
16234
16235
16236 #include <sys/syscall.h>
16237
16238 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016239 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016240 const size_t buflen = sizeof(buffer);
16241 const int flags = 0;
Victor Stinner9eb57c52015-03-19 22:21:49 +010016242 /* ignore the result, Python checks for ENOSYS at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016243 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016244 return 0;
16245 }
16246
16247
16248_ACEOF
16249if ac_fn_c_try_link "$LINENO"; then :
16250 have_getrandom_syscall=yes
16251else
16252 have_getrandom_syscall=no
16253fi
16254rm -f core conftest.err conftest.$ac_objext \
16255 conftest$ac_exeext conftest.$ac_ext
16256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16257$as_echo "$have_getrandom_syscall" >&6; }
16258
16259if test "$have_getrandom_syscall" = yes; then
16260
16261$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16262
16263fi
16264
Victor Stinnerbae2d622015-10-01 09:47:30 +020016265# check if the getrandom() function is available
16266# the test was written for the Solaris function of <sys/random.h>
16267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16268$as_echo_n "checking for the getrandom() function... " >&6; }
16269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16270/* end confdefs.h. */
16271
16272
16273 #include <sys/random.h>
16274
16275 int main() {
16276 char buffer[1];
16277 const size_t buflen = sizeof(buffer);
16278 const int flags = 0;
16279 /* ignore the result, Python checks for ENOSYS at runtime */
16280 (void)getrandom(buffer, buflen, flags);
16281 return 0;
16282 }
16283
16284
16285_ACEOF
16286if ac_fn_c_try_link "$LINENO"; then :
16287 have_getrandom=yes
16288else
16289 have_getrandom=no
16290fi
16291rm -f core conftest.err conftest.$ac_objext \
16292 conftest$ac_exeext conftest.$ac_ext
16293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16294$as_echo "$have_getrandom" >&6; }
16295
16296if test "$have_getrandom" = yes; then
16297
16298$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16299
16300fi
16301
Guido van Rossum627b2d71993-12-24 10:39:16 +000016302# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016303ac_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 +000016304
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016305ac_config_files="$ac_config_files Modules/ld_so_aix"
16306
Martin v. Löwis11437992002-04-12 09:54:03 +000016307cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016308# This file is a shell script that caches the results of configure
16309# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016310# scripts and configure runs, see configure's option --config-cache.
16311# It is not useful on other systems. If it contains results you don't
16312# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016313#
Martin v. Löwis11437992002-04-12 09:54:03 +000016314# config.status only pays attention to the cache file if you give it
16315# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016316#
Skip Montanaro6dead952003-09-25 14:50:04 +000016317# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016318# loading this file, other *unset* `ac_cv_foo' will be assigned the
16319# following values.
16320
16321_ACEOF
16322
Guido van Rossumf78abae1997-01-21 22:02:36 +000016323# The following way of writing the cache mishandles newlines in values,
16324# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016325# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016326# Ultrix sh set writes to stderr and can't be redirected directly,
16327# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328(
16329 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16330 eval ac_val=\$$ac_var
16331 case $ac_val in #(
16332 *${as_nl}*)
16333 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016334 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16335$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016336 esac
16337 case $ac_var in #(
16338 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016339 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16340 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016341 esac ;;
16342 esac
16343 done
16344
Martin v. Löwis11437992002-04-12 09:54:03 +000016345 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016346 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16347 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016348 # `set' does not quote correctly, so add quotes: double-quote
16349 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016351 "s/'/'\\\\''/g;
16352 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016354 *)
16355 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016356 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016358 esac |
16359 sort
16360) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016361 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016364 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016365 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16366 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16368 :end' >>confcache
16369if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16370 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016371 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016372 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16373$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016374 if test ! -f "$cache_file" || test -h "$cache_file"; then
16375 cat confcache >"$cache_file"
16376 else
16377 case $cache_file in #(
16378 */* | ?:*)
16379 mv -f confcache "$cache_file"$$ &&
16380 mv -f "$cache_file"$$ "$cache_file" ;; #(
16381 *)
16382 mv -f confcache "$cache_file" ;;
16383 esac
16384 fi
16385 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016386 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016387 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16388$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016389 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016390fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016391rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016392
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016393test "x$prefix" = xNONE && prefix=$ac_default_prefix
16394# Let make expand exec_prefix.
16395test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016397DEFS=-DHAVE_CONFIG_H
16398
Skip Montanaro6dead952003-09-25 14:50:04 +000016399ac_libobjs=
16400ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016401U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016402for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16403 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016405 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16407 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016408 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16409 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016410done
16411LIBOBJS=$ac_libobjs
16412
16413LTLIBOBJS=$ac_ltlibobjs
16414
16415
Martin v. Löwis11437992002-04-12 09:54:03 +000016416
Matthias Kloseb9621712010-04-24 17:59:49 +000016417
Victor Stinnere0be4232011-10-25 13:06:09 +020016418: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016419ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016420ac_clean_files_save=$ac_clean_files
16421ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016422{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16423$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16424as_write_fail=0
16425cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016426#! $SHELL
16427# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016428# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016429# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016430# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016431
Martin v. Löwis11437992002-04-12 09:54:03 +000016432debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016433ac_cs_recheck=false
16434ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016435
Matthias Kloseb9621712010-04-24 17:59:49 +000016436SHELL=\${CONFIG_SHELL-$SHELL}
16437export SHELL
16438_ASEOF
16439cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16440## -------------------- ##
16441## M4sh Initialization. ##
16442## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016444# Be more Bourne compatible
16445DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016446if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 emulate sh
16448 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016449 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016450 # is contrary to our usage. Disable this feature.
16451 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016453else
Matthias Kloseb9621712010-04-24 17:59:49 +000016454 case `(set -o) 2>/dev/null` in #(
16455 *posix*) :
16456 set -o posix ;; #(
16457 *) :
16458 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016459esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016460fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016461
16462
Matthias Kloseb9621712010-04-24 17:59:49 +000016463as_nl='
16464'
16465export as_nl
16466# Printing a long string crashes Solaris 7 /usr/bin/printf.
16467as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16468as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16469as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16470# Prefer a ksh shell builtin over an external printf program on Solaris,
16471# but without wasting forks for bash or zsh.
16472if test -z "$BASH_VERSION$ZSH_VERSION" \
16473 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16474 as_echo='print -r --'
16475 as_echo_n='print -rn --'
16476elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16477 as_echo='printf %s\n'
16478 as_echo_n='printf %s'
16479else
16480 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16481 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16482 as_echo_n='/usr/ucb/echo -n'
16483 else
16484 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16485 as_echo_n_body='eval
16486 arg=$1;
16487 case $arg in #(
16488 *"$as_nl"*)
16489 expr "X$arg" : "X\\(.*\\)$as_nl";
16490 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16491 esac;
16492 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16493 '
16494 export as_echo_n_body
16495 as_echo_n='sh -c $as_echo_n_body as_echo'
16496 fi
16497 export as_echo_body
16498 as_echo='sh -c $as_echo_body as_echo'
16499fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016500
16501# The user is always right.
16502if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016503 PATH_SEPARATOR=:
16504 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16505 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16506 PATH_SEPARATOR=';'
16507 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016510
16511# IFS
16512# We need space, tab and new line, in precisely that order. Quoting is
16513# there to prevent editors from complaining about space-tab.
16514# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16515# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516IFS=" "" $as_nl"
16517
16518# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016519as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016520case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521 *[\\/]* ) as_myself=$0 ;;
16522 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016523for as_dir in $PATH
16524do
16525 IFS=$as_save_IFS
16526 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016527 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16528 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531 ;;
16532esac
16533# We did not find ourselves, most probably we were run as `sh COMMAND'
16534# in which case we are not to be found in the path.
16535if test "x$as_myself" = x; then
16536 as_myself=$0
16537fi
16538if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016539 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16540 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016541fi
16542
Matthias Kloseb9621712010-04-24 17:59:49 +000016543# Unset variables that we do not need and which cause bugs (e.g. in
16544# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16545# suppresses any "Segmentation fault" message there. '((' could
16546# trigger a bug in pdksh 5.2.14.
16547for as_var in BASH_ENV ENV MAIL MAILPATH
16548do eval test x\${$as_var+set} = xset \
16549 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550done
16551PS1='$ '
16552PS2='> '
16553PS4='+ '
16554
16555# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016556LC_ALL=C
16557export LC_ALL
16558LANGUAGE=C
16559export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560
Matthias Kloseb9621712010-04-24 17:59:49 +000016561# CDPATH.
16562(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16563
16564
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016565# as_fn_error STATUS ERROR [LINENO LOG_FD]
16566# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016567# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16568# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016569# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016570as_fn_error ()
16571{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016572 as_status=$1; test $as_status -eq 0 && as_status=1
16573 if test "$4"; then
16574 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16575 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016576 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016577 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016578 as_fn_exit $as_status
16579} # as_fn_error
16580
16581
16582# as_fn_set_status STATUS
16583# -----------------------
16584# Set $? to STATUS, without forking.
16585as_fn_set_status ()
16586{
16587 return $1
16588} # as_fn_set_status
16589
16590# as_fn_exit STATUS
16591# -----------------
16592# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16593as_fn_exit ()
16594{
16595 set +e
16596 as_fn_set_status $1
16597 exit $1
16598} # as_fn_exit
16599
16600# as_fn_unset VAR
16601# ---------------
16602# Portably unset VAR.
16603as_fn_unset ()
16604{
16605 { eval $1=; unset $1;}
16606}
16607as_unset=as_fn_unset
16608# as_fn_append VAR VALUE
16609# ----------------------
16610# Append the text in VALUE to the end of the definition contained in VAR. Take
16611# advantage of any shell optimizations that allow amortized linear growth over
16612# repeated appends, instead of the typical quadratic growth present in naive
16613# implementations.
16614if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16615 eval 'as_fn_append ()
16616 {
16617 eval $1+=\$2
16618 }'
16619else
16620 as_fn_append ()
16621 {
16622 eval $1=\$$1\$2
16623 }
16624fi # as_fn_append
16625
16626# as_fn_arith ARG...
16627# ------------------
16628# Perform arithmetic evaluation on the ARGs, and store the result in the
16629# global $as_val. Take advantage of shells that can avoid forks. The arguments
16630# must be portable across $(()) and expr.
16631if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16632 eval 'as_fn_arith ()
16633 {
16634 as_val=$(( $* ))
16635 }'
16636else
16637 as_fn_arith ()
16638 {
16639 as_val=`expr "$@" || test $? -eq 1`
16640 }
16641fi # as_fn_arith
16642
16643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644if expr a : '\(a\)' >/dev/null 2>&1 &&
16645 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16646 as_expr=expr
16647else
16648 as_expr=false
16649fi
16650
16651if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16652 as_basename=basename
16653else
16654 as_basename=false
16655fi
16656
Matthias Kloseb9621712010-04-24 17:59:49 +000016657if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16658 as_dirname=dirname
16659else
16660 as_dirname=false
16661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663as_me=`$as_basename -- "$0" ||
16664$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16665 X"$0" : 'X\(//\)$' \| \
16666 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016667$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016668 sed '/^.*\/\([^/][^/]*\)\/*$/{
16669 s//\1/
16670 q
16671 }
16672 /^X\/\(\/\/\)$/{
16673 s//\1/
16674 q
16675 }
16676 /^X\/\(\/\).*/{
16677 s//\1/
16678 q
16679 }
16680 s/.*/./; q'`
16681
Matthias Kloseb9621712010-04-24 17:59:49 +000016682# Avoid depending upon Character Ranges.
16683as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16684as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16685as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16686as_cr_digits='0123456789'
16687as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688
16689ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016690case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016692 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016694 xy) ECHO_C='\c';;
16695 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16696 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016697 esac;;
16698*)
16699 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016700esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016701
Martin v. Löwis11437992002-04-12 09:54:03 +000016702rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703if test -d conf$$.dir; then
16704 rm -f conf$$.dir/conf$$.file
16705else
16706 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016707 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016709if (echo >conf$$.file) 2>/dev/null; then
16710 if ln -s conf$$.file conf$$ 2>/dev/null; then
16711 as_ln_s='ln -s'
16712 # ... but there are two gotchas:
16713 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16714 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016715 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016716 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016717 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016718 elif ln conf$$.file conf$$ 2>/dev/null; then
16719 as_ln_s=ln
16720 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016721 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016723else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016724 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16727rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016728
Matthias Kloseb9621712010-04-24 17:59:49 +000016729
16730# as_fn_mkdir_p
16731# -------------
16732# Create "$as_dir" as a directory, including parents if necessary.
16733as_fn_mkdir_p ()
16734{
16735
16736 case $as_dir in #(
16737 -*) as_dir=./$as_dir;;
16738 esac
16739 test -d "$as_dir" || eval $as_mkdir_p || {
16740 as_dirs=
16741 while :; do
16742 case $as_dir in #(
16743 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16744 *) as_qdir=$as_dir;;
16745 esac
16746 as_dirs="'$as_qdir' $as_dirs"
16747 as_dir=`$as_dirname -- "$as_dir" ||
16748$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16749 X"$as_dir" : 'X\(//\)[^/]' \| \
16750 X"$as_dir" : 'X\(//\)$' \| \
16751 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16752$as_echo X"$as_dir" |
16753 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16754 s//\1/
16755 q
16756 }
16757 /^X\(\/\/\)[^/].*/{
16758 s//\1/
16759 q
16760 }
16761 /^X\(\/\/\)$/{
16762 s//\1/
16763 q
16764 }
16765 /^X\(\/\).*/{
16766 s//\1/
16767 q
16768 }
16769 s/.*/./; q'`
16770 test -d "$as_dir" && break
16771 done
16772 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016773 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016774
16775
16776} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016777if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016778 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016779else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016780 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016781 as_mkdir_p=false
16782fi
16783
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016784
16785# as_fn_executable_p FILE
16786# -----------------------
16787# Test if FILE is an executable regular file.
16788as_fn_executable_p ()
16789{
16790 test -f "$1" && test -x "$1"
16791} # as_fn_executable_p
16792as_test_x='test -x'
16793as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016794
16795# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016796as_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 +000016797
16798# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016799as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016800
16801
Martin v. Löwis11437992002-04-12 09:54:03 +000016802exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016803## ----------------------------------- ##
16804## Main body of $CONFIG_STATUS script. ##
16805## ----------------------------------- ##
16806_ASEOF
16807test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016808
Matthias Kloseb9621712010-04-24 17:59:49 +000016809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16810# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016811# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812# values after options handling.
16813ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016814This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016815generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016816
16817 CONFIG_FILES = $CONFIG_FILES
16818 CONFIG_HEADERS = $CONFIG_HEADERS
16819 CONFIG_LINKS = $CONFIG_LINKS
16820 CONFIG_COMMANDS = $CONFIG_COMMANDS
16821 $ $0 $@
16822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016823on `(hostname || uname -n) 2>/dev/null | sed 1q`
16824"
16825
Martin v. Löwis11437992002-04-12 09:54:03 +000016826_ACEOF
16827
Matthias Kloseb9621712010-04-24 17:59:49 +000016828case $ac_config_files in *"
16829"*) set x $ac_config_files; shift; ac_config_files=$*;;
16830esac
16831
16832case $ac_config_headers in *"
16833"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16834esac
16835
16836
16837cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016838# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016839config_files="$ac_config_files"
16840config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016843
Matthias Kloseb9621712010-04-24 17:59:49 +000016844cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016845ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016846\`$as_me' instantiates files and other configuration actions
16847from templates according to the current configuration. Unless the files
16848and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016849
Matthias Kloseb9621712010-04-24 17:59:49 +000016850Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016851
16852 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016854 --config print configuration, then exit
16855 -q, --quiet, --silent
16856 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 -d, --debug don't remove temporary files
16858 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016859 --file=FILE[:TEMPLATE]
16860 instantiate the configuration file FILE
16861 --header=FILE[:TEMPLATE]
16862 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016863
16864Configuration files:
16865$config_files
16866
16867Configuration headers:
16868$config_headers
16869
Matthias Kloseb9621712010-04-24 17:59:49 +000016870Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16874ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016875ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016876python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016877configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016879
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016880Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016881This config.status script is free software; the Free Software Foundation
16882gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883
16884ac_pwd='$ac_pwd'
16885srcdir='$srcdir'
16886INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016887MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016888test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016889_ACEOF
16890
Matthias Kloseb9621712010-04-24 17:59:49 +000016891cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16892# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016893ac_need_defaults=:
16894while test $# != 0
16895do
16896 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016897 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016898 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16899 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016900 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016902 --*=)
16903 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16904 ac_optarg=
16905 ac_shift=:
16906 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016908 ac_option=$1
16909 ac_optarg=$2
16910 ac_shift=shift
16911 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016912 esac
16913
Skip Montanaro6dead952003-09-25 14:50:04 +000016914 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016916 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16917 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016918 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016919 $as_echo "$ac_cs_version"; exit ;;
16920 --config | --confi | --conf | --con | --co | --c )
16921 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016922 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016923 debug=: ;;
16924 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016925 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016926 case $ac_optarg in
16927 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016928 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016929 esac
16930 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016931 ac_need_defaults=false;;
16932 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016933 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016934 case $ac_optarg in
16935 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16936 esac
16937 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016938 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016939 --he | --h)
16940 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016941 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016942Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016943 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016944 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016945 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16946 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16947 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016948
16949 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016950 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016951Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016952
Matthias Kloseb9621712010-04-24 17:59:49 +000016953 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016954 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016955
16956 esac
16957 shift
16958done
16959
Skip Montanaro6dead952003-09-25 14:50:04 +000016960ac_configure_extra_args=
16961
16962if $ac_cs_silent; then
16963 exec 6>/dev/null
16964 ac_configure_extra_args="$ac_configure_extra_args --silent"
16965fi
16966
16967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016968cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016969if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016970 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016971 shift
16972 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16973 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016974 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016975 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016976fi
16977
Martin v. Löwis11437992002-04-12 09:54:03 +000016978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016979cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016980exec 5>>config.log
16981{
16982 echo
16983 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16984## Running $as_me. ##
16985_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016986 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016990cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016992
Matthias Kloseb9621712010-04-24 17:59:49 +000016993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016994
16995# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016996for ac_config_target in $ac_config_targets
16997do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016998 case $ac_config_target in
16999 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17000 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17001 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017002 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17003 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17005 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017006 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017007 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017008 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009
Victor Stinnere0be4232011-10-25 13:06:09 +020017010 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017011 esac
17012done
17013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014
Martin v. Löwis11437992002-04-12 09:54:03 +000017015# If the user did not use the arguments to specify the items to instantiate,
17016# then the envvar interface is used. Set only those that are not.
17017# We use the long form for the default assignment because of an extremely
17018# bizarre bug on SunOS 4.1.3.
17019if $ac_need_defaults; then
17020 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17021 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17022fi
17023
Skip Montanaro6dead952003-09-25 14:50:04 +000017024# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017025# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017026# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027# Hook for its removal unless debugging.
17028# Note that there is a small window in which the directory will not be cleaned:
17029# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017030$debug ||
17031{
Victor Stinnere0be4232011-10-25 13:06:09 +020017032 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017034 : "${ac_tmp:=$tmp}"
17035 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017037 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017038}
Martin v. Löwis11437992002-04-12 09:54:03 +000017039# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017040
Martin v. Löwis11437992002-04-12 09:54:03 +000017041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017043 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017044} ||
17045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046 tmp=./conf$$-$RANDOM
17047 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017048} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017049ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017050
Matthias Kloseb9621712010-04-24 17:59:49 +000017051# Set up the scripts for CONFIG_FILES section.
17052# No need to generate them if there are no CONFIG_FILES.
17053# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017054if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017055
Matthias Kloseb9621712010-04-24 17:59:49 +000017056
17057ac_cr=`echo X | tr X '\015'`
17058# On cygwin, bash can eat \r inside `` if the user requested igncr.
17059# But we know of no other shell where ac_cr would be empty at this
17060# point, so we can use a bashism as a fallback.
17061if test "x$ac_cr" = x; then
17062 eval ac_cr=\$\'\\r\'
17063fi
17064ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17065if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017066 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017067else
17068 ac_cs_awk_cr=$ac_cr
17069fi
17070
Victor Stinnere0be4232011-10-25 13:06:09 +020017071echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017072_ACEOF
17073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074
Matthias Kloseb9621712010-04-24 17:59:49 +000017075{
17076 echo "cat >conf$$subs.awk <<_ACEOF" &&
17077 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17078 echo "_ACEOF"
17079} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017080 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17081ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082ac_delim='%!_!# '
17083for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017084 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017085 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086
Matthias Kloseb9621712010-04-24 17:59:49 +000017087 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17088 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017089 break
17090 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017091 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092 else
17093 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095done
Matthias Kloseb9621712010-04-24 17:59:49 +000017096rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097
Matthias Kloseb9621712010-04-24 17:59:49 +000017098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017099cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017101sed -n '
17102h
17103s/^/S["/; s/!.*/"]=/
17104p
17105g
17106s/^[^!]*!//
17107:repl
17108t repl
17109s/'"$ac_delim"'$//
17110t delim
17111:nl
17112h
17113s/\(.\{148\}\)..*/\1/
17114t more1
17115s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17116p
17117n
17118b repl
17119:more1
17120s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17121p
17122g
17123s/.\{148\}//
17124t nl
17125:delim
17126h
17127s/\(.\{148\}\)..*/\1/
17128t more2
17129s/["\\]/\\&/g; s/^/"/; s/$/"/
17130p
17131b
17132:more2
17133s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17134p
17135g
17136s/.\{148\}//
17137t delim
17138' <conf$$subs.awk | sed '
17139/^[^""]/{
17140 N
17141 s/\n//
17142}
17143' >>$CONFIG_STATUS || ac_write_fail=1
17144rm -f conf$$subs.awk
17145cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17146_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017147cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017148 for (key in S) S_is_set[key] = 1
17149 FS = ""
17150
17151}
17152{
17153 line = $ 0
17154 nfields = split(line, field, "@")
17155 substed = 0
17156 len = length(field[1])
17157 for (i = 2; i < nfields; i++) {
17158 key = field[i]
17159 keylen = length(key)
17160 if (S_is_set[key]) {
17161 value = S[key]
17162 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17163 len += length(value) + length(field[++i])
17164 substed = 1
17165 } else
17166 len += 1 + keylen
17167 }
17168
17169 print line
17170}
17171
17172_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17175if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17176 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17177else
17178 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017179fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017180 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017181_ACEOF
17182
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017183# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17184# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185# trailing colons and then remove the whole line if VPATH becomes empty
17186# (actually we leave an empty line to preserve line numbers).
17187if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017188 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17189h
17190s///
17191s/^/:/
17192s/[ ]*$/:/
17193s/:\$(srcdir):/:/g
17194s/:\${srcdir}:/:/g
17195s/:@srcdir@:/:/g
17196s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017198x
17199s/\(=[ ]*\).*/\1/
17200G
17201s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202s/^[^=]*=[ ]*$//
17203}'
17204fi
17205
Matthias Kloseb9621712010-04-24 17:59:49 +000017206cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017207fi # test -n "$CONFIG_FILES"
17208
Matthias Kloseb9621712010-04-24 17:59:49 +000017209# Set up the scripts for CONFIG_HEADERS section.
17210# No need to generate them if there are no CONFIG_HEADERS.
17211# This happens for instance with `./config.status Makefile'.
17212if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017213cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017214BEGIN {
17215_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216
Matthias Kloseb9621712010-04-24 17:59:49 +000017217# Transform confdefs.h into an awk script `defines.awk', embedded as
17218# here-document in config.status, that substitutes the proper values into
17219# config.h.in to produce config.h.
17220
17221# Create a delimiter string that does not exist in confdefs.h, to ease
17222# handling of long lines.
17223ac_delim='%!_!# '
17224for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017225 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17226 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017227 break
17228 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017229 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017230 else
17231 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17232 fi
17233done
17234
17235# For the awk script, D is an array of macro values keyed by name,
17236# likewise P contains macro parameters if any. Preserve backslash
17237# newline sequences.
17238
17239ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17240sed -n '
17241s/.\{148\}/&'"$ac_delim"'/g
17242t rset
17243:rset
17244s/^[ ]*#[ ]*define[ ][ ]*/ /
17245t def
17246d
17247:def
17248s/\\$//
17249t bsnl
17250s/["\\]/\\&/g
17251s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17252D["\1"]=" \3"/p
17253s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17254d
17255:bsnl
17256s/["\\]/\\&/g
17257s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17258D["\1"]=" \3\\\\\\n"\\/p
17259t cont
17260s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17261t cont
17262d
17263:cont
17264n
17265s/.\{148\}/&'"$ac_delim"'/g
17266t clear
17267:clear
17268s/\\$//
17269t bsnlc
17270s/["\\]/\\&/g; s/^/"/; s/$/"/p
17271d
17272:bsnlc
17273s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17274b cont
17275' <confdefs.h | sed '
17276s/'"$ac_delim"'/"\\\
17277"/g' >>$CONFIG_STATUS || ac_write_fail=1
17278
17279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17280 for (key in D) D_is_set[key] = 1
17281 FS = ""
17282}
17283/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17284 line = \$ 0
17285 split(line, arg, " ")
17286 if (arg[1] == "#") {
17287 defundef = arg[2]
17288 mac1 = arg[3]
17289 } else {
17290 defundef = substr(arg[1], 2)
17291 mac1 = arg[2]
17292 }
17293 split(mac1, mac2, "(") #)
17294 macro = mac2[1]
17295 prefix = substr(line, 1, index(line, defundef) - 1)
17296 if (D_is_set[macro]) {
17297 # Preserve the white space surrounding the "#".
17298 print prefix "define", macro P[macro] D[macro]
17299 next
17300 } else {
17301 # Replace #undef with comments. This is necessary, for example,
17302 # in the case of _POSIX_SOURCE, which is predefined and required
17303 # on some systems where configure will not decide to define it.
17304 if (defundef == "undef") {
17305 print "/*", prefix defundef, macro, "*/"
17306 next
17307 }
17308 }
17309}
17310{ print }
17311_ACAWK
17312_ACEOF
17313cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017314 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017315fi # test -n "$CONFIG_HEADERS"
17316
17317
17318eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17319shift
17320for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321do
17322 case $ac_tag in
17323 :[FHLC]) ac_mode=$ac_tag; continue;;
17324 esac
17325 case $ac_mode$ac_tag in
17326 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017327 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328 :[FH]-) ac_tag=-:-;;
17329 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17330 esac
17331 ac_save_IFS=$IFS
17332 IFS=:
17333 set x $ac_tag
17334 IFS=$ac_save_IFS
17335 shift
17336 ac_file=$1
17337 shift
17338
17339 case $ac_mode in
17340 :L) ac_source=$1;;
17341 :[FH])
17342 ac_file_inputs=
17343 for ac_f
17344 do
17345 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017346 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347 *) # Look for the file first in the build tree, then in the source tree
17348 # (if the path is not absolute). The absolute path cannot be DOS-style,
17349 # because $ac_f cannot contain `:'.
17350 test -f "$ac_f" ||
17351 case $ac_f in
17352 [\\/$]*) false;;
17353 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17354 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017355 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017357 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17358 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359 done
17360
17361 # Let's still pretend it is `configure' which instantiates (i.e., don't
17362 # use $as_me), people would be surprised to read:
17363 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017364 configure_input='Generated from '`
17365 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17366 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367 if test x"$ac_file" != x-; then
17368 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017369 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17370$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017372 # Neutralize special characters interpreted by sed in replacement strings.
17373 case $configure_input in #(
17374 *\&* | *\|* | *\\* )
17375 ac_sed_conf_input=`$as_echo "$configure_input" |
17376 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17377 *) ac_sed_conf_input=$configure_input;;
17378 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379
17380 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017381 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17382 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383 esac
17384 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017385 esac
17386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017388$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017389 X"$ac_file" : 'X\(//\)[^/]' \| \
17390 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017392$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17394 s//\1/
17395 q
17396 }
17397 /^X\(\/\/\)[^/].*/{
17398 s//\1/
17399 q
17400 }
17401 /^X\(\/\/\)$/{
17402 s//\1/
17403 q
17404 }
17405 /^X\(\/\).*/{
17406 s//\1/
17407 q
17408 }
17409 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017410 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017411 ac_builddir=.
17412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413case "$ac_dir" in
17414.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17415*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017416 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017418 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 case $ac_top_builddir_sub in
17420 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17421 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17422 esac ;;
17423esac
17424ac_abs_top_builddir=$ac_pwd
17425ac_abs_builddir=$ac_pwd$ac_dir_suffix
17426# for backward compatibility:
17427ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017428
17429case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017431 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432 ac_top_srcdir=$ac_top_builddir_sub
17433 ac_abs_top_srcdir=$ac_pwd ;;
17434 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017435 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017436 ac_top_srcdir=$srcdir
17437 ac_abs_top_srcdir=$srcdir ;;
17438 *) # Relative name.
17439 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17440 ac_top_srcdir=$ac_top_build_prefix$srcdir
17441 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017442esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017443ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017444
Martin v. Löwis11437992002-04-12 09:54:03 +000017445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446 case $ac_mode in
17447 :F)
17448 #
17449 # CONFIG_FILE
17450 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017451
17452 case $INSTALL in
17453 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017455 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017456 ac_MKDIR_P=$MKDIR_P
17457 case $MKDIR_P in
17458 [\\/$]* | ?:[\\/]* ) ;;
17459 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17460 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017461_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462
Matthias Kloseb9621712010-04-24 17:59:49 +000017463cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464# If the template does not know about datarootdir, expand it.
17465# FIXME: This hack should be removed a few years after 2.60.
17466ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017467ac_sed_dataroot='
17468/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469 p
17470 q
17471}
17472/@datadir@/p
17473/@docdir@/p
17474/@infodir@/p
17475/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017476/@mandir@/p'
17477case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478*datarootdir*) ac_datarootdir_seen=yes;;
17479*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17481$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484 ac_datarootdir_hack='
17485 s&@datadir@&$datadir&g
17486 s&@docdir@&$docdir&g
17487 s&@infodir@&$infodir&g
17488 s&@localedir@&$localedir&g
17489 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017490 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017491esac
17492_ACEOF
17493
17494# Neutralize VPATH when `$srcdir' = `.'.
17495# Shell code in configure.ac might set extrasub.
17496# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17498ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017499$extrasub
17500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017501cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017502:t
17503/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017504s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017506s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507s&@srcdir@&$ac_srcdir&;t t
17508s&@abs_srcdir@&$ac_abs_srcdir&;t t
17509s&@top_srcdir@&$ac_top_srcdir&;t t
17510s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17511s&@builddir@&$ac_builddir&;t t
17512s&@abs_builddir@&$ac_abs_builddir&;t t
17513s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17514s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017515s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017517"
Victor Stinnere0be4232011-10-25 13:06:09 +020017518eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17519 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017522 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17523 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17524 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017526which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017527$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017528which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017529
Victor Stinnere0be4232011-10-25 13:06:09 +020017530 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017531 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017532 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17533 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017534 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017535 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536 ;;
17537 :H)
17538 #
17539 # CONFIG_HEADER
17540 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017541 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017542 {
17543 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017544 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17545 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017546 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017547 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017548 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17549$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017550 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017551 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017552 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017553 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017554 fi
17555 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017556 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017557 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017558 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562
17563 esac
17564
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017565
17566 case $ac_file$ac_mode in
17567 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17568
17569 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570done # for ac_tag
17571
Guido van Rossum627b2d71993-12-24 10:39:16 +000017572
Matthias Kloseb9621712010-04-24 17:59:49 +000017573as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017574_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017575ac_clean_files=$ac_clean_files_save
17576
Matthias Kloseb9621712010-04-24 17:59:49 +000017577test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017578 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017579
Martin v. Löwis11437992002-04-12 09:54:03 +000017580
17581# configure is writing to config.log, and then calls config.status.
17582# config.status does its own redirection, appending to config.log.
17583# Unfortunately, on DOS this fails, as config.log is still kept open
17584# by configure, so config.status won't be able to write to it; its
17585# output is simply discarded. So we exec the FD to /dev/null,
17586# effectively closing config.log, so it can be properly (re)opened and
17587# appended to by config.status. When coming back to configure, we
17588# need to make the FD available again.
17589if test "$no_create" != yes; then
17590 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017591 ac_config_status_args=
17592 test "$silent" = yes &&
17593 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017594 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017595 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017596 exec 5>>config.log
17597 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17598 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017599 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017600fi
17601if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17603$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017604fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017605
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017606
Christian Heimes75ed8902013-11-20 01:11:18 +010017607echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017608if test ! -f Modules/Setup
17609then
17610 cp $srcdir/Modules/Setup.dist Modules/Setup
17611fi
17612
Christian Heimes75ed8902013-11-20 01:11:18 +010017613echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017614if test ! -f Modules/Setup.local
17615then
17616 echo "# Edit this file for local setup changes" >Modules/Setup.local
17617fi
17618
Christian Heimes75ed8902013-11-20 01:11:18 +010017619echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017620$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17621 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017622 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017623mv config.c Modules