blob: 0eff26d0054df5ca9d55131f88bc3f02440024b1 [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"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006966
6967 # Don't enable unreachable code warning in debug mode, since it usually
6968 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006969 # Issue #24324: Unfortunately, the unreachable code warning does not work
6970 # correctly on gcc and has been silently removed from the compiler.
6971 # It is supported on clang but on OS X systems gcc may be an alias
6972 # for clang. Try to determine if the compiler is not really gcc and,
6973 # if so, only then enable the warning.
6974 if test $ac_cv_enable_unreachable_code_warning = yes && \
6975 test "$Py_DEBUG" != "true" && \
6976 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006977 then
6978 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006979 else
6980 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006981 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6983$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006984
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6986 # support. Without this, treatment of subnormals doesn't follow
6987 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006988 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989 alpha*)
6990 BASECFLAGS="$BASECFLAGS -mieee"
6991 ;;
6992 esac
6993
6994 case $ac_sys_system in
6995 SCO_SV*)
6996 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6997 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006998
6999 # is there any other compiler on Darwin besides gcc?
7000 Darwin*)
7001 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7002 # used to be here, but non-Apple gcc doesn't accept them.
7003 if test "${CC}" = gcc
7004 then
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007006$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007007 case "${UNIVERSALSDK}" in
7008 */MacOSX10.4u.sdk)
7009 # Build using 10.4 SDK, force usage of gcc when the
7010 # compiler is gcc, otherwise the user will get very
7011 # confusing error messages when building on OSX 10.6
7012 CC=gcc-4.0
7013 CPP=cpp-4.0
7014 ;;
7015 esac
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007017$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007018 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007019
Ned Deily87adb6e2013-10-18 21:09:56 -07007020 if test "${enable_universalsdk}"
7021 then
7022 case "$UNIVERSAL_ARCHS" in
7023 32-bit)
7024 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7025 LIPO_32BIT_FLAGS=""
7026 ARCH_RUN_32BIT=""
7027 ;;
7028 64-bit)
7029 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7030 LIPO_32BIT_FLAGS=""
7031 ARCH_RUN_32BIT="true"
7032 ;;
7033 all)
7034 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7035 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7036 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7037 ;;
7038 intel)
7039 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7040 LIPO_32BIT_FLAGS="-extract i386"
7041 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7042 ;;
7043 intel-32)
7044 UNIVERSAL_ARCH_FLAGS="-arch i386"
7045 LIPO_32BIT_FLAGS=""
7046 ARCH_RUN_32BIT=""
7047 ;;
7048 3-way)
7049 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7050 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7051 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7052 ;;
7053 *)
7054 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7055 ;;
7056 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007057
Ned Deily87adb6e2013-10-18 21:09:56 -07007058 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7059 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7060 if test "${UNIVERSALSDK}" != "/"
7061 then
7062 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7063 fi
7064 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065
Ned Deily87adb6e2013-10-18 21:09:56 -07007066 # Calculate an appropriate deployment target for this build:
7067 # The deployment target value is used explicitly to enable certain
7068 # features are enabled (such as builtin libedit support for readline)
7069 # through the use of Apple's Availabiliy Macros and is used as a
7070 # component of the string returned by distutils.get_platform().
7071 #
7072 # Use the value from:
7073 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7074 # 2. the operating system version of the build machine if >= 10.6
7075 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7076 # below to pick either 10.3, 10.4, or 10.5 as the target.
7077 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007078
Ned Deily87adb6e2013-10-18 21:09:56 -07007079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7080$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007081 cur_target_major=`sw_vers -productVersion | \
7082 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7083 cur_target_minor=`sw_vers -productVersion | \
7084 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7085 cur_target="${cur_target_major}.${cur_target_minor}"
7086 if test ${cur_target_major} -eq 10 && \
7087 test ${cur_target_minor} -ge 3 && \
7088 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007089 then
Ned Deily36820b62014-06-25 13:44:22 -07007090 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007091 cur_target=10.3
7092 if test ${enable_universalsdk}
7093 then
7094 case "$UNIVERSAL_ARCHS" in
7095 all|3-way|intel|64-bit)
7096 # These configurations were first supported in 10.5
7097 cur_target='10.5'
7098 ;;
7099 esac
7100 else
7101 if test `/usr/bin/arch` = "i386"
7102 then
7103 # 10.4 was the first release to support Intel archs
7104 cur_target="10.4"
7105 fi
7106 fi
7107 fi
7108 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007109
Ned Deily87adb6e2013-10-18 21:09:56 -07007110 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7111 # environment with a value that is the same as what we'll use
7112 # in the Makefile to ensure that we'll get the same compiler
7113 # environment during configure and build time.
7114 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7115 export MACOSX_DEPLOYMENT_TARGET
7116 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7118$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007119
Ned Deily87adb6e2013-10-18 21:09:56 -07007120 # end of Darwin* tests
7121 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007122 esac
7123 ;;
7124
7125*)
7126 case $ac_sys_system in
7127 OpenUNIX*|UnixWare*)
7128 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7129 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007130 SCO_SV*)
7131 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7132 ;;
7133 esac
7134 ;;
7135esac
7136
Zachary Ware5af85642015-12-21 12:09:17 -06007137# ICC needs -fp-model strict or floats behave badly
7138case "$CC" in
7139*icc*)
7140 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7141 ;;
7142esac
7143
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007144if test "$Py_DEBUG" = 'true'; then
7145 :
7146else
7147 OPT="-DNDEBUG $OPT"
7148fi
7149
7150if test "$ac_arch_flags"
7151then
7152 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7153fi
7154
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007155# On some compilers, pthreads are available without further options
7156# (e.g. MacOS X). On some of these systems, the compiler will not
7157# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7158# So we have to see first whether pthreads are available without
7159# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7161$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007162if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007164else
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007166 ac_cv_pthread_is_default=no
7167else
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007169/* end confdefs.h. */
7170
Stefan Krah7dba5942012-11-22 22:49:11 +01007171#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007172#include <pthread.h>
7173
7174void* routine(void* p){return NULL;}
7175
7176int main(){
7177 pthread_t p;
7178 if(pthread_create(&p,NULL,routine,NULL)!=0)
7179 return 1;
7180 (void)pthread_detach(p);
7181 return 0;
7182}
7183
7184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007185if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007186
7187 ac_cv_pthread_is_default=yes
7188 ac_cv_kthread=no
7189 ac_cv_pthread=no
7190
7191else
Matthias Kloseb9621712010-04-24 17:59:49 +00007192 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7195 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007196fi
7197
7198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007199fi
7200
Matthias Kloseb9621712010-04-24 17:59:49 +00007201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7202$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007203
7204
7205if test $ac_cv_pthread_is_default = yes
7206then
7207 ac_cv_kpthread=no
7208else
7209# -Kpthread, if available, provides the right #defines
7210# and linker options to make pthread_create available
7211# Some compilers won't report that they do not support -Kpthread,
7212# so we need to run a program to see whether it really made the
7213# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7215$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007216if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007217 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007218else
7219 ac_save_cc="$CC"
7220CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007221if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007222 ac_cv_kpthread=no
7223else
Matthias Kloseb9621712010-04-24 17:59:49 +00007224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007225/* end confdefs.h. */
7226
Stefan Krah7dba5942012-11-22 22:49:11 +01007227#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007228#include <pthread.h>
7229
7230void* routine(void* p){return NULL;}
7231
7232int main(){
7233 pthread_t p;
7234 if(pthread_create(&p,NULL,routine,NULL)!=0)
7235 return 1;
7236 (void)pthread_detach(p);
7237 return 0;
7238}
7239
7240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007241if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242 ac_cv_kpthread=yes
7243else
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007248fi
7249
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007250CC="$ac_save_cc"
7251fi
7252
Matthias Kloseb9621712010-04-24 17:59:49 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7254$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007255fi
7256
7257if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7258then
7259# -Kthread, if available, provides the right #defines
7260# and linker options to make pthread_create available
7261# Some compilers won't report that they do not support -Kthread,
7262# so we need to run a program to see whether it really made the
7263# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7265$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007266if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007267 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007268else
7269 ac_save_cc="$CC"
7270CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007271if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007272 ac_cv_kthread=no
7273else
Matthias Kloseb9621712010-04-24 17:59:49 +00007274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007275/* end confdefs.h. */
7276
Stefan Krah7dba5942012-11-22 22:49:11 +01007277#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278#include <pthread.h>
7279
7280void* routine(void* p){return NULL;}
7281
7282int main(){
7283 pthread_t p;
7284 if(pthread_create(&p,NULL,routine,NULL)!=0)
7285 return 1;
7286 (void)pthread_detach(p);
7287 return 0;
7288}
7289
7290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007291if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292 ac_cv_kthread=yes
7293else
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7297 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298fi
7299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007300CC="$ac_save_cc"
7301fi
7302
Matthias Kloseb9621712010-04-24 17:59:49 +00007303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7304$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007305fi
7306
7307if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7308then
7309# -pthread, if available, provides the right #defines
7310# and linker options to make pthread_create available
7311# Some compilers won't report that they do not support -pthread,
7312# so we need to run a program to see whether it really made the
7313# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7315$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007316if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318else
7319 ac_save_cc="$CC"
7320CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007321if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322 ac_cv_pthread=no
7323else
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007325/* end confdefs.h. */
7326
Stefan Krah7dba5942012-11-22 22:49:11 +01007327#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007328#include <pthread.h>
7329
7330void* routine(void* p){return NULL;}
7331
7332int main(){
7333 pthread_t p;
7334 if(pthread_create(&p,NULL,routine,NULL)!=0)
7335 return 1;
7336 (void)pthread_detach(p);
7337 return 0;
7338}
7339
7340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007341if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342 ac_cv_pthread=yes
7343else
Matthias Kloseb9621712010-04-24 17:59:49 +00007344 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7347 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348fi
7349
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007350CC="$ac_save_cc"
7351fi
7352
Matthias Kloseb9621712010-04-24 17:59:49 +00007353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7354$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355fi
7356
7357# If we have set a CC compiler flag for thread support then
7358# check if it works for CXX, too.
7359ac_cv_cxx_thread=no
7360if test ! -z "$CXX"
7361then
Matthias Kloseb9621712010-04-24 17:59:49 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7363$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364ac_save_cxx="$CXX"
7365
7366if test "$ac_cv_kpthread" = "yes"
7367then
7368 CXX="$CXX -Kpthread"
7369 ac_cv_cxx_thread=yes
7370elif test "$ac_cv_kthread" = "yes"
7371then
7372 CXX="$CXX -Kthread"
7373 ac_cv_cxx_thread=yes
7374elif test "$ac_cv_pthread" = "yes"
7375then
7376 CXX="$CXX -pthread"
7377 ac_cv_cxx_thread=yes
7378fi
7379
7380if test $ac_cv_cxx_thread = yes
7381then
7382 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7383 $CXX -c conftest.$ac_ext 2>&5
7384 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7385 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7386 then
7387 ac_cv_cxx_thread=yes
7388 else
7389 ac_cv_cxx_thread=no
7390 fi
7391 rm -fr conftest*
7392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7394$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395fi
7396CXX="$ac_save_cxx"
7397
7398
7399# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7401$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007402if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404else
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406/* end confdefs.h. */
7407#include <stdlib.h>
7408#include <stdarg.h>
7409#include <string.h>
7410#include <float.h>
7411
7412int
7413main ()
7414{
7415
7416 ;
7417 return 0;
7418}
7419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007420if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007421 ac_cv_header_stdc=yes
7422else
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7426
7427if test $ac_cv_header_stdc = yes; then
7428 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430/* end confdefs.h. */
7431#include <string.h>
7432
7433_ACEOF
7434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007435 $EGREP "memchr" >/dev/null 2>&1; then :
7436
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437else
7438 ac_cv_header_stdc=no
7439fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007440rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441
7442fi
7443
7444if test $ac_cv_header_stdc = yes; then
7445 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447/* end confdefs.h. */
7448#include <stdlib.h>
7449
7450_ACEOF
7451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 $EGREP "free" >/dev/null 2>&1; then :
7453
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454else
7455 ac_cv_header_stdc=no
7456fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007457rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007458
7459fi
7460
7461if test $ac_cv_header_stdc = yes; then
7462 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464 :
7465else
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467/* end confdefs.h. */
7468#include <ctype.h>
7469#include <stdlib.h>
7470#if ((' ' & 0x0FF) == 0x020)
7471# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7472# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7473#else
7474# define ISLOWER(c) \
7475 (('a' <= (c) && (c) <= 'i') \
7476 || ('j' <= (c) && (c) <= 'r') \
7477 || ('s' <= (c) && (c) <= 'z'))
7478# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7479#endif
7480
7481#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7482int
7483main ()
7484{
7485 int i;
7486 for (i = 0; i < 256; i++)
7487 if (XOR (islower (i), ISLOWER (i))
7488 || toupper (i) != TOUPPER (i))
7489 return 2;
7490 return 0;
7491}
7492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007493if ac_fn_c_try_run "$LINENO"; then :
7494
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495else
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500fi
7501
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502fi
7503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7505$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506if test $ac_cv_header_stdc = yes; then
7507
Matthias Kloseb9621712010-04-24 17:59:49 +00007508$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509
7510fi
7511
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007512for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007513fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007514ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007515sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007516unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007517poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007518sys/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 +01007519sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007520sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007521sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007522sys/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 -07007523libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007524bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7525sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007526do :
7527 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7528ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007529if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007530 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007531#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007532_ACEOF
7533
7534fi
7535
Guido van Rossum627b2d71993-12-24 10:39:16 +00007536done
7537
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007538ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007539for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7542$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007543if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007545else
Matthias Kloseb9621712010-04-24 17:59:49 +00007546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007547/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007548#include <sys/types.h>
7549#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007550
Martin v. Löwis11437992002-04-12 09:54:03 +00007551int
7552main ()
7553{
7554if ((DIR *) 0)
7555return 0;
7556 ;
7557 return 0;
7558}
7559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007560if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007561 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007562else
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007567eval ac_res=\$$as_ac_Header
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7569$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007570if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007571 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007572#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007573_ACEOF
7574
7575ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007576fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007577
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007578done
7579# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7580if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7582$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007583if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007585else
Martin v. Löwis11437992002-04-12 09:54:03 +00007586 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007590/* Override any GCC internal prototype to avoid an error.
7591 Use char because int might match the return type of a GCC
7592 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007593#ifdef __cplusplus
7594extern "C"
7595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007596char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007597int
7598main ()
7599{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007600return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 ;
7602 return 0;
7603}
7604_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007605for ac_lib in '' dir; do
7606 if test -z "$ac_lib"; then
7607 ac_res="none required"
7608 else
7609 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007610 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007615rm -f core conftest.err conftest.$ac_objext \
7616 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007617 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620done
Victor Stinnere0be4232011-10-25 13:06:09 +02007621if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623else
7624 ac_cv_search_opendir=no
7625fi
7626rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007627LIBS=$ac_func_search_save_LIBS
7628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7630$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007631ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007632if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007634
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007636
Michael W. Hudson54241132001-12-07 15:38:26 +00007637else
Matthias Kloseb9621712010-04-24 17:59:49 +00007638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7639$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007640if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007642else
7643 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007647/* Override any GCC internal prototype to avoid an error.
7648 Use char because int might match the return type of a GCC
7649 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007650#ifdef __cplusplus
7651extern "C"
7652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007653char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007654int
7655main ()
7656{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007658 ;
7659 return 0;
7660}
7661_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662for ac_lib in '' x; do
7663 if test -z "$ac_lib"; then
7664 ac_res="none required"
7665 else
7666 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007667 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672rm -f core conftest.err conftest.$ac_objext \
7673 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007674 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677done
Victor Stinnere0be4232011-10-25 13:06:09 +02007678if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680else
7681 ac_cv_search_opendir=no
7682fi
7683rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007684LIBS=$ac_func_search_save_LIBS
7685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7687$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007689if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007691
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007692fi
7693
7694fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007695
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7697$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007698if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007699 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007700else
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007702/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007703#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007704int
7705main ()
7706{
7707return makedev(0, 0);
7708 ;
7709 return 0;
7710}
7711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007712if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007713 ac_cv_header_sys_types_h_makedev=yes
7714else
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717rm -f core conftest.err conftest.$ac_objext \
7718 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007719
7720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7722$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007723
7724if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007725ac_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 +02007726if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007727
Matthias Kloseb9621712010-04-24 17:59:49 +00007728$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007729
7730fi
7731
7732
7733
7734 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 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 +02007736if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007737
Matthias Kloseb9621712010-04-24 17:59:49 +00007738$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007739
7740fi
7741
7742
7743 fi
7744fi
7745
Michael W. Hudson54241132001-12-07 15:38:26 +00007746
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007747# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7748for ac_header in net/if.h
7749do :
7750 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7751#ifdef STDC_HEADERS
7752# include <stdlib.h>
7753# include <stddef.h>
7754#else
7755# ifdef HAVE_STDLIB_H
7756# include <stdlib.h>
7757# endif
7758#endif
7759#ifdef HAVE_SYS_SOCKET_H
7760# include <sys/socket.h>
7761#endif
7762
7763"
Victor Stinnere0be4232011-10-25 13:06:09 +02007764if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007765 cat >>confdefs.h <<_ACEOF
7766#define HAVE_NET_IF_H 1
7767_ACEOF
7768
7769fi
7770
7771done
7772
7773
Martin v. Löwis11017b12006-01-14 18:12:57 +00007774# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007775for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007776do :
7777 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 +00007778#ifdef HAVE_ASM_TYPES_H
7779#include <asm/types.h>
7780#endif
7781#ifdef HAVE_SYS_SOCKET_H
7782#include <sys/socket.h>
7783#endif
7784
Matthias Kloseb9621712010-04-24 17:59:49 +00007785"
Victor Stinnere0be4232011-10-25 13:06:09 +02007786if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007787 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007788#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007789_ACEOF
7790
7791fi
7792
7793done
7794
7795
Charles-François Natali47413c12011-10-06 19:47:44 +02007796# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007797for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007798do :
7799 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7800ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7801#ifdef HAVE_SYS_SOCKET_H
7802#include <sys/socket.h>
7803#endif
7804
7805"
7806if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7807 cat >>confdefs.h <<_ACEOF
7808#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7809_ACEOF
7810
7811fi
7812
7813done
7814
7815
Guido van Rossum627b2d71993-12-24 10:39:16 +00007816# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007817was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7819$as_echo_n "checking for clock_t in time.h... " >&6; }
7820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007821/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007822#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
7824_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007827 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007828else
Martin v. Löwis11437992002-04-12 09:54:03 +00007829
7830
Matthias Kloseb9621712010-04-24 17:59:49 +00007831$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007832
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007833
Guido van Rossum627b2d71993-12-24 10:39:16 +00007834fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007835rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007836
Matthias Kloseb9621712010-04-24 17:59:49 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7838$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007839
Matthias Kloseb9621712010-04-24 17:59:49 +00007840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7841$as_echo_n "checking for makedev... " >&6; }
7842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007843/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007844
Jesus Cea740f53a2010-04-28 11:35:30 +00007845#if defined(MAJOR_IN_MKDEV)
7846#include <sys/mkdev.h>
7847#elif defined(MAJOR_IN_SYSMACROS)
7848#include <sys/sysmacros.h>
7849#else
7850#include <sys/types.h>
7851#endif
7852
Neal Norwitz11690112002-07-30 01:08:28 +00007853int
7854main ()
7855{
Jesus Cea740f53a2010-04-28 11:35:30 +00007856
7857 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007858 ;
7859 return 0;
7860}
Matthias Kloseb159a552010-04-25 21:00:44 +00007861
Neal Norwitz11690112002-07-30 01:08:28 +00007862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007863if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007864 ac_cv_has_makedev=yes
7865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007868rm -f core conftest.err conftest.$ac_objext \
7869 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7871$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007872if test "$ac_cv_has_makedev" = "yes"; then
7873
Matthias Kloseb9621712010-04-24 17:59:49 +00007874$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007875
7876fi
7877
Christian Heimes985ecdc2013-11-20 11:46:18 +01007878# byte swapping
7879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7880$as_echo_n "checking for le64toh... " >&6; }
7881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7882/* end confdefs.h. */
7883
7884#ifdef HAVE_ENDIAN_H
7885#include <endian.h>
7886#elif defined(HAVE_SYS_ENDIAN_H)
7887#include <sys/endian.h>
7888#endif
7889
7890int
7891main ()
7892{
7893
7894 le64toh(1)
7895 ;
7896 return 0;
7897}
7898
7899_ACEOF
7900if ac_fn_c_try_link "$LINENO"; then :
7901 ac_cv_has_le64toh=yes
7902else
7903 ac_cv_has_le64toh=no
7904fi
7905rm -f core conftest.err conftest.$ac_objext \
7906 conftest$ac_exeext conftest.$ac_ext
7907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7908$as_echo "$ac_cv_has_le64toh" >&6; }
7909if test "$ac_cv_has_le64toh" = "yes"; then
7910
7911$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7912
7913fi
7914
Martin v. Löwis399a6892002-10-04 10:22:02 +00007915# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7916# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7917# defined, but the compiler does not support pragma redefine_extname,
7918# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7919# structures (such as rlimit64) without declaring them. As a
7920# work-around, disable LFS on such configurations
7921
7922use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7924$as_echo_n "checking Solaris LFS bug... " >&6; }
7925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007926/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007927
7928#define _LARGEFILE_SOURCE 1
7929#define _FILE_OFFSET_BITS 64
7930#include <sys/resource.h>
7931
Martin v. Löwis399a6892002-10-04 10:22:02 +00007932int
7933main ()
7934{
7935struct rlimit foo;
7936 ;
7937 return 0;
7938}
7939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007941 sol_lfs_bug=no
7942else
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7947$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007948if test "$sol_lfs_bug" = "yes"; then
7949 use_lfs=no
7950fi
7951
7952if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007953# Two defines needed to enable largefile support on various platforms
7954# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007955case $ac_sys_system/$ac_sys_release in
7956AIX*)
7957
7958$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7959
7960 ;;
7961esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007962
Matthias Kloseb9621712010-04-24 17:59:49 +00007963$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007964
7965
Matthias Kloseb9621712010-04-24 17:59:49 +00007966$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007967
Martin v. Löwis399a6892002-10-04 10:22:02 +00007968fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007969
Guido van Rossum84e7b241996-08-19 21:59:00 +00007970# Add some code to confdefs.h so that the test for off_t works on SCO
7971cat >> confdefs.h <<\EOF
7972#if defined(SCO_DS)
7973#undef _OFF_T
7974#endif
7975EOF
7976
Guido van Rossumef2255b2000-03-10 22:30:29 +00007977# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007978ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007979if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007981else
Martin v. Löwis11437992002-04-12 09:54:03 +00007982
7983cat >>confdefs.h <<_ACEOF
7984#define mode_t int
7985_ACEOF
7986
7987fi
7988
Matthias Kloseb9621712010-04-24 17:59:49 +00007989ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007990if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007992else
Martin v. Löwis11437992002-04-12 09:54:03 +00007993
7994cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007996_ACEOF
7997
7998fi
7999
Matthias Kloseb9621712010-04-24 17:59:49 +00008000ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008001if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008002
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008003else
Martin v. Löwis11437992002-04-12 09:54:03 +00008004
8005cat >>confdefs.h <<_ACEOF
8006#define pid_t int
8007_ACEOF
8008
8009fi
8010
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008011
Martin v. Löwis11437992002-04-12 09:54:03 +00008012cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008013#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008014_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008015
Matthias Kloseb9621712010-04-24 17:59:49 +00008016ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008017if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019else
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
8021cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008023_ACEOF
8024
8025fi
8026
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8028$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008029if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008030 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008033/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008034#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008035
8036_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008039 ac_cv_type_uid_t=yes
8040else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008041 ac_cv_type_uid_t=no
8042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008043rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8047$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008048if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008049
Matthias Kloseb9621712010-04-24 17:59:49 +00008050$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008051
8052
Matthias Kloseb9621712010-04-24 17:59:49 +00008053$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008054
8055fi
8056
Mark Dickinson983bc162012-12-02 12:11:38 +00008057
8058# There are two separate checks for each of the exact-width integer types we
8059# need. First we check whether the type is available using the usual
8060# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8061# and <stdint.h> where available). We then also use the special type checks of
8062# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8063# directly, #define's uint32_t to be a suitable type.
8064
8065ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8066if test "x$ac_cv_type_uint32_t" = xyes; then :
8067
8068$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8069
8070fi
8071
Matthias Kloseb9621712010-04-24 17:59:49 +00008072ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8073case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008074 no|yes) ;; #(
8075 *)
8076
Matthias Kloseb9621712010-04-24 17:59:49 +00008077$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008078
8079
8080cat >>confdefs.h <<_ACEOF
8081#define uint32_t $ac_cv_c_uint32_t
8082_ACEOF
8083;;
8084 esac
8085
Mark Dickinson983bc162012-12-02 12:11:38 +00008086
8087ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8088if test "x$ac_cv_type_uint64_t" = xyes; then :
8089
8090$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8091
8092fi
8093
Matthias Kloseb9621712010-04-24 17:59:49 +00008094ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8095case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008096 no|yes) ;; #(
8097 *)
8098
Matthias Kloseb9621712010-04-24 17:59:49 +00008099$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008100
8101
8102cat >>confdefs.h <<_ACEOF
8103#define uint64_t $ac_cv_c_uint64_t
8104_ACEOF
8105;;
8106 esac
8107
Mark Dickinson983bc162012-12-02 12:11:38 +00008108
8109ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8110if test "x$ac_cv_type_int32_t" = xyes; then :
8111
8112$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8113
8114fi
8115
Matthias Kloseb9621712010-04-24 17:59:49 +00008116ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8117case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008118 no|yes) ;; #(
8119 *)
8120
8121cat >>confdefs.h <<_ACEOF
8122#define int32_t $ac_cv_c_int32_t
8123_ACEOF
8124;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008125esac
8126
Mark Dickinson983bc162012-12-02 12:11:38 +00008127
8128ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8129if test "x$ac_cv_type_int64_t" = xyes; then :
8130
8131$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8132
8133fi
8134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8136case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008137 no|yes) ;; #(
8138 *)
8139
8140cat >>confdefs.h <<_ACEOF
8141#define int64_t $ac_cv_c_int64_t
8142_ACEOF
8143;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008144esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008145
Mark Dickinson983bc162012-12-02 12:11:38 +00008146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008148if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008151
8152fi
8153
Stefan Krah1919b7e2012-03-21 18:25:23 +01008154ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8155if test "x$ac_cv_type___uint128_t" = xyes; then :
8156
8157$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8158
8159fi
8160
Jack Jansendd19cf82001-12-06 22:36:17 +00008161
Michael W. Hudson54241132001-12-07 15:38:26 +00008162# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008163# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164# The cast to long int works around a bug in the HP C Compiler
8165# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8166# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8167# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8169$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008170if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008172else
Matthias Kloseb9621712010-04-24 17:59:49 +00008173 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 +00008174
Martin v. Löwis11437992002-04-12 09:54:03 +00008175else
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 if test "$ac_cv_type_int" = yes; then
8177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008179as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008180See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181 else
8182 ac_cv_sizeof_int=0
8183 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008185
Martin v. Löwis11437992002-04-12 09:54:03 +00008186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8188$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189
8190
8191
Martin v. Löwis11437992002-04-12 09:54:03 +00008192cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008193#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008194_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008195
8196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197# The cast to long int works around a bug in the HP C Compiler
8198# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8199# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8200# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8202$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008203if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008205else
Matthias Kloseb9621712010-04-24 17:59:49 +00008206 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 +00008207
Martin v. Löwis11437992002-04-12 09:54:03 +00008208else
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 if test "$ac_cv_type_long" = yes; then
8210 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008212as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008213See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214 else
8215 ac_cv_sizeof_long=0
8216 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008218
Martin v. Löwis11437992002-04-12 09:54:03 +00008219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8221$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222
8223
8224
Martin v. Löwis11437992002-04-12 09:54:03 +00008225cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008226#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008227_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008228
8229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230# The cast to long int works around a bug in the HP C Compiler
8231# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8232# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8233# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8235$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008236if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 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 +00008240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241else
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 if test "$ac_cv_type_void_p" = yes; then
8243 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008245as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008246See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247 else
8248 ac_cv_sizeof_void_p=0
8249 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251
Martin v. Löwis11437992002-04-12 09:54:03 +00008252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8254$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255
8256
8257
Martin v. Löwis11437992002-04-12 09:54:03 +00008258cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008259#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008260_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008261
8262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263# The cast to long int works around a bug in the HP C Compiler
8264# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8265# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8266# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8268$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008269if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008271else
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 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 +00008273
Martin v. Löwis11437992002-04-12 09:54:03 +00008274else
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 if test "$ac_cv_type_short" = yes; then
8276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008278as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008279See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008280 else
8281 ac_cv_sizeof_short=0
8282 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008284
Martin v. Löwis11437992002-04-12 09:54:03 +00008285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8287$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008288
8289
8290
Martin v. Löwis11437992002-04-12 09:54:03 +00008291cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008292#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008293_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008294
8295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296# The cast to long int works around a bug in the HP C Compiler
8297# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8298# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8299# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8301$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008302if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008304else
Matthias Kloseb9621712010-04-24 17:59:49 +00008305 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 +00008306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307else
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 if test "$ac_cv_type_float" = yes; then
8309 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8310$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008311as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008312See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008313 else
8314 ac_cv_sizeof_float=0
8315 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008317
Martin v. Löwis11437992002-04-12 09:54:03 +00008318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8320$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008321
8322
8323
Martin v. Löwis11437992002-04-12 09:54:03 +00008324cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008325#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008326_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008327
8328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329# The cast to long int works around a bug in the HP C Compiler
8330# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8331# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8332# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8334$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008335if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008337else
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 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 +00008339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340else
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 if test "$ac_cv_type_double" = yes; then
8342 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008344as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008345See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346 else
8347 ac_cv_sizeof_double=0
8348 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8353$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008354
8355
8356
Martin v. Löwis11437992002-04-12 09:54:03 +00008357cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008358#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008359_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008360
8361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362# The cast to long int works around a bug in the HP C Compiler
8363# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8364# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8365# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8367$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 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 +00008372
Martin v. Löwis11437992002-04-12 09:54:03 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 if test "$ac_cv_type_fpos_t" = yes; then
8375 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008377as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008378See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379 else
8380 ac_cv_sizeof_fpos_t=0
8381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008383
Martin v. Löwis11437992002-04-12 09:54:03 +00008384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8386$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387
8388
8389
Martin v. Löwis11437992002-04-12 09:54:03 +00008390cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008391#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008392_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008393
Michael W. Hudson54241132001-12-07 15:38:26 +00008394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395# The cast to long int works around a bug in the HP C Compiler
8396# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8397# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8398# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8400$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008401if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008403else
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 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 +00008405
Martin v. Löwis18e16552006-02-15 17:27:45 +00008406else
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 if test "$ac_cv_type_size_t" = yes; then
8408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008410as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008411See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412 else
8413 ac_cv_sizeof_size_t=0
8414 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416
Martin v. Löwis18e16552006-02-15 17:27:45 +00008417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8419$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420
8421
8422
Martin v. Löwis18e16552006-02-15 17:27:45 +00008423cat >>confdefs.h <<_ACEOF
8424#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8425_ACEOF
8426
8427
Christian Heimes400adb02008-02-01 08:12:03 +00008428# The cast to long int works around a bug in the HP C Compiler
8429# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8430# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8431# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8433$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008434if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008436else
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 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 +00008438
Christian Heimes400adb02008-02-01 08:12:03 +00008439else
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 if test "$ac_cv_type_pid_t" = yes; then
8441 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8442$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008443as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008444See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008445 else
8446 ac_cv_sizeof_pid_t=0
8447 fi
8448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449
Christian Heimes400adb02008-02-01 08:12:03 +00008450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8452$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008453
8454
8455
8456cat >>confdefs.h <<_ACEOF
8457#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8458_ACEOF
8459
8460
Michael W. Hudson54241132001-12-07 15:38:26 +00008461
Matthias Kloseb9621712010-04-24 17:59:49 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8463$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008464have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008466/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468int
8469main ()
8470{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008471long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 ;
8473 return 0;
8474}
8475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008476if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008477
8478
Matthias Kloseb9621712010-04-24 17:59:49 +00008479$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008480
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008481 have_long_long=yes
8482
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8486$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008487if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488# The cast to long int works around a bug in the HP C Compiler
8489# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8490# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8491# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8493$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008494if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008496else
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 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 +00008498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499else
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 if test "$ac_cv_type_long_long" = yes; then
8501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008503as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008504See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505 else
8506 ac_cv_sizeof_long_long=0
8507 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8512$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513
8514
8515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008517#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008518_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008519
Michael W. Hudson54241132001-12-07 15:38:26 +00008520
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008521fi
8522
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8524$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008525have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008527/* end confdefs.h. */
8528
8529int
8530main ()
8531{
8532long double x; x = (long double)0;
8533 ;
8534 return 0;
8535}
8536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008537if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008538
8539
Matthias Kloseb9621712010-04-24 17:59:49 +00008540$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008541
8542 have_long_double=yes
8543
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008544fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8547$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008548if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008549# The cast to long int works around a bug in the HP C Compiler
8550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8552# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8554$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008555if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 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 +00008559
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008560else
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 if test "$ac_cv_type_long_double" = yes; then
8562 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008564as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008565See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008566 else
8567 ac_cv_sizeof_long_double=0
8568 fi
8569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8573$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008574
8575
8576
8577cat >>confdefs.h <<_ACEOF
8578#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8579_ACEOF
8580
8581
8582fi
8583
8584
Matthias Kloseb9621712010-04-24 17:59:49 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8586$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008587have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008589/* end confdefs.h. */
8590
8591int
8592main ()
8593{
8594_Bool x; x = (_Bool)0;
8595 ;
8596 return 0;
8597}
8598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008599if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008600
8601
Matthias Kloseb9621712010-04-24 17:59:49 +00008602$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008603
8604 have_c99_bool=yes
8605
Thomas Woutersb2137042007-02-01 18:02:27 +00008606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8609$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008610if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611# The cast to long int works around a bug in the HP C Compiler
8612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8614# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8616$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008617if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 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 +00008621
Thomas Woutersb2137042007-02-01 18:02:27 +00008622else
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 if test "$ac_cv_type__Bool" = yes; then
8624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008626as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008627See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 else
8629 ac_cv_sizeof__Bool=0
8630 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632
Thomas Woutersb2137042007-02-01 18:02:27 +00008633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8635$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636
8637
8638
Thomas Woutersb2137042007-02-01 18:02:27 +00008639cat >>confdefs.h <<_ACEOF
8640#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8641_ACEOF
8642
8643
8644fi
8645
Matthias Kloseb9621712010-04-24 17:59:49 +00008646ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008647 #include <stdint.h>
8648 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008649 #ifdef HAVE_INTTYPES_H
8650 #include <inttypes.h>
8651 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008652"
Victor Stinnere0be4232011-10-25 13:06:09 +02008653if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008654
8655cat >>confdefs.h <<_ACEOF
8656#define HAVE_UINTPTR_T 1
8657_ACEOF
8658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659# The cast to long int works around a bug in the HP C Compiler
8660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8662# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8664$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008665if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008667else
Matthias Kloseb9621712010-04-24 17:59:49 +00008668 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 +00008669
Martin v. Löwis11437992002-04-12 09:54:03 +00008670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 if test "$ac_cv_type_uintptr_t" = yes; then
8672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008674as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008675See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676 else
8677 ac_cv_sizeof_uintptr_t=0
8678 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008680
Martin v. Löwis11437992002-04-12 09:54:03 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8683$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684
8685
8686
Martin v. Löwis11437992002-04-12 09:54:03 +00008687cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008688#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008689_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008690
Michael W. Hudson54241132001-12-07 15:38:26 +00008691
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008692fi
8693
Thomas Wouters89f507f2006-12-13 04:49:30 +00008694
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008695# The cast to long int works around a bug in the HP C Compiler
8696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8698# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8700$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008701if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008703else
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008705#ifdef HAVE_SYS_TYPES_H
8706#include <sys/types.h>
8707#endif
8708
Matthias Kloseb9621712010-04-24 17:59:49 +00008709"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008710
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008711else
Matthias Kloseb9621712010-04-24 17:59:49 +00008712 if test "$ac_cv_type_off_t" = yes; then
8713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008715as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008716See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008717 else
8718 ac_cv_sizeof_off_t=0
8719 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008721
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8724$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008725
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008726
8727
Martin v. Löwis11437992002-04-12 09:54:03 +00008728cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008729#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008730_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008731
Michael W. Hudson54241132001-12-07 15:38:26 +00008732
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008733
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8735$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008736if test "$have_long_long" = yes
8737then
8738if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008739 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008742
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8744$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008745else
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8747$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008748fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008749else
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8751$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008752fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008754# The cast to long int works around a bug in the HP C Compiler
8755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8759$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008760if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764#ifdef HAVE_SYS_TYPES_H
8765#include <sys/types.h>
8766#endif
8767#ifdef HAVE_TIME_H
8768#include <time.h>
8769#endif
8770
Matthias Kloseb9621712010-04-24 17:59:49 +00008771"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008772
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 if test "$ac_cv_type_time_t" = yes; then
8775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008777as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008778See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008779 else
8780 ac_cv_sizeof_time_t=0
8781 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8786$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008787
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788
8789
Martin v. Löwis11437992002-04-12 09:54:03 +00008790cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008791#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008792_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008793
Michael W. Hudson54241132001-12-07 15:38:26 +00008794
8795
Trent Mick635f6fb2000-08-23 21:33:05 +00008796# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008797ac_save_cc="$CC"
8798if test "$ac_cv_kpthread" = "yes"
8799then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008800elif test "$ac_cv_kthread" = "yes"
8801then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008802elif test "$ac_cv_pthread" = "yes"
8803then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008804fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008805
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8807$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008808have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008810/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008811
8812 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008813int
8814main ()
8815{
Guido van Rossum12580492000-09-24 16:47:19 +00008816pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ;
8818 return 0;
8819}
Matthias Kloseb159a552010-04-25 21:00:44 +00008820
Martin v. Löwis11437992002-04-12 09:54:03 +00008821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008822if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008823 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8827$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008828if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008830# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8831# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8832# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8834$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008835if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837else
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839#ifdef HAVE_PTHREAD_H
8840#include <pthread.h>
8841#endif
8842
Matthias Kloseb9621712010-04-24 17:59:49 +00008843"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845else
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if test "$ac_cv_type_pthread_t" = yes; then
8847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008849as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008850See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851 else
8852 ac_cv_sizeof_pthread_t=0
8853 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855
Trent Mick635f6fb2000-08-23 21:33:05 +00008856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8858$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008859
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008860
8861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008863#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008864_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008865
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008866
Trent Mick635f6fb2000-08-23 21:33:05 +00008867fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008868CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008869
Michael W. Hudson54241132001-12-07 15:38:26 +00008870
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008871case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008872 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008873 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8874 ;;
8875 Darwin/*)
8876 OTHER_LIBTOOL_OPT=""
8877 ;;
8878esac
8879
8880
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008881
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008882case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008883 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008884 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8885 if test "${enable_universalsdk}"; then
8886 :
8887 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008888 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008889 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008890 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008891 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008892 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008893 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008894 if test ${gcc_version} '<' 4.0
8895 then
8896 LIBTOOL_CRUFT="-lcc_dynamic"
8897 else
8898 LIBTOOL_CRUFT=""
8899 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008901 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008902else
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008904/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008905
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008906 #include <unistd.h>
8907 int main(int argc, char*argv[])
8908 {
8909 if (sizeof(long) == 4) {
8910 return 0;
8911 } else {
8912 return 1;
8913 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008914 }
8915
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008917if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008918 ac_osx_32bit=yes
8919else
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008924fi
8925
8926
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008927 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008928 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008929 i386)
8930 MACOSX_DEFAULT_ARCH="i386"
8931 ;;
8932 ppc)
8933 MACOSX_DEFAULT_ARCH="ppc"
8934 ;;
8935 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008936 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008937 ;;
8938 esac
8939 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008940 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008941 i386)
8942 MACOSX_DEFAULT_ARCH="x86_64"
8943 ;;
8944 ppc)
8945 MACOSX_DEFAULT_ARCH="ppc64"
8946 ;;
8947 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008948 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008949 ;;
8950 esac
8951
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008952 fi
8953
8954 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008955 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008956 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008957esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8959$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008960if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008961then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008962 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008963 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008964 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008965
Matthias Kloseb9621712010-04-24 17:59:49 +00008966$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008967
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8969$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008970 if test $enable_shared = "yes"
8971 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008972 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 +00008973 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8976$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008977fi
8978
Matthias Kloseb9621712010-04-24 17:59:49 +00008979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8980$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008981case $ac_sys_system/$ac_sys_release in
8982 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008983
Matthias Kloseb9621712010-04-24 17:59:49 +00008984$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008985
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8987$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008988 ;;
8989 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8991$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008992 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008993esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008994
Guido van Rossum0a516c91994-09-12 10:58:40 +00008995# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008996
Michael W. Hudson54241132001-12-07 15:38:26 +00008997
8998
8999
9000
Benjamin Peterson99f03762010-04-11 22:15:28 +00009001
Thomas Wouters477c8d52006-05-27 19:21:47 +00009002
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009003# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9004# -- usually .so, .sl on HP-UX, .dll on Cygwin
9005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9006$as_echo_n "checking the extension of shared libraries... " >&6; }
9007if test -z "$SHLIB_SUFFIX"; then
9008 case $ac_sys_system in
9009 hp*|HP*)
9010 case `uname -m` in
9011 ia64) SHLIB_SUFFIX=.so;;
9012 *) SHLIB_SUFFIX=.sl;;
9013 esac
9014 ;;
9015 CYGWIN*) SHLIB_SUFFIX=.dll;;
9016 *) SHLIB_SUFFIX=.so;;
9017 esac
9018fi
9019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9020$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009021
Guido van Rossum0a516c91994-09-12 10:58:40 +00009022# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009023# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009024# (Shared libraries in this instance are shared modules to be loaded into
9025# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9027$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009028if test -z "$LDSHARED"
9029then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009030 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009031 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009032 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009033 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009034 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009035 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009036 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009038 if test "$GCC" = "yes" ; then
9039 LDSHARED='$(CC) -shared'
9040 LDCXXSHARED='$(CXX) -shared'
9041 else
9042 LDSHARED='$(CC) -G'
9043 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009044 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009045 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009046 if test "$GCC" = "yes" ; then
9047 LDSHARED='$(CC) -shared'
9048 LDCXXSHARED='$(CXX) -shared'
9049 else
9050 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009051 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009052 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009053 LDSHARED='$(CC) -bundle'
9054 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009055 if test "$enable_framework" ; then
9056 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009057 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9058 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009059 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009060 else
9061 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009062 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009063 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009064 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009065 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009066 LDSHARED='$(CC) -bundle'
9067 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009068 if test "$enable_framework" ; then
9069 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009070 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9071 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009072 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009073 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009074 # No framework, use the Python app as bundle-loader
9075 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009076 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009077 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009078 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009079 Darwin/*)
9080 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9081 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009082
Ned Deily36820b62014-06-25 13:44:22 -07009083 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9084 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9085 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9086 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9087 if test ${dep_target_major} -eq 10 && \
9088 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009089 then
Ned Deily36820b62014-06-25 13:44:22 -07009090 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009091 LDSHARED='$(CC) -bundle'
9092 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009093 if test "$enable_framework" ; then
9094 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009095 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9096 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009097 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009098 else
9099 # No framework, use the Python app as bundle-loader
9100 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9101 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009102 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009103 fi
Ned Deily36820b62014-06-25 13:44:22 -07009104 else
9105 # building for OS X 10.3 and later
9106 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9107 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9108 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009109 fi
9110 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009111 Linux*|GNU*|QNX*)
9112 LDSHARED='$(CC) -shared'
9113 LDCXXSHARED='$(CXX) -shared';;
9114 BSD/OS*/4*)
9115 LDSHARED="gcc -shared"
9116 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009117 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009118 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009119 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009120 LDSHARED='$(CC) -shared'
9121 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009122 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009123 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009124 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009125 OpenBSD*)
9126 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9127 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009128 LDSHARED='$(CC) -shared $(CCSHARED)'
9129 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009130 else
9131 case `uname -r` in
9132 [01].* | 2.[0-7] | 2.[0-7].*)
9133 LDSHARED="ld -Bshareable ${LDFLAGS}"
9134 ;;
9135 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009136 LDSHARED='$(CC) -shared $(CCSHARED)'
9137 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009138 ;;
9139 esac
9140 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009141 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009142 LDSHARED='$(CC) -shared'
9143 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009144 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009145 if test "$GCC" = "yes" ; then
9146 LDSHARED='$(CC) -shared'
9147 LDCXXSHARED='$(CXX) -shared'
9148 else
9149 LDSHARED='$(CC) -G'
9150 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009151 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009152 SCO_SV*)
9153 LDSHARED='$(CC) -Wl,-G,-Bexport'
9154 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9155 CYGWIN*)
9156 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9157 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009158 *) LDSHARED="ld";;
9159 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9162$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009163LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009164BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009165# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009166# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9168$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009169if test -z "$CCSHARED"
9170then
Guido van Rossum07397971997-04-29 21:49:50 +00009171 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009172 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009173 then CCSHARED="-fPIC";
9174 elif test `uname -p` = sparc;
9175 then CCSHARED="-xcode=pic32";
9176 else CCSHARED="-Kpic";
9177 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009178 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009179 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009180 else CCSHARED="+z";
9181 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009182 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009183 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009184 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009185 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009186 if test "$GCC" = "yes"
9187 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009188 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009189 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009190 SCO_SV*)
9191 if test "$GCC" = "yes"
9192 then CCSHARED="-fPIC"
9193 else CCSHARED="-Kpic -belf"
9194 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009195 IRIX*/6*) case $CC in
9196 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009197 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009198 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009199 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9202$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009203# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009204# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9206$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009207if test -z "$LINKFORSHARED"
9208then
Guido van Rossum07397971997-04-29 21:49:50 +00009209 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009210 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009211 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009212 LINKFORSHARED="-Wl,-E -Wl,+s";;
9213# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009214 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009215 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009216 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009218 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009219
9220 # Issue #18075: the default maximum stack size (8MBytes) is too
9221 # small for the default recursion limit. Increase the stack size
9222 # to ensure that tests don't crash
9223 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9224
Jack Jansene578a632001-08-15 01:27:14 +00009225 if test "$enable_framework"
9226 then
Jack Jansenda49e192005-01-07 13:08:22 +00009227 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009228 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009229 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009230 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009231 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009232 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009233 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009234 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9235 then
9236 LINKFORSHARED="-Wl,--export-dynamic"
9237 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009238 SunOS/5*) case $CC in
9239 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009240 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009241 then
9242 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009243 fi;;
9244 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009245 CYGWIN*)
9246 if test $enable_shared = "no"
9247 then
9248 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9249 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009250 QNX*)
9251 # -Wl,-E causes the symbols to be added to the dynamic
9252 # symbol table so that they can be found when a module
9253 # is loaded. -N 2048K causes the stack size to be set
9254 # to 2048 kilobytes so that the stack doesn't overflow
9255 # when running test_compile.py.
9256 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009257 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9260$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009261
Michael W. Hudson54241132001-12-07 15:38:26 +00009262
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9265$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009266if test ! "$LIBRARY" = "$LDLIBRARY"
9267then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009268 case $ac_sys_system in
9269 CYGWIN*)
9270 # Cygwin needs CCSHARED when building extension DLLs
9271 # but not when building the interpreter DLL.
9272 CFLAGSFORSHARED='';;
9273 *)
9274 CFLAGSFORSHARED='$(CCSHARED)'
9275 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9278$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009279
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009280# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9281# library (with --enable-shared).
9282# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009283# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9284# if it is not required, since it creates a dependency of the shared library
9285# to LIBS. This, in turn, means that applications linking the shared libpython
9286# don't need to link LIBS explicitly. The default should be only changed
9287# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009288
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9290$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009291case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009292 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009293 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009294esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9296$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009297
9298
Guido van Rossum627b2d71993-12-24 10:39:16 +00009299# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9301$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009302if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009303 $as_echo_n "(cached) " >&6
9304else
9305 ac_check_lib_save_LIBS=$LIBS
9306LIBS="-lsendfile $LIBS"
9307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9308/* end confdefs.h. */
9309
9310/* Override any GCC internal prototype to avoid an error.
9311 Use char because int might match the return type of a GCC
9312 builtin and then its argument prototype would still apply. */
9313#ifdef __cplusplus
9314extern "C"
9315#endif
9316char sendfile ();
9317int
9318main ()
9319{
9320return sendfile ();
9321 ;
9322 return 0;
9323}
9324_ACEOF
9325if ac_fn_c_try_link "$LINENO"; then :
9326 ac_cv_lib_sendfile_sendfile=yes
9327else
9328 ac_cv_lib_sendfile_sendfile=no
9329fi
9330rm -f core conftest.err conftest.$ac_objext \
9331 conftest$ac_exeext conftest.$ac_ext
9332LIBS=$ac_check_lib_save_LIBS
9333fi
9334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9335$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009336if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009337 cat >>confdefs.h <<_ACEOF
9338#define HAVE_LIBSENDFILE 1
9339_ACEOF
9340
9341 LIBS="-lsendfile $LIBS"
9342
9343fi
9344
Matthias Kloseb9621712010-04-24 17:59:49 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9346$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009347if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009348 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009349else
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009351LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009354
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355/* Override any GCC internal prototype to avoid an error.
9356 Use char because int might match the return type of a GCC
9357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009358#ifdef __cplusplus
9359extern "C"
9360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009361char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009362int
9363main ()
9364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ;
9367 return 0;
9368}
9369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009370if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009372else
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009375rm -f core conftest.err conftest.$ac_objext \
9376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009377LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9380$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009381if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 cat >>confdefs.h <<_ACEOF
9383#define HAVE_LIBDL 1
9384_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009385
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009386 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009387
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009388fi
9389 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9391$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009392if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009393 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009394else
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009396LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009400/* Override any GCC internal prototype to avoid an error.
9401 Use char because int might match the return type of a GCC
9402 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009403#ifdef __cplusplus
9404extern "C"
9405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009406char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009407int
9408main ()
9409{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 ;
9412 return 0;
9413}
9414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009415if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009417else
Matthias Kloseb9621712010-04-24 17:59:49 +00009418 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009420rm -f core conftest.err conftest.$ac_objext \
9421 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009422LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9425$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009426if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 cat >>confdefs.h <<_ACEOF
9428#define HAVE_LIBDLD 1
9429_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009430
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009431 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009433fi
9434 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9436$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9437if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9438 $as_echo_n "(cached) " >&6
9439else
9440 ac_check_lib_save_LIBS=$LIBS
9441LIBS="-lcrypto $LIBS"
9442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9443/* end confdefs.h. */
9444
9445/* Override any GCC internal prototype to avoid an error.
9446 Use char because int might match the return type of a GCC
9447 builtin and then its argument prototype would still apply. */
9448#ifdef __cplusplus
9449extern "C"
9450#endif
9451char RAND_egd ();
9452int
9453main ()
9454{
9455return RAND_egd ();
9456 ;
9457 return 0;
9458}
9459_ACEOF
9460if ac_fn_c_try_link "$LINENO"; then :
9461 ac_cv_lib_crypto_RAND_egd=yes
9462else
9463 ac_cv_lib_crypto_RAND_egd=no
9464fi
9465rm -f core conftest.err conftest.$ac_objext \
9466 conftest$ac_exeext conftest.$ac_ext
9467LIBS=$ac_check_lib_save_LIBS
9468fi
9469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9470$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9471if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9472
9473$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9474
9475fi
9476
Martin v. Löwis519adae2003-09-20 10:47:47 +00009477
Georg Brandlb1441c72009-01-03 22:33:39 +00009478# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009479if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9481$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009482if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009483 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009484else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009485 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489/* Override any GCC internal prototype to avoid an error.
9490 Use char because int might match the return type of a GCC
9491 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009492#ifdef __cplusplus
9493extern "C"
9494#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009495char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009496int
9497main ()
9498{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 ;
9501 return 0;
9502}
9503_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504for ac_lib in '' pthread rt posix4; do
9505 if test -z "$ac_lib"; then
9506 ac_res="none required"
9507 else
9508 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009509 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009514rm -f core conftest.err conftest.$ac_objext \
9515 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009516 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519done
Victor Stinnere0be4232011-10-25 13:06:09 +02009520if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522else
9523 ac_cv_search_sem_init=no
9524fi
9525rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009526LIBS=$ac_func_search_save_LIBS
9527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9529$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009531if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009533
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009534fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009535 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009536 # posix4 on Solaris 2.6
9537 # pthread (first!) on Linux
9538fi
9539
Martin v. Löwis19d17342003-06-14 21:03:05 +00009540# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9542$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009543if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009545else
9546 ac_check_lib_save_LIBS=$LIBS
9547LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009549/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551/* Override any GCC internal prototype to avoid an error.
9552 Use char because int might match the return type of a GCC
9553 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009554#ifdef __cplusplus
9555extern "C"
9556#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009557char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009558int
9559main ()
9560{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009562 ;
9563 return 0;
9564}
9565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009566if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009567 ac_cv_lib_intl_textdomain=yes
9568else
Matthias Kloseb9621712010-04-24 17:59:49 +00009569 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009571rm -f core conftest.err conftest.$ac_objext \
9572 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009573LIBS=$ac_check_lib_save_LIBS
9574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9576$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009577if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009578
Matthias Kloseb9621712010-04-24 17:59:49 +00009579$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009580
Brett Cannonc6d936e2009-06-07 20:09:53 +00009581 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009582fi
9583
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009584
9585# checks for system dependent C++ extensions support
9586case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9588$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009590/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009591
Georg Brandl59e87bd2011-02-15 19:48:59 +00009592 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009593int
9594main ()
9595{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009596loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 ;
9598 return 0;
9599}
Matthias Kloseb159a552010-04-25 21:00:44 +00009600
Martin v. Löwis11437992002-04-12 09:54:03 +00009601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009602if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009603
Matthias Kloseb159a552010-04-25 21:00:44 +00009604
Matthias Kloseb9621712010-04-24 17:59:49 +00009605$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009606
Matthias Kloseb159a552010-04-25 21:00:44 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009608$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009609
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009610else
Matthias Kloseb159a552010-04-25 21:00:44 +00009611
9612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009613$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009614
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009616rm -f core conftest.err conftest.$ac_objext \
9617 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009618 *) ;;
9619esac
9620
Christian Heimes985ecdc2013-11-20 11:46:18 +01009621# check for systems that require aligned memory access
9622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9623$as_echo_n "checking aligned memory access is required... " >&6; }
9624if test "$cross_compiling" = yes; then :
9625 aligned_required=yes
9626else
9627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9628/* end confdefs.h. */
9629
9630int main()
9631{
9632 char s[16];
9633 int i, *p1, *p2;
9634 for (i=0; i < 16; i++)
9635 s[i] = i;
9636 p1 = (int*)(s+1);
9637 p2 = (int*)(s+2);
9638 if (*p1 == *p2)
9639 return 1;
9640 return 0;
9641}
9642
9643_ACEOF
9644if ac_fn_c_try_run "$LINENO"; then :
9645 aligned_required=no
9646else
9647 aligned_required=yes
9648fi
9649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9650 conftest.$ac_objext conftest.beam conftest.$ac_ext
9651fi
9652
9653
9654if test "$aligned_required" = yes ; then
9655
9656$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9657
9658fi
9659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9660$as_echo "$aligned_required" >&6; }
9661
9662
9663# str, bytes and memoryview hash algorithm
9664
9665
9666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9667$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9668
9669# Check whether --with-hash_algorithm was given.
9670if test "${with_hash_algorithm+set}" = set; then :
9671 withval=$with_hash_algorithm;
9672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9673$as_echo "$withval" >&6; }
9674case "$withval" in
9675 siphash24)
9676 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9677
9678 ;;
9679 fnv)
9680 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9681
9682 ;;
9683 *)
9684 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9685 ;;
9686esac
9687
9688else
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9690$as_echo "default" >&6; }
9691fi
9692
9693
Charles-François Natalid30b0222014-05-08 23:08:51 +01009694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9695$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9696
9697# Check whether --with-address_sanitizer was given.
9698if test "${with_address_sanitizer+set}" = set; then :
9699 withval=$with_address_sanitizer;
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9701$as_echo "$withval" >&6; }
9702BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9703LDFLAGS="-fsanitize=address $LDFLAGS"
9704
9705else
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9707$as_echo "no" >&6; }
9708fi
9709
9710
Guido van Rossum70c7f481998-03-26 18:44:10 +00009711# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9713$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009714if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009715 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009716else
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009718LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722/* Override any GCC internal prototype to avoid an error.
9723 Use char because int might match the return type of a GCC
9724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009725#ifdef __cplusplus
9726extern "C"
9727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009728char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009729int
9730main ()
9731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ;
9734 return 0;
9735}
9736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009737if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009739else
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009742rm -f core conftest.err conftest.$ac_objext \
9743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009744LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9747$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009748if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009749 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009750fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009751 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9753$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009754if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009756else
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009758LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762/* Override any GCC internal prototype to avoid an error.
9763 Use char because int might match the return type of a GCC
9764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009765#ifdef __cplusplus
9766extern "C"
9767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009768char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009769int
9770main ()
9771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009772return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ;
9774 return 0;
9775}
9776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009779else
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009782rm -f core conftest.err conftest.$ac_objext \
9783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009784LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9787$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009788if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009789 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009790fi
9791 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009792
Matthias Kloseb9621712010-04-24 17:59:49 +00009793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9794$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009797if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9800$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009801LIBS="$withval $LIBS"
9802
9803else
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806fi
9807
Guido van Rossum7f43da71994-08-01 12:15:30 +00009808
Victor Stinner8291b5e2015-03-20 16:03:14 +01009809
9810
9811
9812
9813
9814
9815
9816if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9817 if test -n "$ac_tool_prefix"; then
9818 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9819set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9821$as_echo_n "checking for $ac_word... " >&6; }
9822if ${ac_cv_path_PKG_CONFIG+:} false; then :
9823 $as_echo_n "(cached) " >&6
9824else
9825 case $PKG_CONFIG in
9826 [\\/]* | ?:[\\/]*)
9827 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9828 ;;
9829 *)
9830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9831for as_dir in $PATH
9832do
9833 IFS=$as_save_IFS
9834 test -z "$as_dir" && as_dir=.
9835 for ac_exec_ext in '' $ac_executable_extensions; do
9836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9837 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9839 break 2
9840 fi
9841done
9842 done
9843IFS=$as_save_IFS
9844
9845 ;;
9846esac
9847fi
9848PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9849if test -n "$PKG_CONFIG"; then
9850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9851$as_echo "$PKG_CONFIG" >&6; }
9852else
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9854$as_echo "no" >&6; }
9855fi
9856
9857
9858fi
9859if test -z "$ac_cv_path_PKG_CONFIG"; then
9860 ac_pt_PKG_CONFIG=$PKG_CONFIG
9861 # Extract the first word of "pkg-config", so it can be a program name with args.
9862set dummy pkg-config; ac_word=$2
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9864$as_echo_n "checking for $ac_word... " >&6; }
9865if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9866 $as_echo_n "(cached) " >&6
9867else
9868 case $ac_pt_PKG_CONFIG in
9869 [\\/]* | ?:[\\/]*)
9870 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9871 ;;
9872 *)
9873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9874for as_dir in $PATH
9875do
9876 IFS=$as_save_IFS
9877 test -z "$as_dir" && as_dir=.
9878 for ac_exec_ext in '' $ac_executable_extensions; do
9879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9880 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9882 break 2
9883 fi
9884done
9885 done
9886IFS=$as_save_IFS
9887
9888 ;;
9889esac
9890fi
9891ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9892if test -n "$ac_pt_PKG_CONFIG"; then
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9894$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9895else
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897$as_echo "no" >&6; }
9898fi
9899
9900 if test "x$ac_pt_PKG_CONFIG" = x; then
9901 PKG_CONFIG=""
9902 else
9903 case $cross_compiling:$ac_tool_warned in
9904yes:)
9905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9907ac_tool_warned=yes ;;
9908esac
9909 PKG_CONFIG=$ac_pt_PKG_CONFIG
9910 fi
9911else
9912 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9913fi
9914
9915fi
9916if test -n "$PKG_CONFIG"; then
9917 _pkg_min_version=0.9.0
9918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9919$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9920 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9922$as_echo "yes" >&6; }
9923 else
9924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926 PKG_CONFIG=""
9927 fi
9928fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009929
9930# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9932$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009933
9934# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009935if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009936 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009937else
9938 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009939fi
9940
9941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9943$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009944
9945# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9947$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009948
9949# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009950if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009951 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009952else
9953 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009954fi
9955
9956
9957if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009958 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9959else
9960 LIBFFI_INCLUDEDIR=""
9961fi
9962
9963
Matthias Kloseb9621712010-04-24 17:59:49 +00009964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9965$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009966
Stefan Krah60187b52012-03-23 19:06:27 +01009967# Check for use of the system libmpdec library
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9969$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9970
9971# Check whether --with-system_libmpdec was given.
9972if test "${with_system_libmpdec+set}" = set; then :
9973 withval=$with_system_libmpdec;
9974else
9975 with_system_libmpdec="no"
9976fi
9977
9978
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9980$as_echo "$with_system_libmpdec" >&6; }
9981
Benjamin Peterson076ed002010-10-31 17:11:02 +00009982# Check for support for loadable sqlite extensions
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9984$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9985# Check whether --enable-loadable-sqlite-extensions was given.
9986if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9987 enableval=$enable_loadable_sqlite_extensions;
9988else
9989 enable_loadable_sqlite_extensions="no"
9990fi
9991
9992
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9994$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9995
Ned Deilyd819b932013-09-06 01:07:05 -07009996# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9997
9998
9999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10000$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10001
10002# Check whether --with-tcltk-includes was given.
10003if test "${with_tcltk_includes+set}" = set; then :
10004 withval=$with_tcltk_includes;
10005else
10006 with_tcltk_includes="default"
10007fi
10008
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10010$as_echo "$with_tcltk_includes" >&6; }
10011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10012$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10013
10014# Check whether --with-tcltk-libs was given.
10015if test "${with_tcltk_libs+set}" = set; then :
10016 withval=$with_tcltk_libs;
10017else
10018 with_tcltk_libs="default"
10019fi
10020
10021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10022$as_echo "$with_tcltk_libs" >&6; }
10023if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10024then
10025 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10026 then
10027 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10028 fi
10029 TCLTK_INCLUDES=""
10030 TCLTK_LIBS=""
10031else
10032 TCLTK_INCLUDES="$with_tcltk_includes"
10033 TCLTK_LIBS="$with_tcltk_libs"
10034fi
10035
Matthias Klose55708cc2009-04-30 08:06:49 +000010036# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10038$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010039
10040# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010041if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010042 withval=$with_dbmliborder;
10043if test x$with_dbmliborder = xyes
10044then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010045as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010046else
10047 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10048 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10049 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010050 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010051 fi
10052 done
10053fi
10054fi
10055
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10057$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010058
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010059# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010060
10061
Matthias Kloseb9621712010-04-24 17:59:49 +000010062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10063$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010066if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067 withval=$with_signal_module;
10068fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010069
10070
10071if test -z "$with_signal_module"
10072then with_signal_module="yes"
10073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10075$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010076
10077if test "${with_signal_module}" = "yes"; then
10078 USE_SIGNAL_MODULE=""
10079 SIGNAL_OBJS=""
10080else
10081 USE_SIGNAL_MODULE="#"
10082 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10083fi
10084
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010085# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010086
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010087USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010089
Martin v. Löwis11437992002-04-12 09:54:03 +000010090
10091# Templates for things AC_DEFINEd more than once.
10092# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010093
10094
Martin v. Löwis11437992002-04-12 09:54:03 +000010095
Matthias Kloseb9621712010-04-24 17:59:49 +000010096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10097$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010100if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101 withval=$with_threads;
10102fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010103
10104
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010105# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010108if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109 withval=$with_thread; with_threads=$with_thread
10110fi
10111
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010112
10113if test -z "$with_threads"
10114then with_threads="yes"
10115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10117$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010118
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010119
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010120if test "$with_threads" = "no"
10121then
10122 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010123elif test "$ac_cv_pthread_is_default" = yes
10124then
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010126
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010127 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010129
10130 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010132elif test "$ac_cv_kpthread" = "yes"
10133then
10134 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010135 if test "$ac_cv_cxx_thread" = "yes"; then
10136 CXX="$CXX -Kpthread"
10137 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010139
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010140 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010141 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010142elif test "$ac_cv_kthread" = "yes"
10143then
10144 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010145 if test "$ac_cv_cxx_thread" = "yes"; then
10146 CXX="$CXX -Kthread"
10147 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010149
10150 posix_threads=yes
10151 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010152elif test "$ac_cv_pthread" = "yes"
10153then
10154 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010155 if test "$ac_cv_cxx_thread" = "yes"; then
10156 CXX="$CXX -pthread"
10157 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010159
10160 posix_threads=yes
10161 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010162else
10163 if test ! -z "$with_threads" -a -d "$with_threads"
10164 then LDFLAGS="$LDFLAGS -L$with_threads"
10165 fi
10166 if test ! -z "$withval" -a -d "$withval"
10167 then LDFLAGS="$LDFLAGS -L$withval"
10168 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010169
10170 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010171 # define _POSIX_THREADS in unistd.h. Some apparently don't
10172 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10174$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010176/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010177
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010178#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010179#ifdef _POSIX_THREADS
10180yes
10181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010182
10183_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010186 unistd_defines_pthreads=yes
10187else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010188 unistd_defines_pthreads=no
10189fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010190rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010191
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10193$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010194
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010196
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010197 # Just looking for pthread_create in libpthread is not enough:
10198 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10199 # So we really have to include pthread.h, and then link.
10200 _libs=$LIBS
10201 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10203$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010205/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010206
10207#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010208#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010209
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010210void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010211int
10212main ()
10213{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010214
10215pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ;
10217 return 0;
10218}
10219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010221
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10223$as_echo "yes" >&6; }
10224 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +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 Rossum02a1c402000-02-25 19:26:31 +000010228else
Martin v. Löwis11437992002-04-12 09:54:03 +000010229
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010230 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010232if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010234
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010235 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010236 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010237else
Guido van Rossumad678af1998-10-02 14:42:15 +000010238
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10240$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010241if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010243else
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010245LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249/* Override any GCC internal prototype to avoid an error.
10250 Use char because int might match the return type of a GCC
10251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252#ifdef __cplusplus
10253extern "C"
10254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010255char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010256int
10257main ()
10258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 ;
10261 return 0;
10262}
10263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010266else
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010269rm -f core conftest.err conftest.$ac_objext \
10270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010271LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10274$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010275if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010278 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010279 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010280 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010281else
Greg Steinadf63d62000-07-05 10:38:09 +000010282
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10284$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010285if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010287else
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010289LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293/* Override any GCC internal prototype to avoid an error.
10294 Use char because int might match the return type of a GCC
10295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010296#ifdef __cplusplus
10297extern "C"
10298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010299char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010300int
10301main ()
10302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 ;
10305 return 0;
10306}
10307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010310else
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010313rm -f core conftest.err conftest.$ac_objext \
10314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010315LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10318$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010319if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010321
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010322 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010323 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010324 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010325else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010326
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10328$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010329if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010331else
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010333LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337/* Override any GCC internal prototype to avoid an error.
10338 Use char because int might match the return type of a GCC
10339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010340#ifdef __cplusplus
10341extern "C"
10342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010343char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010344int
10345main ()
10346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 ;
10349 return 0;
10350}
10351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010352if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010357rm -f core conftest.err conftest.$ac_objext \
10358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10362$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010363if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010367 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010368 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010369else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010370
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10372$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010373if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010375else
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010377LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010381/* Override any GCC internal prototype to avoid an error.
10382 Use char because int might match the return type of a GCC
10383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010384#ifdef __cplusplus
10385extern "C"
10386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010387char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010388int
10389main ()
10390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 ;
10393 return 0;
10394}
10395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010398else
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010401rm -f core conftest.err conftest.$ac_objext \
10402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010403LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10406$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010407if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010409
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010410 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010411 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010412 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010413else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010414
Martin v. Löwis130fb172001-07-19 11:00:41 +000010415 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010416fi
10417
Guido van Rossum627b2d71993-12-24 10:39:16 +000010418
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010419fi
10420
Guido van Rossum0be3e491997-05-22 20:33:33 +000010421fi
10422
Guido van Rossum49545951997-12-02 19:28:29 +000010423fi
10424
Guido van Rossumb93a8621998-05-07 13:27:32 +000010425fi
10426
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010428rm -f core conftest.err conftest.$ac_objext \
10429 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010430
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10432$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010433if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010435else
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010437LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441/* Override any GCC internal prototype to avoid an error.
10442 Use char because int might match the return type of a GCC
10443 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010444#ifdef __cplusplus
10445extern "C"
10446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010447char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010448int
10449main ()
10450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 ;
10453 return 0;
10454}
10455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010456if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010458else
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010461rm -f core conftest.err conftest.$ac_objext \
10462 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010463LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10466$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010467if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010469
Martin v. Löwis130fb172001-07-19 11:00:41 +000010470 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010471 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010472 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010473fi
10474
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010475
Neal Norwitza978ab02002-11-02 16:58:05 +000010476 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10478$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010479if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010481else
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010483LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010487/* Override any GCC internal prototype to avoid an error.
10488 Use char because int might match the return type of a GCC
10489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010490#ifdef __cplusplus
10491extern "C"
10492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010493char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010494int
10495main ()
10496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010497return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 ;
10499 return 0;
10500}
10501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010502if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010504else
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010507rm -f core conftest.err conftest.$ac_objext \
10508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010509LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10512$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010513if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010515
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010516 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010517 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010518 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010519fi
10520
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010521 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010522fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010523
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010524if test "$posix_threads" = "yes"; then
10525 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010526
Matthias Kloseb9621712010-04-24 17:59:49 +000010527$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010528
10529 fi
10530
10531 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10532 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010533 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010534$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010535
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010536 ;;
10537 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010538$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010539
10540 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010541 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010542$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010543
10544 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010545 esac
10546
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10548$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010549 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010551else
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010553 ac_cv_pthread_system_supported=no
10554else
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010556/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010557
10558 #include <stdio.h>
10559 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010560 void *foo(void *parm) {
10561 return NULL;
10562 }
10563 main() {
10564 pthread_attr_t attr;
10565 pthread_t id;
10566 if (pthread_attr_init(&attr)) exit(-1);
10567 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10568 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10569 exit(0);
10570 }
10571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010572if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010573 ac_cv_pthread_system_supported=yes
10574else
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010579fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581
Guido van Rossum627b2d71993-12-24 10:39:16 +000010582fi
10583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10585$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010586 if test "$ac_cv_pthread_system_supported" = "yes"; then
10587
Matthias Kloseb9621712010-04-24 17:59:49 +000010588$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010589
10590 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 for ac_func in pthread_sigmask
10592do :
10593 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010594if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010596#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010598 case $ac_sys_system in
10599 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010600
Matthias Kloseb9621712010-04-24 17:59:49 +000010601$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010602
10603 ;;
10604 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010605fi
10606done
10607
Christian Heimesf77b4b22013-08-21 13:26:05 +020010608 for ac_func in pthread_atfork
10609do :
10610 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10611if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10612 cat >>confdefs.h <<_ACEOF
10613#define HAVE_PTHREAD_ATFORK 1
10614_ACEOF
10615
10616fi
10617done
10618
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010619fi
10620
10621
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010622# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010623
Matthias Kloseb9621712010-04-24 17:59:49 +000010624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10625$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010627if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010629 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10631$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632 ipv6=no
10633 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10635$as_echo "yes" >&6; }
10636 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010637
10638 ipv6=yes
10639 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010641else
Martin v. Löwis11437992002-04-12 09:54:03 +000010642
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645 /* AF_INET6 available check */
10646#include <sys/types.h>
10647#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010648int
10649main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010650{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010651int domain = AF_INET6;
10652 ;
10653 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010654}
Martin v. Löwis11437992002-04-12 09:54:03 +000010655_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010656if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10659$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010660 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010661
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010662else
Matthias Kloseb159a552010-04-25 21:00:44 +000010663
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10665$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010666 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010667
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010668fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010671if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10673$as_echo_n "checking if RFC2553 API is available... " >&6; }
10674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010675/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010676
10677 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010678#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010679int
10680main ()
10681{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010682struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010683 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 ;
10685 return 0;
10686}
Matthias Kloseb159a552010-04-25 21:00:44 +000010687
Martin v. Löwis11437992002-04-12 09:54:03 +000010688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010689if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010690
10691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010692$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010693 ipv6=yes
10694
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010695else
Matthias Kloseb159a552010-04-25 21:00:44 +000010696
10697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010698$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010699 ipv6=no
10700
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010703fi
10704
10705if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010707
10708fi
10709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710fi
10711
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010712
10713ipv6type=unknown
10714ipv6lib=none
10715ipv6trylibc=no
10716
10717if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10719$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010720 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10721 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722 case $i in
10723 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010725/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010726
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727#include <netinet/in.h>
10728#ifdef IPV6_INRIA_VERSION
10729yes
10730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010731_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010734 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010736rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737
10738 ;;
10739 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010741/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743#include <netinet/in.h>
10744#ifdef __KAME__
10745yes
10746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010747_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010750 ipv6type=$i;
10751 ipv6lib=inet6
10752 ipv6libdir=/usr/local/v6/lib
10753 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010754fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010755rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756
10757 ;;
10758 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010760/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010761
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762#include <features.h>
10763#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10764yes
10765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010766_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769 ipv6type=$i;
10770 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010772rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773
10774 ;;
10775 linux-inet6)
10776 if test -d /usr/inet6; then
10777 ipv6type=$i
10778 ipv6lib=inet6
10779 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010780 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781 fi
10782 ;;
10783 solaris)
10784 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010785 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786 ipv6type=$i
10787 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 fi
10789 fi
10790 ;;
10791 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010793/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795#include <sys/param.h>
10796#ifdef _TOSHIBA_INET6
10797yes
10798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010799_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802 ipv6type=$i;
10803 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010804 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010806rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807
10808 ;;
10809 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010812
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813#include </usr/local/v6/include/sys/v6config.h>
10814#ifdef __V6D__
10815yes
10816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010817_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820 ipv6type=$i;
10821 ipv6lib=v6;
10822 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010823 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010824fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010825rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826
10827 ;;
10828 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010830/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010831
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010832#include <sys/param.h>
10833#ifdef _ZETA_MINAMI_INET6
10834yes
10835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010836_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839 ipv6type=$i;
10840 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010841 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010843rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844
10845 ;;
10846 esac
10847 if test "$ipv6type" != "unknown"; then
10848 break
10849 fi
10850 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10852$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853fi
10854
10855if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10856 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10857 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10858 echo "using lib$ipv6lib"
10859 else
10860 if test $ipv6trylibc = "yes"; then
10861 echo "using libc"
10862 else
10863 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10864 echo "You need to fetch lib$ipv6lib.a from appropriate"
10865 echo 'ipv6 kit and compile beforehand.'
10866 exit 1
10867 fi
10868 fi
10869fi
10870
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10872$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10874/* end confdefs.h. */
10875 /* CAN_RAW_FD_FRAMES available check */
10876#include <linux/can/raw.h>
10877int
10878main ()
10879{
10880int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10881 ;
10882 return 0;
10883}
10884_ACEOF
10885if ac_fn_c_try_compile "$LINENO"; then :
10886
10887
10888$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10889
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10891$as_echo "yes" >&6; }
10892
10893else
10894
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10896$as_echo "no" >&6; }
10897
10898fi
10899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10902$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010904/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010905
10906 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010907int
10908main ()
10909{
10910FSIORefNum fRef = 0
10911 ;
10912 return 0;
10913}
Matthias Kloseb159a552010-04-25 21:00:44 +000010914
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010916if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010917
Matthias Kloseb159a552010-04-25 21:00:44 +000010918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10922$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010923
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010924else
Matthias Kloseb159a552010-04-25 21:00:44 +000010925
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10927$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010928
10929fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10931
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010932# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10934$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010937if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010938 withval=$with_doc_strings;
10939fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010940
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010941
10942if test -z "$with_doc_strings"
10943then with_doc_strings="yes"
10944fi
10945if test "$with_doc_strings" != "no"
10946then
10947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010949
10950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10952$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010953
Antoine Pitrou042b1282010-08-13 21:15:58 +000010954# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10956$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010959if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010960 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010961if test "$withval" != no
10962then
10963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010965
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10967$as_echo "yes" >&6; }
10968else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010970fi
10971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10973$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974fi
10975
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010976
10977# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10979$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010981# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010982if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983 withval=$with_pymalloc;
10984fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010985
Neil Schemenauera35c6882001-02-27 04:45:05 +000010986
Neil Schemenauer16c22972002-03-22 15:34:49 +000010987if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010988then
10989 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010990fi
10991if test "$with_pymalloc" != "no"
10992then
Martin v. Löwis11437992002-04-12 09:54:03 +000010993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010995
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010996 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10999$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011000
Benjamin Peterson05159c42009-12-03 03:01:27 +000011001# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11003$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011004
11005# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011006if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011007 withval=$with_valgrind;
11008else
11009 with_valgrind=no
11010fi
11011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11013$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011014if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011015 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 +020011016if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011019
11020else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011021 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011022
11023fi
11024
11025
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011026 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011027fi
11028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011029# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011030
Guido van Rossum98935bf2001-09-05 19:13:16 +000011031DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011032
Guido van Rossume97ee181999-12-20 21:27:22 +000011033# the dlopen() function means we might want to use dynload_shlib.o. some
11034# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011035for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011036do :
11037 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011038if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011040#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011041_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011042
Guido van Rossume97ee181999-12-20 21:27:22 +000011043fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011044done
Guido van Rossume97ee181999-12-20 21:27:22 +000011045
Michael W. Hudson54241132001-12-07 15:38:26 +000011046
Guido van Rossume97ee181999-12-20 21:27:22 +000011047# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11048# loading of modules.
11049
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11051$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011052if test -z "$DYNLOADFILE"
11053then
11054 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011055 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11056 if test "$ac_cv_func_dlopen" = yes
11057 then DYNLOADFILE="dynload_shlib.o"
11058 else DYNLOADFILE="dynload_aix.o"
11059 fi
11060 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011061 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011062 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11063 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011064 *)
11065 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11066 # out any dynamic loading
11067 if test "$ac_cv_func_dlopen" = yes
11068 then DYNLOADFILE="dynload_shlib.o"
11069 else DYNLOADFILE="dynload_stub.o"
11070 fi
11071 ;;
11072 esac
11073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11075$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011076if test "$DYNLOADFILE" != "dynload_stub.o"
11077then
Martin v. Löwis11437992002-04-12 09:54:03 +000011078
Matthias Kloseb9621712010-04-24 17:59:49 +000011079$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011080
11081fi
11082
Neil Schemenauer4e425612001-06-19 15:44:15 +000011083# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11084
Michael W. Hudson54241132001-12-07 15:38:26 +000011085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11087$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011088if test -z "$MACHDEP_OBJS"
11089then
Jack Jansene578a632001-08-15 01:27:14 +000011090 MACHDEP_OBJS=$extra_machdep_objs
11091else
11092 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011093fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011094if test -z "$MACHDEP_OBJS"; then
11095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11096$as_echo "none" >&6; }
11097else
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11099$as_echo "$MACHDEP_OBJS" >&6; }
11100fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011101
Guido van Rossum627b2d71993-12-24 10:39:16 +000011102# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011103for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011104 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011105 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011106 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011107 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011108 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011109 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011110 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11111 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011112 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011113 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011114 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011115 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011116 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011117 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011118 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11119 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011120 sigaction sigaltstack siginterrupt sigpending sigrelse \
11121 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011122 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011123 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011124 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011125do :
11126 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11127ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011128if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011130#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011131_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011132
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011133fi
11134done
11135
Michael W. Hudson54241132001-12-07 15:38:26 +000011136
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011137ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11138 #include <dirent.h>
11139"
11140if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11141
11142$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11143
11144fi
11145
11146
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011147# For some functions, having a definition is not sufficient, since
11148# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11150$as_echo_n "checking for chroot... " >&6; }
11151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011152/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011153#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011154int
11155main ()
11156{
11157void *x=chroot
11158 ;
11159 return 0;
11160}
11161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011163
Matthias Kloseb9621712010-04-24 17:59:49 +000011164$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011165
Matthias Kloseb159a552010-04-25 21:00:44 +000011166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011167$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011168else
Matthias Kloseb9621712010-04-24 17:59:49 +000011169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11170$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011171
11172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11175$as_echo_n "checking for link... " >&6; }
11176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011178#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011179int
11180main ()
11181{
11182void *x=link
11183 ;
11184 return 0;
11185}
11186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011188
Matthias Kloseb9621712010-04-24 17:59:49 +000011189$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011190
Matthias Kloseb159a552010-04-25 21:00:44 +000011191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011192$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011193else
Matthias Kloseb9621712010-04-24 17:59:49 +000011194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11195$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011196
11197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11200$as_echo_n "checking for symlink... " >&6; }
11201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011202/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011203#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011204int
11205main ()
11206{
11207void *x=symlink
11208 ;
11209 return 0;
11210}
11211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011212if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011213
Matthias Kloseb9621712010-04-24 17:59:49 +000011214$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011215
Matthias Kloseb159a552010-04-25 21:00:44 +000011216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011217$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011218else
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11220$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011221
11222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11225$as_echo_n "checking for fchdir... " >&6; }
11226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011227/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011228#include <unistd.h>
11229int
11230main ()
11231{
11232void *x=fchdir
11233 ;
11234 return 0;
11235}
11236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011240
Matthias Kloseb159a552010-04-25 21:00:44 +000011241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011242$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011243else
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11245$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011246
11247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11250$as_echo_n "checking for fsync... " >&6; }
11251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011252/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011253#include <unistd.h>
11254int
11255main ()
11256{
11257void *x=fsync
11258 ;
11259 return 0;
11260}
11261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011265
Matthias Kloseb159a552010-04-25 21:00:44 +000011266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011267$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011268else
Matthias Kloseb9621712010-04-24 17:59:49 +000011269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11270$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011271
11272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11275$as_echo_n "checking for fdatasync... " >&6; }
11276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011278#include <unistd.h>
11279int
11280main ()
11281{
11282void *x=fdatasync
11283 ;
11284 return 0;
11285}
11286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011290
Matthias Kloseb159a552010-04-25 21:00:44 +000011291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011292$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011293else
Matthias Kloseb9621712010-04-24 17:59:49 +000011294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11295$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011296
11297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11300$as_echo_n "checking for epoll... " >&6; }
11301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011302/* end confdefs.h. */
11303#include <sys/epoll.h>
11304int
11305main ()
11306{
11307void *x=epoll_create
11308 ;
11309 return 0;
11310}
11311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011315
Matthias Kloseb159a552010-04-25 21:00:44 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011318else
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11320$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011321
11322fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11325$as_echo_n "checking for epoll_create1... " >&6; }
11326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327/* end confdefs.h. */
11328#include <sys/epoll.h>
11329int
11330main ()
11331{
11332void *x=epoll_create1
11333 ;
11334 return 0;
11335}
11336_ACEOF
11337if ac_fn_c_try_compile "$LINENO"; then :
11338
11339$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11340
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11342$as_echo "yes" >&6; }
11343else
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11345$as_echo "no" >&6; }
11346
11347fi
11348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11350$as_echo_n "checking for kqueue... " >&6; }
11351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011352/* end confdefs.h. */
11353
11354#include <sys/types.h>
11355#include <sys/event.h>
11356
11357int
11358main ()
11359{
11360int x=kqueue()
11361 ;
11362 return 0;
11363}
11364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011365if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011368
Matthias Kloseb159a552010-04-25 21:00:44 +000011369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011370$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011371else
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11373$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011374
11375fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11378$as_echo_n "checking for prlimit... " >&6; }
11379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11380/* end confdefs.h. */
11381
11382#include <sys/time.h>
11383#include <sys/resource.h>
11384
11385int
11386main ()
11387{
11388void *x=prlimit
11389 ;
11390 return 0;
11391}
11392_ACEOF
11393if ac_fn_c_try_compile "$LINENO"; then :
11394
11395$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11396
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11398$as_echo "yes" >&6; }
11399else
11400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11401$as_echo "no" >&6; }
11402
11403fi
11404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11405
Martin v. Löwisd5843682002-11-21 20:41:28 +000011406# On some systems (eg. FreeBSD 5), we would find a definition of the
11407# functions ctermid_r, setgroups in the library, but no prototype
11408# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11409# address to avoid compiler warnings and potential miscompilations
11410# because of the missing prototypes.
11411
Matthias Kloseb9621712010-04-24 17:59:49 +000011412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11413$as_echo_n "checking for ctermid_r... " >&6; }
11414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011415/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011416
Martin v. Löwisd5843682002-11-21 20:41:28 +000011417#include <stdio.h>
11418
Martin v. Löwisd5843682002-11-21 20:41:28 +000011419int
11420main ()
11421{
11422void* p = ctermid_r
11423 ;
11424 return 0;
11425}
11426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011430
Matthias Kloseb159a552010-04-25 21:00:44 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011432$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011433else
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011436
11437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11439
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11441$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011442if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011443 $as_echo_n "(cached) " >&6
11444else
11445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011446/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011447#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011448int
11449main ()
11450{
11451void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011452
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011453 ;
11454 return 0;
11455}
11456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011457if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011458 ac_cv_flock_decl=yes
11459else
11460 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011461
11462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011464
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011465fi
11466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11467$as_echo "$ac_cv_flock_decl" >&6; }
11468if test "x${ac_cv_flock_decl}" = xyes; then
11469 for ac_func in flock
11470do :
11471 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011472if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011473 cat >>confdefs.h <<_ACEOF
11474#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011475_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011476
Antoine Pitroua3000072010-09-07 14:52:42 +000011477else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011479$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011480if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011481 $as_echo_n "(cached) " >&6
11482else
11483 ac_check_lib_save_LIBS=$LIBS
11484LIBS="-lbsd $LIBS"
11485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11486/* end confdefs.h. */
11487
11488/* Override any GCC internal prototype to avoid an error.
11489 Use char because int might match the return type of a GCC
11490 builtin and then its argument prototype would still apply. */
11491#ifdef __cplusplus
11492extern "C"
11493#endif
11494char flock ();
11495int
11496main ()
11497{
11498return flock ();
11499 ;
11500 return 0;
11501}
11502_ACEOF
11503if ac_fn_c_try_link "$LINENO"; then :
11504 ac_cv_lib_bsd_flock=yes
11505else
11506 ac_cv_lib_bsd_flock=no
11507fi
11508rm -f core conftest.err conftest.$ac_objext \
11509 conftest$ac_exeext conftest.$ac_ext
11510LIBS=$ac_check_lib_save_LIBS
11511fi
11512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11513$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011514if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011515 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011516
11517
11518$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11519
11520
11521fi
11522
11523
11524fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011525done
11526
Antoine Pitroua3000072010-09-07 14:52:42 +000011527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528
Matthias Kloseb9621712010-04-24 17:59:49 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11530$as_echo_n "checking for getpagesize... " >&6; }
11531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011532/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011533
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011534#include <unistd.h>
11535
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011536int
11537main ()
11538{
11539void* p = getpagesize
11540 ;
11541 return 0;
11542}
11543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011544if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011545
Matthias Kloseb9621712010-04-24 17:59:49 +000011546$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011547
Matthias Kloseb159a552010-04-25 21:00:44 +000011548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011549$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011550else
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011553
11554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011556
Victor Stinner984890f2011-11-24 13:53:38 +010011557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11558$as_echo_n "checking for broken unsetenv... " >&6; }
11559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11560/* end confdefs.h. */
11561
11562#include <stdlib.h>
11563
11564int
11565main ()
11566{
11567int res = unsetenv("DUMMY")
11568 ;
11569 return 0;
11570}
11571_ACEOF
11572if ac_fn_c_try_compile "$LINENO"; then :
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11574$as_echo "no" >&6; }
11575else
11576
11577$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11578
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11580$as_echo "yes" >&6; }
11581
11582fi
11583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11584
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011585for ac_prog in true
11586do
11587 # Extract the first word of "$ac_prog", so it can be a program name with args.
11588set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11590$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011591if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011593else
11594 if test -n "$TRUE"; then
11595 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11596else
11597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11598for as_dir in $PATH
11599do
11600 IFS=$as_save_IFS
11601 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011603 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011604 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 $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 +000011606 break 2
11607 fi
11608done
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011610IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011611
11612fi
11613fi
11614TRUE=$ac_cv_prog_TRUE
11615if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11617$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011618else
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11620$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011621fi
11622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011624 test -n "$TRUE" && break
11625done
11626test -n "$TRUE" || TRUE="/bin/true"
11627
11628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11630$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011631if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011633else
11634 ac_check_lib_save_LIBS=$LIBS
11635LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011637/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639/* Override any GCC internal prototype to avoid an error.
11640 Use char because int might match the return type of a GCC
11641 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011642#ifdef __cplusplus
11643extern "C"
11644#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011645char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011646int
11647main ()
11648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011649return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011650 ;
11651 return 0;
11652}
11653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011654if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011655 ac_cv_lib_c_inet_aton=yes
11656else
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011659rm -f core conftest.err conftest.$ac_objext \
11660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011661LIBS=$ac_check_lib_save_LIBS
11662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11664$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011665if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011666 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011667else
Matthias Kloseb9621712010-04-24 17:59:49 +000011668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11669$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011670if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011672else
11673 ac_check_lib_save_LIBS=$LIBS
11674LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011676/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011678/* Override any GCC internal prototype to avoid an error.
11679 Use char because int might match the return type of a GCC
11680 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011681#ifdef __cplusplus
11682extern "C"
11683#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011684char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011685int
11686main ()
11687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011689 ;
11690 return 0;
11691}
11692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011694 ac_cv_lib_resolv_inet_aton=yes
11695else
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011698rm -f core conftest.err conftest.$ac_objext \
11699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011700LIBS=$ac_check_lib_save_LIBS
11701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11703$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011704if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011705 cat >>confdefs.h <<_ACEOF
11706#define HAVE_LIBRESOLV 1
11707_ACEOF
11708
11709 LIBS="-lresolv $LIBS"
11710
11711fi
11712
11713
11714fi
11715
11716
Christian Heimesd0764e22007-12-04 15:00:33 +000011717# On Tru64, chflags seems to be present, but calling it will
11718# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11720$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011721if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011723else
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011725 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011728/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011729
Christian Heimesd0764e22007-12-04 15:00:33 +000011730#include <sys/stat.h>
11731#include <unistd.h>
11732int main(int argc, char*argv[])
11733{
11734 if(chflags(argv[0], 0) != 0)
11735 return 1;
11736 return 0;
11737}
Ned Deily3eb67d52011-06-28 00:00:28 -070011738
Christian Heimesd0764e22007-12-04 15:00:33 +000011739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011741 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011747fi
11748
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011749
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11752$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011753if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011755if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011756 ac_cv_have_chflags="yes"
11757else
11758 ac_cv_have_chflags="no"
11759fi
11760
11761fi
11762if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011763
Matthias Kloseb9621712010-04-24 17:59:49 +000011764$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011765
11766fi
11767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11769$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011770if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011772else
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011774 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011775else
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011777/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011778
Christian Heimesd0764e22007-12-04 15:00:33 +000011779#include <sys/stat.h>
11780#include <unistd.h>
11781int main(int argc, char*argv[])
11782{
11783 if(lchflags(argv[0], 0) != 0)
11784 return 1;
11785 return 0;
11786}
Ned Deily3eb67d52011-06-28 00:00:28 -070011787
Christian Heimesd0764e22007-12-04 15:00:33 +000011788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011789if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011790 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011791else
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011796fi
11797
11798
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11801$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011802if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011804if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011805 ac_cv_have_lchflags="yes"
11806else
11807 ac_cv_have_lchflags="no"
11808fi
11809
11810fi
11811if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011814
11815fi
11816
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011817case $ac_sys_system/$ac_sys_release in
11818Darwin/*)
11819 _CUR_CFLAGS="${CFLAGS}"
11820 _CUR_LDFLAGS="${LDFLAGS}"
11821 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11822 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11823 ;;
11824esac
11825
Matthias Kloseb9621712010-04-24 17:59:49 +000011826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11827$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011828if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011830else
11831 ac_check_lib_save_LIBS=$LIBS
11832LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011834/* end confdefs.h. */
11835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011836/* Override any GCC internal prototype to avoid an error.
11837 Use char because int might match the return type of a GCC
11838 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011839#ifdef __cplusplus
11840extern "C"
11841#endif
11842char inflateCopy ();
11843int
11844main ()
11845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011846return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011847 ;
11848 return 0;
11849}
11850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011852 ac_cv_lib_z_inflateCopy=yes
11853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011856rm -f core conftest.err conftest.$ac_objext \
11857 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011858LIBS=$ac_check_lib_save_LIBS
11859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11861$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011862if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011865
11866fi
11867
11868
11869case $ac_sys_system/$ac_sys_release in
11870Darwin/*)
11871 CFLAGS="${_CUR_CFLAGS}"
11872 LDFLAGS="${_CUR_LDFLAGS}"
11873 ;;
11874esac
11875
Matthias Kloseb9621712010-04-24 17:59:49 +000011876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11877$as_echo_n "checking for hstrerror... " >&6; }
11878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011879/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011880
Martin v. Löwise9416172003-05-03 10:12:45 +000011881#include <netdb.h>
11882
Martin v. Löwise9416172003-05-03 10:12:45 +000011883int
11884main ()
11885{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011886void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011887 ;
11888 return 0;
11889}
11890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011892
Matthias Kloseb9621712010-04-24 17:59:49 +000011893$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011894
Matthias Kloseb159a552010-04-25 21:00:44 +000011895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011896$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011897else
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11899$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011900
11901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011902rm -f core conftest.err conftest.$ac_objext \
11903 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11906$as_echo_n "checking for inet_aton... " >&6; }
11907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011908/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011909
Martin v. Löwis86d66262006-02-17 08:40:11 +000011910#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011911#include <sys/socket.h>
11912#include <netinet/in.h>
11913#include <arpa/inet.h>
11914
Martin v. Löwise9416172003-05-03 10:12:45 +000011915int
11916main ()
11917{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011918void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011919 ;
11920 return 0;
11921}
11922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011924
Matthias Kloseb9621712010-04-24 17:59:49 +000011925$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011926
Matthias Kloseb159a552010-04-25 21:00:44 +000011927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011928$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11931$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011932
11933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011934rm -f core conftest.err conftest.$ac_objext \
11935 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011936
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11938$as_echo_n "checking for inet_pton... " >&6; }
11939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011940/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011941
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011942#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011943#include <sys/socket.h>
11944#include <netinet/in.h>
11945#include <arpa/inet.h>
11946
Martin v. Löwise9416172003-05-03 10:12:45 +000011947int
11948main ()
11949{
11950void* p = inet_pton
11951 ;
11952 return 0;
11953}
11954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011955if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011958
Matthias Kloseb159a552010-04-25 21:00:44 +000011959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011960$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011961else
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11963$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011964
11965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011967
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011968# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11970$as_echo_n "checking for setgroups... " >&6; }
11971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011972/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011973
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011974#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011975#ifdef HAVE_GRP_H
11976#include <grp.h>
11977#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011978
Martin v. Löwisd5843682002-11-21 20:41:28 +000011979int
11980main ()
11981{
11982void* p = setgroups
11983 ;
11984 return 0;
11985}
11986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011988
Matthias Kloseb9621712010-04-24 17:59:49 +000011989$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011990
Matthias Kloseb159a552010-04-25 21:00:44 +000011991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011992$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011993else
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11995$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011996
11997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011999
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012000# check for openpty and forkpty
12001
12002for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012003do :
12004 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012005if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012007#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012008_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012009
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12012$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012013if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012015else
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012017LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021/* Override any GCC internal prototype to avoid an error.
12022 Use char because int might match the return type of a GCC
12023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012024#ifdef __cplusplus
12025extern "C"
12026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012027char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012028int
12029main ()
12030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012031return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012032 ;
12033 return 0;
12034}
12035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012038else
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012041rm -f core conftest.err conftest.$ac_objext \
12042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012043LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12046$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012047if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012049 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012050else
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12052$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012053if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012055else
12056 ac_check_lib_save_LIBS=$LIBS
12057LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012059/* end confdefs.h. */
12060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061/* Override any GCC internal prototype to avoid an error.
12062 Use char because int might match the return type of a GCC
12063 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012064#ifdef __cplusplus
12065extern "C"
12066#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012067char openpty ();
12068int
12069main ()
12070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012077 ac_cv_lib_bsd_openpty=yes
12078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012081rm -f core conftest.err conftest.$ac_objext \
12082 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012083LIBS=$ac_check_lib_save_LIBS
12084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12086$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012087if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012089 LIBS="$LIBS -lbsd"
12090fi
12091
12092
12093fi
12094
Fred Drake8cef4cf2000-06-28 16:40:38 +000012095
12096fi
12097done
12098
12099for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012100do :
12101 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012102if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012104#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012105_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012106
Fred Drake8cef4cf2000-06-28 16:40:38 +000012107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12109$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012110if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012112else
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012114LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118/* Override any GCC internal prototype to avoid an error.
12119 Use char because int might match the return type of a GCC
12120 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012121#ifdef __cplusplus
12122extern "C"
12123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012124char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012125int
12126main ()
12127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012129 ;
12130 return 0;
12131}
12132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012135else
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012138rm -f core conftest.err conftest.$ac_objext \
12139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012140LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12143$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012146 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12149$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012150if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012152else
12153 ac_check_lib_save_LIBS=$LIBS
12154LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012156/* end confdefs.h. */
12157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158/* Override any GCC internal prototype to avoid an error.
12159 Use char because int might match the return type of a GCC
12160 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012161#ifdef __cplusplus
12162extern "C"
12163#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012164char forkpty ();
12165int
12166main ()
12167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012169 ;
12170 return 0;
12171}
12172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012173if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012174 ac_cv_lib_bsd_forkpty=yes
12175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012178rm -f core conftest.err conftest.$ac_objext \
12179 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012180LIBS=$ac_check_lib_save_LIBS
12181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12183$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012184if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012186 LIBS="$LIBS -lbsd"
12187fi
12188
12189
12190fi
12191
Fred Drake8cef4cf2000-06-28 16:40:38 +000012192
12193fi
12194done
12195
Jack Jansendd19cf82001-12-06 22:36:17 +000012196
Christian Heimesb186d002008-03-18 15:15:01 +000012197# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012198for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012199do :
12200 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012201if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012202 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012203#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012204_ACEOF
12205
12206fi
12207done
12208
12209
Michael W. Hudson54241132001-12-07 15:38:26 +000012210# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012211for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012212do :
12213 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12214ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012215if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012217#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012218_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012219
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012220fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221done
12222
Michael W. Hudson54241132001-12-07 15:38:26 +000012223
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012224ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012225if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012226 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012227
Martin v. Löwis1142de32002-03-29 16:28:31 +000012228else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012230 *" dup2.$ac_objext "* ) ;;
12231 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012232 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012233esac
12234
Martin v. Löwis1142de32002-03-29 16:28:31 +000012235fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012236
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012237ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012238if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012239 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12240
12241else
12242 case " $LIBOBJS " in
12243 *" strdup.$ac_objext "* ) ;;
12244 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12245 ;;
12246esac
12247
12248fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012249
12250
12251for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012252do :
12253 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012254if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012255 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012256#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012259/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012260#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012261int
12262main ()
12263{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012264getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 ;
12266 return 0;
12267}
12268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012270
Matthias Kloseb9621712010-04-24 17:59:49 +000012271$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012272
Guido van Rossum627b2d71993-12-24 10:39:16 +000012273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012275
Guido van Rossum627b2d71993-12-24 10:39:16 +000012276fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012277done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012278
Jack Jansen150753c2003-03-29 22:07:47 +000012279for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012280do :
12281 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012282if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012283 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012284#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012287/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012288#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012289int
12290main ()
12291{
12292setpgrp(0,0);
12293 ;
12294 return 0;
12295}
12296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012300
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012303
12304fi
12305done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012306
Thomas Wouters3a584202000-08-05 23:28:51 +000012307for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012308do :
12309 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012310if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012312#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012316#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012317int
12318main ()
12319{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012320gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 ;
12322 return 0;
12323}
12324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012325if ac_fn_c_try_compile "$LINENO"; then :
12326
Guido van Rossum627b2d71993-12-24 10:39:16 +000012327else
Skip Montanaro6dead952003-09-25 14:50:04 +000012328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012330
Martin v. Löwis11437992002-04-12 09:54:03 +000012331
Guido van Rossum627b2d71993-12-24 10:39:16 +000012332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012334
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012335fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012336done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012337
Michael W. Hudson54241132001-12-07 15:38:26 +000012338
Victor Stinnere0be4232011-10-25 13:06:09 +020012339for ac_func in clock_gettime
12340do :
12341 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12342if test "x$ac_cv_func_clock_gettime" = xyes; then :
12343 cat >>confdefs.h <<_ACEOF
12344#define HAVE_CLOCK_GETTIME 1
12345_ACEOF
12346
12347else
12348
12349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12350$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12351if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12352 $as_echo_n "(cached) " >&6
12353else
12354 ac_check_lib_save_LIBS=$LIBS
12355LIBS="-lrt $LIBS"
12356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12357/* end confdefs.h. */
12358
12359/* Override any GCC internal prototype to avoid an error.
12360 Use char because int might match the return type of a GCC
12361 builtin and then its argument prototype would still apply. */
12362#ifdef __cplusplus
12363extern "C"
12364#endif
12365char clock_gettime ();
12366int
12367main ()
12368{
12369return clock_gettime ();
12370 ;
12371 return 0;
12372}
12373_ACEOF
12374if ac_fn_c_try_link "$LINENO"; then :
12375 ac_cv_lib_rt_clock_gettime=yes
12376else
12377 ac_cv_lib_rt_clock_gettime=no
12378fi
12379rm -f core conftest.err conftest.$ac_objext \
12380 conftest$ac_exeext conftest.$ac_ext
12381LIBS=$ac_check_lib_save_LIBS
12382fi
12383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12384$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12385if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12386
Victor Stinner7efb8332014-08-29 15:41:08 +020012387 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012388 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12389
12390
12391$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12392
12393
12394fi
12395
12396
12397fi
12398done
12399
12400
12401for ac_func in clock_getres
12402do :
12403 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12404if test "x$ac_cv_func_clock_getres" = xyes; then :
12405 cat >>confdefs.h <<_ACEOF
12406#define HAVE_CLOCK_GETRES 1
12407_ACEOF
12408
12409else
12410
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12412$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12413if ${ac_cv_lib_rt_clock_getres+:} false; then :
12414 $as_echo_n "(cached) " >&6
12415else
12416 ac_check_lib_save_LIBS=$LIBS
12417LIBS="-lrt $LIBS"
12418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12419/* end confdefs.h. */
12420
12421/* Override any GCC internal prototype to avoid an error.
12422 Use char because int might match the return type of a GCC
12423 builtin and then its argument prototype would still apply. */
12424#ifdef __cplusplus
12425extern "C"
12426#endif
12427char clock_getres ();
12428int
12429main ()
12430{
12431return clock_getres ();
12432 ;
12433 return 0;
12434}
12435_ACEOF
12436if ac_fn_c_try_link "$LINENO"; then :
12437 ac_cv_lib_rt_clock_getres=yes
12438else
12439 ac_cv_lib_rt_clock_getres=no
12440fi
12441rm -f core conftest.err conftest.$ac_objext \
12442 conftest$ac_exeext conftest.$ac_ext
12443LIBS=$ac_check_lib_save_LIBS
12444fi
12445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12446$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12447if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12448
12449 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12450
12451
12452fi
12453
12454
12455fi
12456done
12457
12458
Matthias Kloseb9621712010-04-24 17:59:49 +000012459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12460$as_echo_n "checking for major... " >&6; }
12461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012462/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012463
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012464#if defined(MAJOR_IN_MKDEV)
12465#include <sys/mkdev.h>
12466#elif defined(MAJOR_IN_SYSMACROS)
12467#include <sys/sysmacros.h>
12468#else
12469#include <sys/types.h>
12470#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012471
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012472int
12473main ()
12474{
12475
12476 makedev(major(0),minor(0));
12477
12478 ;
12479 return 0;
12480}
12481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012483
12484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12488$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012489
12490else
Skip Montanaro6dead952003-09-25 14:50:04 +000012491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12493$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012494
12495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012496rm -f core conftest.err conftest.$ac_objext \
12497 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012498
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012499# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012500# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12502$as_echo_n "checking for getaddrinfo... " >&6; }
12503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012504/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012505
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012506#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012507#include <sys/socket.h>
12508#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012509#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012510
Martin v. Löwis11437992002-04-12 09:54:03 +000012511int
12512main ()
12513{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012514getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 ;
12516 return 0;
12517}
12518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012519if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012520 have_getaddrinfo=yes
12521else
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012524rm -f core conftest.err conftest.$ac_objext \
12525 conftest$ac_exeext conftest.$ac_ext
12526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12527$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012528if test $have_getaddrinfo = yes
12529then
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12531$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012532 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012534else
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012536
12537if test "${enable_ipv6+set}" = set; then
12538 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12539else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012540 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012541fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012542else
Matthias Kloseb9621712010-04-24 17:59:49 +000012543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012544/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012545
Stefan Krah19c21392012-11-22 23:47:32 +010012546#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012547#include <sys/types.h>
12548#include <netdb.h>
12549#include <string.h>
12550#include <sys/socket.h>
12551#include <netinet/in.h>
12552
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012553int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012554{
12555 int passive, gaierr, inet4 = 0, inet6 = 0;
12556 struct addrinfo hints, *ai, *aitop;
12557 char straddr[INET6_ADDRSTRLEN], strport[16];
12558
12559 for (passive = 0; passive <= 1; passive++) {
12560 memset(&hints, 0, sizeof(hints));
12561 hints.ai_family = AF_UNSPEC;
12562 hints.ai_flags = passive ? AI_PASSIVE : 0;
12563 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012564 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012565 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12566 (void)gai_strerror(gaierr);
12567 goto bad;
12568 }
12569 for (ai = aitop; ai; ai = ai->ai_next) {
12570 if (ai->ai_addr == NULL ||
12571 ai->ai_addrlen == 0 ||
12572 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12573 straddr, sizeof(straddr), strport, sizeof(strport),
12574 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12575 goto bad;
12576 }
12577 switch (ai->ai_family) {
12578 case AF_INET:
12579 if (strcmp(strport, "54321") != 0) {
12580 goto bad;
12581 }
12582 if (passive) {
12583 if (strcmp(straddr, "0.0.0.0") != 0) {
12584 goto bad;
12585 }
12586 } else {
12587 if (strcmp(straddr, "127.0.0.1") != 0) {
12588 goto bad;
12589 }
12590 }
12591 inet4++;
12592 break;
12593 case AF_INET6:
12594 if (strcmp(strport, "54321") != 0) {
12595 goto bad;
12596 }
12597 if (passive) {
12598 if (strcmp(straddr, "::") != 0) {
12599 goto bad;
12600 }
12601 } else {
12602 if (strcmp(straddr, "::1") != 0) {
12603 goto bad;
12604 }
12605 }
12606 inet6++;
12607 break;
12608 case AF_UNSPEC:
12609 goto bad;
12610 break;
12611 default:
12612 /* another family support? */
12613 break;
12614 }
12615 }
12616 }
12617
12618 if (!(inet4 == 0 || inet4 == 2))
12619 goto bad;
12620 if (!(inet6 == 0 || inet6 == 2))
12621 goto bad;
12622
12623 if (aitop)
12624 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012625 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012626
12627 bad:
12628 if (aitop)
12629 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012630 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012631}
12632
Martin v. Löwis11437992002-04-12 09:54:03 +000012633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012634if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012635 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012636else
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12640 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012643fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012644
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12648$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12649
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012650if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012651then
12652 if test $ipv6 = yes
12653 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012654 echo 'Fatal: You must get working getaddrinfo() function.'
12655 echo ' or you can specify "--disable-ipv6"'.
12656 exit 1
12657 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012658else
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
Matthias Kloseb9621712010-04-24 17:59:49 +000012660$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012661
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012662fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012663
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012664for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012665do :
12666 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012667if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012669#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012670_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012671
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012672fi
12673done
12674
Michael W. Hudson54241132001-12-07 15:38:26 +000012675
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012676# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12678$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012679if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012681else
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684#include <sys/types.h>
12685#include <sys/time.h>
12686#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
Martin v. Löwis11437992002-04-12 09:54:03 +000012688int
12689main ()
12690{
12691if ((struct tm *) 0)
12692return 0;
12693 ;
12694 return 0;
12695}
12696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012697if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012698 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012699else
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12705$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012706if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012709
12710fi
12711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12713$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012714if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012715 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719#include <sys/types.h>
12720#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Martin v. Löwis11437992002-04-12 09:54:03 +000012722int
12723main ()
12724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725struct tm tm;
12726 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ;
12729 return 0;
12730}
12731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012732if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012733 ac_cv_struct_tm=time.h
12734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12740$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012741if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012744
12745fi
12746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012748#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750"
Victor Stinnere0be4232011-10-25 13:06:09 +020012751if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
12753cat >>confdefs.h <<_ACEOF
12754#define HAVE_STRUCT_TM_TM_ZONE 1
12755_ACEOF
12756
12757
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012759
Martin v. Löwis11437992002-04-12 09:54:03 +000012760if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763
12764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12766"
Victor Stinnere0be4232011-10-25 13:06:09 +020012767if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769else
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771fi
12772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012774#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775_ACEOF
12776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12778$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012779if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781else
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012784#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785#if !HAVE_DECL_TZNAME
12786extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
Martin v. Löwis11437992002-04-12 09:54:03 +000012789int
12790main ()
12791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 ;
12794 return 0;
12795}
12796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012797if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012798 ac_cv_var_tzname=yes
12799else
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012802rm -f core conftest.err conftest.$ac_objext \
12803 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12806$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012807 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012810
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811 fi
12812fi
12813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012815if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
12817cat >>confdefs.h <<_ACEOF
12818#define HAVE_STRUCT_STAT_ST_RDEV 1
12819_ACEOF
12820
12821
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012822fi
12823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012825if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012826
Martin v. Löwis11437992002-04-12 09:54:03 +000012827cat >>confdefs.h <<_ACEOF
12828#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12829_ACEOF
12830
12831
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012832fi
12833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012835if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012836
12837cat >>confdefs.h <<_ACEOF
12838#define HAVE_STRUCT_STAT_ST_FLAGS 1
12839_ACEOF
12840
12841
12842fi
12843
Matthias Kloseb9621712010-04-24 17:59:49 +000012844ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012845if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012846
12847cat >>confdefs.h <<_ACEOF
12848#define HAVE_STRUCT_STAT_ST_GEN 1
12849_ACEOF
12850
12851
12852fi
12853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012855if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012856
12857cat >>confdefs.h <<_ACEOF
12858#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12859_ACEOF
12860
12861
12862fi
12863
Matthias Kloseb9621712010-04-24 17:59:49 +000012864ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012865if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012866
Martin v. Löwis11437992002-04-12 09:54:03 +000012867cat >>confdefs.h <<_ACEOF
12868#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12869_ACEOF
12870
12871
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012872fi
12873
Michael W. Hudson54241132001-12-07 15:38:26 +000012874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12876$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012877if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879else
Matthias Kloseb159a552010-04-25 21:00:44 +000012880
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012882/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012883#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012884int
12885main ()
12886{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 ;
12889 return 0;
12890}
12891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012892if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012893 ac_cv_header_time_altzone=yes
12894else
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899fi
12900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12902$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012903if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012904
Matthias Kloseb9621712010-04-24 17:59:49 +000012905$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906
12907fi
12908
Guido van Rossumda88dad1995-01-26 00:46:29 +000012909was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12911$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012913/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012914
12915#include <sys/types.h>
12916#include <sys/select.h>
12917#include <sys/time.h>
12918
Martin v. Löwis11437992002-04-12 09:54:03 +000012919int
12920main ()
12921{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012922;
Martin v. Löwis11437992002-04-12 09:54:03 +000012923 ;
12924 return 0;
12925}
12926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012927if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
12929
Matthias Kloseb9621712010-04-24 17:59:49 +000012930$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012931
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012932 was_it_defined=yes
12933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12937$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12940$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012941if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012943else
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012945/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012946#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012947int
12948main ()
12949{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012950struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ;
12952 return 0;
12953}
12954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012955if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012956 ac_cv_struct_addrinfo=yes
12957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12961fi
12962
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12964$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012965if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012966
Matthias Kloseb9621712010-04-24 17:59:49 +000012967$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012968
12969fi
12970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12972$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012973if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012978
12979# include <sys/types.h>
12980# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012981int
12982main ()
12983{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012984struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012985 ;
12986 return 0;
12987}
12988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012989if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012990 ac_cv_struct_sockaddr_storage=yes
12991else
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12995fi
12996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12998$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012999if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002
13003fi
13004
Guido van Rossum627b2d71993-12-24 10:39:16 +000013005# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13008$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013009if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013010 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013011else
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013014$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013015int
13016main ()
13017{
13018static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013019test_array [0] = 0;
13020return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
13022 ;
13023 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013024}
Martin v. Löwis11437992002-04-12 09:54:03 +000013025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013027 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13034$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013035if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013037
13038fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13041$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013042if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013044else
Matthias Kloseb9621712010-04-24 17:59:49 +000013045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013046/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013047
Martin v. Löwis11437992002-04-12 09:54:03 +000013048int
13049main ()
13050{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013051
Martin v. Löwis11437992002-04-12 09:54:03 +000013052#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013053 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013055 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013056 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013057 char const *const *pcpcc;
13058 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 /* NEC SVR4.0.2 mips cc rejects this. */
13060 struct point {int x, y;};
13061 static struct point const zero = {0,0};
13062 /* AIX XL C 1.02.0.0 rejects this.
13063 It does not let you subtract one const X* pointer from another in
13064 an arm of an if-expression whose if-part is not a constant
13065 expression */
13066 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013068 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069 ++pcpcc;
13070 ppc = (char**) pcpcc;
13071 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013072 { /* SCO 3.2v4 cc rejects this sort of thing. */
13073 char tx;
13074 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013075 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076
Martin v. Löwis11437992002-04-12 09:54:03 +000013077 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 }
13080 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13081 int x[] = {25, 17};
13082 const int *foo = &x[0];
13083 ++foo;
13084 }
13085 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13086 typedef const int *iptr;
13087 iptr p = 0;
13088 ++p;
13089 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013090 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013092 struct s { int j; const int *ap[3]; } bx;
13093 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013094 }
13095 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13096 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013099 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013100#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013101
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ;
13103 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013104}
Martin v. Löwis11437992002-04-12 09:54:03 +000013105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013106if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013107 ac_cv_c_const=yes
13108else
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13114$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013118
13119fi
13120
Michael W. Hudson54241132001-12-07 15:38:26 +000013121
Guido van Rossumda88dad1995-01-26 00:46:29 +000013122works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13124$as_echo_n "checking for working volatile... " >&6; }
13125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013126/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013127
Martin v. Löwis11437992002-04-12 09:54:03 +000013128int
13129main ()
13130{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 ;
13133 return 0;
13134}
13135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013136if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013137 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013138else
Skip Montanaro6dead952003-09-25 14:50:04 +000013139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013141
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013142
Guido van Rossum627b2d71993-12-24 10:39:16 +000013143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13146$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013147
Guido van Rossumda88dad1995-01-26 00:46:29 +000013148works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13150$as_echo_n "checking for working signed char... " >&6; }
13151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013152/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013153
Martin v. Löwis11437992002-04-12 09:54:03 +000013154int
13155main ()
13156{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013158 ;
13159 return 0;
13160}
13161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013162if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013163 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013164else
Skip Montanaro6dead952003-09-25 14:50:04 +000013165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013167
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013168
Guido van Rossum7f43da71994-08-01 12:15:30 +000013169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13172$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013173
Guido van Rossumda88dad1995-01-26 00:46:29 +000013174have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13176$as_echo_n "checking for prototypes... " >&6; }
13177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013178/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013179int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013180int
13181main ()
13182{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013183return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013184 ;
13185 return 0;
13186}
13187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013191
Matthias Kloseb159a552010-04-25 21:00:44 +000013192 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13196$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013197
Guido van Rossumda88dad1995-01-26 00:46:29 +000013198works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13200$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013202/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013203
13204#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013205int foo(int x, ...) {
13206 va_list va;
13207 va_start(va, x);
13208 va_arg(va, int);
13209 va_arg(va, char *);
13210 va_arg(va, double);
13211 return 0;
13212}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013213
Martin v. Löwis11437992002-04-12 09:54:03 +000013214int
13215main ()
13216{
Guido van Rossum90eea071996-08-30 20:58:57 +000013217return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 ;
13219 return 0;
13220}
13221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013223
13224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013226
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013227 works=yes
13228
Guido van Rossum627b2d71993-12-24 10:39:16 +000013229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13232$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013233
Martin v. Löwisd6320502004-08-12 13:45:08 +000013234# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13236$as_echo_n "checking for socketpair... " >&6; }
13237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013238/* end confdefs.h. */
13239
13240#include <sys/types.h>
13241#include <sys/socket.h>
13242
13243int
13244main ()
13245{
13246void *x=socketpair
13247 ;
13248 return 0;
13249}
13250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013251if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013254
Matthias Kloseb159a552010-04-25 21:00:44 +000013255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013256$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13259$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013260
13261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013263
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013264# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13266$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013268/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013269#include <sys/types.h>
13270#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013271int
13272main ()
13273{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013274struct sockaddr x;
13275x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 ;
13277 return 0;
13278}
13279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if ac_fn_c_try_compile "$LINENO"; then :
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13282$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285
13286else
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13288$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013289
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292
Guido van Rossumda88dad1995-01-26 00:46:29 +000013293va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13295$as_echo_n "checking whether va_list is an array... " >&6; }
13296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013297/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298
13299#ifdef HAVE_STDARG_PROTOTYPES
13300#include <stdarg.h>
13301#else
13302#include <varargs.h>
13303#endif
13304
Martin v. Löwis11437992002-04-12 09:54:03 +000013305int
13306main ()
13307{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 ;
13310 return 0;
13311}
13312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013313if ac_fn_c_try_compile "$LINENO"; then :
13314
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315else
Skip Montanaro6dead952003-09-25 14:50:04 +000013316
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013319
Guido van Rossumda88dad1995-01-26 00:46:29 +000013320 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013321
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13325$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013327# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
13329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013331if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013332
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013334
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13336$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013337 OLD_CFLAGS=$CFLAGS
13338 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013340/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013341
13342# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013343
Martin v. Löwis11437992002-04-12 09:54:03 +000013344int
13345main ()
13346{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013347
13348 char *name;
13349 struct hostent *he, *res;
13350 char buffer[2048];
13351 int buflen = 2048;
13352 int h_errnop;
13353
13354 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
13356 ;
13357 return 0;
13358}
13359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013363
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
Matthias Kloseb9621712010-04-24 17:59:49 +000013365$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13368$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013370else
Skip Montanaro6dead952003-09-25 14:50:04 +000013371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13373$as_echo "no" >&6; }
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13375$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013377/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013378
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013379# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013380
Martin v. Löwis11437992002-04-12 09:54:03 +000013381int
13382main ()
13383{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013384
13385 char *name;
13386 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013387 char buffer[2048];
13388 int buflen = 2048;
13389 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013390
Matthias Kloseb159a552010-04-25 21:00:44 +000013391 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013392
13393 ;
13394 return 0;
13395}
13396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Matthias Kloseb159a552010-04-25 21:00:44 +000013402$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13405$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013407else
Skip Montanaro6dead952003-09-25 14:50:04 +000013408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13410$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13412$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13414/* end confdefs.h. */
13415
13416# include <netdb.h>
13417
13418int
13419main ()
13420{
13421
13422 char *name;
13423 struct hostent *he;
13424 struct hostent_data data;
13425
13426 (void) gethostbyname_r(name, he, &data);
13427
13428 ;
13429 return 0;
13430}
13431_ACEOF
13432if ac_fn_c_try_compile "$LINENO"; then :
13433
13434 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13435
13436
13437$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13438
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13440$as_echo "yes" >&6; }
13441
13442else
13443
13444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13445$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013446
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013449
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013452
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013455 CFLAGS=$OLD_CFLAGS
13456
13457else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 for ac_func in gethostbyname
13460do :
13461 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013462if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013464#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013465_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013466
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013467fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013468done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013469
Michael W. Hudson54241132001-12-07 15:38:26 +000013470
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013471fi
13472
Michael W. Hudson54241132001-12-07 15:38:26 +000013473
13474
13475
13476
13477
13478
Guido van Rossum627b2d71993-12-24 10:39:16 +000013479# checks for system services
13480# (none yet)
13481
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013483ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013484if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013485
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13488$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013489if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013491else
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013493LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497/* Override any GCC internal prototype to avoid an error.
13498 Use char because int might match the return type of a GCC
13499 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013500#ifdef __cplusplus
13501extern "C"
13502#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013503char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013504int
13505main ()
13506{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013507return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013508 ;
13509 return 0;
13510}
13511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013517rm -f core conftest.err conftest.$ac_objext \
13518 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013519LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13522$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013523if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 cat >>confdefs.h <<_ACEOF
13525#define HAVE_LIBIEEE 1
13526_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013527
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013528 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013529
Guido van Rossum627b2d71993-12-24 10:39:16 +000013530fi
13531
Michael W. Hudson54241132001-12-07 15:38:26 +000013532
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013533fi
13534
Michael W. Hudson54241132001-12-07 15:38:26 +000013535
Guido van Rossum7f253911997-05-09 02:42:48 +000013536# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13538$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013541if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013542 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013543if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013544then
13545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13549$as_echo "yes" >&6; }
13550else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13551$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013552fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013553else
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13555$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556fi
13557
Guido van Rossum7f253911997-05-09 02:42:48 +000013558
Guido van Rossum7f43da71994-08-01 12:15:30 +000013559# check for --with-libm=...
13560
Guido van Rossum563e7081996-09-10 18:20:48 +000013561case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013562Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013563*) LIBM=-lm
13564esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13566$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013568# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013569if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013571if test "$withval" = no
13572then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13574$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013575elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013576then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13578$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013579else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013580fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13583$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584fi
13585
Guido van Rossum7f43da71994-08-01 12:15:30 +000013586
13587# check for --with-libc=...
13588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13590$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013592# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013593if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013594 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013595if test "$withval" = no
13596then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13598$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013599elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013600then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13602$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013603else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013604fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013605else
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13607$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013608fi
13609
Guido van Rossum7f43da71994-08-01 12:15:30 +000013610
Stefan Krah1919b7e2012-03-21 18:25:23 +010013611# **************************************
13612# * Check for gcc x64 inline assembler *
13613# **************************************
13614
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13616$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13618/* end confdefs.h. */
13619
13620int
13621main ()
13622{
13623
13624 __asm__ __volatile__ ("movq %rcx, %rax");
13625
13626 ;
13627 return 0;
13628}
13629_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013630if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013631 have_gcc_asm_for_x64=yes
13632else
13633 have_gcc_asm_for_x64=no
13634fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013635rm -f core conftest.err conftest.$ac_objext \
13636 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13638$as_echo "$have_gcc_asm_for_x64" >&6; }
13639if test "$have_gcc_asm_for_x64" = yes
13640then
13641
13642$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13643
13644fi
13645
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013646# **************************************************
13647# * Check for various properties of floating point *
13648# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13651$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013652if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013654else
13655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013657 ac_cv_little_endian_double=no
13658else
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013660/* end confdefs.h. */
13661
13662#include <string.h>
13663int main() {
13664 double x = 9006104071832581.0;
13665 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13666 return 0;
13667 else
13668 return 1;
13669}
13670
13671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013672if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013673 ac_cv_little_endian_double=yes
13674else
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13678 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013679fi
13680
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013681fi
13682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13684$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013685if test "$ac_cv_little_endian_double" = yes
13686then
13687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013689
13690fi
13691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13693$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013694if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013696else
13697
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013699 ac_cv_big_endian_double=no
13700else
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013702/* end confdefs.h. */
13703
13704#include <string.h>
13705int main() {
13706 double x = 9006104071832581.0;
13707 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13708 return 0;
13709 else
13710 return 1;
13711}
13712
13713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013714if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013715 ac_cv_big_endian_double=yes
13716else
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013721fi
13722
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013723fi
13724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13726$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013727if test "$ac_cv_big_endian_double" = yes
13728then
13729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013731
13732fi
13733
13734# Some ARM platforms use a mixed-endian representation for doubles.
13735# While Python doesn't currently have full support for these platforms
13736# (see e.g., issue 1762561), we can at least make sure that float <-> string
13737# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13739$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013740if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013742else
13743
Matthias Kloseb9621712010-04-24 17:59:49 +000013744if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013745 ac_cv_mixed_endian_double=no
13746else
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013748/* end confdefs.h. */
13749
13750#include <string.h>
13751int main() {
13752 double x = 9006104071832581.0;
13753 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13754 return 0;
13755 else
13756 return 1;
13757}
13758
13759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013761 ac_cv_mixed_endian_double=yes
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013767fi
13768
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013769fi
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13772$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013773if test "$ac_cv_mixed_endian_double" = yes
13774then
13775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013777
13778fi
13779
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013780# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013781# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013782# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013783# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013784# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013785# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013786
13787# This inline assembler syntax may also work for suncc and icc,
13788# so we try it on all platforms.
13789
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13791$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013793/* end confdefs.h. */
13794
13795int
13796main ()
13797{
13798
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013799 unsigned short cw;
13800 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13801 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013802
13803 ;
13804 return 0;
13805}
13806_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013807if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013808 have_gcc_asm_for_x87=yes
13809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013811fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013812rm -f core conftest.err conftest.$ac_objext \
13813 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13815$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013816if test "$have_gcc_asm_for_x87" = yes
13817then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013820
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013821fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13824$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13826/* end confdefs.h. */
13827
13828int
13829main ()
13830{
13831
13832 unsigned int fpcr;
13833 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13834 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13835
13836 ;
13837 return 0;
13838}
13839_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013840if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013841 have_gcc_asm_for_mc68881=yes
13842else
13843 have_gcc_asm_for_mc68881=no
13844fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013845rm -f core conftest.err conftest.$ac_objext \
13846 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13848$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13849if test "$have_gcc_asm_for_mc68881" = yes
13850then
13851
13852$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13853
13854fi
13855
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013856# Detect whether system arithmetic is subject to x87-style double
13857# rounding issues. The result of this test has little meaning on non
13858# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13859# mode is round-to-nearest and double rounding issues are present, and
13860# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13862$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863# $BASECFLAGS may affect the result
13864ac_save_cc="$CC"
13865CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013866if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013867 ac_cv_x87_double_rounding=no
13868else
Matthias Kloseb9621712010-04-24 17:59:49 +000013869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013870/* end confdefs.h. */
13871
13872#include <stdlib.h>
13873#include <math.h>
13874int main() {
13875 volatile double x, y, z;
13876 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13877 x = 0.99999999999999989; /* 1-2**-53 */
13878 y = 1./x;
13879 if (y != 1.)
13880 exit(0);
13881 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13882 x = 1e16;
13883 y = 2.99999;
13884 z = x + y;
13885 if (z != 1e16+4.)
13886 exit(0);
13887 /* both tests show evidence of double rounding */
13888 exit(1);
13889}
13890
13891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013892if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013893 ac_cv_x87_double_rounding=no
13894else
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013899fi
13900
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013901CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13903$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013904if test "$ac_cv_x87_double_rounding" = yes
13905then
13906
Matthias Kloseb9621712010-04-24 17:59:49 +000013907$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013908
13909fi
13910
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013911# ************************************
13912# * Check for mathematical functions *
13913# ************************************
13914
13915LIBS_SAVE=$LIBS
13916LIBS="$LIBS $LIBM"
13917
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013918for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13919do :
13920 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13921ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013922if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013923 cat >>confdefs.h <<_ACEOF
13924#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13925_ACEOF
13926
13927fi
13928done
13929
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013930for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013931do :
13932 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13933ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013934if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013935 cat >>confdefs.h <<_ACEOF
13936#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13937_ACEOF
13938
13939fi
13940done
13941
13942ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13943"
Victor Stinnere0be4232011-10-25 13:06:09 +020013944if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013945 ac_have_decl=1
13946else
13947 ac_have_decl=0
13948fi
13949
13950cat >>confdefs.h <<_ACEOF
13951#define HAVE_DECL_ISINF $ac_have_decl
13952_ACEOF
13953ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13954"
Victor Stinnere0be4232011-10-25 13:06:09 +020013955if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013956 ac_have_decl=1
13957else
13958 ac_have_decl=0
13959fi
13960
13961cat >>confdefs.h <<_ACEOF
13962#define HAVE_DECL_ISNAN $ac_have_decl
13963_ACEOF
13964ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13965"
Victor Stinnere0be4232011-10-25 13:06:09 +020013966if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013967 ac_have_decl=1
13968else
13969 ac_have_decl=0
13970fi
13971
13972cat >>confdefs.h <<_ACEOF
13973#define HAVE_DECL_ISFINITE $ac_have_decl
13974_ACEOF
13975
13976
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013977# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13978# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13980$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013981if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013983else
13984
Matthias Kloseb9621712010-04-24 17:59:49 +000013985if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013986 ac_cv_tanh_preserves_zero_sign=no
13987else
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013989/* end confdefs.h. */
13990
13991#include <math.h>
13992#include <stdlib.h>
13993int main() {
13994 /* return 0 if either negative zeros don't exist
13995 on this platform or if negative zeros exist
13996 and tanh(-0.) == -0. */
13997 if (atan2(0., -1.) == atan2(-0., -1.) ||
13998 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13999 else exit(1);
14000}
14001
14002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014003if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014004 ac_cv_tanh_preserves_zero_sign=yes
14005else
Matthias Kloseb9621712010-04-24 17:59:49 +000014006 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14009 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014010fi
14011
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014012fi
14013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14015$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014016if test "$ac_cv_tanh_preserves_zero_sign" = yes
14017then
14018
Matthias Kloseb9621712010-04-24 17:59:49 +000014019$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014020
14021fi
14022
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014023if test "$ac_cv_func_log1p" = yes
14024then
14025 # On some versions of AIX, log1p(-0.) returns 0. instead of
14026 # -0. See issue #9920.
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14028$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014029 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014030 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014031else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014032
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014033 if test "$cross_compiling" = yes; then :
14034 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014035else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14037/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014038
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014039 #include <math.h>
14040 #include <stdlib.h>
14041 int main() {
14042 /* Fail if the signs of log1p(-0.) and -0. can be
14043 distinguished. */
14044 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14045 return 0;
14046 else
14047 return 1;
14048 }
14049
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014050_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014051if ac_fn_c_try_run "$LINENO"; then :
14052 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014053else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014054 ac_cv_log1p_drops_zero_sign=yes
14055fi
14056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014058fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014059
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014060fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014061
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14063$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14064fi
14065if test "$ac_cv_log1p_drops_zero_sign" = yes
14066then
14067
14068$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14069
14070fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014071
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014072LIBS=$LIBS_SAVE
14073
Mark Dickinsona614f042009-11-28 12:48:43 +000014074# For multiprocessing module, check that sem_open
14075# actually works. For FreeBSD versions <= 7.2,
14076# the kernel module that provides POSIX semaphores
14077# isn't loaded by default, so an attempt to call
14078# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14080$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014081if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014083else
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014085 ac_cv_posix_semaphores_enabled=yes
14086else
Matthias Kloseb9621712010-04-24 17:59:49 +000014087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014088/* end confdefs.h. */
14089
14090#include <unistd.h>
14091#include <fcntl.h>
14092#include <stdio.h>
14093#include <semaphore.h>
14094#include <sys/stat.h>
14095
14096int main(void) {
14097 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14098 if (a == SEM_FAILED) {
14099 perror("sem_open");
14100 return 1;
14101 }
14102 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014103 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014104 return 0;
14105}
14106
14107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014108if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014109 ac_cv_posix_semaphores_enabled=yes
14110else
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14114 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014115fi
14116
14117
Mark Dickinsona614f042009-11-28 12:48:43 +000014118fi
14119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14121$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014122if test $ac_cv_posix_semaphores_enabled = no
14123then
14124
Matthias Kloseb9621712010-04-24 17:59:49 +000014125$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014126
14127fi
14128
Mark Dickinson10683072009-04-18 21:18:19 +000014129# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14131$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014132if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014134else
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014136 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014137else
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014139/* end confdefs.h. */
14140
14141#include <unistd.h>
14142#include <fcntl.h>
14143#include <stdio.h>
14144#include <semaphore.h>
14145#include <sys/stat.h>
14146
14147int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014148 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014149 int count;
14150 int res;
14151 if(a==SEM_FAILED){
14152 perror("sem_open");
14153 return 1;
14154
14155 }
14156 res = sem_getvalue(a, &count);
14157 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014158 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014159 return res==-1 ? 1 : 0;
14160}
14161
Mark Dickinson10683072009-04-18 21:18:19 +000014162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014163if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014164 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014165else
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14169 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014170fi
14171
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014173fi
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14176$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014177if test $ac_cv_broken_sem_getvalue = yes
14178then
14179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014181
14182fi
14183
Mark Dickinsonbd792642009-03-18 20:06:12 +000014184# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14186$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014187# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014188if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014189 enableval=$enable_big_digits; case $enable_big_digits in
14190yes)
14191 enable_big_digits=30 ;;
14192no)
14193 enable_big_digits=15 ;;
1419415|30)
14195 ;;
14196*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014197 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 +000014198esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14200$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014201
14202cat >>confdefs.h <<_ACEOF
14203#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14204_ACEOF
14205
14206
14207else
Matthias Kloseb9621712010-04-24 17:59:49 +000014208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14209$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014210fi
14211
14212
Guido van Rossumef2255b2000-03-10 22:30:29 +000014213# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014214ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014215if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014216
14217
Matthias Kloseb9621712010-04-24 17:59:49 +000014218$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014219
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014220 wchar_h="yes"
14221
Guido van Rossumef2255b2000-03-10 22:30:29 +000014222else
Martin v. Löwis11437992002-04-12 09:54:03 +000014223 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014224
14225fi
14226
Michael W. Hudson54241132001-12-07 15:38:26 +000014227
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014229# determine wchar_t size
14230if test "$wchar_h" = yes
14231then
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14234# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14235# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14237$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014238if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014240else
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14242"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014243
Martin v. Löwis11437992002-04-12 09:54:03 +000014244else
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 if test "$ac_cv_type_wchar_t" = yes; then
14246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014248as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014249See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250 else
14251 ac_cv_sizeof_wchar_t=0
14252 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014254
Martin v. Löwis11437992002-04-12 09:54:03 +000014255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14257$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258
14259
14260
Martin v. Löwis11437992002-04-12 09:54:03 +000014261cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014262#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014263_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014264
Michael W. Hudson54241132001-12-07 15:38:26 +000014265
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014266fi
14267
Matthias Kloseb9621712010-04-24 17:59:49 +000014268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14269$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014270have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014272/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014273
14274#include <tcl.h>
14275#if TCL_UTF_MAX != 6
14276# error "NOT UCS4_TCL"
14277#endif
14278int
14279main ()
14280{
14281
14282 ;
14283 return 0;
14284}
14285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014287
14288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014290
14291 have_ucs4_tcl=yes
14292
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14296$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014297
Skip Montanaro6dead952003-09-25 14:50:04 +000014298# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014299if test "$wchar_h" = yes
14300then
14301 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14303$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014304 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014306else
14307
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014309 ac_cv_wchar_t_signed=yes
14310else
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014312/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014313
14314 #include <wchar.h>
14315 int main()
14316 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014317 /* Success: exit code 0 */
14318 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014319 }
14320
14321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014322if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014323 ac_cv_wchar_t_signed=yes
14324else
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014329fi
14330
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014331fi
14332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14334$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335fi
14336
Georg Brandl52d168a2008-01-07 18:10:24 +000014337# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014338if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014339 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014340then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014341 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014342
Matthias Kloseb9621712010-04-24 17:59:49 +000014343$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014344
Georg Brandl52d168a2008-01-07 18:10:24 +000014345else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014346 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014347fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14349$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014350
14351# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14353$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014354if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014355 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014356else
Matthias Kloseb9621712010-04-24 17:59:49 +000014357 ac_cv_c_bigendian=unknown
14358 # See if we're dealing with a universal compiler.
14359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14360/* end confdefs.h. */
14361#ifndef __APPLE_CC__
14362 not a universal capable compiler
14363 #endif
14364 typedef int dummy;
14365
Skip Montanaro6dead952003-09-25 14:50:04 +000014366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014367if ac_fn_c_try_compile "$LINENO"; then :
14368
14369 # Check for potential -arch flags. It is not universal unless
14370 # there are at least two -arch flags with different values.
14371 ac_arch=
14372 ac_prev=
14373 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14374 if test -n "$ac_prev"; then
14375 case $ac_word in
14376 i?86 | x86_64 | ppc | ppc64)
14377 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14378 ac_arch=$ac_word
14379 else
14380 ac_cv_c_bigendian=universal
14381 break
14382 fi
14383 ;;
14384 esac
14385 ac_prev=
14386 elif test "x$ac_word" = "x-arch"; then
14387 ac_prev=arch
14388 fi
14389 done
14390fi
14391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14392 if test $ac_cv_c_bigendian = unknown; then
14393 # See if sys/param.h defines the BYTE_ORDER macro.
14394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014395/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014396#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014398
Martin v. Löwis11437992002-04-12 09:54:03 +000014399int
14400main ()
14401{
Matthias Kloseb9621712010-04-24 17:59:49 +000014402#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14403 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14404 && LITTLE_ENDIAN)
14405 bogus endian macros
14406 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014407
14408 ;
14409 return 0;
14410}
14411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014412if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014413 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014415/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014416#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419int
14420main ()
14421{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014422#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 not big endian
14424 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
14426 ;
14427 return 0;
14428}
14429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014430if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014431 ac_cv_c_bigendian=yes
14432else
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014436fi
14437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14438 fi
14439 if test $ac_cv_c_bigendian = unknown; then
14440 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014442/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014443#include <limits.h>
14444
Martin v. Löwis11437992002-04-12 09:54:03 +000014445int
14446main ()
14447{
Matthias Kloseb9621712010-04-24 17:59:49 +000014448#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14449 bogus endian macros
14450 #endif
14451
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 ;
14453 return 0;
14454}
14455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014456if ac_fn_c_try_compile "$LINENO"; then :
14457 # It does; now see whether it defined to _BIG_ENDIAN or not.
14458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14459/* end confdefs.h. */
14460#include <limits.h>
14461
14462int
14463main ()
14464{
14465#ifndef _BIG_ENDIAN
14466 not big endian
14467 #endif
14468
14469 ;
14470 return 0;
14471}
14472_ACEOF
14473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014474 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014475else
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14479fi
14480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14481 fi
14482 if test $ac_cv_c_bigendian = unknown; then
14483 # Compile a test program.
14484 if test "$cross_compiling" = yes; then :
14485 # Try to guess by grepping values from an object file.
14486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14487/* end confdefs.h. */
14488short int ascii_mm[] =
14489 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14490 short int ascii_ii[] =
14491 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14492 int use_ascii (int i) {
14493 return ascii_mm[i] + ascii_ii[i];
14494 }
14495 short int ebcdic_ii[] =
14496 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14497 short int ebcdic_mm[] =
14498 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14499 int use_ebcdic (int i) {
14500 return ebcdic_mm[i] + ebcdic_ii[i];
14501 }
14502 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504int
14505main ()
14506{
14507return use_ascii (foo) == use_ebcdic (foo);
14508 ;
14509 return 0;
14510}
14511_ACEOF
14512if ac_fn_c_try_compile "$LINENO"; then :
14513 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14514 ac_cv_c_bigendian=yes
14515 fi
14516 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14517 if test "$ac_cv_c_bigendian" = unknown; then
14518 ac_cv_c_bigendian=no
14519 else
14520 # finding both strings is unlikely to happen, but who knows?
14521 ac_cv_c_bigendian=unknown
14522 fi
14523 fi
14524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014526else
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014528/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014530int
14531main ()
14532{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 /* Are we little or big endian? From Harbison&Steele. */
14535 union
14536 {
14537 long int l;
14538 char c[sizeof (long int)];
14539 } u;
14540 u.l = 1;
14541 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542
14543 ;
14544 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014545}
Martin v. Löwis11437992002-04-12 09:54:03 +000014546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014547if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014548 ac_cv_c_bigendian=no
14549else
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14553 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14559$as_echo "$ac_cv_c_bigendian" >&6; }
14560 case $ac_cv_c_bigendian in #(
14561 yes)
14562 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14563;; #(
14564 no)
14565 ;; #(
14566 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014567
Matthias Kloseb9621712010-04-24 17:59:49 +000014568$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014569
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 ;; #(
14571 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014572 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014573 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575
Michael W. Hudson54241132001-12-07 15:38:26 +000014576
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014577# ABI version string for Python extension modules. This appears between the
14578# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14579# from the following attributes which affect the ABI of this Python build (in
14580# this order):
14581#
14582# * The Python implementation (always 'cpython-' for us)
14583# * The major and minor version numbers
14584# * --with-pydebug (adds a 'd')
14585# * --with-pymalloc (adds a 'm')
14586# * --with-wide-unicode (adds a 'u')
14587#
14588# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014589# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14590# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014591
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14593$as_echo_n "checking ABIFLAGS... " >&6; }
14594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14595$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14597$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014598SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14600$as_echo "$SOABI" >&6; }
14601
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014602
14603case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014604 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014605 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14606 *)
14607 EXT_SUFFIX=${SHLIB_SUFFIX};;
14608esac
14609
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14611$as_echo_n "checking LDVERSION... " >&6; }
14612LDVERSION='$(VERSION)$(ABIFLAGS)'
14613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14614$as_echo "$LDVERSION" >&6; }
14615
doko@python.org87421192013-01-26 11:39:31 +010014616
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014617LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014618
14619
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014620# Check whether right shifting a negative integer extends the sign bit
14621# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14623$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014624if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014625 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014626else
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
Matthias Kloseb9621712010-04-24 17:59:49 +000014628if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014629 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014630else
Matthias Kloseb9621712010-04-24 17:59:49 +000014631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014632/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014633
14634int main()
14635{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014636 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014637}
14638
Martin v. Löwis11437992002-04-12 09:54:03 +000014639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014640if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014641 ac_cv_rshift_extends_sign=yes
14642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14646 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014647fi
14648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649fi
14650
Matthias Kloseb9621712010-04-24 17:59:49 +000014651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14652$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014653if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014654then
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014657
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014658fi
14659
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014660# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14662$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014663if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014665else
Martin v. Löwis11437992002-04-12 09:54:03 +000014666
Matthias Kloseb9621712010-04-24 17:59:49 +000014667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014668/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014669#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014670int
14671main ()
14672{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014673
14674 FILE *f = fopen("/dev/null", "r");
14675 flockfile(f);
14676 getc_unlocked(f);
14677 funlockfile(f);
14678
Martin v. Löwis11437992002-04-12 09:54:03 +000014679 ;
14680 return 0;
14681}
14682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014683if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014684 ac_cv_have_getc_unlocked=yes
14685else
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 ac_cv_have_getc_unlocked=no
14687fi
14688rm -f core conftest.err conftest.$ac_objext \
14689 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691
Matthias Kloseb9621712010-04-24 17:59:49 +000014692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14693$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014694if test "$ac_cv_have_getc_unlocked" = yes
14695then
Martin v. Löwis11437992002-04-12 09:54:03 +000014696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014698
14699fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014700
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014701# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014702# save the value of LIBS so we don't actually link Python with readline
14703LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014704
Gregory P. Smith18820942008-09-07 06:24:49 +000014705# On some systems we need to link readline to a termcap compatible
14706# library. NOTE: Keep the precedence of listed libraries synchronised
14707# with setup.py.
14708py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14710$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014711for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014712 if test -z "$py_libtermcap"; then
14713 READLINE_LIBS="-lreadline"
14714 else
14715 READLINE_LIBS="-lreadline -l$py_libtermcap"
14716 fi
14717 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014719/* end confdefs.h. */
14720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721/* Override any GCC internal prototype to avoid an error.
14722 Use char because int might match the return type of a GCC
14723 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014724#ifdef __cplusplus
14725extern "C"
14726#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014727char readline ();
14728int
14729main ()
14730{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014732 ;
14733 return 0;
14734}
14735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014736if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014737 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014739rm -f core conftest.err conftest.$ac_objext \
14740 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014741 if test $py_cv_lib_readline = yes; then
14742 break
14743 fi
14744done
14745# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14746#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014747if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14749$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014750else
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14752$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014753
Matthias Kloseb9621712010-04-24 17:59:49 +000014754$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014755
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014756fi
14757
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014758# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14760$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014761if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014763else
14764 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014765LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014767/* end confdefs.h. */
14768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769/* Override any GCC internal prototype to avoid an error.
14770 Use char because int might match the return type of a GCC
14771 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014772#ifdef __cplusplus
14773extern "C"
14774#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014775char rl_callback_handler_install ();
14776int
14777main ()
14778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014780 ;
14781 return 0;
14782}
14783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014784if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014785 ac_cv_lib_readline_rl_callback_handler_install=yes
14786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014789rm -f core conftest.err conftest.$ac_objext \
14790 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014791LIBS=$ac_check_lib_save_LIBS
14792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14794$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014795if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014798
14799fi
14800
14801
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014802# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014804/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014805#include <readline/readline.h>
14806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014807if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014808 have_readline=yes
14809else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014810 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014811
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014812fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014813rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014814if test $have_readline = yes
14815then
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014817/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014818#include <readline/readline.h>
14819
14820_ACEOF
14821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014823
Matthias Kloseb9621712010-04-24 17:59:49 +000014824$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014825
14826fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014827rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014828
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014830/* end confdefs.h. */
14831#include <readline/readline.h>
14832
14833_ACEOF
14834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014838
14839fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014840rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014841
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014842fi
14843
Martin v. Löwis0daad592001-09-30 21:09:59 +000014844# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14846$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014847if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014849else
Martin v. Löwis11437992002-04-12 09:54:03 +000014850 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014851LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855/* Override any GCC internal prototype to avoid an error.
14856 Use char because int might match the return type of a GCC
14857 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014858#ifdef __cplusplus
14859extern "C"
14860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014861char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014862int
14863main ()
14864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 ;
14867 return 0;
14868}
14869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014870if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014871 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014872else
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014875rm -f core conftest.err conftest.$ac_objext \
14876 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014877LIBS=$ac_check_lib_save_LIBS
14878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14880$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014881if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014882
Matthias Kloseb9621712010-04-24 17:59:49 +000014883$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014884
Martin v. Löwis0daad592001-09-30 21:09:59 +000014885fi
14886
Michael W. Hudson54241132001-12-07 15:38:26 +000014887
Thomas Wouters89d996e2007-09-08 17:39:28 +000014888# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14890$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014891if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014893else
14894 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014895LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014897/* end confdefs.h. */
14898
14899/* Override any GCC internal prototype to avoid an error.
14900 Use char because int might match the return type of a GCC
14901 builtin and then its argument prototype would still apply. */
14902#ifdef __cplusplus
14903extern "C"
14904#endif
14905char rl_completion_display_matches_hook ();
14906int
14907main ()
14908{
14909return rl_completion_display_matches_hook ();
14910 ;
14911 return 0;
14912}
14913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014914if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014915 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14916else
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014919rm -f core conftest.err conftest.$ac_objext \
14920 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014921LIBS=$ac_check_lib_save_LIBS
14922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14924$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014925if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014926
Matthias Kloseb9621712010-04-24 17:59:49 +000014927$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014928
14929fi
14930
14931
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014932# also in 4.0, but not in editline
14933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14934$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14935if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14936 $as_echo_n "(cached) " >&6
14937else
14938 ac_check_lib_save_LIBS=$LIBS
14939LIBS="-lreadline $READLINE_LIBS $LIBS"
14940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14941/* end confdefs.h. */
14942
14943/* Override any GCC internal prototype to avoid an error.
14944 Use char because int might match the return type of a GCC
14945 builtin and then its argument prototype would still apply. */
14946#ifdef __cplusplus
14947extern "C"
14948#endif
14949char rl_resize_terminal ();
14950int
14951main ()
14952{
14953return rl_resize_terminal ();
14954 ;
14955 return 0;
14956}
14957_ACEOF
14958if ac_fn_c_try_link "$LINENO"; then :
14959 ac_cv_lib_readline_rl_resize_terminal=yes
14960else
14961 ac_cv_lib_readline_rl_resize_terminal=no
14962fi
14963rm -f core conftest.err conftest.$ac_objext \
14964 conftest$ac_exeext conftest.$ac_ext
14965LIBS=$ac_check_lib_save_LIBS
14966fi
14967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14968$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14969if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14970
14971$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14972
14973fi
14974
14975
Martin v. Löwis0daad592001-09-30 21:09:59 +000014976# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14978$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014979if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014981else
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014983LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987/* Override any GCC internal prototype to avoid an error.
14988 Use char because int might match the return type of a GCC
14989 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014990#ifdef __cplusplus
14991extern "C"
14992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014993char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014994int
14995main ()
14996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 ;
14999 return 0;
15000}
15001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015004else
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015007rm -f core conftest.err conftest.$ac_objext \
15008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015009LIBS=$ac_check_lib_save_LIBS
15010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15012$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015013if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015014
Matthias Kloseb9621712010-04-24 17:59:49 +000015015$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015016
Guido van Rossum353ae582001-07-10 16:45:32 +000015017fi
15018
Jack Jansendd19cf82001-12-06 22:36:17 +000015019
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015020# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015022/* end confdefs.h. */
15023#include <readline/readline.h>
15024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015025if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015026 have_readline=yes
15027else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015028 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015029
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015030fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015031rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015032if test $have_readline = yes
15033then
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015035/* end confdefs.h. */
15036#include <readline/readline.h>
15037
15038_ACEOF
15039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015041
Matthias Kloseb9621712010-04-24 17:59:49 +000015042$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015043
15044fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015045rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015046
15047fi
15048
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15050$as_echo_n "checking for append_history in -lreadline... " >&6; }
15051if ${ac_cv_lib_readline_append_history+:} false; then :
15052 $as_echo_n "(cached) " >&6
15053else
15054 ac_check_lib_save_LIBS=$LIBS
15055LIBS="-lreadline $READLINE_LIBS $LIBS"
15056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15057/* end confdefs.h. */
15058
15059/* Override any GCC internal prototype to avoid an error.
15060 Use char because int might match the return type of a GCC
15061 builtin and then its argument prototype would still apply. */
15062#ifdef __cplusplus
15063extern "C"
15064#endif
15065char append_history ();
15066int
15067main ()
15068{
15069return append_history ();
15070 ;
15071 return 0;
15072}
15073_ACEOF
15074if ac_fn_c_try_link "$LINENO"; then :
15075 ac_cv_lib_readline_append_history=yes
15076else
15077 ac_cv_lib_readline_append_history=no
15078fi
15079rm -f core conftest.err conftest.$ac_objext \
15080 conftest$ac_exeext conftest.$ac_ext
15081LIBS=$ac_check_lib_save_LIBS
15082fi
15083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15084$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15085if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15086
15087$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15088
15089fi
15090
15091
Martin v. Löwis82bca632006-02-10 20:49:30 +000015092# End of readline checks: restore LIBS
15093LIBS=$LIBS_no_readline
15094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15096$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015097if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015099else
Martin v. Löwis11437992002-04-12 09:54:03 +000015100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015102 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015103else
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015105/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015106
15107int main()
15108{
15109 int val1 = nice(1);
15110 if (val1 != -1 && val1 == nice(2))
15111 exit(0);
15112 exit(1);
15113}
15114
Martin v. Löwis11437992002-04-12 09:54:03 +000015115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015116if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015117 ac_cv_broken_nice=yes
15118else
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015123fi
15124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125fi
15126
Matthias Kloseb9621712010-04-24 17:59:49 +000015127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15128$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015129if test "$ac_cv_broken_nice" = yes
15130then
Martin v. Löwis11437992002-04-12 09:54:03 +000015131
Matthias Kloseb9621712010-04-24 17:59:49 +000015132$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015133
15134fi
15135
Matthias Kloseb9621712010-04-24 17:59:49 +000015136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15137$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015138if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015140else
Matthias Kloseb9621712010-04-24 17:59:49 +000015141 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015142 ac_cv_broken_poll=no
15143else
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015145/* end confdefs.h. */
15146
15147#include <poll.h>
15148
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015149int main()
15150{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015151 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015152 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015153
15154 close (42);
15155
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015156 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015157 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015158 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015159 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015160 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015161 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015162 return 1;
15163}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015164
15165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015166if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015167 ac_cv_broken_poll=yes
15168else
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15172 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015175fi
15176
Matthias Kloseb9621712010-04-24 17:59:49 +000015177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15178$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015179if test "$ac_cv_broken_poll" = yes
15180then
15181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015183
15184fi
15185
Brett Cannon43802422005-02-10 20:48:03 +000015186# 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 +000015187# (which is not required by ISO C or UNIX spec) and/or if we support
15188# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015189ac_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 +000015190#include <$ac_cv_struct_tm>
15191
Matthias Kloseb9621712010-04-24 17:59:49 +000015192"
Victor Stinnere0be4232011-10-25 13:06:09 +020015193if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015194
15195cat >>confdefs.h <<_ACEOF
15196#define HAVE_STRUCT_TM_TM_ZONE 1
15197_ACEOF
15198
15199
15200fi
15201
15202if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15203
Matthias Kloseb9621712010-04-24 17:59:49 +000015204$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015205
15206else
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15208"
Victor Stinnere0be4232011-10-25 13:06:09 +020015209if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211else
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213fi
15214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015216#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015217_ACEOF
15218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15220$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015221if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015223else
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015225/* end confdefs.h. */
15226#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227#if !HAVE_DECL_TZNAME
15228extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015229#endif
15230
15231int
15232main ()
15233{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015235 ;
15236 return 0;
15237}
15238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015239if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015240 ac_cv_var_tzname=yes
15241else
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015244rm -f core conftest.err conftest.$ac_objext \
15245 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15248$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015249 if test $ac_cv_var_tzname = yes; then
15250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015252
15253 fi
15254fi
15255
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015256
Martin v. Löwis1d459062005-03-14 21:23:33 +000015257# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15259$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015260if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015262else
15263
Matthias Kloseb9621712010-04-24 17:59:49 +000015264if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015265 ac_cv_working_tzset=no
15266else
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015268/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015269
15270#include <stdlib.h>
15271#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015272#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015273
15274#if HAVE_TZNAME
15275extern char *tzname[];
15276#endif
15277
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015278int main()
15279{
Brett Cannon18367812003-09-19 00:59:16 +000015280 /* Note that we need to ensure that not only does tzset(3)
15281 do 'something' with localtime, but it works as documented
15282 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015283 This includes making sure that tzname is set properly if
15284 tm->tm_zone does not exist since it is the alternative way
15285 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015286
15287 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015288 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015289 */
15290
Martin v. Löwis1d459062005-03-14 21:23:33 +000015291 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015292 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15293
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015294 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015295 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015296 if (localtime(&groundhogday)->tm_hour != 0)
15297 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015298#if HAVE_TZNAME
15299 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15300 if (strcmp(tzname[0], "UTC") ||
15301 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15302 exit(1);
15303#endif
Brett Cannon18367812003-09-19 00:59:16 +000015304
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015305 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015306 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015307 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015308 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015309#if HAVE_TZNAME
15310 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15311 exit(1);
15312#endif
Brett Cannon18367812003-09-19 00:59:16 +000015313
15314 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15315 tzset();
15316 if (localtime(&groundhogday)->tm_hour != 11)
15317 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015318#if HAVE_TZNAME
15319 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15320 exit(1);
15321#endif
15322
15323#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015324 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15325 exit(1);
15326 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15327 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015328#endif
Brett Cannon18367812003-09-19 00:59:16 +000015329
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015330 exit(0);
15331}
15332
15333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015334if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015335 ac_cv_working_tzset=yes
15336else
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015341fi
15342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343fi
15344
Matthias Kloseb9621712010-04-24 17:59:49 +000015345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15346$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015347if test "$ac_cv_working_tzset" = yes
15348then
15349
Matthias Kloseb9621712010-04-24 17:59:49 +000015350$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015351
15352fi
15353
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015354# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15356$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015357if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015358 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015359else
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015361/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015362#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015363int
15364main ()
15365{
15366
15367struct stat st;
15368st.st_mtim.tv_nsec = 1;
15369
15370 ;
15371 return 0;
15372}
15373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015375 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015376else
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15380fi
15381
Matthias Kloseb9621712010-04-24 17:59:49 +000015382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15383$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015384if test "$ac_cv_stat_tv_nsec" = yes
15385then
15386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015388
15389fi
15390
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015391# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15393$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015394if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015396else
Matthias Kloseb9621712010-04-24 17:59:49 +000015397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015398/* end confdefs.h. */
15399#include <sys/stat.h>
15400int
15401main ()
15402{
15403
15404struct stat st;
15405st.st_mtimespec.tv_nsec = 1;
15406
15407 ;
15408 return 0;
15409}
15410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015412 ac_cv_stat_tv_nsec2=yes
15413else
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15417fi
15418
Matthias Kloseb9621712010-04-24 17:59:49 +000015419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15420$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015421if test "$ac_cv_stat_tv_nsec2" = yes
15422then
15423
Matthias Kloseb9621712010-04-24 17:59:49 +000015424$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015425
15426fi
15427
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015428# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015429ac_save_cppflags="$CPPFLAGS"
15430CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015431
15432for ac_header in curses.h ncurses.h
15433do :
15434 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15435ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15436if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15437 cat >>confdefs.h <<_ACEOF
15438#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15439_ACEOF
15440
15441fi
15442
15443done
15444
15445
15446# On Solaris, term.h requires curses.h
15447for ac_header in term.h
15448do :
15449 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15450#ifdef HAVE_CURSES_H
15451#include <curses.h>
15452#endif
15453
15454"
15455if test "x$ac_cv_header_term_h" = xyes; then :
15456 cat >>confdefs.h <<_ACEOF
15457#define HAVE_TERM_H 1
15458_ACEOF
15459
15460fi
15461
15462done
15463
15464
Jack Jansen666b1e72001-10-31 12:11:48 +000015465# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15467$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015468if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015469 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015470else
Matthias Kloseb9621712010-04-24 17:59:49 +000015471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015472/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015473#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015474int
15475main ()
15476{
Jack Jansen666b1e72001-10-31 12:11:48 +000015477
15478 int rtn;
15479 rtn = mvwdelch(0,0,0);
15480
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 ;
15482 return 0;
15483}
15484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015485if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015486 ac_cv_mvwdelch_is_expression=yes
15487else
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15491fi
15492
Matthias Kloseb9621712010-04-24 17:59:49 +000015493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15494$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015495
15496if test "$ac_cv_mvwdelch_is_expression" = yes
15497then
Martin v. Löwis11437992002-04-12 09:54:03 +000015498
Matthias Kloseb9621712010-04-24 17:59:49 +000015499$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015500
15501fi
15502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15504$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015505if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015506 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015507else
Matthias Kloseb9621712010-04-24 17:59:49 +000015508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015509/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015510#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015511int
15512main ()
15513{
Jack Jansen666b1e72001-10-31 12:11:48 +000015514
15515 WINDOW *w;
15516 w->_flags = 0;
15517
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 ;
15519 return 0;
15520}
15521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015522if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015523 ac_cv_window_has_flags=yes
15524else
Matthias Kloseb9621712010-04-24 17:59:49 +000015525 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15528fi
15529
Matthias Kloseb9621712010-04-24 17:59:49 +000015530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15531$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015532
Jack Jansen666b1e72001-10-31 12:11:48 +000015533
15534if test "$ac_cv_window_has_flags" = yes
15535then
Martin v. Löwis11437992002-04-12 09:54:03 +000015536
Matthias Kloseb9621712010-04-24 17:59:49 +000015537$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015538
15539fi
15540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15542$as_echo_n "checking for is_term_resized... " >&6; }
15543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015544/* end confdefs.h. */
15545#include <curses.h>
15546int
15547main ()
15548{
15549void *x=is_term_resized
15550 ;
15551 return 0;
15552}
15553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015555
Matthias Kloseb9621712010-04-24 17:59:49 +000015556$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015557
Matthias Kloseb159a552010-04-25 21:00:44 +000015558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015559$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015560else
Matthias Kloseb9621712010-04-24 17:59:49 +000015561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15562$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015563
15564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15566
Matthias Kloseb9621712010-04-24 17:59:49 +000015567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15568$as_echo_n "checking for resize_term... " >&6; }
15569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015570/* end confdefs.h. */
15571#include <curses.h>
15572int
15573main ()
15574{
15575void *x=resize_term
15576 ;
15577 return 0;
15578}
15579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015580if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015581
Matthias Kloseb9621712010-04-24 17:59:49 +000015582$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015583
Matthias Kloseb159a552010-04-25 21:00:44 +000015584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015585$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015586else
Matthias Kloseb9621712010-04-24 17:59:49 +000015587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15588$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015589
15590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15592
Matthias Kloseb9621712010-04-24 17:59:49 +000015593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15594$as_echo_n "checking for resizeterm... " >&6; }
15595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015596/* end confdefs.h. */
15597#include <curses.h>
15598int
15599main ()
15600{
15601void *x=resizeterm
15602 ;
15603 return 0;
15604}
15605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015606if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015607
Matthias Kloseb9621712010-04-24 17:59:49 +000015608$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015609
Matthias Kloseb159a552010-04-25 21:00:44 +000015610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015611$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015612else
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15614$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015615
15616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015618# last curses configure check
15619CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15622$as_echo "$as_me: checking for device files" >&6;}
15623
15624if test "x$cross_compiling" = xyes; then
15625 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15627$as_echo_n "checking for /dev/ptmx... " >&6; }
15628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15629$as_echo "not set" >&6; }
15630 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15631 fi
15632 if test "${ac_cv_file__dev_ptc+set}" != set; then
15633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15634$as_echo_n "checking for /dev/ptc... " >&6; }
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15636$as_echo "not set" >&6; }
15637 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15638 fi
15639fi
15640
Matthias Kloseb9621712010-04-24 17:59:49 +000015641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15642$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015643if ${ac_cv_file__dev_ptmx+:} false; then :
15644 $as_echo_n "(cached) " >&6
15645else
15646 test "$cross_compiling" = yes &&
15647 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15648if test -r "/dev/ptmx"; then
15649 ac_cv_file__dev_ptmx=yes
15650else
15651 ac_cv_file__dev_ptmx=no
15652fi
15653fi
15654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15655$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15656if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015657
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015658fi
15659
15660if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015661
Matthias Kloseb9621712010-04-24 17:59:49 +000015662$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015663
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15666$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015667if ${ac_cv_file__dev_ptc+:} false; then :
15668 $as_echo_n "(cached) " >&6
15669else
15670 test "$cross_compiling" = yes &&
15671 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15672if test -r "/dev/ptc"; then
15673 ac_cv_file__dev_ptc=yes
15674else
15675 ac_cv_file__dev_ptc=no
15676fi
15677fi
15678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15679$as_echo "$ac_cv_file__dev_ptc" >&6; }
15680if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015681
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015682fi
15683
15684if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015685
Matthias Kloseb9621712010-04-24 17:59:49 +000015686$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015687
Neal Norwitz865400f2003-03-21 01:42:58 +000015688fi
15689
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015690if test "$have_long_long" = yes
15691then
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15693$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015694 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015698 ac_cv_have_long_long_format="cross -- assuming no"
15699 if test x$GCC = xyes; then
15700 save_CFLAGS=$CFLAGS
15701 CFLAGS="$CFLAGS -Werror -Wformat"
15702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15703/* end confdefs.h. */
15704
15705 #include <stdio.h>
15706 #include <stddef.h>
15707
15708int
15709main ()
15710{
15711
15712 char *buffer;
15713 sprintf(buffer, "%lld", (long long)123);
15714 sprintf(buffer, "%lld", (long long)-123);
15715 sprintf(buffer, "%llu", (unsigned long long)123);
15716
15717 ;
15718 return 0;
15719}
15720_ACEOF
15721if ac_fn_c_try_compile "$LINENO"; then :
15722 ac_cv_have_long_long_format=yes
15723
15724fi
15725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15726 CFLAGS=$save_CFLAGS
15727 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015728else
Matthias Kloseb9621712010-04-24 17:59:49 +000015729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015730/* end confdefs.h. */
15731
15732 #include <stdio.h>
15733 #include <stddef.h>
15734 #include <string.h>
15735
15736 #ifdef HAVE_SYS_TYPES_H
15737 #include <sys/types.h>
15738 #endif
15739
15740 int main()
15741 {
15742 char buffer[256];
15743
15744 if (sprintf(buffer, "%lld", (long long)123) < 0)
15745 return 1;
15746 if (strcmp(buffer, "123"))
15747 return 1;
15748
15749 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15750 return 1;
15751 if (strcmp(buffer, "-123"))
15752 return 1;
15753
15754 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15755 return 1;
15756 if (strcmp(buffer, "123"))
15757 return 1;
15758
15759 return 0;
15760 }
15761
15762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015763if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015764 ac_cv_have_long_long_format=yes
15765else
Matthias Kloseb9621712010-04-24 17:59:49 +000015766 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15769 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015770fi
15771
15772
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015773fi
15774
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15776$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015777fi
15778
Mark Dickinson89d7d412009-12-31 20:50:59 +000015779if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015780then
15781
Matthias Kloseb9621712010-04-24 17:59:49 +000015782$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015783
15784fi
15785
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015786if test $ac_sys_system = Darwin
15787then
15788 LIBS="$LIBS -framework CoreFoundation"
15789fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15792$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015793if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015794 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015795else
Matthias Kloseb9621712010-04-24 17:59:49 +000015796 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015797 ac_cv_have_size_t_format="cross -- assuming yes"
15798
Thomas Wouters477c8d52006-05-27 19:21:47 +000015799else
Matthias Kloseb9621712010-04-24 17:59:49 +000015800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015801/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015802
Thomas Wouters477c8d52006-05-27 19:21:47 +000015803#include <stdio.h>
15804#include <stddef.h>
15805#include <string.h>
15806
Christian Heimes2c181612007-12-17 20:04:13 +000015807#ifdef HAVE_SYS_TYPES_H
15808#include <sys/types.h>
15809#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015810
15811#ifdef HAVE_SSIZE_T
15812typedef ssize_t Py_ssize_t;
15813#elif SIZEOF_VOID_P == SIZEOF_LONG
15814typedef long Py_ssize_t;
15815#else
15816typedef int Py_ssize_t;
15817#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015818
Christian Heimes2c181612007-12-17 20:04:13 +000015819int main()
15820{
15821 char buffer[256];
15822
Thomas Wouters477c8d52006-05-27 19:21:47 +000015823 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15824 return 1;
15825
Thomas Wouters89f507f2006-12-13 04:49:30 +000015826 if (strcmp(buffer, "123"))
15827 return 1;
15828
15829 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15830 return 1;
15831
15832 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015833 return 1;
15834
15835 return 0;
15836}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015837
Thomas Wouters477c8d52006-05-27 19:21:47 +000015838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015839if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015840 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015841else
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015846fi
15847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15850$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015851if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015852
Matthias Kloseb9621712010-04-24 17:59:49 +000015853$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015854
15855fi
15856
Matthias Kloseb9621712010-04-24 17:59:49 +000015857ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015858#ifdef HAVE_SYS_TYPES_H
15859#include <sys/types.h>
15860#endif
15861#ifdef HAVE_SYS_SOCKET_H
15862#include <sys/socket.h>
15863#endif
15864
Matthias Kloseb9621712010-04-24 17:59:49 +000015865"
Victor Stinnere0be4232011-10-25 13:06:09 +020015866if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015867
Martin v. Löwis11437992002-04-12 09:54:03 +000015868else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015869
Matthias Kloseb9621712010-04-24 17:59:49 +000015870$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015871
15872fi
15873
Michael W. Hudson54241132001-12-07 15:38:26 +000015874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15876$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015877if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015878 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015879else
Matthias Kloseb9621712010-04-24 17:59:49 +000015880 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015881 ac_cv_broken_mbstowcs=no
15882else
Matthias Kloseb9621712010-04-24 17:59:49 +000015883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015884/* end confdefs.h. */
15885
Stefan Krah19c21392012-11-22 23:47:32 +010015886#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015887#include<stdlib.h>
15888int main() {
15889 size_t len = -1;
15890 const char *str = "text";
15891 len = mbstowcs(NULL, str, 0);
15892 return (len != 4);
15893}
15894
15895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015896if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015897 ac_cv_broken_mbstowcs=no
15898else
Matthias Kloseb9621712010-04-24 17:59:49 +000015899 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015903fi
15904
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015905fi
15906
Matthias Kloseb9621712010-04-24 17:59:49 +000015907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15908$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015909if test "$ac_cv_broken_mbstowcs" = yes
15910then
15911
Matthias Kloseb9621712010-04-24 17:59:49 +000015912$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015913
15914fi
15915
Antoine Pitroub52ec782009-01-25 16:34:23 +000015916# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15918$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015919
15920# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015921if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015922 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015923if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015924then
15925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015927
Matthias Kloseb9621712010-04-24 17:59:49 +000015928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15929$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015930fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015931if test "$withval" = no
15932then
15933
15934$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15935
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15937$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015938fi
15939
Antoine Pitrou042b1282010-08-13 21:15:58 +000015940else
15941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15942$as_echo "no value specified" >&6; }
15943fi
15944
Antoine Pitroub52ec782009-01-25 16:34:23 +000015945
Matthias Kloseb17289e2012-03-15 19:51:34 +010015946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15947$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15948if ${ac_cv_computed_gotos+:} false; then :
15949 $as_echo_n "(cached) " >&6
15950else
15951 if test "$cross_compiling" = yes; then :
15952 if test "${with_computed_gotos+set}" = set; then
15953 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15954 else
15955 ac_cv_computed_gotos=no
15956 fi
15957else
15958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15959/* end confdefs.h. */
15960
15961int main(int argc, char **argv)
15962{
15963 static void *targets[1] = { &&LABEL1 };
15964 goto LABEL2;
15965LABEL1:
15966 return 0;
15967LABEL2:
15968 goto *targets[0];
15969 return 1;
15970}
15971
15972_ACEOF
15973if ac_fn_c_try_run "$LINENO"; then :
15974 ac_cv_computed_gotos=yes
15975else
15976 ac_cv_computed_gotos=no
15977fi
15978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15979 conftest.$ac_objext conftest.beam conftest.$ac_ext
15980fi
15981
15982fi
15983
15984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15985$as_echo "$ac_cv_computed_gotos" >&6; }
15986case "$ac_cv_computed_gotos" in yes*)
15987
15988$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15989
15990esac
15991
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015992case $ac_sys_system in
15993AIX*)
15994
15995$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15996 ;;
15997esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015998
Michael W. Hudson54241132001-12-07 15:38:26 +000015999
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016000
16001
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016002for h in `(cd $srcdir;echo Python/thread_*.h)`
16003do
16004 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16005done
16006
Michael W. Hudson54241132001-12-07 15:38:26 +000016007
Ned Deily0db50cf2014-07-25 12:41:31 -070016008SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16010$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016011for dir in $SRCDIRS; do
16012 if test ! -d $dir; then
16013 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016014 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016015done
Matthias Kloseb9621712010-04-24 17:59:49 +000016016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16017$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016018
Stefan Krah1919b7e2012-03-21 18:25:23 +010016019# Availability of -O2:
16020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16021$as_echo_n "checking for -O2... " >&6; }
16022saved_cflags="$CFLAGS"
16023CFLAGS="-O2"
16024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16025/* end confdefs.h. */
16026
16027int
16028main ()
16029{
16030
16031
16032 ;
16033 return 0;
16034}
16035_ACEOF
16036if ac_fn_c_try_compile "$LINENO"; then :
16037 have_O2=yes
16038else
16039 have_O2=no
16040fi
16041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16043$as_echo "$have_O2" >&6; }
16044CFLAGS="$saved_cflags"
16045
16046# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16047# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16049$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16050saved_cflags="$CFLAGS"
16051CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16052if test "$have_O2" = no; then
16053 CFLAGS=""
16054fi
16055if test "$cross_compiling" = yes; then :
16056 have_glibc_memmove_bug=undefined
16057else
16058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16059/* end confdefs.h. */
16060
16061#include <stdio.h>
16062#include <stdlib.h>
16063#include <string.h>
16064void foo(void *p, void *q) { memmove(p, q, 19); }
16065int main() {
16066 char a[32] = "123456789000000000";
16067 foo(&a[9], a);
16068 if (strcmp(a, "123456789123456789000000000") != 0)
16069 return 1;
16070 foo(a, &a[9]);
16071 if (strcmp(a, "123456789000000000") != 0)
16072 return 1;
16073 return 0;
16074}
16075
16076_ACEOF
16077if ac_fn_c_try_run "$LINENO"; then :
16078 have_glibc_memmove_bug=no
16079else
16080 have_glibc_memmove_bug=yes
16081fi
16082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16083 conftest.$ac_objext conftest.beam conftest.$ac_ext
16084fi
16085
16086CFLAGS="$saved_cflags"
16087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16088$as_echo "$have_glibc_memmove_bug" >&6; }
16089if test "$have_glibc_memmove_bug" = yes; then
16090
16091$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16092
16093fi
16094
16095if test "$have_gcc_asm_for_x87" = yes; then
16096 # Some versions of gcc miscompile inline asm:
16097 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16098 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16099 case $CC in
16100 *gcc*)
16101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16102$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16103 saved_cflags="$CFLAGS"
16104 CFLAGS="-O2"
16105 if test "$cross_compiling" = yes; then :
16106 have_ipa_pure_const_bug=undefined
16107else
16108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16109/* end confdefs.h. */
16110
16111 __attribute__((noinline)) int
16112 foo(int *p) {
16113 int r;
16114 asm ( "movl \$6, (%1)\n\t"
16115 "xorl %0, %0\n\t"
16116 : "=r" (r) : "r" (p) : "memory"
16117 );
16118 return r;
16119 }
16120 int main() {
16121 int p = 8;
16122 if ((foo(&p) ? : p) != 6)
16123 return 1;
16124 return 0;
16125 }
16126
16127_ACEOF
16128if ac_fn_c_try_run "$LINENO"; then :
16129 have_ipa_pure_const_bug=no
16130else
16131 have_ipa_pure_const_bug=yes
16132fi
16133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16134 conftest.$ac_objext conftest.beam conftest.$ac_ext
16135fi
16136
16137 CFLAGS="$saved_cflags"
16138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16139$as_echo "$have_ipa_pure_const_bug" >&6; }
16140 if test "$have_ipa_pure_const_bug" = yes; then
16141
16142$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16143
16144 fi
16145 ;;
16146 esac
16147fi
16148
Victor Stinner4f5366e2015-01-09 02:13:19 +010016149# Check for stdatomic.h
16150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16151$as_echo_n "checking for stdatomic.h... " >&6; }
16152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16153/* end confdefs.h. */
16154
16155
16156 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016157 atomic_int value = ATOMIC_VAR_INIT(1);
16158 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016159 int main() {
16160 int loaded_value = atomic_load(&value);
16161 return 0;
16162 }
16163
16164
16165_ACEOF
16166if ac_fn_c_try_link "$LINENO"; then :
16167 have_stdatomic_h=yes
16168else
16169 have_stdatomic_h=no
16170fi
16171rm -f core conftest.err conftest.$ac_objext \
16172 conftest$ac_exeext conftest.$ac_ext
16173
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16175$as_echo "$have_stdatomic_h" >&6; }
16176
16177if test "$have_stdatomic_h" = yes; then
16178
16179$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16180
16181fi
16182
16183# Check for GCC >= 4.7 __atomic builtins
16184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16185$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16187/* end confdefs.h. */
16188
16189
16190 volatile int val = 1;
16191 int main() {
16192 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16193 return 0;
16194 }
16195
16196
16197_ACEOF
16198if ac_fn_c_try_link "$LINENO"; then :
16199 have_builtin_atomic=yes
16200else
16201 have_builtin_atomic=no
16202fi
16203rm -f core conftest.err conftest.$ac_objext \
16204 conftest$ac_exeext conftest.$ac_ext
16205
16206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16207$as_echo "$have_builtin_atomic" >&6; }
16208
16209if test "$have_builtin_atomic" = yes; then
16210
16211$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16212
16213fi
16214
Ned Deily322f5ba2013-11-21 23:01:59 -080016215# ensurepip option
16216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16217$as_echo_n "checking for ensurepip... " >&6; }
16218
16219# Check whether --with-ensurepip was given.
16220if test "${with_ensurepip+set}" = set; then :
16221 withval=$with_ensurepip;
16222else
16223 with_ensurepip=upgrade
16224fi
16225
16226case $with_ensurepip in #(
16227 yes|upgrade) :
16228 ENSUREPIP=upgrade ;; #(
16229 install) :
16230 ENSUREPIP=install ;; #(
16231 no) :
16232 ENSUREPIP=no ;; #(
16233 *) :
16234 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16235esac
16236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16237$as_echo "$ENSUREPIP" >&6; }
16238
16239
Victor Stinner35a97c02015-03-08 02:59:09 +010016240# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16242$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16244/* end confdefs.h. */
16245
16246
16247 #include <dirent.h>
16248
16249 int main() {
16250 struct dirent entry;
16251 return entry.d_type == DT_UNKNOWN;
16252 }
16253
16254
16255_ACEOF
16256if ac_fn_c_try_link "$LINENO"; then :
16257 have_dirent_d_type=yes
16258else
16259 have_dirent_d_type=no
16260fi
16261rm -f core conftest.err conftest.$ac_objext \
16262 conftest$ac_exeext conftest.$ac_ext
16263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16264$as_echo "$have_dirent_d_type" >&6; }
16265
16266if test "$have_dirent_d_type" = yes; then
16267
16268$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16269
16270fi
16271
Victor Stinner9eb57c52015-03-19 22:21:49 +010016272# check if the Linux getrandom() syscall is available
16273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16274$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16276/* end confdefs.h. */
16277
16278
Victor Stinner1b80b242016-04-12 22:34:58 +020016279 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016280 #include <sys/syscall.h>
16281
16282 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016283 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016284 const size_t buflen = sizeof(buffer);
16285 const int flags = 0;
Victor Stinner9eb57c52015-03-19 22:21:49 +010016286 /* ignore the result, Python checks for ENOSYS at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016287 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016288 return 0;
16289 }
16290
16291
16292_ACEOF
16293if ac_fn_c_try_link "$LINENO"; then :
16294 have_getrandom_syscall=yes
16295else
16296 have_getrandom_syscall=no
16297fi
16298rm -f core conftest.err conftest.$ac_objext \
16299 conftest$ac_exeext conftest.$ac_ext
16300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16301$as_echo "$have_getrandom_syscall" >&6; }
16302
16303if test "$have_getrandom_syscall" = yes; then
16304
16305$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16306
16307fi
16308
Victor Stinnerbae2d622015-10-01 09:47:30 +020016309# check if the getrandom() function is available
16310# the test was written for the Solaris function of <sys/random.h>
16311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16312$as_echo_n "checking for the getrandom() function... " >&6; }
16313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16314/* end confdefs.h. */
16315
16316
16317 #include <sys/random.h>
16318
16319 int main() {
16320 char buffer[1];
16321 const size_t buflen = sizeof(buffer);
16322 const int flags = 0;
16323 /* ignore the result, Python checks for ENOSYS at runtime */
16324 (void)getrandom(buffer, buflen, flags);
16325 return 0;
16326 }
16327
16328
16329_ACEOF
16330if ac_fn_c_try_link "$LINENO"; then :
16331 have_getrandom=yes
16332else
16333 have_getrandom=no
16334fi
16335rm -f core conftest.err conftest.$ac_objext \
16336 conftest$ac_exeext conftest.$ac_ext
16337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16338$as_echo "$have_getrandom" >&6; }
16339
16340if test "$have_getrandom" = yes; then
16341
16342$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16343
16344fi
16345
Guido van Rossum627b2d71993-12-24 10:39:16 +000016346# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016347ac_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 +000016348
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016349ac_config_files="$ac_config_files Modules/ld_so_aix"
16350
Martin v. Löwis11437992002-04-12 09:54:03 +000016351cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016352# This file is a shell script that caches the results of configure
16353# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016354# scripts and configure runs, see configure's option --config-cache.
16355# It is not useful on other systems. If it contains results you don't
16356# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016357#
Martin v. Löwis11437992002-04-12 09:54:03 +000016358# config.status only pays attention to the cache file if you give it
16359# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016360#
Skip Montanaro6dead952003-09-25 14:50:04 +000016361# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016362# loading this file, other *unset* `ac_cv_foo' will be assigned the
16363# following values.
16364
16365_ACEOF
16366
Guido van Rossumf78abae1997-01-21 22:02:36 +000016367# The following way of writing the cache mishandles newlines in values,
16368# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016369# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016370# Ultrix sh set writes to stderr and can't be redirected directly,
16371# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016372(
16373 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16374 eval ac_val=\$$ac_var
16375 case $ac_val in #(
16376 *${as_nl}*)
16377 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016378 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16379$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016380 esac
16381 case $ac_var in #(
16382 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016383 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16384 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016385 esac ;;
16386 esac
16387 done
16388
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16391 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016392 # `set' does not quote correctly, so add quotes: double-quote
16393 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016395 "s/'/'\\\\''/g;
16396 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 *)
16399 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016402 esac |
16403 sort
16404) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16410 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016411 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16412 :end' >>confcache
16413if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16414 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016415 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016416 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16417$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016418 if test ! -f "$cache_file" || test -h "$cache_file"; then
16419 cat confcache >"$cache_file"
16420 else
16421 case $cache_file in #(
16422 */* | ?:*)
16423 mv -f confcache "$cache_file"$$ &&
16424 mv -f "$cache_file"$$ "$cache_file" ;; #(
16425 *)
16426 mv -f confcache "$cache_file" ;;
16427 esac
16428 fi
16429 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016430 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016431 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16432$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016433 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016434fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016435rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016436
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016437test "x$prefix" = xNONE && prefix=$ac_default_prefix
16438# Let make expand exec_prefix.
16439test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016441DEFS=-DHAVE_CONFIG_H
16442
Skip Montanaro6dead952003-09-25 14:50:04 +000016443ac_libobjs=
16444ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016445U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016446for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16447 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016448 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016449 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16451 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016452 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16453 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016454done
16455LIBOBJS=$ac_libobjs
16456
16457LTLIBOBJS=$ac_ltlibobjs
16458
16459
Martin v. Löwis11437992002-04-12 09:54:03 +000016460
Matthias Kloseb9621712010-04-24 17:59:49 +000016461
Victor Stinnere0be4232011-10-25 13:06:09 +020016462: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016463ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016464ac_clean_files_save=$ac_clean_files
16465ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016466{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16467$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16468as_write_fail=0
16469cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016470#! $SHELL
16471# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016472# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016473# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016474# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016475
Martin v. Löwis11437992002-04-12 09:54:03 +000016476debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016477ac_cs_recheck=false
16478ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016479
Matthias Kloseb9621712010-04-24 17:59:49 +000016480SHELL=\${CONFIG_SHELL-$SHELL}
16481export SHELL
16482_ASEOF
16483cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16484## -------------------- ##
16485## M4sh Initialization. ##
16486## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016488# Be more Bourne compatible
16489DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016490if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016491 emulate sh
16492 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016493 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016494 # is contrary to our usage. Disable this feature.
16495 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016497else
Matthias Kloseb9621712010-04-24 17:59:49 +000016498 case `(set -o) 2>/dev/null` in #(
16499 *posix*) :
16500 set -o posix ;; #(
16501 *) :
16502 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016503esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016504fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016505
16506
Matthias Kloseb9621712010-04-24 17:59:49 +000016507as_nl='
16508'
16509export as_nl
16510# Printing a long string crashes Solaris 7 /usr/bin/printf.
16511as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16512as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16513as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16514# Prefer a ksh shell builtin over an external printf program on Solaris,
16515# but without wasting forks for bash or zsh.
16516if test -z "$BASH_VERSION$ZSH_VERSION" \
16517 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16518 as_echo='print -r --'
16519 as_echo_n='print -rn --'
16520elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16521 as_echo='printf %s\n'
16522 as_echo_n='printf %s'
16523else
16524 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16525 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16526 as_echo_n='/usr/ucb/echo -n'
16527 else
16528 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16529 as_echo_n_body='eval
16530 arg=$1;
16531 case $arg in #(
16532 *"$as_nl"*)
16533 expr "X$arg" : "X\\(.*\\)$as_nl";
16534 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16535 esac;
16536 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16537 '
16538 export as_echo_n_body
16539 as_echo_n='sh -c $as_echo_n_body as_echo'
16540 fi
16541 export as_echo_body
16542 as_echo='sh -c $as_echo_body as_echo'
16543fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016544
16545# The user is always right.
16546if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016547 PATH_SEPARATOR=:
16548 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16549 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16550 PATH_SEPARATOR=';'
16551 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554
16555# IFS
16556# We need space, tab and new line, in precisely that order. Quoting is
16557# there to prevent editors from complaining about space-tab.
16558# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16559# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560IFS=" "" $as_nl"
16561
16562# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016563as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016564case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565 *[\\/]* ) as_myself=$0 ;;
16566 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016567for as_dir in $PATH
16568do
16569 IFS=$as_save_IFS
16570 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016571 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16572 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016575 ;;
16576esac
16577# We did not find ourselves, most probably we were run as `sh COMMAND'
16578# in which case we are not to be found in the path.
16579if test "x$as_myself" = x; then
16580 as_myself=$0
16581fi
16582if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016583 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16584 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585fi
16586
Matthias Kloseb9621712010-04-24 17:59:49 +000016587# Unset variables that we do not need and which cause bugs (e.g. in
16588# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16589# suppresses any "Segmentation fault" message there. '((' could
16590# trigger a bug in pdksh 5.2.14.
16591for as_var in BASH_ENV ENV MAIL MAILPATH
16592do eval test x\${$as_var+set} = xset \
16593 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594done
16595PS1='$ '
16596PS2='> '
16597PS4='+ '
16598
16599# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016600LC_ALL=C
16601export LC_ALL
16602LANGUAGE=C
16603export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604
Matthias Kloseb9621712010-04-24 17:59:49 +000016605# CDPATH.
16606(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16607
16608
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016609# as_fn_error STATUS ERROR [LINENO LOG_FD]
16610# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016611# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16612# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016613# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016614as_fn_error ()
16615{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016616 as_status=$1; test $as_status -eq 0 && as_status=1
16617 if test "$4"; then
16618 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16619 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016620 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016621 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016622 as_fn_exit $as_status
16623} # as_fn_error
16624
16625
16626# as_fn_set_status STATUS
16627# -----------------------
16628# Set $? to STATUS, without forking.
16629as_fn_set_status ()
16630{
16631 return $1
16632} # as_fn_set_status
16633
16634# as_fn_exit STATUS
16635# -----------------
16636# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16637as_fn_exit ()
16638{
16639 set +e
16640 as_fn_set_status $1
16641 exit $1
16642} # as_fn_exit
16643
16644# as_fn_unset VAR
16645# ---------------
16646# Portably unset VAR.
16647as_fn_unset ()
16648{
16649 { eval $1=; unset $1;}
16650}
16651as_unset=as_fn_unset
16652# as_fn_append VAR VALUE
16653# ----------------------
16654# Append the text in VALUE to the end of the definition contained in VAR. Take
16655# advantage of any shell optimizations that allow amortized linear growth over
16656# repeated appends, instead of the typical quadratic growth present in naive
16657# implementations.
16658if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16659 eval 'as_fn_append ()
16660 {
16661 eval $1+=\$2
16662 }'
16663else
16664 as_fn_append ()
16665 {
16666 eval $1=\$$1\$2
16667 }
16668fi # as_fn_append
16669
16670# as_fn_arith ARG...
16671# ------------------
16672# Perform arithmetic evaluation on the ARGs, and store the result in the
16673# global $as_val. Take advantage of shells that can avoid forks. The arguments
16674# must be portable across $(()) and expr.
16675if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16676 eval 'as_fn_arith ()
16677 {
16678 as_val=$(( $* ))
16679 }'
16680else
16681 as_fn_arith ()
16682 {
16683 as_val=`expr "$@" || test $? -eq 1`
16684 }
16685fi # as_fn_arith
16686
16687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688if expr a : '\(a\)' >/dev/null 2>&1 &&
16689 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16690 as_expr=expr
16691else
16692 as_expr=false
16693fi
16694
16695if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16696 as_basename=basename
16697else
16698 as_basename=false
16699fi
16700
Matthias Kloseb9621712010-04-24 17:59:49 +000016701if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16702 as_dirname=dirname
16703else
16704 as_dirname=false
16705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707as_me=`$as_basename -- "$0" ||
16708$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16709 X"$0" : 'X\(//\)$' \| \
16710 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016711$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016712 sed '/^.*\/\([^/][^/]*\)\/*$/{
16713 s//\1/
16714 q
16715 }
16716 /^X\/\(\/\/\)$/{
16717 s//\1/
16718 q
16719 }
16720 /^X\/\(\/\).*/{
16721 s//\1/
16722 q
16723 }
16724 s/.*/./; q'`
16725
Matthias Kloseb9621712010-04-24 17:59:49 +000016726# Avoid depending upon Character Ranges.
16727as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16728as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16729as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16730as_cr_digits='0123456789'
16731as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732
16733ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016734case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016735-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016736 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016738 xy) ECHO_C='\c';;
16739 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16740 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741 esac;;
16742*)
16743 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016744esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016745
Martin v. Löwis11437992002-04-12 09:54:03 +000016746rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747if test -d conf$$.dir; then
16748 rm -f conf$$.dir/conf$$.file
16749else
16750 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016751 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016753if (echo >conf$$.file) 2>/dev/null; then
16754 if ln -s conf$$.file conf$$ 2>/dev/null; then
16755 as_ln_s='ln -s'
16756 # ... but there are two gotchas:
16757 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16758 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016759 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016760 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016761 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016762 elif ln conf$$.file conf$$ 2>/dev/null; then
16763 as_ln_s=ln
16764 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016765 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016766 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016767else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016768 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16771rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016772
Matthias Kloseb9621712010-04-24 17:59:49 +000016773
16774# as_fn_mkdir_p
16775# -------------
16776# Create "$as_dir" as a directory, including parents if necessary.
16777as_fn_mkdir_p ()
16778{
16779
16780 case $as_dir in #(
16781 -*) as_dir=./$as_dir;;
16782 esac
16783 test -d "$as_dir" || eval $as_mkdir_p || {
16784 as_dirs=
16785 while :; do
16786 case $as_dir in #(
16787 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16788 *) as_qdir=$as_dir;;
16789 esac
16790 as_dirs="'$as_qdir' $as_dirs"
16791 as_dir=`$as_dirname -- "$as_dir" ||
16792$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16793 X"$as_dir" : 'X\(//\)[^/]' \| \
16794 X"$as_dir" : 'X\(//\)$' \| \
16795 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16796$as_echo X"$as_dir" |
16797 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16798 s//\1/
16799 q
16800 }
16801 /^X\(\/\/\)[^/].*/{
16802 s//\1/
16803 q
16804 }
16805 /^X\(\/\/\)$/{
16806 s//\1/
16807 q
16808 }
16809 /^X\(\/\).*/{
16810 s//\1/
16811 q
16812 }
16813 s/.*/./; q'`
16814 test -d "$as_dir" && break
16815 done
16816 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016817 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016818
16819
16820} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016821if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016822 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016823else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016824 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016825 as_mkdir_p=false
16826fi
16827
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016828
16829# as_fn_executable_p FILE
16830# -----------------------
16831# Test if FILE is an executable regular file.
16832as_fn_executable_p ()
16833{
16834 test -f "$1" && test -x "$1"
16835} # as_fn_executable_p
16836as_test_x='test -x'
16837as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016838
16839# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016840as_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 +000016841
16842# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016843as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016844
16845
Martin v. Löwis11437992002-04-12 09:54:03 +000016846exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016847## ----------------------------------- ##
16848## Main body of $CONFIG_STATUS script. ##
16849## ----------------------------------- ##
16850_ASEOF
16851test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016852
Matthias Kloseb9621712010-04-24 17:59:49 +000016853cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16854# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016855# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016856# values after options handling.
16857ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016858This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016859generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016860
16861 CONFIG_FILES = $CONFIG_FILES
16862 CONFIG_HEADERS = $CONFIG_HEADERS
16863 CONFIG_LINKS = $CONFIG_LINKS
16864 CONFIG_COMMANDS = $CONFIG_COMMANDS
16865 $ $0 $@
16866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016867on `(hostname || uname -n) 2>/dev/null | sed 1q`
16868"
16869
Martin v. Löwis11437992002-04-12 09:54:03 +000016870_ACEOF
16871
Matthias Kloseb9621712010-04-24 17:59:49 +000016872case $ac_config_files in *"
16873"*) set x $ac_config_files; shift; ac_config_files=$*;;
16874esac
16875
16876case $ac_config_headers in *"
16877"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16878esac
16879
16880
16881cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016882# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016883config_files="$ac_config_files"
16884config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016886_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016887
Matthias Kloseb9621712010-04-24 17:59:49 +000016888cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016889ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016890\`$as_me' instantiates files and other configuration actions
16891from templates according to the current configuration. Unless the files
16892and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016893
Matthias Kloseb9621712010-04-24 17:59:49 +000016894Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016895
16896 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016897 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016898 --config print configuration, then exit
16899 -q, --quiet, --silent
16900 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 -d, --debug don't remove temporary files
16902 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016903 --file=FILE[:TEMPLATE]
16904 instantiate the configuration file FILE
16905 --header=FILE[:TEMPLATE]
16906 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016907
16908Configuration files:
16909$config_files
16910
16911Configuration headers:
16912$config_headers
16913
Matthias Kloseb9621712010-04-24 17:59:49 +000016914Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016917cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16918ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016919ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016920python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016921configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016922 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016923
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016924Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016925This config.status script is free software; the Free Software Foundation
16926gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927
16928ac_pwd='$ac_pwd'
16929srcdir='$srcdir'
16930INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016931MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016932test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016933_ACEOF
16934
Matthias Kloseb9621712010-04-24 17:59:49 +000016935cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16936# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016937ac_need_defaults=:
16938while test $# != 0
16939do
16940 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016941 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016942 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16943 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016944 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016945 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016946 --*=)
16947 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16948 ac_optarg=
16949 ac_shift=:
16950 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016952 ac_option=$1
16953 ac_optarg=$2
16954 ac_shift=shift
16955 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 esac
16957
Skip Montanaro6dead952003-09-25 14:50:04 +000016958 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016959 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016960 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16961 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016962 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016963 $as_echo "$ac_cs_version"; exit ;;
16964 --config | --confi | --conf | --con | --co | --c )
16965 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016967 debug=: ;;
16968 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016969 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016970 case $ac_optarg in
16971 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016972 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016973 esac
16974 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016975 ac_need_defaults=false;;
16976 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016977 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016978 case $ac_optarg in
16979 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16980 esac
16981 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016982 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016983 --he | --h)
16984 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016985 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016986Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016988 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016989 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16990 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16991 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016992
16993 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016994 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016995Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016996
Matthias Kloseb9621712010-04-24 17:59:49 +000016997 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016998 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016999
17000 esac
17001 shift
17002done
17003
Skip Montanaro6dead952003-09-25 14:50:04 +000017004ac_configure_extra_args=
17005
17006if $ac_cs_silent; then
17007 exec 6>/dev/null
17008 ac_configure_extra_args="$ac_configure_extra_args --silent"
17009fi
17010
17011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017012cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017013if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017014 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017015 shift
17016 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17017 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017019 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017020fi
17021
Martin v. Löwis11437992002-04-12 09:54:03 +000017022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017023cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017024exec 5>>config.log
17025{
17026 echo
17027 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17028## Running $as_me. ##
17029_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017030 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017036
Matthias Kloseb9621712010-04-24 17:59:49 +000017037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038
17039# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017040for ac_config_target in $ac_config_targets
17041do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 case $ac_config_target in
17043 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17044 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17045 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017046 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17047 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17049 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017050 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017051 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017052 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053
Victor Stinnere0be4232011-10-25 13:06:09 +020017054 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017055 esac
17056done
17057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058
Martin v. Löwis11437992002-04-12 09:54:03 +000017059# If the user did not use the arguments to specify the items to instantiate,
17060# then the envvar interface is used. Set only those that are not.
17061# We use the long form for the default assignment because of an extremely
17062# bizarre bug on SunOS 4.1.3.
17063if $ac_need_defaults; then
17064 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17065 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17066fi
17067
Skip Montanaro6dead952003-09-25 14:50:04 +000017068# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017070# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017071# Hook for its removal unless debugging.
17072# Note that there is a small window in which the directory will not be cleaned:
17073# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017074$debug ||
17075{
Victor Stinnere0be4232011-10-25 13:06:09 +020017076 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017078 : "${ac_tmp:=$tmp}"
17079 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017081 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017082}
Martin v. Löwis11437992002-04-12 09:54:03 +000017083# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017084
Martin v. Löwis11437992002-04-12 09:54:03 +000017085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017087 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017088} ||
17089{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090 tmp=./conf$$-$RANDOM
17091 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017092} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017093ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017094
Matthias Kloseb9621712010-04-24 17:59:49 +000017095# Set up the scripts for CONFIG_FILES section.
17096# No need to generate them if there are no CONFIG_FILES.
17097# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017099
Matthias Kloseb9621712010-04-24 17:59:49 +000017100
17101ac_cr=`echo X | tr X '\015'`
17102# On cygwin, bash can eat \r inside `` if the user requested igncr.
17103# But we know of no other shell where ac_cr would be empty at this
17104# point, so we can use a bashism as a fallback.
17105if test "x$ac_cr" = x; then
17106 eval ac_cr=\$\'\\r\'
17107fi
17108ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17109if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017110 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017111else
17112 ac_cs_awk_cr=$ac_cr
17113fi
17114
Victor Stinnere0be4232011-10-25 13:06:09 +020017115echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017116_ACEOF
17117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017118
Matthias Kloseb9621712010-04-24 17:59:49 +000017119{
17120 echo "cat >conf$$subs.awk <<_ACEOF" &&
17121 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17122 echo "_ACEOF"
17123} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017124 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17125ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126ac_delim='%!_!# '
17127for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017128 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017129 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017130
Matthias Kloseb9621712010-04-24 17:59:49 +000017131 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17132 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133 break
17134 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017135 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136 else
17137 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017138 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017139done
Matthias Kloseb9621712010-04-24 17:59:49 +000017140rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017141
Matthias Kloseb9621712010-04-24 17:59:49 +000017142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017143cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017145sed -n '
17146h
17147s/^/S["/; s/!.*/"]=/
17148p
17149g
17150s/^[^!]*!//
17151:repl
17152t repl
17153s/'"$ac_delim"'$//
17154t delim
17155:nl
17156h
17157s/\(.\{148\}\)..*/\1/
17158t more1
17159s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17160p
17161n
17162b repl
17163:more1
17164s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17165p
17166g
17167s/.\{148\}//
17168t nl
17169:delim
17170h
17171s/\(.\{148\}\)..*/\1/
17172t more2
17173s/["\\]/\\&/g; s/^/"/; s/$/"/
17174p
17175b
17176:more2
17177s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17178p
17179g
17180s/.\{148\}//
17181t delim
17182' <conf$$subs.awk | sed '
17183/^[^""]/{
17184 N
17185 s/\n//
17186}
17187' >>$CONFIG_STATUS || ac_write_fail=1
17188rm -f conf$$subs.awk
17189cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17190_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017191cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017192 for (key in S) S_is_set[key] = 1
17193 FS = ""
17194
17195}
17196{
17197 line = $ 0
17198 nfields = split(line, field, "@")
17199 substed = 0
17200 len = length(field[1])
17201 for (i = 2; i < nfields; i++) {
17202 key = field[i]
17203 keylen = length(key)
17204 if (S_is_set[key]) {
17205 value = S[key]
17206 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17207 len += length(value) + length(field[++i])
17208 substed = 1
17209 } else
17210 len += 1 + keylen
17211 }
17212
17213 print line
17214}
17215
17216_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017218cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17219if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17220 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17221else
17222 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017223fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017224 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017225_ACEOF
17226
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017227# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17228# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229# trailing colons and then remove the whole line if VPATH becomes empty
17230# (actually we leave an empty line to preserve line numbers).
17231if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017232 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17233h
17234s///
17235s/^/:/
17236s/[ ]*$/:/
17237s/:\$(srcdir):/:/g
17238s/:\${srcdir}:/:/g
17239s/:@srcdir@:/:/g
17240s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017242x
17243s/\(=[ ]*\).*/\1/
17244G
17245s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246s/^[^=]*=[ ]*$//
17247}'
17248fi
17249
Matthias Kloseb9621712010-04-24 17:59:49 +000017250cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017251fi # test -n "$CONFIG_FILES"
17252
Matthias Kloseb9621712010-04-24 17:59:49 +000017253# Set up the scripts for CONFIG_HEADERS section.
17254# No need to generate them if there are no CONFIG_HEADERS.
17255# This happens for instance with `./config.status Makefile'.
17256if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017257cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017258BEGIN {
17259_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260
Matthias Kloseb9621712010-04-24 17:59:49 +000017261# Transform confdefs.h into an awk script `defines.awk', embedded as
17262# here-document in config.status, that substitutes the proper values into
17263# config.h.in to produce config.h.
17264
17265# Create a delimiter string that does not exist in confdefs.h, to ease
17266# handling of long lines.
17267ac_delim='%!_!# '
17268for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017269 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17270 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017271 break
17272 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017273 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017274 else
17275 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17276 fi
17277done
17278
17279# For the awk script, D is an array of macro values keyed by name,
17280# likewise P contains macro parameters if any. Preserve backslash
17281# newline sequences.
17282
17283ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17284sed -n '
17285s/.\{148\}/&'"$ac_delim"'/g
17286t rset
17287:rset
17288s/^[ ]*#[ ]*define[ ][ ]*/ /
17289t def
17290d
17291:def
17292s/\\$//
17293t bsnl
17294s/["\\]/\\&/g
17295s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17296D["\1"]=" \3"/p
17297s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17298d
17299:bsnl
17300s/["\\]/\\&/g
17301s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17302D["\1"]=" \3\\\\\\n"\\/p
17303t cont
17304s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17305t cont
17306d
17307:cont
17308n
17309s/.\{148\}/&'"$ac_delim"'/g
17310t clear
17311:clear
17312s/\\$//
17313t bsnlc
17314s/["\\]/\\&/g; s/^/"/; s/$/"/p
17315d
17316:bsnlc
17317s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17318b cont
17319' <confdefs.h | sed '
17320s/'"$ac_delim"'/"\\\
17321"/g' >>$CONFIG_STATUS || ac_write_fail=1
17322
17323cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17324 for (key in D) D_is_set[key] = 1
17325 FS = ""
17326}
17327/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17328 line = \$ 0
17329 split(line, arg, " ")
17330 if (arg[1] == "#") {
17331 defundef = arg[2]
17332 mac1 = arg[3]
17333 } else {
17334 defundef = substr(arg[1], 2)
17335 mac1 = arg[2]
17336 }
17337 split(mac1, mac2, "(") #)
17338 macro = mac2[1]
17339 prefix = substr(line, 1, index(line, defundef) - 1)
17340 if (D_is_set[macro]) {
17341 # Preserve the white space surrounding the "#".
17342 print prefix "define", macro P[macro] D[macro]
17343 next
17344 } else {
17345 # Replace #undef with comments. This is necessary, for example,
17346 # in the case of _POSIX_SOURCE, which is predefined and required
17347 # on some systems where configure will not decide to define it.
17348 if (defundef == "undef") {
17349 print "/*", prefix defundef, macro, "*/"
17350 next
17351 }
17352 }
17353}
17354{ print }
17355_ACAWK
17356_ACEOF
17357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017358 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017359fi # test -n "$CONFIG_HEADERS"
17360
17361
17362eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17363shift
17364for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365do
17366 case $ac_tag in
17367 :[FHLC]) ac_mode=$ac_tag; continue;;
17368 esac
17369 case $ac_mode$ac_tag in
17370 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017371 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372 :[FH]-) ac_tag=-:-;;
17373 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17374 esac
17375 ac_save_IFS=$IFS
17376 IFS=:
17377 set x $ac_tag
17378 IFS=$ac_save_IFS
17379 shift
17380 ac_file=$1
17381 shift
17382
17383 case $ac_mode in
17384 :L) ac_source=$1;;
17385 :[FH])
17386 ac_file_inputs=
17387 for ac_f
17388 do
17389 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017390 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391 *) # Look for the file first in the build tree, then in the source tree
17392 # (if the path is not absolute). The absolute path cannot be DOS-style,
17393 # because $ac_f cannot contain `:'.
17394 test -f "$ac_f" ||
17395 case $ac_f in
17396 [\\/$]*) false;;
17397 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17398 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017399 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017401 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17402 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403 done
17404
17405 # Let's still pretend it is `configure' which instantiates (i.e., don't
17406 # use $as_me), people would be surprised to read:
17407 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017408 configure_input='Generated from '`
17409 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17410 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411 if test x"$ac_file" != x-; then
17412 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017413 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17414$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017416 # Neutralize special characters interpreted by sed in replacement strings.
17417 case $configure_input in #(
17418 *\&* | *\|* | *\\* )
17419 ac_sed_conf_input=`$as_echo "$configure_input" |
17420 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17421 *) ac_sed_conf_input=$configure_input;;
17422 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423
17424 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017425 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17426 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427 esac
17428 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017429 esac
17430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017432$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017433 X"$ac_file" : 'X\(//\)[^/]' \| \
17434 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017436$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17438 s//\1/
17439 q
17440 }
17441 /^X\(\/\/\)[^/].*/{
17442 s//\1/
17443 q
17444 }
17445 /^X\(\/\/\)$/{
17446 s//\1/
17447 q
17448 }
17449 /^X\(\/\).*/{
17450 s//\1/
17451 q
17452 }
17453 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017454 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017455 ac_builddir=.
17456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457case "$ac_dir" in
17458.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17459*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017460 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017462 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463 case $ac_top_builddir_sub in
17464 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17465 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17466 esac ;;
17467esac
17468ac_abs_top_builddir=$ac_pwd
17469ac_abs_builddir=$ac_pwd$ac_dir_suffix
17470# for backward compatibility:
17471ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017472
17473case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476 ac_top_srcdir=$ac_top_builddir_sub
17477 ac_abs_top_srcdir=$ac_pwd ;;
17478 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480 ac_top_srcdir=$srcdir
17481 ac_abs_top_srcdir=$srcdir ;;
17482 *) # Relative name.
17483 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17484 ac_top_srcdir=$ac_top_build_prefix$srcdir
17485 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017486esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017488
Martin v. Löwis11437992002-04-12 09:54:03 +000017489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490 case $ac_mode in
17491 :F)
17492 #
17493 # CONFIG_FILE
17494 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017495
17496 case $INSTALL in
17497 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017499 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017500 ac_MKDIR_P=$MKDIR_P
17501 case $MKDIR_P in
17502 [\\/$]* | ?:[\\/]* ) ;;
17503 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17504 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017505_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506
Matthias Kloseb9621712010-04-24 17:59:49 +000017507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508# If the template does not know about datarootdir, expand it.
17509# FIXME: This hack should be removed a few years after 2.60.
17510ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017511ac_sed_dataroot='
17512/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017513 p
17514 q
17515}
17516/@datadir@/p
17517/@docdir@/p
17518/@infodir@/p
17519/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017520/@mandir@/p'
17521case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522*datarootdir*) ac_datarootdir_seen=yes;;
17523*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17525$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017527cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017528 ac_datarootdir_hack='
17529 s&@datadir@&$datadir&g
17530 s&@docdir@&$docdir&g
17531 s&@infodir@&$infodir&g
17532 s&@localedir@&$localedir&g
17533 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017534 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017535esac
17536_ACEOF
17537
17538# Neutralize VPATH when `$srcdir' = `.'.
17539# Shell code in configure.ac might set extrasub.
17540# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017541cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17542ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017543$extrasub
17544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017545cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017546:t
17547/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017548s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017550s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551s&@srcdir@&$ac_srcdir&;t t
17552s&@abs_srcdir@&$ac_abs_srcdir&;t t
17553s&@top_srcdir@&$ac_top_srcdir&;t t
17554s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17555s&@builddir@&$ac_builddir&;t t
17556s&@abs_builddir@&$ac_abs_builddir&;t t
17557s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17558s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017559s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017561"
Victor Stinnere0be4232011-10-25 13:06:09 +020017562eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17563 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017566 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17567 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17568 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017569 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017570which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017571$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017572which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017573
Victor Stinnere0be4232011-10-25 13:06:09 +020017574 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017575 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017576 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17577 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017578 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017579 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580 ;;
17581 :H)
17582 #
17583 # CONFIG_HEADER
17584 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017585 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017586 {
17587 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017588 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17589 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017590 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017591 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017592 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17593$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017594 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017595 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017596 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017597 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017598 fi
17599 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017600 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017601 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017602 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017603 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017604 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606
17607 esac
17608
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017609
17610 case $ac_file$ac_mode in
17611 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17612
17613 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614done # for ac_tag
17615
Guido van Rossum627b2d71993-12-24 10:39:16 +000017616
Matthias Kloseb9621712010-04-24 17:59:49 +000017617as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017618_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017619ac_clean_files=$ac_clean_files_save
17620
Matthias Kloseb9621712010-04-24 17:59:49 +000017621test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017622 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017623
Martin v. Löwis11437992002-04-12 09:54:03 +000017624
17625# configure is writing to config.log, and then calls config.status.
17626# config.status does its own redirection, appending to config.log.
17627# Unfortunately, on DOS this fails, as config.log is still kept open
17628# by configure, so config.status won't be able to write to it; its
17629# output is simply discarded. So we exec the FD to /dev/null,
17630# effectively closing config.log, so it can be properly (re)opened and
17631# appended to by config.status. When coming back to configure, we
17632# need to make the FD available again.
17633if test "$no_create" != yes; then
17634 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017635 ac_config_status_args=
17636 test "$silent" = yes &&
17637 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017639 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017640 exec 5>>config.log
17641 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17642 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017643 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017644fi
17645if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17647$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017648fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017649
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017650
Christian Heimes75ed8902013-11-20 01:11:18 +010017651echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017652if test ! -f Modules/Setup
17653then
17654 cp $srcdir/Modules/Setup.dist Modules/Setup
17655fi
17656
Christian Heimes75ed8902013-11-20 01:11:18 +010017657echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017658if test ! -f Modules/Setup.local
17659then
17660 echo "# Edit this file for local setup changes" >Modules/Setup.local
17661fi
17662
Christian Heimes75ed8902013-11-20 01:11:18 +010017663echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017664$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17665 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017666 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017667mv config.c Modules