blob: c5256642d13df8091760870b9adfeac8f07493ca [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.
Ross Lagerwall2bb842a2012-10-29 17:39:19 +00003# Generated by GNU Autoconf 2.69 for python 3.4.
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'
Georg Brandl08a90122012-09-29 09:34:13 +0200583PACKAGE_VERSION='3.4'
584PACKAGE_STRING='python 3.4'
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
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100628LIBPL
629PY_ENABLE_SHARED
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000630SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
648LIBFFI_INCLUDEDIR
649PKG_CONFIG
650SHLIBS
651CFLAGSFORSHARED
652LINKFORSHARED
653CCSHARED
654BLDSHARED
655LDCXXSHARED
656LDSHARED
657SO
658LIBTOOL_CRUFT
659OTHER_LIBTOOL_OPT
660UNIVERSAL_ARCH_FLAGS
661BASECFLAGS
662OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000663ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100665MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000666INSTALL_DATA
667INSTALL_SCRIPT
668INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200669PYTHON
670ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200671ac_ct_READELF
672READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000673ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200674ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000675AR
676RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000677USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000678GNULD
679LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000680LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000681RUNSHARED
682INSTSONAME
683LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000684PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000685BLDLIBRARY
686DLLLIBRARY
687LDLIBRARY
688LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100689MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000690BUILDEXEEXT
691EGREP
692GREP
693CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200694NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000696MAINCC
697CXX
698OBJEXT
699EXEEXT
700ac_ct_CC
701CPPFLAGS
702LDFLAGS
703CFLAGS
704CC
705EXPORT_MACOSX_DEPLOYMENT_TARGET
706CONFIGURE_MACOSX_DEPLOYMENT_TARGET
707SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200708_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000709MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000710FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000711FRAMEWORKUNIXTOOLSPREFIX
712FRAMEWORKALTINSTALLLAST
713FRAMEWORKALTINSTALLFIRST
714FRAMEWORKINSTALLLAST
715FRAMEWORKINSTALLFIRST
716PYTHONFRAMEWORKINSTALLDIR
717PYTHONFRAMEWORKPREFIX
718PYTHONFRAMEWORKDIR
719PYTHONFRAMEWORKIDENTIFIER
720PYTHONFRAMEWORK
721LIPO_32BIT_FLAGS
722ARCH_RUN_32BIT
723UNIVERSALSDK
724CONFIG_ARGS
725SOVERSION
726VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200727PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100728host_os
729host_vendor
730host_cpu
731host
732build_os
733build_vendor
734build_cpu
735build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500736HAS_HG
737HGBRANCH
738HGTAG
739HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400740BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000741target_alias
742host_alias
743build_alias
744LIBS
745ECHO_T
746ECHO_N
747ECHO_C
748DEFS
749mandir
750localedir
751libdir
752psdir
753pdfdir
754dvidir
755htmldir
756infodir
757docdir
758oldincludedir
759includedir
760localstatedir
761sharedstatedir
762sysconfdir
763datadir
764datarootdir
765libexecdir
766sbindir
767bindir
768program_transform_name
769prefix
770exec_prefix
771PACKAGE_URL
772PACKAGE_BUGREPORT
773PACKAGE_STRING
774PACKAGE_VERSION
775PACKAGE_TARNAME
776PACKAGE_NAME
777PATH_SEPARATOR
778SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000779ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000780ac_user_opts='
781enable_option_checking
782enable_universalsdk
783with_universal_archs
784with_framework_name
785enable_framework
786with_gcc
787with_cxx_main
788with_suffix
789enable_shared
790enable_profiling
791with_pydebug
792with_libs
793with_system_expat
794with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100795with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000796enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000797with_dbmliborder
798with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000799with_threads
800with_thread
801enable_ipv6
802with_doc_strings
803with_tsc
804with_pymalloc
805with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_fpectl
807with_libm
808with_libc
809enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_computed_gotos
811'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000812 ac_precious_vars='build_alias
813host_alias
814target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100815MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816CC
817CFLAGS
818LDFLAGS
819LIBS
820CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200821CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000825ac_init_help=
826ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000827ac_unrecognized_opts=
828ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829# The variables have the same names as the options, with
830# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000831cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834no_recursion=
835prefix=NONE
836program_prefix=NONE
837program_suffix=NONE
838program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843x_includes=NONE
844x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000845
846# Installation directory options.
847# These are left unexpanded so users can "make install exec_prefix=/foo"
848# and all the variables that are supposed to be based on exec_prefix
849# by default will actually change.
850# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000852bindir='${exec_prefix}/bin'
853sbindir='${exec_prefix}/sbin'
854libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855datarootdir='${prefix}/share'
856datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857sysconfdir='${prefix}/etc'
858sharedstatedir='${prefix}/com'
859localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860includedir='${prefix}/include'
861oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
863infodir='${datarootdir}/info'
864htmldir='${docdir}'
865dvidir='${docdir}'
866pdfdir='${docdir}'
867psdir='${docdir}'
868libdir='${exec_prefix}/lib'
869localedir='${datarootdir}/locale'
870mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000875do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 # If the previous option needs an argument, assign it.
877 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 ac_prev=
880 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000881 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200884 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
885 *=) ac_optarg= ;;
886 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Accept the important Cygnus configure options, so we can diagnose typos.
890
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891 case $ac_dashdash$ac_option in
892 --)
893 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895 -bindir | --bindir | --bindi | --bind | --bin | --bi)
896 ac_prev=bindir ;;
897 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899
900 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905 -cache-file | --cache-file | --cache-fil | --cache-fi \
906 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
907 ac_prev=cache_file ;;
908 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
909 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 cache_file=$ac_optarg ;;
911
912 --config-cache | -C)
913 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
921 | --dataroo | --dataro | --datar)
922 ac_prev=datarootdir ;;
923 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
924 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
925 datarootdir=$ac_optarg ;;
926
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000928 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000930 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200931 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000932 ac_useropt_orig=$ac_useropt
933 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
934 case $ac_user_opts in
935 *"
936"enable_$ac_useropt"
937"*) ;;
938 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
939 ac_unrecognized_sep=', ';;
940 esac
941 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942
943 -docdir | --docdir | --docdi | --doc | --do)
944 ac_prev=docdir ;;
945 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
946 docdir=$ac_optarg ;;
947
948 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
949 ac_prev=dvidir ;;
950 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
951 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000954 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
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--enable-$ac_useropt_orig"
965 ac_unrecognized_sep=', ';;
966 esac
967 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
970 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
971 | --exec | --exe | --ex)
972 ac_prev=exec_prefix ;;
973 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
974 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
975 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000979 # Obsolete; use --with-gas.
980 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 -help | --help | --hel | --he | -h)
983 ac_init_help=long ;;
984 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
985 ac_init_help=recursive ;;
986 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
987 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000994 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
995 ac_prev=htmldir ;;
996 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
997 | --ht=*)
998 htmldir=$ac_optarg ;;
999
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000 -includedir | --includedir | --includedi | --included | --include \
1001 | --includ | --inclu | --incl | --inc)
1002 ac_prev=includedir ;;
1003 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1004 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006
1007 -infodir | --infodir | --infodi | --infod | --info | --inf)
1008 ac_prev=infodir ;;
1009 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -libdir | --libdir | --libdi | --libd)
1013 ac_prev=libdir ;;
1014 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1018 | --libexe | --libex | --libe)
1019 ac_prev=libexecdir ;;
1020 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1021 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001024 -localedir | --localedir | --localedi | --localed | --locale)
1025 ac_prev=localedir ;;
1026 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1027 localedir=$ac_optarg ;;
1028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001030 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031 ac_prev=localstatedir ;;
1032 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1037 ac_prev=mandir ;;
1038 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042 # Obsolete; use --without-fp.
1043 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
1045 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047 no_create=yes ;;
1048
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001049 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1050 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1051 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1054 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1055 | --oldin | --oldi | --old | --ol | --o)
1056 ac_prev=oldincludedir ;;
1057 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1058 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1059 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1063 ac_prev=prefix ;;
1064 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
1067 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1068 | --program-pre | --program-pr | --program-p)
1069 ac_prev=program_prefix ;;
1070 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1071 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1075 | --program-suf | --program-su | --program-s)
1076 ac_prev=program_suffix ;;
1077 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1078 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -program-transform-name | --program-transform-name \
1082 | --program-transform-nam | --program-transform-na \
1083 | --program-transform-n | --program-transform- \
1084 | --program-transform | --program-transfor \
1085 | --program-transfo | --program-transf \
1086 | --program-trans | --program-tran \
1087 | --progr-tra | --program-tr | --program-t)
1088 ac_prev=program_transform_name ;;
1089 -program-transform-name=* | --program-transform-name=* \
1090 | --program-transform-nam=* | --program-transform-na=* \
1091 | --program-transform-n=* | --program-transform-=* \
1092 | --program-transform=* | --program-transfor=* \
1093 | --program-transfo=* | --program-transf=* \
1094 | --program-trans=* | --program-tran=* \
1095 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001098 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1099 ac_prev=pdfdir ;;
1100 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1101 pdfdir=$ac_optarg ;;
1102
1103 -psdir | --psdir | --psdi | --psd | --ps)
1104 ac_prev=psdir ;;
1105 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1106 psdir=$ac_optarg ;;
1107
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1109 | -silent | --silent | --silen | --sile | --sil)
1110 silent=yes ;;
1111
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001112 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1113 ac_prev=sbindir ;;
1114 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1115 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117
1118 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1119 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1120 | --sharedst | --shareds | --shared | --share | --shar \
1121 | --sha | --sh)
1122 ac_prev=sharedstatedir ;;
1123 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1124 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1125 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1126 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001128
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001129 -site | --site | --sit)
1130 ac_prev=site ;;
1131 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1135 ac_prev=srcdir ;;
1136 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1140 | --syscon | --sysco | --sysc | --sys | --sy)
1141 ac_prev=sysconfdir ;;
1142 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1143 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1152 verbose=yes ;;
1153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 -version | --version | --versio | --versi | --vers | -V)
1155 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
1157 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001158 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001159 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001161 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001162 ac_useropt_orig=$ac_useropt
1163 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1164 case $ac_user_opts in
1165 *"
1166"with_$ac_useropt"
1167"*) ;;
1168 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1169 ac_unrecognized_sep=', ';;
1170 esac
1171 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172
1173 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001177 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001178 ac_useropt_orig=$ac_useropt
1179 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1180 case $ac_user_opts in
1181 *"
1182"with_$ac_useropt"
1183"*) ;;
1184 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1185 ac_unrecognized_sep=', ';;
1186 esac
1187 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189 --x)
1190 # Obsolete; use --with-x.
1191 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1194 | --x-incl | --x-inc | --x-in | --x-i)
1195 ac_prev=x_includes ;;
1196 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1197 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1201 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1202 ac_prev=x_libraries ;;
1203 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1204 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001207 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1208Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 ;;
1210
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 *=*)
1212 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1213 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 case $ac_envvar in #(
1215 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 export $ac_envvar ;;
1220
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001221 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001226 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227 ;;
1228
1229 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230done
1231
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001234 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235fi
1236
Matthias Kloseb9621712010-04-24 17:59:49 +00001237if test -n "$ac_unrecognized_opts"; then
1238 case $enable_option_checking in
1239 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001240 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001241 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1242 esac
1243fi
1244
1245# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1247 datadir sysconfdir sharedstatedir localstatedir includedir \
1248 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1249 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001250do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 # Remove trailing slashes.
1253 case $ac_val in
1254 */ )
1255 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1256 eval $ac_var=\$ac_val;;
1257 esac
1258 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 [\\/$]* | ?:[\\/]* ) continue;;
1261 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001264done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001265
Martin v. Löwis11437992002-04-12 09:54:03 +00001266# There might be people who depend on the old broken behavior: `$host'
1267# used to hold the argument of --host etc.
1268# FIXME: To remove some day.
1269build=$build_alias
1270host=$host_alias
1271target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272
Martin v. Löwis11437992002-04-12 09:54:03 +00001273# FIXME: To remove some day.
1274if test "x$host_alias" != x; then
1275 if test "x$build_alias" = x; then
1276 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 elif test "x$build_alias" != "x$host_alias"; then
1278 cross_compiling=yes
1279 fi
1280fi
1281
1282ac_tool_prefix=
1283test -n "$host_alias" && ac_tool_prefix=$host_alias-
1284
1285test "$silent" = yes && exec 6>/dev/null
1286
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288ac_pwd=`pwd` && test -n "$ac_pwd" &&
1289ac_ls_di=`ls -di .` &&
1290ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001291 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001293 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294
1295
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296# Find the source files, if location was not specified.
1297if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 ac_confdir=`$as_dirname -- "$as_myself" ||
1301$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1302 X"$as_myself" : 'X\(//\)[^/]' \| \
1303 X"$as_myself" : 'X\(//\)$' \| \
1304 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1305$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1307 s//\1/
1308 q
1309 }
1310 /^X\(\/\/\)[^/].*/{
1311 s//\1/
1312 q
1313 }
1314 /^X\(\/\/\)$/{
1315 s//\1/
1316 q
1317 }
1318 /^X\(\/\).*/{
1319 s//\1/
1320 q
1321 }
1322 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001323 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325 srcdir=..
1326 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327else
1328 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330if test ! -r "$srcdir/$ac_unique_file"; then
1331 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1335ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001336 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 pwd)`
1338# When building in place, set srcdir=.
1339if test "$ac_abs_confdir" = "$ac_pwd"; then
1340 srcdir=.
1341fi
1342# Remove unnecessary trailing slashes from srcdir.
1343# Double slashes in file names in object file debugging info
1344# mess up M-x gdb in Emacs.
1345case $srcdir in
1346*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1347esac
1348for ac_var in $ac_precious_vars; do
1349 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1350 eval ac_env_${ac_var}_value=\$${ac_var}
1351 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1352 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1353done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354
Martin v. Löwis11437992002-04-12 09:54:03 +00001355#
1356# Report the --help message.
1357#
1358if test "$ac_init_help" = "long"; then
1359 # Omit some internal or obsolete options to make the list less imposing.
1360 # This message is too long to be a string in the A/UX 3.1 sh.
1361 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001362\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001363
1364Usage: $0 [OPTION]... [VAR=VALUE]...
1365
1366To assign environment variables (e.g., CC, CFLAGS...), specify them as
1367VAR=VALUE. See below for descriptions of some of the useful variables.
1368
1369Defaults for the options are specified in brackets.
1370
1371Configuration:
1372 -h, --help display this help and exit
1373 --help=short display options specific to this package
1374 --help=recursive display the short help of all the included packages
1375 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 --cache-file=FILE cache test results in FILE [disabled]
1378 -C, --config-cache alias for \`--cache-file=config.cache'
1379 -n, --no-create do not create output files
1380 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1381
Martin v. Löwis11437992002-04-12 09:54:03 +00001382Installation directories:
1383 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001384 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001386 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001387
1388By default, \`make install' will install all the files in
1389\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1390an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1391for instance \`--prefix=\$HOME'.
1392
1393For better control, use the options below.
1394
1395Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 --bindir=DIR user executables [EPREFIX/bin]
1397 --sbindir=DIR system admin executables [EPREFIX/sbin]
1398 --libexecdir=DIR program executables [EPREFIX/libexec]
1399 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1400 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1401 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1402 --libdir=DIR object code libraries [EPREFIX/lib]
1403 --includedir=DIR C header files [PREFIX/include]
1404 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1405 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1406 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1407 --infodir=DIR info documentation [DATAROOTDIR/info]
1408 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1409 --mandir=DIR man documentation [DATAROOTDIR/man]
1410 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1411 --htmldir=DIR html documentation [DOCDIR]
1412 --dvidir=DIR dvi documentation [DOCDIR]
1413 --pdfdir=DIR pdf documentation [DOCDIR]
1414 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001415_ACEOF
1416
1417 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001418
1419System types:
1420 --build=BUILD configure for building on BUILD [guessed]
1421 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422_ACEOF
1423fi
1424
1425if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001426 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001427 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001428 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 cat <<\_ACEOF
1430
1431Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1434 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001435 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001436 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001437 --enable-framework[=INSTALLDIR]
1438 Build (MacOSX|Darwin) framework
1439 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001440 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001441 --enable-loadable-sqlite-extensions
1442 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001443 --enable-ipv6 Enable ipv6 (with ipv4) support
1444 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001445 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001447
1448Optional Packages:
1449 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1450 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001451 --with-universal-archs=ARCH
1452 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001453 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001454 --with-framework-name=FRAMEWORK
1455 specify an alternate name of the framework built
1456 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001458 --with-cxx-main=<compiler>
1459 compile main() and link python executable with C++
1460 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --with-suffix=.exe set executable suffix
1462 --with-pydebug build with Py_DEBUG defined
1463 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001464 --with-system-expat build pyexpat module using an installed expat
1465 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001466 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001467 --with-system-libmpdec build _decimal module using an installed libmpdec
1468 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001469 --with-dbmliborder=db1:db2:...
1470 order to check db backends for dbm. Valid value is a
1471 colon separated string with the backend names
1472 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with(out)-threads[=DIRECTORY]
1475 disable/enable thread support
1476 --with(out)-thread[=DIRECTORY]
1477 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001479 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001481 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --with-fpectl enable SIGFPE catching
1483 --with-libm=STRING math library
1484 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001485 --with(out)-computed-gotos
1486 Use computed gotos in evaluation loop (enabled by
1487 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001488
1489Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001490 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 CC C compiler command
1492 CFLAGS C compiler flags
1493 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1494 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001496 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 CPP C preprocessor
1499
1500Use these variables to override the choices made by `configure' or to help
1501it to find libraries and programs with nonstandard names/locations.
1502
Georg Brandle2e15612009-05-20 18:25:10 +00001503Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001504_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001506fi
1507
1508if test "$ac_init_help" = "recursive"; then
1509 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001511 test -d "$ac_dir" ||
1512 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1513 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 ac_builddir=.
1515
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516case "$ac_dir" in
1517.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1518*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001519 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001521 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001522 case $ac_top_builddir_sub in
1523 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1524 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1525 esac ;;
1526esac
1527ac_abs_top_builddir=$ac_pwd
1528ac_abs_builddir=$ac_pwd$ac_dir_suffix
1529# for backward compatibility:
1530ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001531
1532case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001534 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535 ac_top_srcdir=$ac_top_builddir_sub
1536 ac_abs_top_srcdir=$ac_pwd ;;
1537 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539 ac_top_srcdir=$srcdir
1540 ac_abs_top_srcdir=$srcdir ;;
1541 *) # Relative name.
1542 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1543 ac_top_srcdir=$ac_top_build_prefix$srcdir
1544 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001545esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001546ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 cd "$ac_dir" || { ac_status=$?; continue; }
1549 # Check for guested configure.
1550 if test -f "$ac_srcdir/configure.gnu"; then
1551 echo &&
1552 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1553 elif test -f "$ac_srcdir/configure"; then
1554 echo &&
1555 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001557 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 fi || ac_status=$?
1559 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 done
1561fi
1562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001564if $ac_init_version; then
1565 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001566python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001567generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001569Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570This configure script is free software; the Free Software Foundation
1571gives unlimited permission to copy, distribute and modify it.
1572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001575
1576## ------------------------ ##
1577## Autoconf initialization. ##
1578## ------------------------ ##
1579
1580# ac_fn_c_try_compile LINENO
1581# --------------------------
1582# Try to compile conftest.$ac_ext, and return whether this succeeded.
1583ac_fn_c_try_compile ()
1584{
1585 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1586 rm -f conftest.$ac_objext
1587 if { { ac_try="$ac_compile"
1588case "(($ac_try" in
1589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1590 *) ac_try_echo=$ac_try;;
1591esac
1592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1593$as_echo "$ac_try_echo"; } >&5
1594 (eval "$ac_compile") 2>conftest.err
1595 ac_status=$?
1596 if test -s conftest.err; then
1597 grep -v '^ *+' conftest.err >conftest.er1
1598 cat conftest.er1 >&5
1599 mv -f conftest.er1 conftest.err
1600 fi
1601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1602 test $ac_status = 0; } && {
1603 test -z "$ac_c_werror_flag" ||
1604 test ! -s conftest.err
1605 } && test -s conftest.$ac_objext; then :
1606 ac_retval=0
1607else
1608 $as_echo "$as_me: failed program was:" >&5
1609sed 's/^/| /' conftest.$ac_ext >&5
1610
1611 ac_retval=1
1612fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001613 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001614 as_fn_set_status $ac_retval
1615
1616} # ac_fn_c_try_compile
1617
Matthias Kloseb9621712010-04-24 17:59:49 +00001618# ac_fn_c_try_link LINENO
1619# -----------------------
1620# Try to link conftest.$ac_ext, and return whether this succeeded.
1621ac_fn_c_try_link ()
1622{
1623 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1624 rm -f conftest.$ac_objext conftest$ac_exeext
1625 if { { ac_try="$ac_link"
1626case "(($ac_try" in
1627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1628 *) ac_try_echo=$ac_try;;
1629esac
1630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1631$as_echo "$ac_try_echo"; } >&5
1632 (eval "$ac_link") 2>conftest.err
1633 ac_status=$?
1634 if test -s conftest.err; then
1635 grep -v '^ *+' conftest.err >conftest.er1
1636 cat conftest.er1 >&5
1637 mv -f conftest.er1 conftest.err
1638 fi
1639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1640 test $ac_status = 0; } && {
1641 test -z "$ac_c_werror_flag" ||
1642 test ! -s conftest.err
1643 } && test -s conftest$ac_exeext && {
1644 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001645 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001646 }; then :
1647 ac_retval=0
1648else
1649 $as_echo "$as_me: failed program was:" >&5
1650sed 's/^/| /' conftest.$ac_ext >&5
1651
1652 ac_retval=1
1653fi
1654 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1655 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1656 # interfere with the next link command; also delete a directory that is
1657 # left behind by Apple's compiler. We do this before executing the actions.
1658 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001659 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 as_fn_set_status $ac_retval
1661
1662} # ac_fn_c_try_link
1663
Matthias Kloseb9621712010-04-24 17:59:49 +00001664# ac_fn_c_try_cpp LINENO
1665# ----------------------
1666# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1667ac_fn_c_try_cpp ()
1668{
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670 if { { ac_try="$ac_cpp conftest.$ac_ext"
1671case "(($ac_try" in
1672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673 *) ac_try_echo=$ac_try;;
1674esac
1675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676$as_echo "$ac_try_echo"; } >&5
1677 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1678 ac_status=$?
1679 if test -s conftest.err; then
1680 grep -v '^ *+' conftest.err >conftest.er1
1681 cat conftest.er1 >&5
1682 mv -f conftest.er1 conftest.err
1683 fi
1684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001685 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001686 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1687 test ! -s conftest.err
1688 }; then :
1689 ac_retval=0
1690else
1691 $as_echo "$as_me: failed program was:" >&5
1692sed 's/^/| /' conftest.$ac_ext >&5
1693
1694 ac_retval=1
1695fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001697 as_fn_set_status $ac_retval
1698
1699} # ac_fn_c_try_cpp
1700
1701# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1702# -------------------------------------------------------
1703# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1704# the include files in INCLUDES and setting the cache variable VAR
1705# accordingly.
1706ac_fn_c_check_header_mongrel ()
1707{
1708 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001709 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1711$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001712if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001713 $as_echo_n "(cached) " >&6
1714fi
1715eval ac_res=\$$3
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1717$as_echo "$ac_res" >&6; }
1718else
1719 # Is the header compilable?
1720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1721$as_echo_n "checking $2 usability... " >&6; }
1722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1723/* end confdefs.h. */
1724$4
1725#include <$2>
1726_ACEOF
1727if ac_fn_c_try_compile "$LINENO"; then :
1728 ac_header_compiler=yes
1729else
1730 ac_header_compiler=no
1731fi
1732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1734$as_echo "$ac_header_compiler" >&6; }
1735
1736# Is the header present?
1737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1738$as_echo_n "checking $2 presence... " >&6; }
1739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741#include <$2>
1742_ACEOF
1743if ac_fn_c_try_cpp "$LINENO"; then :
1744 ac_header_preproc=yes
1745else
1746 ac_header_preproc=no
1747fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001748rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1750$as_echo "$ac_header_preproc" >&6; }
1751
1752# So? What about this header?
1753case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1754 yes:no: )
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1756$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1758$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1759 ;;
1760 no:yes:* )
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1762$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1764$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1766$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1768$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1770$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001771( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001772## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001773## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 ) | sed "s/^/$as_me: WARNING: /" >&2
1775 ;;
1776esac
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1778$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001779if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 $as_echo_n "(cached) " >&6
1781else
1782 eval "$3=\$ac_header_compiler"
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001788 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001789
1790} # ac_fn_c_check_header_mongrel
1791
1792# ac_fn_c_try_run LINENO
1793# ----------------------
1794# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1795# that executables *can* be run.
1796ac_fn_c_try_run ()
1797{
1798 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1799 if { { ac_try="$ac_link"
1800case "(($ac_try" in
1801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1802 *) ac_try_echo=$ac_try;;
1803esac
1804eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1805$as_echo "$ac_try_echo"; } >&5
1806 (eval "$ac_link") 2>&5
1807 ac_status=$?
1808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1809 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1810 { { case "(($ac_try" in
1811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812 *) ac_try_echo=$ac_try;;
1813esac
1814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1815$as_echo "$ac_try_echo"; } >&5
1816 (eval "$ac_try") 2>&5
1817 ac_status=$?
1818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1819 test $ac_status = 0; }; }; then :
1820 ac_retval=0
1821else
1822 $as_echo "$as_me: program exited with status $ac_status" >&5
1823 $as_echo "$as_me: failed program was:" >&5
1824sed 's/^/| /' conftest.$ac_ext >&5
1825
1826 ac_retval=$ac_status
1827fi
1828 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001829 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001830 as_fn_set_status $ac_retval
1831
1832} # ac_fn_c_try_run
1833
1834# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1835# -------------------------------------------------------
1836# Tests whether HEADER exists and can be compiled using the include files in
1837# INCLUDES, setting the cache variable VAR accordingly.
1838ac_fn_c_check_header_compile ()
1839{
1840 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1842$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001843if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001844 $as_echo_n "(cached) " >&6
1845else
1846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848$4
1849#include <$2>
1850_ACEOF
1851if ac_fn_c_try_compile "$LINENO"; then :
1852 eval "$3=yes"
1853else
1854 eval "$3=no"
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001862
1863} # ac_fn_c_check_header_compile
1864
Matthias Kloseb9621712010-04-24 17:59:49 +00001865# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1866# -------------------------------------------
1867# Tests whether TYPE exists after having included INCLUDES, setting cache
1868# variable VAR accordingly.
1869ac_fn_c_check_type ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001874if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=no"
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880$4
1881int
1882main ()
1883{
1884if (sizeof ($2))
1885 return 0;
1886 ;
1887 return 0;
1888}
1889_ACEOF
1890if ac_fn_c_try_compile "$LINENO"; then :
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894int
1895main ()
1896{
1897if (sizeof (($2)))
1898 return 0;
1899 ;
1900 return 0;
1901}
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"; then :
1904
1905else
1906 eval "$3=yes"
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909fi
1910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001915 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917} # ac_fn_c_check_type
1918
1919# ac_fn_c_find_uintX_t LINENO BITS VAR
1920# ------------------------------------
1921# Finds an unsigned integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_uintX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1927$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001928if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1935 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
1939int
1940main ()
1941{
1942static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001943test_array [0] = 0;
1944return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 case $ac_type in #(
1952 uint$2_t) :
1953 eval "$3=yes" ;; #(
1954 *) :
1955 eval "$3=\$ac_type" ;;
1956esac
1957fi
1958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001959 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001960
1961else
1962 break
1963fi
1964 done
1965fi
1966eval ac_res=\$$3
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1968$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001969 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001970
1971} # ac_fn_c_find_uintX_t
1972
1973# ac_fn_c_find_intX_t LINENO BITS VAR
1974# -----------------------------------
1975# Finds a signed integer type with width BITS, setting cache variable VAR
1976# accordingly.
1977ac_fn_c_find_intX_t ()
1978{
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1981$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001982if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001983 $as_echo_n "(cached) " >&6
1984else
1985 eval "$3=no"
1986 # Order is important - never check a type that is potentially smaller
1987 # than half of the expected target width.
1988 for ac_type in int$2_t 'int' 'long int' \
1989 'long long int' 'short int' 'signed char'; do
1990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991/* end confdefs.h. */
1992$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001993 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001994int
1995main ()
1996{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001997static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001998test_array [0] = 0;
1999return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002000
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002009 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002010int
2011main ()
2012{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002013static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002014 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002015test_array [0] = 0;
2016return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023
2024else
2025 case $ac_type in #(
2026 int$2_t) :
2027 eval "$3=yes" ;; #(
2028 *) :
2029 eval "$3=\$ac_type" ;;
2030esac
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002035 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002036
2037else
2038 break
2039fi
2040 done
2041fi
2042eval ac_res=\$$3
2043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2044$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002045 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047} # ac_fn_c_find_intX_t
2048
2049# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2050# --------------------------------------------
2051# Tries to find the compile-time value of EXPR in a program that includes
2052# INCLUDES, setting VAR accordingly. Returns whether the value could be
2053# computed
2054ac_fn_c_compute_int ()
2055{
2056 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2057 if test "$cross_compiling" = yes; then
2058 # Depending upon the size, compute the lo and hi bounds.
2059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=0 ac_mid=0
2075 while :; do
2076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002083test_array [0] = 0;
2084return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_hi=$ac_mid; break
2092else
2093 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2094 if test $ac_lo -le $ac_mid; then
2095 ac_lo= ac_hi=
2096 break
2097 fi
2098 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101 done
2102else
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002110test_array [0] = 0;
2111return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=-1 ac_mid=-1
2119 while :; do
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002127test_array [0] = 0;
2128return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002129
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_lo=$ac_mid; break
2136else
2137 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2138 if test $ac_mid -le $ac_hi; then
2139 ac_lo= ac_hi=
2140 break
2141 fi
2142 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 done
2146else
2147 ac_lo= ac_hi=
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152# Binary search between lo and hi bounds.
2153while test "x$ac_lo" != "x$ac_hi"; do
2154 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h. */
2157$4
2158int
2159main ()
2160{
2161static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002162test_array [0] = 0;
2163return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002164
2165 ;
2166 return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_compile "$LINENO"; then :
2170 ac_hi=$ac_mid
2171else
2172 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2173fi
2174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2175done
2176case $ac_lo in #((
2177?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2178'') ac_retval=1 ;;
2179esac
2180 else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183$4
2184static long int longval () { return $2; }
2185static unsigned long int ulongval () { return $2; }
2186#include <stdio.h>
2187#include <stdlib.h>
2188int
2189main ()
2190{
2191
2192 FILE *f = fopen ("conftest.val", "w");
2193 if (! f)
2194 return 1;
2195 if (($2) < 0)
2196 {
2197 long int i = longval ();
2198 if (i != ($2))
2199 return 1;
2200 fprintf (f, "%ld", i);
2201 }
2202 else
2203 {
2204 unsigned long int i = ulongval ();
2205 if (i != ($2))
2206 return 1;
2207 fprintf (f, "%lu", i);
2208 }
2209 /* Do not output a trailing newline, as this causes \r\n confusion
2210 on some platforms. */
2211 return ferror (f) || fclose (f) != 0;
2212
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_run "$LINENO"; then :
2218 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2219else
2220 ac_retval=1
2221fi
2222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2223 conftest.$ac_objext conftest.beam conftest.$ac_ext
2224rm -f conftest.val
2225
2226 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002227 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002228 as_fn_set_status $ac_retval
2229
2230} # ac_fn_c_compute_int
2231
2232# ac_fn_c_check_func LINENO FUNC VAR
2233# ----------------------------------
2234# Tests whether FUNC exists, setting the cache variable VAR accordingly
2235ac_fn_c_check_func ()
2236{
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2239$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002240if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002241 $as_echo_n "(cached) " >&6
2242else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2246 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2247#define $2 innocuous_$2
2248
2249/* System header to define __stub macros and hopefully few prototypes,
2250 which can conflict with char $2 (); below.
2251 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2252 <limits.h> exists even on freestanding compilers. */
2253
2254#ifdef __STDC__
2255# include <limits.h>
2256#else
2257# include <assert.h>
2258#endif
2259
2260#undef $2
2261
2262/* Override any GCC internal prototype to avoid an error.
2263 Use char because int might match the return type of a GCC
2264 builtin and then its argument prototype would still apply. */
2265#ifdef __cplusplus
2266extern "C"
2267#endif
2268char $2 ();
2269/* The GNU C library defines this for functions which it implements
2270 to always fail with ENOSYS. Some functions are actually named
2271 something starting with __ and the normal name is an alias. */
2272#if defined __stub_$2 || defined __stub___$2
2273choke me
2274#endif
2275
2276int
2277main ()
2278{
2279return $2 ();
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_link "$LINENO"; then :
2285 eval "$3=yes"
2286else
2287 eval "$3=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext \
2290 conftest$ac_exeext conftest.$ac_ext
2291fi
2292eval ac_res=\$$3
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002296
2297} # ac_fn_c_check_func
2298
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002299# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2300# ---------------------------------------------
2301# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2302# accordingly.
2303ac_fn_c_check_decl ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 as_decl_name=`echo $2|sed 's/ *(.*//'`
2307 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2309$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2310if eval \${$3+:} false; then :
2311 $as_echo_n "(cached) " >&6
2312else
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314/* end confdefs.h. */
2315$4
2316int
2317main ()
2318{
2319#ifndef $as_decl_name
2320#ifdef __cplusplus
2321 (void) $as_decl_use;
2322#else
2323 (void) $as_decl_name;
2324#endif
2325#endif
2326
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_compile "$LINENO"; then :
2332 eval "$3=yes"
2333else
2334 eval "$3=no"
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
2341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2342
2343} # ac_fn_c_check_decl
2344
Matthias Kloseb9621712010-04-24 17:59:49 +00002345# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2346# ----------------------------------------------------
2347# Tries to find if the field MEMBER exists in type AGGR, after including
2348# INCLUDES, setting cache variable VAR accordingly.
2349ac_fn_c_check_member ()
2350{
2351 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2353$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002354if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002355 $as_echo_n "(cached) " >&6
2356else
2357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358/* end confdefs.h. */
2359$5
2360int
2361main ()
2362{
2363static $2 ac_aggr;
2364if (ac_aggr.$3)
2365return 0;
2366 ;
2367 return 0;
2368}
2369_ACEOF
2370if ac_fn_c_try_compile "$LINENO"; then :
2371 eval "$4=yes"
2372else
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$5
2376int
2377main ()
2378{
2379static $2 ac_aggr;
2380if (sizeof ac_aggr.$3)
2381return 0;
2382 ;
2383 return 0;
2384}
2385_ACEOF
2386if ac_fn_c_try_compile "$LINENO"; then :
2387 eval "$4=yes"
2388else
2389 eval "$4=no"
2390fi
2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395eval ac_res=\$$4
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002399
2400} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002402This file contains any messages produced by compilers while
2403running configure, to aid debugging if configure makes a mistake.
2404
Georg Brandl08a90122012-09-29 09:34:13 +02002405It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002406generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
2408 $ $0 $@
2409
2410_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002412{
2413cat <<_ASUNAME
2414## --------- ##
2415## Platform. ##
2416## --------- ##
2417
2418hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2419uname -m = `(uname -m) 2>/dev/null || echo unknown`
2420uname -r = `(uname -r) 2>/dev/null || echo unknown`
2421uname -s = `(uname -s) 2>/dev/null || echo unknown`
2422uname -v = `(uname -v) 2>/dev/null || echo unknown`
2423
2424/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2425/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2426
2427/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2428/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2429/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002431/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2432/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2433/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2434
2435_ASUNAME
2436
2437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2438for as_dir in $PATH
2439do
2440 IFS=$as_save_IFS
2441 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002442 $as_echo "PATH: $as_dir"
2443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446} >&5
2447
2448cat >&5 <<_ACEOF
2449
2450
2451## ----------- ##
2452## Core tests. ##
2453## ----------- ##
2454
2455_ACEOF
2456
2457
2458# Keep a trace of the command line.
2459# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002461# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002462# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002463ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002464ac_configure_args0=
2465ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002466ac_must_keep_next=false
2467for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002468do
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 for ac_arg
2470 do
2471 case $ac_arg in
2472 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2473 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2474 | -silent | --silent | --silen | --sile | --sil)
2475 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 esac
2479 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002482 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002484 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002486 case $ac_arg in
2487 *=* | --config-cache | -C | -disable-* | --disable-* \
2488 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2489 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2490 | -with-* | --with-* | -without-* | --without-* | --x)
2491 case "$ac_configure_args0 " in
2492 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2493 esac
2494 ;;
2495 -* ) ac_must_keep_next=true ;;
2496 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 ;;
2500 esac
2501 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002502done
Matthias Kloseb9621712010-04-24 17:59:49 +00002503{ ac_configure_args0=; unset ac_configure_args0;}
2504{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506# When interrupted or exit'd, cleanup temporary files, and complete
2507# config.log. We remove comments because anyway the quotes in there
2508# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509# WARNING: Use '\'' to represent an apostrophe within the trap.
2510# 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 +00002511trap 'exit_status=$?
2512 # Save into config.log some information that might help in debugging.
2513 {
2514 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002515
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
2520 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521(
2522 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2523 eval ac_val=\$$ac_var
2524 case $ac_val in #(
2525 *${as_nl}*)
2526 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2528$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac
2530 case $ac_var in #(
2531 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2533 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 esac ;;
2535 esac
2536 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2539 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 "s/'\''/'\''\\\\'\'''\''/g;
2542 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2543 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002544 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002546 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 esac |
2548 sort
2549)
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002551
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002553## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002554## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 echo
2556 for ac_var in $ac_subst_vars
2557 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 eval ac_val=\$$ac_var
2559 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002562 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002563 done | sort
2564 echo
2565
2566 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002569## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 echo
2571 for ac_var in $ac_subst_files
2572 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 eval ac_val=\$$ac_var
2574 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002578 done | sort
2579 echo
2580 fi
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002583 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002584## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002585## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 echo
2589 fi
2590 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 $as_echo "$as_me: caught signal $ac_signal"
2592 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 rm -f core *.core core.conftest.* &&
2595 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002598for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002600done
2601ac_signal=0
2602
2603# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002605
Matthias Kloseb9621712010-04-24 17:59:49 +00002606$as_echo "/* confdefs.h */" > confdefs.h
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608# Predefined preprocessor variables.
2609
2610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_NAME "$PACKAGE_NAME"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2616_ACEOF
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_VERSION "$PACKAGE_VERSION"
2620_ACEOF
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_STRING "$PACKAGE_STRING"
2624_ACEOF
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2628_ACEOF
2629
Matthias Kloseb9621712010-04-24 17:59:49 +00002630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_URL "$PACKAGE_URL"
2632_ACEOF
2633
Martin v. Löwis11437992002-04-12 09:54:03 +00002634
2635# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002636# Prefer an explicitly selected file to automatically selected ones.
2637ac_site_file1=NONE
2638ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002640 # We do not want a PATH search for config.site.
2641 case $CONFIG_SITE in #((
2642 -*) ac_site_file1=./$CONFIG_SITE;;
2643 */*) ac_site_file1=$CONFIG_SITE;;
2644 *) ac_site_file1=./$CONFIG_SITE;;
2645 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 ac_site_file1=$prefix/share/config.site
2648 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002649else
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 ac_site_file1=$ac_default_prefix/share/config.site
2651 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002653for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654do
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 test "x$ac_site_file" = xNONE && continue
2656 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2658$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002660 . "$ac_site_file" \
2661 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002664See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665 fi
2666done
2667
2668if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 # Some versions of bash will fail to source /dev/null (special files
2670 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2671 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2673$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002675 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2676 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 esac
2678 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679else
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2681$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 >$cache_file
2683fi
2684
2685# Check that the precious variables saved in the cache have kept the same
2686# value.
2687ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2690 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2692 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 case $ac_old_set,$ac_new_set in
2694 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2696$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 +00002697 ac_cache_corrupted=: ;;
2698 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2700$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 ac_cache_corrupted=: ;;
2702 ,);;
2703 *)
2704 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 # differences in whitespace do not lead to failure.
2706 ac_old_val_w=`echo x $ac_old_val`
2707 ac_new_val_w=`echo x $ac_new_val`
2708 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2710$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2711 ac_cache_corrupted=:
2712 else
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2714$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2715 eval $ac_var=\$ac_old_val
2716 fi
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2718$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2720$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 fi;;
2722 esac
2723 # Pass precious variables to config.status.
2724 if test "$ac_new_set" = set; then
2725 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 *) ac_arg=$ac_var=$ac_new_val ;;
2728 esac
2729 case " $ac_configure_args " in
2730 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002731 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733 fi
2734done
2735if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002736 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2739$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002740 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002742## -------------------- ##
2743## Main body of script. ##
2744## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745
Guido van Rossum7f43da71994-08-01 12:15:30 +00002746ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2750ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002751
Guido van Rossum627b2d71993-12-24 10:39:16 +00002752
Michael W. Hudson54241132001-12-07 15:38:26 +00002753
Trent Nelson4d4ec652012-10-16 08:51:24 -04002754
Trent Nelson5595ab52012-10-17 04:47:31 -04002755if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002756 # If we're building out-of-tree, we need to make sure the following
2757 # resources get picked up before their $srcdir counterparts.
2758 # Objects/ -> typeslots.inc
2759 # Include/ -> Python-ast.h, graminit.h
2760 # Python/ -> importlib.h
2761 # (A side effect of this is that these resources will automatically be
2762 # regenerated when building out-of-tree, regardless of whether or not
2763 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2764 # off.)
2765 BASECPPFLAGS="-IObjects -IInclude -IPython"
2766else
2767 BASECPPFLAGS=""
2768fi
2769
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770
2771
2772
2773
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002774if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002775then
2776# Extract the first word of "hg", so it can be a program name with args.
2777set dummy hg; ac_word=$2
2778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2779$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002780if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002781 $as_echo_n "(cached) " >&6
2782else
2783 if test -n "$HAS_HG"; then
2784 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2785else
2786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2787for as_dir in $PATH
2788do
2789 IFS=$as_save_IFS
2790 test -z "$as_dir" && as_dir=.
2791 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002793 ac_cv_prog_HAS_HG="found"
2794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2795 break 2
2796 fi
2797done
2798 done
2799IFS=$as_save_IFS
2800
2801 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2802fi
2803fi
2804HAS_HG=$ac_cv_prog_HAS_HG
2805if test -n "$HAS_HG"; then
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2807$as_echo "$HAS_HG" >&6; }
2808else
2809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2810$as_echo "no" >&6; }
2811fi
2812
2813
2814else
2815HAS_HG=no-repository
2816fi
2817if test $HAS_HG = found
2818then
2819 HGVERSION="hg id -i \$(srcdir)"
2820 HGTAG="hg id -t \$(srcdir)"
2821 HGBRANCH="hg id -b \$(srcdir)"
2822else
2823 HGVERSION=""
2824 HGTAG=""
2825 HGBRANCH=""
2826fi
2827
2828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002830
2831
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002832ac_aux_dir=
2833for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2834 if test -f "$ac_dir/install-sh"; then
2835 ac_aux_dir=$ac_dir
2836 ac_install_sh="$ac_aux_dir/install-sh -c"
2837 break
2838 elif test -f "$ac_dir/install.sh"; then
2839 ac_aux_dir=$ac_dir
2840 ac_install_sh="$ac_aux_dir/install.sh -c"
2841 break
2842 elif test -f "$ac_dir/shtool"; then
2843 ac_aux_dir=$ac_dir
2844 ac_install_sh="$ac_aux_dir/shtool install -c"
2845 break
2846 fi
2847done
2848if test -z "$ac_aux_dir"; then
2849 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2850fi
2851
2852# These three variables are undocumented and unsupported,
2853# and are intended to be withdrawn in a future Autoconf release.
2854# They can cause serious problems if a builder's source tree is in a directory
2855# whose full name contains unusual characters.
2856ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2857ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2858ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2859
2860
2861# Make sure we can run config.sub.
2862$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2863 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2864
2865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2866$as_echo_n "checking build system type... " >&6; }
2867if ${ac_cv_build+:} false; then :
2868 $as_echo_n "(cached) " >&6
2869else
2870 ac_build_alias=$build_alias
2871test "x$ac_build_alias" = x &&
2872 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2873test "x$ac_build_alias" = x &&
2874 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2875ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2876 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2877
2878fi
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2880$as_echo "$ac_cv_build" >&6; }
2881case $ac_cv_build in
2882*-*-*) ;;
2883*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2884esac
2885build=$ac_cv_build
2886ac_save_IFS=$IFS; IFS='-'
2887set x $ac_cv_build
2888shift
2889build_cpu=$1
2890build_vendor=$2
2891shift; shift
2892# Remember, the first character of IFS is used to create $*,
2893# except with old shells:
2894build_os=$*
2895IFS=$ac_save_IFS
2896case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2897
2898
2899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2900$as_echo_n "checking host system type... " >&6; }
2901if ${ac_cv_host+:} false; then :
2902 $as_echo_n "(cached) " >&6
2903else
2904 if test "x$host_alias" = x; then
2905 ac_cv_host=$ac_cv_build
2906else
2907 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2908 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2909fi
2910
2911fi
2912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2913$as_echo "$ac_cv_host" >&6; }
2914case $ac_cv_host in
2915*-*-*) ;;
2916*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2917esac
2918host=$ac_cv_host
2919ac_save_IFS=$IFS; IFS='-'
2920set x $ac_cv_host
2921shift
2922host_cpu=$1
2923host_vendor=$2
2924shift; shift
2925# Remember, the first character of IFS is used to create $*,
2926# except with old shells:
2927host_os=$*
2928IFS=$ac_save_IFS
2929case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2930
2931
2932
doko@python.orga10e4a92013-01-25 18:45:12 +01002933
2934
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002935if test "$cross_compiling" = yes; then
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2937$as_echo_n "checking for python interpreter for cross build... " >&6; }
2938 if test -z "$PYTHON_FOR_BUILD"; then
2939 for interp in python$PACKAGE_VERSION python3 python; do
2940 which $interp >/dev/null 2>&1 || continue
2941 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2942 break
2943 fi
2944 interp=
2945 done
2946 if test x$interp = x; then
2947 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2948 fi
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2950$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002951 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 +02002952 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002953elif test "$cross_compiling" = maybe; then
2954 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002955else
2956 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2957fi
2958
2959
Martin v. Löwis11437992002-04-12 09:54:03 +00002960
Benjamin Petersond23f8222009-04-05 19:13:16 +00002961if test "$prefix" != "/"; then
2962 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2963fi
2964
2965
Martin v. Löwis11437992002-04-12 09:54:03 +00002966
2967
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002968# We don't use PACKAGE_ variables, and they cause conflicts
2969# with other autoconf-based packages that include Python.h
2970grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2971rm confdefs.h
2972mv confdefs.h.new confdefs.h
2973
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002974
Georg Brandl08a90122012-09-29 09:34:13 +02002975VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002976
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002977# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002978
2979SOVERSION=1.0
2980
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981# The later defininition of _XOPEN_SOURCE disables certain features
2982# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002985
2986
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2988# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2989# them.
2990
Matthias Kloseb9621712010-04-24 17:59:49 +00002991$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002992
2993
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002994# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2995# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2996# them.
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002999
3000
Martin v. Löwisd6320502004-08-12 13:45:08 +00003001# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3002# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003005
3006
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003007# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3008# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3009# them.
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003012
3013
3014
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003015define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003016
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003017# Arguments passed to configure.
3018
3019CONFIG_ARGS="$ac_configure_args"
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3022$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003023# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003024if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003025 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003026 case $enableval in
3027 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003028 # Locate the best usable SDK, see Mac/README.txt for more
3029 # information
3030 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3031 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003033 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3034 if test ! -d "${enableval}"
3035 then
3036 enableval=/
3037 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039 ;;
3040 esac
3041 case $enableval in
3042 no)
3043 UNIVERSALSDK=
3044 enable_universalsdk=
3045 ;;
3046 *)
3047 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048 if test ! -d "${UNIVERSALSDK}"
3049 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003050 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052 ;;
3053 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003054
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056else
3057
3058 UNIVERSALSDK=
3059 enable_universalsdk=
3060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003062
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063if test -n "${UNIVERSALSDK}"
3064then
Matthias Kloseb9621712010-04-24 17:59:49 +00003065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3066$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003067else
Matthias Kloseb9621712010-04-24 17:59:49 +00003068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3069$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003070fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003072
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003073
3074
Ned Deilycbfb9a52012-06-23 16:02:19 -07003075# For backward compatibility reasons we prefer to select '32-bit' if available,
3076# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003078if test "`uname -s`" = "Darwin"
3079then
3080 if test -n "${UNIVERSALSDK}"
3081 then
3082 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3083 then
3084 UNIVERSAL_ARCHS="intel"
3085 fi
3086 fi
3087fi
3088
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003089
Matthias Kloseb9621712010-04-24 17:59:49 +00003090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3091$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092
3093# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003094if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3097$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003098 UNIVERSAL_ARCHS="$withval"
3099
3100else
3101
Ned Deilycbfb9a52012-06-23 16:02:19 -07003102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3103$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003104
3105fi
3106
3107
3108
3109
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003110
3111# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003112if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003113 withval=$with_framework_name;
3114 PYTHONFRAMEWORK=${withval}
3115 PYTHONFRAMEWORKDIR=${withval}.framework
3116 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3117
3118else
3119
3120 PYTHONFRAMEWORK=Python
3121 PYTHONFRAMEWORKDIR=Python.framework
3122 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3123
3124fi
3125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003126# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003127if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003128 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003129 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003130 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003131 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003132 esac
3133 case $enableval in
3134 no)
3135 PYTHONFRAMEWORK=
3136 PYTHONFRAMEWORKDIR=no-framework
3137 PYTHONFRAMEWORKPREFIX=
3138 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003139 FRAMEWORKINSTALLFIRST=
3140 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 FRAMEWORKALTINSTALLFIRST=
3142 FRAMEWORKALTINSTALLLAST=
3143 if test "x${prefix}" = "xNONE"; then
3144 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3145 else
3146 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3147 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003149 ;;
3150 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003152 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003153 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003154 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003155 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3156 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003158
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 if test "x${prefix}" = "xNONE" ; then
3160 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003161
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 else
3163 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3164 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003165
3166 case "${enableval}" in
3167 /System*)
3168 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3169 if test "${prefix}" = "NONE" ; then
3170 # See below
3171 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3172 fi
3173 ;;
3174
3175 /Library*)
3176 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3177 ;;
3178
3179 */Library/Frameworks)
3180 MDIR="`dirname "${enableval}"`"
3181 MDIR="`dirname "${MDIR}"`"
3182 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3183
3184 if test "${prefix}" = "NONE"; then
3185 # User hasn't specified the
3186 # --prefix option, but wants to install
3187 # the framework in a non-default location,
3188 # ensure that the compatibility links get
3189 # installed relative to that prefix as well
3190 # instead of in /usr/local.
3191 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3192 fi
3193 ;;
3194
3195 *)
3196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3197 ;;
3198 esac
3199
Jack Jansen127e56e2001-09-11 14:41:54 +00003200 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003202 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003207
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003208 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3209
3210 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3211
Jack Jansene578a632001-08-15 01:27:14 +00003212 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Guido van Rossum563e7081996-09-10 18:20:48 +00003214else
Martin v. Löwis11437992002-04-12 09:54:03 +00003215
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003217 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003218 PYTHONFRAMEWORKPREFIX=
3219 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220 FRAMEWORKINSTALLFIRST=
3221 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222 FRAMEWORKALTINSTALLFIRST=
3223 FRAMEWORKALTINSTALLLAST=
3224 if test "x${prefix}" = "xNONE" ; then
3225 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3226 else
3227 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3228 fi
Jack Jansene578a632001-08-15 01:27:14 +00003229 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003230
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232fi
3233
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
3235
Michael W. Hudson54241132001-12-07 15:38:26 +00003236
3237
3238
3239
Jack Jansene578a632001-08-15 01:27:14 +00003240
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003241
3242
3243
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003244
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003245
Jack Jansene578a632001-08-15 01:27:14 +00003246##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003247## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003248## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003249##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250# Set name for machine-dependent library files
3251
Matthias Kloseb9621712010-04-24 17:59:49 +00003252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3253$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254if test -z "$MACHDEP"
3255then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 # avoid using uname for cross builds
3257 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003258 # ac_sys_system and ac_sys_release are used for setting
3259 # a lot of different things including 'define_xopen_source'
3260 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 case "$host" in
3262 *-*-linux*)
3263 ac_sys_system=Linux
3264 ;;
3265 *-*-cygwin*)
3266 ac_sys_system=Cygwin
3267 ;;
3268 *)
3269 # for now, limit cross builds to known configurations
3270 MACHDEP="unknown"
3271 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3272 esac
3273 ac_sys_release=
3274 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003276 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003277 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 fi
3283 ac_md_system=`echo $ac_sys_system |
3284 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3285 ac_md_release=`echo $ac_sys_release |
3286 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3287 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003288
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003290 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003291 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003292 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003293 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003294 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003296fi
Guido van Rossum91922671997-10-09 20:24:13 +00003297
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003298
3299if test "$cross_compiling" = yes; then
3300 case "$host" in
3301 *-*-linux*)
3302 case "$host_cpu" in
3303 arm*)
3304 _host_cpu=arm
3305 ;;
3306 *)
3307 _host_cpu=$host_cpu
3308 esac
3309 ;;
3310 *-*-cygwin*)
3311 _host_cpu=
3312 ;;
3313 *)
3314 # for now, limit cross builds to known configurations
3315 MACHDEP="unknown"
3316 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3317 esac
3318 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3319fi
3320
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003321# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3322# disable features if it is defined, without any means to access these
3323# features as extensions. For these systems, we skip the definition of
3324# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3325# some feature, make sure there is no alternative way to access this
3326# feature. Also, when using wildcards, make sure you have verified the
3327# need for not defining _XOPEN_SOURCE on all systems matching the
3328# wildcard, and that the wildcard does not include future systems
3329# (which may remove their limitations).
3330case $ac_sys_system/$ac_sys_release in
3331 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3332 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003333 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003334 # In addition, Stefan Krah confirms that issue #1244610 exists through
3335 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337 define_xopen_source=no
3338 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3339 # also defined. This can be overridden by defining _BSD_SOURCE
3340 # As this has a different meaning on Linux, only define it on OpenBSD
3341
Matthias Kloseb9621712010-04-24 17:59:49 +00003342$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003343
3344 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003346 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3347 # also defined. This can be overridden by defining _BSD_SOURCE
3348 # As this has a different meaning on Linux, only define it on OpenBSD
3349
Matthias Kloseb9621712010-04-24 17:59:49 +00003350$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003351
3352 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003353 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3354 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3355 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003356 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003357 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003358 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3359 # request to enable features supported by the standard as a request
3360 # to disable features not supported by the standard. The best way
3361 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3362 # entirely and define __EXTENSIONS__ instead.
3363 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003364 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003365 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3366 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003367 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003368 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003369 define_xopen_source=no;;
3370 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003371 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003374 # On FreeBSD 4, the math functions C89 does not cover are never defined
3375 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3376 FreeBSD/4.*)
3377 define_xopen_source=no;;
3378 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3379 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3380 # identifies itself as Darwin/7.*
3381 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3382 # disables platform specific features beyond repair.
3383 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3384 # has no effect, don't bother defining them
3385 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003386 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003387 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003388 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003389 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3390 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3391 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003392 AIX/4)
3393 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003394 AIX/5)
3395 if test `uname -r` -eq 1; then
3396 define_xopen_source=no
3397 fi
3398 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003399 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3400 # defining NI_NUMERICHOST.
3401 QNX/6.3.2)
3402 define_xopen_source=no
3403 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003404
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003405esac
3406
3407if test $define_xopen_source = yes
3408then
Victor Stinner14d098d2011-09-07 22:29:43 +02003409 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
Victor Stinner14d098d2011-09-07 22:29:43 +02003411$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003412
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
3414 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3415 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3416 # several APIs are not declared. Since this is also needed in some
3417 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Matthias Kloseb9621712010-04-24 17:59:49 +00003419$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
3421
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003422
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003423$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003424
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003425fi
3426
Guido van Rossum91922671997-10-09 20:24:13 +00003427#
3428# SGI compilers allow the specification of the both the ABI and the
3429# ISA on the command line. Depending on the values of these switches,
3430# different and often incompatable code will be generated.
3431#
3432# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3433# thus supply support for various ABI/ISA combinations. The MACHDEP
3434# variable is also adjusted.
3435#
3436
3437if test ! -z "$SGI_ABI"
3438then
3439 CC="cc $SGI_ABI"
3440 LDFLAGS="$SGI_ABI $LDFLAGS"
3441 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3444$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003445
Jack Jansen6b08a402004-06-03 12:41:45 +00003446# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3447# it may influence the way we can build extensions, so distutils
3448# needs to check it
3449
Thomas Wouters477c8d52006-05-27 19:21:47 +00003450
Jack Jansen6b08a402004-06-03 12:41:45 +00003451CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003452EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003453
Guido van Rossum627b2d71993-12-24 10:39:16 +00003454# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003455
3456# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3457# for debug/optimization stuff. BASECFLAGS is for flags that are required
3458# just to get things to compile and link. Users are free to override OPT
3459# when running configure or make. The build should not break if they do.
3460# BASECFLAGS should generally not be messed with, however.
3461
3462# XXX shouldn't some/most/all of this code be merged with the stuff later
3463# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3465$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003468if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003470 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003471 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003472 without_gcc=yes;;
3473 yes) CC=gcc
3474 without_gcc=no;;
3475 *) CC=$withval
3476 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003477 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003478else
Martin v. Löwis11437992002-04-12 09:54:03 +00003479
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003480 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003481 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003482 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003483 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003484 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485fi
3486
Matthias Kloseb9621712010-04-24 17:59:49 +00003487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3488$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003489
Guido van Rossum8b131c51995-03-09 14:10:13 +00003490# If the user switches compilers, we can't believe the cache
3491if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3492then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003493 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003494(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003495fi
3496
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003497# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3498# when the compiler supports them, but we don't always want -O2, and
3499# we set -g later.
3500if test -z "$CFLAGS"; then
3501 CFLAGS=
3502fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003503
3504if test "$ac_sys_system" = "Darwin"
3505then
3506 # Compiler selection on MacOSX is more complicated than
3507 # AC_PROG_CC can handle, see Mac/README.txt for more
3508 # information
3509 if test -z "${CC}"
3510 then
3511 found_gcc=
3512 found_clang=
3513 as_save_IFS=$IFS; IFS=:
3514 for as_dir in $PATH
3515 do
3516 IFS=$as_save_IFS
3517 if test -x $as_dir/gcc; then
3518 if test -z "${found_gcc}"; then
3519 found_gcc=$as_dir/gcc
3520 fi
3521 fi
3522 if test -x $as_dir/clang; then
3523 if test -z "${found_clang}"; then
3524 found_clang=$as_dir/clang
3525 fi
3526 fi
3527 done
3528 IFS=$as_save_IFS
3529
3530 if test -n "$found_gcc" -a -n "$found_clang"
3531 then
3532 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3533 then
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3535$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3536 CC="$found_clang"
3537 CXX="$found_clang++"
3538 fi
3539
3540
3541 elif test -z "$found_gcc" -a -n "$found_clang"
3542 then
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3544$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3545 CC="$found_clang"
3546 CXX="$found_clang++"
3547
3548 elif test -z "$found_gcc" -a -z "$found_clang"
3549 then
3550 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3551 if test -n "${found_clang}"
3552 then
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3554$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3555 CC="${found_clang}"
3556 CXX="`/usr/bin/xcrun -find clang++`"
3557
3558 # else: use default behaviour
3559 fi
3560 fi
3561 fi
3562fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003563ac_ext=c
3564ac_cpp='$CPP $CPPFLAGS'
3565ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3566ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3567ac_compiler_gnu=$ac_cv_c_compiler_gnu
3568if test -n "$ac_tool_prefix"; then
3569 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3570set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3572$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003573if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003575else
3576 if test -n "$CC"; then
3577 ac_cv_prog_CC="$CC" # Let the user override the test.
3578else
Martin v. Löwis11437992002-04-12 09:54:03 +00003579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3580for as_dir in $PATH
3581do
3582 IFS=$as_save_IFS
3583 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003585 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003587 $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 +00003588 break 2
3589 fi
3590done
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003593
Jack Jansendd19cf82001-12-06 22:36:17 +00003594fi
3595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003596CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003597if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3599$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003600else
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3602$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003603fi
3604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605
Martin v. Löwis11437992002-04-12 09:54:03 +00003606fi
3607if test -z "$ac_cv_prog_CC"; then
3608 ac_ct_CC=$CC
3609 # Extract the first word of "gcc", so it can be a program name with args.
3610set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003613if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003615else
3616 if test -n "$ac_ct_CC"; then
3617 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3618else
3619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $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 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
3634fi
3635fi
3636ac_ct_CC=$ac_cv_prog_ac_ct_CC
3637if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3639$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003640else
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 if test "x$ac_ct_CC" = x; then
3646 CC=""
3647 else
3648 case $cross_compiling:$ac_tool_warned in
3649yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652ac_tool_warned=yes ;;
3653esac
3654 CC=$ac_ct_CC
3655 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003656else
3657 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003658fi
3659
Jack Jansendd19cf82001-12-06 22:36:17 +00003660if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 if test -n "$ac_tool_prefix"; then
3662 # 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 +00003663set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3665$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003666if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003668else
3669 if test -n "$CC"; then
3670 ac_cv_prog_CC="$CC" # Let the user override the test.
3671else
Martin v. Löwis11437992002-04-12 09:54:03 +00003672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3673for as_dir in $PATH
3674do
3675 IFS=$as_save_IFS
3676 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 $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 +00003681 break 2
3682 fi
3683done
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003686
3687fi
3688fi
3689CC=$ac_cv_prog_CC
3690if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3692$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003693else
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3695$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003696fi
3697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003700fi
3701if test -z "$CC"; then
3702 # Extract the first word of "cc", so it can be a program name with args.
3703set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003706if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003708else
3709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3714for as_dir in $PATH
3715do
3716 IFS=$as_save_IFS
3717 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3721 ac_prog_rejected=yes
3722 continue
3723 fi
3724 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $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 +00003726 break 2
3727 fi
3728done
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003731
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732if test $ac_prog_rejected = yes; then
3733 # We found a bogon in the path, so make sure we never use it.
3734 set dummy $ac_cv_prog_CC
3735 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003737 # We chose a different compiler from the bogus one.
3738 # However, it has the same basename, so the bogon will be chosen
3739 # first if we set CC to just the basename; use the full file name.
3740 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003741 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742 fi
3743fi
3744fi
3745fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003746CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3749$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003750else
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3752$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753fi
3754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755
Martin v. Löwis11437992002-04-12 09:54:03 +00003756fi
3757if test -z "$CC"; then
3758 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 do
3761 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3762set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3764$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003765if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003767else
3768 if test -n "$CC"; then
3769 ac_cv_prog_CC="$CC" # Let the user override the test.
3770else
Martin v. Löwis11437992002-04-12 09:54:03 +00003771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3772for as_dir in $PATH
3773do
3774 IFS=$as_save_IFS
3775 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003778 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 $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 +00003780 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003781 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003782done
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003785
3786fi
3787fi
3788CC=$ac_cv_prog_CC
3789if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3791$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003792else
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3794$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003795fi
3796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 test -n "$CC" && break
3799 done
3800fi
3801if test -z "$CC"; then
3802 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003804do
3805 # Extract the first word of "$ac_prog", so it can be a program name with args.
3806set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3808$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003809if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003811else
3812 if test -n "$ac_ct_CC"; then
3813 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3814else
3815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3816for as_dir in $PATH
3817do
3818 IFS=$as_save_IFS
3819 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003821 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003822 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 $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 +00003824 break 2
3825 fi
3826done
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830fi
3831fi
3832ac_ct_CC=$ac_cv_prog_ac_ct_CC
3833if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3835$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003836else
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3838$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 test -n "$ac_ct_CC" && break
3843done
Michael W. Hudson54241132001-12-07 15:38:26 +00003844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845 if test "x$ac_ct_CC" = x; then
3846 CC=""
3847 else
3848 case $cross_compiling:$ac_tool_warned in
3849yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003850{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3851$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852ac_tool_warned=yes ;;
3853esac
3854 CC=$ac_ct_CC
3855 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003856fi
3857
3858fi
3859
3860
Matthias Kloseb9621712010-04-24 17:59:49 +00003861test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003863as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003864See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003865
3866# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003867$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3868set X $ac_compile
3869ac_compiler=$2
3870for ac_option in --version -v -V -qversion; do
3871 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872case "(($ac_try" in
3873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3874 *) ac_try_echo=$ac_try;;
3875esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3877$as_echo "$ac_try_echo"; } >&5
3878 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003879 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003880 if test -s conftest.err; then
3881 sed '10a\
3882... rest of stderr output deleted ...
3883 10q' conftest.err >conftest.er1
3884 cat conftest.er1 >&5
3885 fi
3886 rm -f conftest.er1 conftest.err
3887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3888 test $ac_status = 0; }
3889done
Martin v. Löwis11437992002-04-12 09:54:03 +00003890
Matthias Kloseb9621712010-04-24 17:59:49 +00003891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003892/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003893
Martin v. Löwis11437992002-04-12 09:54:03 +00003894int
3895main ()
3896{
3897
3898 ;
3899 return 0;
3900}
3901_ACEOF
3902ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003903ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003904# Try to create an executable without -o first, disregard a.out.
3905# It will help us diagnose broken compilers, and finding out an intuition
3906# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3908$as_echo_n "checking whether the C compiler works... " >&6; }
3909ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3910
3911# The possible output files:
3912ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914ac_rmfiles=
3915for ac_file in $ac_files
3916do
3917 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003918 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3920 esac
3921done
3922rm -f $ac_rmfiles
3923
Matthias Kloseb9621712010-04-24 17:59:49 +00003924if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925case "(($ac_try" in
3926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3927 *) ac_try_echo=$ac_try;;
3928esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003929eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3930$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003932 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3934 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3936# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3937# in a Makefile. We should not override ac_cv_exeext if it was cached,
3938# so that the user can short-circuit this test for compilers unknown to
3939# Autoconf.
3940for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003941do
3942 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003945 ;;
3946 [ab].out )
3947 # We found the default executable, but exeext='' is most
3948 # certainly right.
3949 break;;
3950 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 then :; else
3953 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3954 fi
3955 # We set ac_cv_exeext here because the later test for it is not
3956 # safe: cross compilers may not add the suffix if given an `-o'
3957 # argument, so we may need to know it at that point already.
3958 # Even if this section looks crufty: it has the advantage of
3959 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003960 break;;
3961 * )
3962 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 esac
3964done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965test "$ac_cv_exeext" = no && ac_cv_exeext=
3966
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003967else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 ac_file=''
3969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003970if test -z "$ac_file"; then :
3971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3972$as_echo "no" >&6; }
3973$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003974sed 's/^/| /' conftest.$ac_ext >&5
3975
Matthias Kloseb9621712010-04-24 17:59:49 +00003976{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003978as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003979See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003980else
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3982$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3985$as_echo_n "checking for C compiler default output file name... " >&6; }
3986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3987$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003988ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989
Matthias Kloseb9621712010-04-24 17:59:49 +00003990rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003991ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3993$as_echo_n "checking for suffix of executables... " >&6; }
3994if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995case "(($ac_try" in
3996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3997 *) ac_try_echo=$ac_try;;
3998esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4000$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004002 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004003 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4004 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004005 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4006# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4007# work properly (i.e., refer to `conftest.exe'), while it won't with
4008# `rm'.
4009for ac_file in conftest.exe conftest conftest.*; do
4010 test -f "$ac_file" || continue
4011 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004013 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4014 break;;
4015 * ) break;;
4016 esac
4017done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004018else
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004021as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004022See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024rm -f conftest conftest$ac_cv_exeext
4025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4026$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004027
4028rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004029EXEEXT=$ac_cv_exeext
4030ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4032/* end confdefs.h. */
4033#include <stdio.h>
4034int
4035main ()
4036{
4037FILE *f = fopen ("conftest.out", "w");
4038 return ferror (f) || fclose (f) != 0;
4039
4040 ;
4041 return 0;
4042}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004044ac_clean_files="$ac_clean_files conftest.out"
4045# Check that the compiler produces executables we can run. If not, either
4046# the compiler is broken, or we cross compile.
4047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4048$as_echo_n "checking whether we are cross compiling... " >&6; }
4049if test "$cross_compiling" != yes; then
4050 { { ac_try="$ac_link"
4051case "(($ac_try" in
4052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4053 *) ac_try_echo=$ac_try;;
4054esac
4055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4056$as_echo "$ac_try_echo"; } >&5
4057 (eval "$ac_link") 2>&5
4058 ac_status=$?
4059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4060 test $ac_status = 0; }
4061 if { ac_try='./conftest$ac_cv_exeext'
4062 { { case "(($ac_try" in
4063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4064 *) ac_try_echo=$ac_try;;
4065esac
4066eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4067$as_echo "$ac_try_echo"; } >&5
4068 (eval "$ac_try") 2>&5
4069 ac_status=$?
4070 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4071 test $ac_status = 0; }; }; then
4072 cross_compiling=no
4073 else
4074 if test "$cross_compiling" = maybe; then
4075 cross_compiling=yes
4076 else
4077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004079as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004080If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004081See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 fi
4083 fi
4084fi
4085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4086$as_echo "$cross_compiling" >&6; }
4087
4088rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4089ac_clean_files=$ac_clean_files_save
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4091$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004092if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 $as_echo_n "(cached) " >&6
4094else
4095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004096/* end confdefs.h. */
4097
4098int
4099main ()
4100{
4101
4102 ;
4103 return 0;
4104}
4105_ACEOF
4106rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004107if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004108case "(($ac_try" in
4109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4110 *) ac_try_echo=$ac_try;;
4111esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004112eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4113$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4117 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004118 for ac_file in conftest.o conftest.obj conftest.*; do
4119 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004122 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4123 break;;
4124 esac
4125done
4126else
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004128sed 's/^/| /' conftest.$ac_ext >&5
4129
Matthias Kloseb9621712010-04-24 17:59:49 +00004130{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004132as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004133See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004134fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004135rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4138$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004139OBJEXT=$ac_cv_objext
4140ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4142$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004143if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
Martin v. Löwis11437992002-04-12 09:54:03 +00004149int
4150main ()
4151{
4152#ifndef __GNUC__
4153 choke me
4154#endif
4155
4156 ;
4157 return 0;
4158}
4159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004161 ac_compiler_gnu=yes
4162else
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004166ac_cv_c_compiler_gnu=$ac_compiler_gnu
4167
4168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4170$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4171if test $ac_compiler_gnu = yes; then
4172 GCC=yes
4173else
4174 GCC=
4175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004176ac_test_CFLAGS=${CFLAGS+set}
4177ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4179$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004180if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004182else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183 ac_save_c_werror_flag=$ac_c_werror_flag
4184 ac_c_werror_flag=yes
4185 ac_cv_prog_cc_g=no
4186 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004189
Martin v. Löwis11437992002-04-12 09:54:03 +00004190int
4191main ()
4192{
4193
4194 ;
4195 return 0;
4196}
4197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004198if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004199 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200else
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 CFLAGS=""
4202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203/* end confdefs.h. */
4204
4205int
4206main ()
4207{
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214
Matthias Kloseb9621712010-04-24 17:59:49 +00004215else
4216 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219/* end confdefs.h. */
4220
4221int
4222main ()
4223{
4224
4225 ;
4226 return 0;
4227}
4228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004229if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4237 ac_c_werror_flag=$ac_save_c_werror_flag
4238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4240$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004241if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004242 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004243elif test $ac_cv_prog_cc_g = yes; then
4244 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004245 CFLAGS="-g -O2"
4246 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004247 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248 fi
4249else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250 if test "$GCC" = yes; then
4251 CFLAGS="-O2"
4252 else
4253 CFLAGS=
4254 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4257$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004258if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004259 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004260else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004262ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004264/* end confdefs.h. */
4265#include <stdarg.h>
4266#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004267struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004268/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4269struct buf { int x; };
4270FILE * (*rcsopen) (struct buf *, struct stat *, int);
4271static char *e (p, i)
4272 char **p;
4273 int i;
4274{
4275 return p[i];
4276}
4277static char *f (char * (*g) (char **, int), char **p, ...)
4278{
4279 char *s;
4280 va_list v;
4281 va_start (v,p);
4282 s = g (p, va_arg (v,int));
4283 va_end (v);
4284 return s;
4285}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004286
4287/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4288 function prototypes and stuff, but not '\xHH' hex character constants.
4289 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004291 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4292 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4297 inside strings and character constants. */
4298#define FOO(x) 'x'
4299int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4300
Skip Montanaro6dead952003-09-25 14:50:04 +00004301int test (int i, double x);
4302struct s1 {int (*f) (int a);};
4303struct s2 {int (*f) (double a);};
4304int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4305int argc;
4306char **argv;
4307int
4308main ()
4309{
4310return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4311 ;
4312 return 0;
4313}
4314_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4316 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004317do
4318 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322rm -f core conftest.err conftest.$ac_objext
4323 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004324done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004326CC=$ac_save_CC
4327
4328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329# AC_CACHE_VAL
4330case "x$ac_cv_prog_cc_c89" in
4331 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4333$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4336$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004337 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4340$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004341esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004342if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004343
Matthias Kloseb9621712010-04-24 17:59:49 +00004344fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004345
Martin v. Löwis11437992002-04-12 09:54:03 +00004346ac_ext=c
4347ac_cpp='$CPP $CPPFLAGS'
4348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4350ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004351
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004352
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004353
4354
Matthias Kloseb9621712010-04-24 17:59:49 +00004355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4356$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004359if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004361
4362 case $withval in
4363 no) with_cxx_main=no
4364 MAINCC='$(CC)';;
4365 yes) with_cxx_main=yes
4366 MAINCC='$(CXX)';;
4367 *) with_cxx_main=yes
4368 MAINCC=$withval
4369 if test -z "$CXX"
4370 then
4371 CXX=$withval
4372 fi;;
4373 esac
4374else
4375
4376 with_cxx_main=no
4377 MAINCC='$(CC)'
4378
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379fi
4380
Matthias Kloseb9621712010-04-24 17:59:49 +00004381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4382$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004383
4384preset_cxx="$CXX"
4385if test -z "$CXX"
4386then
4387 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004388 gcc) if test -n "$ac_tool_prefix"; then
4389 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4390set dummy ${ac_tool_prefix}g++; ac_word=$2
4391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4392$as_echo_n "checking for $ac_word... " >&6; }
4393if ${ac_cv_path_CXX+:} false; then :
4394 $as_echo_n "(cached) " >&6
4395else
4396 case $CXX in
4397 [\\/]* | ?:[\\/]*)
4398 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4399 ;;
4400 *)
4401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4402for as_dir in notfound
4403do
4404 IFS=$as_save_IFS
4405 test -z "$as_dir" && as_dir=.
4406 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004408 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4410 break 2
4411 fi
4412done
4413 done
4414IFS=$as_save_IFS
4415
4416 ;;
4417esac
4418fi
4419CXX=$ac_cv_path_CXX
4420if test -n "$CXX"; then
4421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4422$as_echo "$CXX" >&6; }
4423else
4424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4425$as_echo "no" >&6; }
4426fi
4427
4428
4429fi
4430if test -z "$ac_cv_path_CXX"; then
4431 ac_pt_CXX=$CXX
4432 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004433set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4435$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004436if ${ac_cv_path_ac_pt_CXX+:} false; then :
4437 $as_echo_n "(cached) " >&6
4438else
4439 case $ac_pt_CXX in
4440 [\\/]* | ?:[\\/]*)
4441 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4442 ;;
4443 *)
4444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4445for as_dir in notfound
4446do
4447 IFS=$as_save_IFS
4448 test -z "$as_dir" && as_dir=.
4449 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004450 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004451 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4452 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4453 break 2
4454 fi
4455done
4456 done
4457IFS=$as_save_IFS
4458
4459 ;;
4460esac
4461fi
4462ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4463if test -n "$ac_pt_CXX"; then
4464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4465$as_echo "$ac_pt_CXX" >&6; }
4466else
4467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4468$as_echo "no" >&6; }
4469fi
4470
4471 if test "x$ac_pt_CXX" = x; then
4472 CXX="g++"
4473 else
4474 case $cross_compiling:$ac_tool_warned in
4475yes:)
4476{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4477$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4478ac_tool_warned=yes ;;
4479esac
4480 CXX=$ac_pt_CXX
4481 fi
4482else
4483 CXX="$ac_cv_path_CXX"
4484fi
4485 ;;
4486 cc) if test -n "$ac_tool_prefix"; then
4487 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4488set dummy ${ac_tool_prefix}c++; ac_word=$2
4489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4490$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004491if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004492 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004493else
4494 case $CXX in
4495 [\\/]* | ?:[\\/]*)
4496 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4497 ;;
4498 *)
4499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500for as_dir in notfound
4501do
4502 IFS=$as_save_IFS
4503 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004504 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004505 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004506 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004507 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004508 break 2
4509 fi
4510done
Matthias Kloseb9621712010-04-24 17:59:49 +00004511 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004512IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004513
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004514 ;;
4515esac
4516fi
4517CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004518if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4520$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004521else
Matthias Kloseb9621712010-04-24 17:59:49 +00004522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4523$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004525
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004526
4527fi
4528if test -z "$ac_cv_path_CXX"; then
4529 ac_pt_CXX=$CXX
4530 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004531set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4533$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004534if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004535 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004536else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004537 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004538 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004539 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 +00004540 ;;
4541 *)
4542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4543for as_dir in notfound
4544do
4545 IFS=$as_save_IFS
4546 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004549 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004550 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004551 break 2
4552 fi
4553done
Matthias Kloseb9621712010-04-24 17:59:49 +00004554 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004555IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004556
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004557 ;;
4558esac
4559fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004560ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4561if test -n "$ac_pt_CXX"; then
4562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4563$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004564else
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4566$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004568
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004569 if test "x$ac_pt_CXX" = x; then
4570 CXX="c++"
4571 else
4572 case $cross_compiling:$ac_tool_warned in
4573yes:)
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4575$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4576ac_tool_warned=yes ;;
4577esac
4578 CXX=$ac_pt_CXX
4579 fi
4580else
4581 CXX="$ac_cv_path_CXX"
4582fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004583 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004584 clang|*/clang) if test -n "$ac_tool_prefix"; then
4585 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4586set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4588$as_echo_n "checking for $ac_word... " >&6; }
4589if ${ac_cv_path_CXX+:} false; then :
4590 $as_echo_n "(cached) " >&6
4591else
4592 case $CXX in
4593 [\\/]* | ?:[\\/]*)
4594 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4595 ;;
4596 *)
4597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4598for as_dir in notfound
4599do
4600 IFS=$as_save_IFS
4601 test -z "$as_dir" && as_dir=.
4602 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004603 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004604 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4606 break 2
4607 fi
4608done
4609 done
4610IFS=$as_save_IFS
4611
Ned Deilycbfb9a52012-06-23 16:02:19 -07004612 ;;
4613esac
4614fi
4615CXX=$ac_cv_path_CXX
4616if test -n "$CXX"; then
4617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4618$as_echo "$CXX" >&6; }
4619else
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4621$as_echo "no" >&6; }
4622fi
4623
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004624
4625fi
4626if test -z "$ac_cv_path_CXX"; then
4627 ac_pt_CXX=$CXX
4628 # Extract the first word of "clang++", so it can be a program name with args.
4629set dummy clang++; ac_word=$2
4630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4631$as_echo_n "checking for $ac_word... " >&6; }
4632if ${ac_cv_path_ac_pt_CXX+:} false; then :
4633 $as_echo_n "(cached) " >&6
4634else
4635 case $ac_pt_CXX in
4636 [\\/]* | ?:[\\/]*)
4637 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4638 ;;
4639 *)
4640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4641for as_dir in notfound
4642do
4643 IFS=$as_save_IFS
4644 test -z "$as_dir" && as_dir=.
4645 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004647 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4649 break 2
4650 fi
4651done
4652 done
4653IFS=$as_save_IFS
4654
4655 ;;
4656esac
4657fi
4658ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4659if test -n "$ac_pt_CXX"; then
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4661$as_echo "$ac_pt_CXX" >&6; }
4662else
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4664$as_echo "no" >&6; }
4665fi
4666
4667 if test "x$ac_pt_CXX" = x; then
4668 CXX="clang++"
4669 else
4670 case $cross_compiling:$ac_tool_warned in
4671yes:)
4672{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4674ac_tool_warned=yes ;;
4675esac
4676 CXX=$ac_pt_CXX
4677 fi
4678else
4679 CXX="$ac_cv_path_CXX"
4680fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004681 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004682 esac
4683 if test "$CXX" = "notfound"
4684 then
4685 CXX=""
4686 fi
4687fi
4688if test -z "$CXX"
4689then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004690 if test -n "$ac_tool_prefix"; then
4691 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4692 do
4693 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4694set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4696$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004697if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004698 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004699else
4700 if test -n "$CXX"; then
4701 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4702else
4703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4704for as_dir in $PATH
4705do
4706 IFS=$as_save_IFS
4707 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004708 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004709 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004710 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004712 break 2
4713 fi
4714done
Matthias Kloseb9621712010-04-24 17:59:49 +00004715 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004716IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004717
4718fi
4719fi
4720CXX=$ac_cv_prog_CXX
4721if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4723$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724else
Matthias Kloseb9621712010-04-24 17:59:49 +00004725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4726$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004727fi
4728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004729
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004730 test -n "$CXX" && break
4731 done
4732fi
4733if test -z "$CXX"; then
4734 ac_ct_CXX=$CXX
4735 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4736do
4737 # Extract the first word of "$ac_prog", so it can be a program name with args.
4738set dummy $ac_prog; ac_word=$2
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
4741if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4742 $as_echo_n "(cached) " >&6
4743else
4744 if test -n "$ac_ct_CXX"; then
4745 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4746else
4747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in $PATH
4749do
4750 IFS=$as_save_IFS
4751 test -z "$as_dir" && as_dir=.
4752 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754 ac_cv_prog_ac_ct_CXX="$ac_prog"
4755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756 break 2
4757 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004759 done
4760IFS=$as_save_IFS
4761
4762fi
4763fi
4764ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4765if test -n "$ac_ct_CXX"; then
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4767$as_echo "$ac_ct_CXX" >&6; }
4768else
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770$as_echo "no" >&6; }
4771fi
4772
4773
4774 test -n "$ac_ct_CXX" && break
4775done
4776
4777 if test "x$ac_ct_CXX" = x; then
4778 CXX="notfound"
4779 else
4780 case $cross_compiling:$ac_tool_warned in
4781yes:)
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4784ac_tool_warned=yes ;;
4785esac
4786 CXX=$ac_ct_CXX
4787 fi
4788fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789
4790 if test "$CXX" = "notfound"
4791 then
4792 CXX=""
4793 fi
4794fi
4795if test "$preset_cxx" != "$CXX"
4796then
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798
4799 By default, distutils will build C++ extension modules with \"$CXX\".
4800 If this is not intended, then set CXX on the configure command line.
4801 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004802$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803
4804 By default, distutils will build C++ extension modules with \"$CXX\".
4805 If this is not intended, then set CXX on the configure command line.
4806 " >&2;}
4807fi
4808
4809
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4811$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4812save_LDFLAGS="$LDFLAGS"
4813LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004814
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816/* end confdefs.h. */
4817
4818int
4819main ()
4820{
4821
4822 ;
4823 return 0;
4824}
4825_ACEOF
4826if ac_fn_c_try_link "$LINENO"; then :
4827 NO_AS_NEEDED="-Wl,--no-as-needed"
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4829$as_echo "yes" >&6; }
4830else
4831 NO_AS_NEEDED=""
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
4834fi
4835rm -f core conftest.err conftest.$ac_objext \
4836 conftest$ac_exeext conftest.$ac_ext
4837LDFLAGS="$save_LDFLAGS"
4838
4839
4840
4841# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004842ac_ext=c
4843ac_cpp='$CPP $CPPFLAGS'
4844ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4845ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4846ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4848$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004849# On Suns, sometimes $CPP names a directory.
4850if test -n "$CPP" && test -d "$CPP"; then
4851 CPP=
4852fi
4853if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004854 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004855 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004856else
Martin v. Löwis11437992002-04-12 09:54:03 +00004857 # Double quotes because CPP needs to be expanded
4858 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4859 do
4860 ac_preproc_ok=false
4861for ac_c_preproc_warn_flag in '' yes
4862do
4863 # Use a header file that comes with gcc, so configuring glibc
4864 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004865 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4866 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004867 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004868 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004870/* end confdefs.h. */
4871#ifdef __STDC__
4872# include <limits.h>
4873#else
4874# include <assert.h>
4875#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004876 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004878if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004879
Matthias Kloseb9621712010-04-24 17:59:49 +00004880else
Martin v. Löwis11437992002-04-12 09:54:03 +00004881 # Broken: fails on valid input.
4882continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004883fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004884rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004886 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004887 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004890#include <ac_nonexistent.h>
4891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004892if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004893 # Broken: success on invalid input.
4894continue
4895else
Martin v. Löwis11437992002-04-12 09:54:03 +00004896 # Passes both tests.
4897ac_preproc_ok=:
4898break
4899fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004900rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004901
4902done
4903# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004904rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004905if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004906 break
4907fi
4908
4909 done
4910 ac_cv_prog_CPP=$CPP
4911
4912fi
4913 CPP=$ac_cv_prog_CPP
4914else
4915 ac_cv_prog_CPP=$CPP
4916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4918$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004919ac_preproc_ok=false
4920for ac_c_preproc_warn_flag in '' yes
4921do
4922 # Use a header file that comes with gcc, so configuring glibc
4923 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004924 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4925 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 # On the NeXT, cc -E runs the code through the compiler's parser,
4927 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004929/* end confdefs.h. */
4930#ifdef __STDC__
4931# include <limits.h>
4932#else
4933# include <assert.h>
4934#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004935 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004937if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004938
Matthias Kloseb9621712010-04-24 17:59:49 +00004939else
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 # Broken: fails on valid input.
4941continue
4942fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004943rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004945 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004949#include <ac_nonexistent.h>
4950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004951if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004952 # Broken: success on invalid input.
4953continue
4954else
Martin v. Löwis11437992002-04-12 09:54:03 +00004955 # Passes both tests.
4956ac_preproc_ok=:
4957break
4958fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004959rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004960
4961done
4962# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004963rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004964if $ac_preproc_ok; then :
4965
Martin v. Löwis11437992002-04-12 09:54:03 +00004966else
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004969as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004970See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004971fi
4972
4973ac_ext=c
4974ac_cpp='$CPP $CPPFLAGS'
4975ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4976ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4977ac_compiler_gnu=$ac_cv_c_compiler_gnu
4978
4979
Matthias Kloseb9621712010-04-24 17:59:49 +00004980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4981$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004982if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004983 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004984else
Matthias Kloseb9621712010-04-24 17:59:49 +00004985 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004986 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 # Loop through the user's path and test for each of PROGNAME-LIST
4988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004989for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4990do
4991 IFS=$as_save_IFS
4992 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004993 for ac_prog in grep ggrep; do
4994 for ac_exec_ext in '' $ac_executable_extensions; do
4995 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004996 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004997# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998 # Check for GNU $ac_path_GREP
4999case `"$ac_path_GREP" --version 2>&1` in
5000*GNU*)
5001 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5002*)
5003 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005005 while :
5006 do
5007 cat "conftest.in" "conftest.in" >"conftest.tmp"
5008 mv "conftest.tmp" "conftest.in"
5009 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005010 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005011 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5012 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005013 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005014 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5015 # Best one so far, save it but keep looking for a better one
5016 ac_cv_path_GREP="$ac_path_GREP"
5017 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005018 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005019 # 10*(2^10) chars as input seems more than enough
5020 test $ac_count -gt 10 && break
5021 done
5022 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5023esac
5024
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 $ac_path_GREP_found && break 3
5026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005027 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005031 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005032 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005033else
5034 ac_cv_path_GREP=$GREP
5035fi
5036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5039$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005040 GREP="$ac_cv_path_GREP"
5041
5042
Matthias Kloseb9621712010-04-24 17:59:49 +00005043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5044$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005045if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005047else
5048 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5049 then ac_cv_path_EGREP="$GREP -E"
5050 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005052 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 # Loop through the user's path and test for each of PROGNAME-LIST
5054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5056do
5057 IFS=$as_save_IFS
5058 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005059 for ac_prog in egrep; do
5060 for ac_exec_ext in '' $ac_executable_extensions; do
5061 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005062 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005063# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064 # Check for GNU $ac_path_EGREP
5065case `"$ac_path_EGREP" --version 2>&1` in
5066*GNU*)
5067 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5068*)
5069 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071 while :
5072 do
5073 cat "conftest.in" "conftest.in" >"conftest.tmp"
5074 mv "conftest.tmp" "conftest.in"
5075 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5078 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5081 # Best one so far, save it but keep looking for a better one
5082 ac_cv_path_EGREP="$ac_path_EGREP"
5083 ac_path_EGREP_max=$ac_count
5084 fi
5085 # 10*(2^10) chars as input seems more than enough
5086 test $ac_count -gt 10 && break
5087 done
5088 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5089esac
5090
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 $ac_path_EGREP_found && break 3
5092 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005093 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005097 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 +00005098 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005099else
5100 ac_cv_path_EGREP=$EGREP
5101fi
5102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005103 fi
5104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5106$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005108
5109
Matthias Kloseb9621712010-04-24 17:59:49 +00005110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5111$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005112if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 $as_echo_n "(cached) " >&6
5114else
5115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005116/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005117#include <stdlib.h>
5118#include <stdarg.h>
5119#include <string.h>
5120#include <float.h>
5121
5122int
5123main ()
5124{
5125
5126 ;
5127 return 0;
5128}
5129_ACEOF
5130if ac_fn_c_try_compile "$LINENO"; then :
5131 ac_cv_header_stdc=yes
5132else
5133 ac_cv_header_stdc=no
5134fi
5135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5136
5137if test $ac_cv_header_stdc = yes; then
5138 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5140/* end confdefs.h. */
5141#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005142
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005143_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005145 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005146
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005147else
Matthias Kloseb9621712010-04-24 17:59:49 +00005148 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005149fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005150rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151
Matthias Kloseb9621712010-04-24 17:59:49 +00005152fi
5153
5154if test $ac_cv_header_stdc = yes; then
5155 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5157/* end confdefs.h. */
5158#include <stdlib.h>
5159
5160_ACEOF
5161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5162 $EGREP "free" >/dev/null 2>&1; then :
5163
5164else
5165 ac_cv_header_stdc=no
5166fi
5167rm -f conftest*
5168
5169fi
5170
5171if test $ac_cv_header_stdc = yes; then
5172 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5173 if test "$cross_compiling" = yes; then :
5174 :
5175else
5176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5177/* end confdefs.h. */
5178#include <ctype.h>
5179#include <stdlib.h>
5180#if ((' ' & 0x0FF) == 0x020)
5181# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5182# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5183#else
5184# define ISLOWER(c) \
5185 (('a' <= (c) && (c) <= 'i') \
5186 || ('j' <= (c) && (c) <= 'r') \
5187 || ('s' <= (c) && (c) <= 'z'))
5188# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5189#endif
5190
5191#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5192int
5193main ()
5194{
5195 int i;
5196 for (i = 0; i < 256; i++)
5197 if (XOR (islower (i), ISLOWER (i))
5198 || toupper (i) != TOUPPER (i))
5199 return 2;
5200 return 0;
5201}
5202_ACEOF
5203if ac_fn_c_try_run "$LINENO"; then :
5204
5205else
5206 ac_cv_header_stdc=no
5207fi
5208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5209 conftest.$ac_objext conftest.beam conftest.$ac_ext
5210fi
5211
5212fi
5213fi
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5215$as_echo "$ac_cv_header_stdc" >&6; }
5216if test $ac_cv_header_stdc = yes; then
5217
5218$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5219
5220fi
5221
5222# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5223for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5224 inttypes.h stdint.h unistd.h
5225do :
5226 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5227ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5228"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005229if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005230 cat >>confdefs.h <<_ACEOF
5231#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5232_ACEOF
5233
5234fi
5235
5236done
5237
5238
5239
5240 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 +02005241if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005242 MINIX=yes
5243else
5244 MINIX=
5245fi
5246
5247
5248 if test "$MINIX" = yes; then
5249
5250$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5251
5252
5253$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5254
5255
5256$as_echo "#define _MINIX 1" >>confdefs.h
5257
5258 fi
5259
5260
5261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5262$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005263if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005264 $as_echo_n "(cached) " >&6
5265else
5266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5267/* end confdefs.h. */
5268
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005269# define __EXTENSIONS__ 1
5270 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005271int
5272main ()
5273{
5274
5275 ;
5276 return 0;
5277}
5278_ACEOF
5279if ac_fn_c_try_compile "$LINENO"; then :
5280 ac_cv_safe_to_define___extensions__=yes
5281else
5282 ac_cv_safe_to_define___extensions__=no
5283fi
5284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5285fi
5286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5287$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5288 test $ac_cv_safe_to_define___extensions__ = yes &&
5289 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5290
5291 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5292
5293 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5294
5295 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5296
5297 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5298
5299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301# Check for unsupported systems
5302case $ac_sys_system/$ac_sys_release in
5303atheos*|Linux*/1*)
5304 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5305 echo See README for details.
5306 exit 1;;
5307esac
5308
5309
Matthias Kloseb9621712010-04-24 17:59:49 +00005310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5311$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312
5313# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005314if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315 withval=$with_suffix;
5316 case $withval in
5317 no) EXEEXT=;;
5318 yes) EXEEXT=.exe;;
5319 *) EXEEXT=$withval;;
5320 esac
5321fi
5322
Matthias Kloseb9621712010-04-24 17:59:49 +00005323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5324$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325
5326# Test whether we're running on a non-case-sensitive system, in which
5327# case we give a warning if no ext is given
5328
Matthias Kloseb9621712010-04-24 17:59:49 +00005329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5330$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331if test ! -d CaseSensitiveTestDir; then
5332mkdir CaseSensitiveTestDir
5333fi
5334
5335if test -d casesensitivetestdir
5336then
Matthias Kloseb9621712010-04-24 17:59:49 +00005337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5338$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339 BUILDEXEEXT=.exe
5340else
Matthias Kloseb9621712010-04-24 17:59:49 +00005341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343 BUILDEXEEXT=$EXEEXT
5344fi
5345rmdir CaseSensitiveTestDir
5346
5347case $MACHDEP in
5348bsdos*)
5349 case $CC in
5350 gcc) CC="$CC -D_HAVE_BSDI";;
5351 esac;;
5352esac
5353
5354case $ac_sys_system in
5355hp*|HP*)
5356 case $CC in
5357 cc|*/cc) CC="$CC -Ae";;
5358 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359esac
5360
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005361MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5362
5363
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365
Matthias Kloseb9621712010-04-24 17:59:49 +00005366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5367$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368if test -z "$LIBRARY"
5369then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005370 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5373$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005374
5375# LDLIBRARY is the name of the library to link against (as opposed to the
5376# name of the library into which to insert object files). BLDLIBRARY is also
5377# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5378# is blank as the main program is not linked directly against LDLIBRARY.
5379# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5380# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5381# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5382# DLLLIBRARY is the shared (i.e., DLL) library.
5383#
5384# RUNSHARED is used to run shared python without installed libraries
5385#
5386# INSTSONAME is the name of the shared library that will be use to install
5387# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005388#
5389# LDVERSION is the shared library version number, normally the Python version
5390# with the ABI build flags appended.
5391
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392
5393
5394
5395
5396
5397
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399LDLIBRARY="$LIBRARY"
5400BLDLIBRARY='$(LDLIBRARY)'
5401INSTSONAME='$(LDLIBRARY)'
5402DLLLIBRARY=''
5403LDLIBRARYDIR=''
5404RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005405LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406
5407# LINKCC is the command that links the python executable -- default is $(CC).
5408# If CXX is set, and if it is needed to link a main function that was
5409# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5410# python might then depend on the C++ runtime
5411# This is altered for AIX in order to build the export list before
5412# linking.
5413
Matthias Kloseb9621712010-04-24 17:59:49 +00005414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5415$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005416if test -z "$LINKCC"
5417then
5418 LINKCC='$(PURIFY) $(MAINCC)'
5419 case $ac_sys_system in
5420 AIX*)
5421 exp_extra="\"\""
5422 if test $ac_sys_release -ge 5 -o \
5423 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5424 exp_extra="."
5425 fi
5426 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427 QNX*)
5428 # qcc must be used because the other compilers do not
5429 # support -N.
5430 LINKCC=qcc;;
5431 esac
5432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5434$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005435
5436# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5437# make sure we default having it set to "no": this is used by
5438# distutils.unixccompiler to know if it should add --enable-new-dtags
5439# to linker command lines, and failing to detect GNU ld simply results
5440# in the same bahaviour as before.
5441
Matthias Kloseb9621712010-04-24 17:59:49 +00005442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5443$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444ac_prog=ld
5445if test "$GCC" = yes; then
5446 ac_prog=`$CC -print-prog-name=ld`
5447fi
5448case `"$ac_prog" -V 2>&1 < /dev/null` in
5449 *GNU*)
5450 GNULD=yes;;
5451 *)
5452 GNULD=no;;
5453esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5455$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5458$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005459if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005460 $as_echo_n "(cached) " >&6
5461else
5462 ac_cv_c_inline=no
5463for ac_kw in inline __inline__ __inline; do
5464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5465/* end confdefs.h. */
5466#ifndef __cplusplus
5467typedef int foo_t;
5468static $ac_kw foo_t static_foo () {return 0; }
5469$ac_kw foo_t foo () {return 0; }
5470#endif
5471
5472_ACEOF
5473if ac_fn_c_try_compile "$LINENO"; then :
5474 ac_cv_c_inline=$ac_kw
5475fi
5476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5477 test "$ac_cv_c_inline" != no && break
5478done
5479
5480fi
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5482$as_echo "$ac_cv_c_inline" >&6; }
5483
5484case $ac_cv_c_inline in
5485 inline | yes) ;;
5486 *)
5487 case $ac_cv_c_inline in
5488 no) ac_val=;;
5489 *) ac_val=$ac_cv_c_inline;;
5490 esac
5491 cat >>confdefs.h <<_ACEOF
5492#ifndef __cplusplus
5493#define inline $ac_val
5494#endif
5495_ACEOF
5496 ;;
5497esac
5498
5499if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005500
5501$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005502
5503
5504fi
5505
5506
Matthias Kloseb9621712010-04-24 17:59:49 +00005507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5508$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005510if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511 enableval=$enable_shared;
5512fi
5513
5514
5515if test -z "$enable_shared"
5516then
5517 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005518 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005519 enable_shared="yes";;
5520 *)
5521 enable_shared="no";;
5522 esac
5523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5525$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526
Matthias Kloseb9621712010-04-24 17:59:49 +00005527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5528$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005530if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005531 enableval=$enable_profiling;
5532fi
5533
5534if test "x$enable_profiling" = xyes; then
5535 ac_save_cc="$CC"
5536 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538/* end confdefs.h. */
5539int main() { return 0; }
5540_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005541if ac_fn_c_try_link "$LINENO"; then :
5542
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005544 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005546rm -f core conftest.err conftest.$ac_objext \
5547 conftest$ac_exeext conftest.$ac_ext
5548 CC="$ac_save_cc"
5549else
5550 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5553$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554
doko@ubuntu.comba015832012-06-30 16:52:05 +02005555if test "x$enable_profiling" = xyes; then
5556 BASECFLAGS="-pg $BASECFLAGS"
5557 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558fi
5559
Matthias Kloseb9621712010-04-24 17:59:49 +00005560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5561$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562
5563# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5564# library that we build, but we do not want to link against it (we
5565# will find it with a -framework option). For this reason there is an
5566# extra variable BLDLIBRARY against which Python and the extension
5567# modules are linked, BLDLIBRARY. This is normally the same as
5568# LDLIBRARY, but empty for MacOSX framework builds.
5569if test "$enable_framework"
5570then
5571 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5572 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5573 BLDLIBRARY=''
5574else
5575 BLDLIBRARY='$(LDLIBRARY)'
5576fi
5577
5578# Other platforms follow
5579if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005580 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581
Matthias Kloseb9621712010-04-24 17:59:49 +00005582$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583
5584 case $ac_sys_system in
5585 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005586 LDLIBRARY='libpython$(LDVERSION).dll.a'
5587 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588 ;;
5589 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005590 LDLIBRARY='libpython$(LDVERSION).so'
5591 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5593 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005594 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005595 then
5596 PY3LIBRARY=libpython3.so
5597 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005599 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005600 LDLIBRARY='libpython$(LDVERSION).so'
5601 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5603 case $ac_sys_system in
5604 FreeBSD*)
5605 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5606 ;;
5607 esac
5608 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005609 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005610 then
5611 PY3LIBRARY=libpython3.so
5612 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 ;;
5614 hp*|HP*)
5615 case `uname -m` in
5616 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005617 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 ;;
5619 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005620 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621 ;;
5622 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005623 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5625 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005627 LDLIBRARY='libpython$(LDVERSION).dylib'
5628 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5630 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005631 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005632 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005633 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5634 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
5636 esac
5637else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005638 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639 case $ac_sys_system in
5640 CYGWIN*)
5641 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005642 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 ;;
5644 esac
5645fi
5646
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005647if test "$cross_compiling" = yes; then
5648 RUNSHARED=
5649fi
5650
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5652$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
5654if test -n "$ac_tool_prefix"; then
5655 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5656set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005659if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005660 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661else
5662 if test -n "$RANLIB"; then
5663 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5664else
5665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5666for as_dir in $PATH
5667do
5668 IFS=$as_save_IFS
5669 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005670 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 break 2
5675 fi
5676done
Matthias Kloseb9621712010-04-24 17:59:49 +00005677 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678IFS=$as_save_IFS
5679
5680fi
5681fi
5682RANLIB=$ac_cv_prog_RANLIB
5683if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5685$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686else
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5688$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689fi
5690
5691
5692fi
5693if test -z "$ac_cv_prog_RANLIB"; then
5694 ac_ct_RANLIB=$RANLIB
5695 # Extract the first word of "ranlib", so it can be a program name with args.
5696set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005699if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701else
5702 if test -n "$ac_ct_RANLIB"; then
5703 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5704else
5705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5706for as_dir in $PATH
5707do
5708 IFS=$as_save_IFS
5709 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714 break 2
5715 fi
5716done
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718IFS=$as_save_IFS
5719
5720fi
5721fi
5722ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5723if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5725$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
5730
5731 if test "x$ac_ct_RANLIB" = x; then
5732 RANLIB=":"
5733 else
5734 case $cross_compiling:$ac_tool_warned in
5735yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738ac_tool_warned=yes ;;
5739esac
5740 RANLIB=$ac_ct_RANLIB
5741 fi
5742else
5743 RANLIB="$ac_cv_prog_RANLIB"
5744fi
5745
5746
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005747if test -n "$ac_tool_prefix"; then
5748 for ac_prog in ar aal
5749 do
5750 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5751set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5753$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005754if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005755 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756else
5757 if test -n "$AR"; then
5758 ac_cv_prog_AR="$AR" # Let the user override the test.
5759else
5760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5761for as_dir in $PATH
5762do
5763 IFS=$as_save_IFS
5764 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005765 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005767 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769 break 2
5770 fi
5771done
Matthias Kloseb9621712010-04-24 17:59:49 +00005772 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773IFS=$as_save_IFS
5774
5775fi
5776fi
5777AR=$ac_cv_prog_AR
5778if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5780$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781else
Matthias Kloseb9621712010-04-24 17:59:49 +00005782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5783$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784fi
5785
5786
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005787 test -n "$AR" && break
5788 done
5789fi
5790if test -z "$AR"; then
5791 ac_ct_AR=$AR
5792 for ac_prog in ar aal
5793do
5794 # Extract the first word of "$ac_prog", so it can be a program name with args.
5795set dummy $ac_prog; ac_word=$2
5796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5797$as_echo_n "checking for $ac_word... " >&6; }
5798if ${ac_cv_prog_ac_ct_AR+:} false; then :
5799 $as_echo_n "(cached) " >&6
5800else
5801 if test -n "$ac_ct_AR"; then
5802 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5803else
5804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5805for as_dir in $PATH
5806do
5807 IFS=$as_save_IFS
5808 test -z "$as_dir" && as_dir=.
5809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005811 ac_cv_prog_ac_ct_AR="$ac_prog"
5812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5813 break 2
5814 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005816 done
5817IFS=$as_save_IFS
5818
5819fi
5820fi
5821ac_ct_AR=$ac_cv_prog_ac_ct_AR
5822if test -n "$ac_ct_AR"; then
5823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5824$as_echo "$ac_ct_AR" >&6; }
5825else
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827$as_echo "no" >&6; }
5828fi
5829
5830
5831 test -n "$ac_ct_AR" && break
5832done
5833
5834 if test "x$ac_ct_AR" = x; then
5835 AR="ar"
5836 else
5837 case $cross_compiling:$ac_tool_warned in
5838yes:)
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5840$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5841ac_tool_warned=yes ;;
5842esac
5843 AR=$ac_ct_AR
5844 fi
5845fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
5847
5848# tweak ARFLAGS only if the user didn't set it on the command line
5849
5850if test -z "$ARFLAGS"
5851then
5852 ARFLAGS="rc"
5853fi
5854
doko@ubuntu.com58844492012-06-30 18:25:32 +02005855if test -n "$ac_tool_prefix"; then
5856 for ac_prog in readelf
5857 do
5858 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5859set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861$as_echo_n "checking for $ac_word... " >&6; }
5862if ${ac_cv_prog_READELF+:} false; then :
5863 $as_echo_n "(cached) " >&6
5864else
5865 if test -n "$READELF"; then
5866 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5867else
5868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5869for as_dir in $PATH
5870do
5871 IFS=$as_save_IFS
5872 test -z "$as_dir" && as_dir=.
5873 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005875 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5877 break 2
5878 fi
5879done
5880 done
5881IFS=$as_save_IFS
5882
5883fi
5884fi
5885READELF=$ac_cv_prog_READELF
5886if test -n "$READELF"; then
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5888$as_echo "$READELF" >&6; }
5889else
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5891$as_echo "no" >&6; }
5892fi
5893
5894
5895 test -n "$READELF" && break
5896 done
5897fi
5898if test -z "$READELF"; then
5899 ac_ct_READELF=$READELF
5900 for ac_prog in readelf
5901do
5902 # Extract the first word of "$ac_prog", so it can be a program name with args.
5903set dummy $ac_prog; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5907 $as_echo_n "(cached) " >&6
5908else
5909 if test -n "$ac_ct_READELF"; then
5910 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5911else
5912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913for as_dir in $PATH
5914do
5915 IFS=$as_save_IFS
5916 test -z "$as_dir" && as_dir=.
5917 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005919 ac_cv_prog_ac_ct_READELF="$ac_prog"
5920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5921 break 2
5922 fi
5923done
5924 done
5925IFS=$as_save_IFS
5926
5927fi
5928fi
5929ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5930if test -n "$ac_ct_READELF"; then
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5932$as_echo "$ac_ct_READELF" >&6; }
5933else
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5935$as_echo "no" >&6; }
5936fi
5937
5938
5939 test -n "$ac_ct_READELF" && break
5940done
5941
5942 if test "x$ac_ct_READELF" = x; then
5943 READELF=":"
5944 else
5945 case $cross_compiling:$ac_tool_warned in
5946yes:)
5947{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5948$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5949ac_tool_warned=yes ;;
5950esac
5951 READELF=$ac_ct_READELF
5952 fi
5953fi
5954
5955if test "$cross_compiling" = yes; then
5956 case "$READELF" in
5957 readelf|:)
5958 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5959 ;;
5960 esac
5961fi
5962
5963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964
Matthias Klosec4c48422012-10-21 23:05:35 +02005965for ac_prog in python$PACKAGE_VERSION python3 python
5966do
5967 # Extract the first word of "$ac_prog", so it can be a program name with args.
5968set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005971if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005972 $as_echo_n "(cached) " >&6
5973else
Matthias Klosec4c48422012-10-21 23:05:35 +02005974 if test -n "$PYTHON"; then
5975 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005976else
5977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5978for as_dir in $PATH
5979do
5980 IFS=$as_save_IFS
5981 test -z "$as_dir" && as_dir=.
5982 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005984 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5986 break 2
5987 fi
5988done
5989 done
5990IFS=$as_save_IFS
5991
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005992fi
5993fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005994PYTHON=$ac_cv_prog_PYTHON
5995if test -n "$PYTHON"; then
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5997$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005998else
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000$as_echo "no" >&6; }
6001fi
6002
6003
Matthias Klosec4c48422012-10-21 23:05:35 +02006004 test -n "$PYTHON" && break
6005done
6006test -n "$PYTHON" || PYTHON="not-found"
6007
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006008if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006009 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6010else
6011 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006012fi
6013
6014
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015case $MACHDEP in
6016bsdos*|hp*|HP*)
6017 # install -d does not work on BSDI or HP-UX
6018 if test -z "$INSTALL"
6019 then
6020 INSTALL="${srcdir}/install-sh -c"
6021 fi
6022esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023# Find a good install program. We prefer a C program (faster),
6024# so one script is as good as another. But avoid the broken or
6025# incompatible versions:
6026# SysV /etc/install, /usr/sbin/install
6027# SunOS /usr/etc/install
6028# IRIX /sbin/install
6029# AIX /bin/install
6030# AmigaOS /C/install, which installs bootblocks on floppy discs
6031# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6032# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6033# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6034# OS/2's system install, which has a completely different semantic
6035# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006036# Reject install programs that cannot install multiple files.
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6038$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006040if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042else
6043 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6044for as_dir in $PATH
6045do
6046 IFS=$as_save_IFS
6047 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006048 # Account for people who put trailing slashes in PATH elements.
6049case $as_dir/ in #((
6050 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053 /usr/ucb/* ) ;;
6054 *)
6055 # OSF1 and SCO ODT 3.0 have their own names for install.
6056 # Don't use installbsd from OSF since it installs stuff as root
6057 # by default.
6058 for ac_prog in ginstall scoinst install; do
6059 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006060 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061 if test $ac_prog = install &&
6062 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6063 # AIX install. It has an incompatible calling convention.
6064 :
6065 elif test $ac_prog = install &&
6066 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6067 # program-specific install script used by HP pwplus--don't use.
6068 :
6069 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006070 rm -rf conftest.one conftest.two conftest.dir
6071 echo one > conftest.one
6072 echo two > conftest.two
6073 mkdir conftest.dir
6074 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6075 test -s conftest.one && test -s conftest.two &&
6076 test -s conftest.dir/conftest.one &&
6077 test -s conftest.dir/conftest.two
6078 then
6079 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6080 break 3
6081 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082 fi
6083 fi
6084 done
6085 done
6086 ;;
6087esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006088
6089 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090IFS=$as_save_IFS
6091
Matthias Kloseb9621712010-04-24 17:59:49 +00006092rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093
6094fi
6095 if test "${ac_cv_path_install+set}" = set; then
6096 INSTALL=$ac_cv_path_install
6097 else
6098 # As a last resort, use the slow shell script. Don't cache a
6099 # value for INSTALL within a source directory, because that will
6100 # break other packages using the cache if that directory is
6101 # removed, or if the value is a relative name.
6102 INSTALL=$ac_install_sh
6103 fi
6104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6106$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107
6108# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6109# It thinks the first close brace ends the variable substitution.
6110test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6111
6112test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6113
6114test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6115
Matthias Klose93a0ef12012-03-15 18:08:34 +01006116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6117$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6118if test -z "$MKDIR_P"; then
6119 if ${ac_cv_path_mkdir+:} false; then :
6120 $as_echo_n "(cached) " >&6
6121else
6122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6123for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6124do
6125 IFS=$as_save_IFS
6126 test -z "$as_dir" && as_dir=.
6127 for ac_prog in mkdir gmkdir; do
6128 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006129 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006130 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6131 'mkdir (GNU coreutils) '* | \
6132 'mkdir (coreutils) '* | \
6133 'mkdir (fileutils) '4.1*)
6134 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6135 break 3;;
6136 esac
6137 done
6138 done
6139 done
6140IFS=$as_save_IFS
6141
6142fi
6143
6144 test -d ./--version && rmdir ./--version
6145 if test "${ac_cv_path_mkdir+set}" = set; then
6146 MKDIR_P="$ac_cv_path_mkdir -p"
6147 else
6148 # As a last resort, use the slow shell script. Don't cache a
6149 # value for MKDIR_P within a source directory, because that will
6150 # break other packages using the cache if that directory is
6151 # removed, or if the value is a relative name.
6152 MKDIR_P="$ac_install_sh -d"
6153 fi
6154fi
6155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6156$as_echo "$MKDIR_P" >&6; }
6157
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158
6159# Not every filesystem supports hard links
6160
6161if test -z "$LN" ; then
6162 case $ac_sys_system in
6163 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164 *) LN=ln;;
6165 esac
6166fi
6167
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006168# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006169
6170ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006171
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6174$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175
6176# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006177if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178 withval=$with_pydebug;
6179if test "$withval" != no
6180then
6181
Matthias Kloseb9621712010-04-24 17:59:49 +00006182$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6185$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006186 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006187 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006188else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6189$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190fi
6191else
Matthias Kloseb9621712010-04-24 17:59:49 +00006192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194fi
6195
6196
6197# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6198# merged with this chunk of code?
6199
6200# Optimizer/debugger flags
6201# ------------------------
6202# (The following bit of code is complicated enough - please keep things
6203# indented properly. Just pretend you're editing Python code. ;-)
6204
6205# There are two parallel sets of case statements below, one that checks to
6206# see if OPT was set and one that does BASECFLAGS setting based upon
6207# compiler and platform. BASECFLAGS tweaks need to be made even if the
6208# user set OPT.
6209
6210# tweak OPT based on compiler and platform, only if the user didn't set
6211# it on the command line
6212
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006213if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214then
6215 case $GCC in
6216 yes)
6217 if test "$CC" != 'g++' ; then
6218 STRICT_PROTO="-Wstrict-prototypes"
6219 fi
6220 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6221 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6222 WRAP="-fwrapv"
6223 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006224
6225 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006226 case $CC in
6227 *clang*) WRAP="-fwrapv"
6228 ;;
6229 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006230
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231 case $ac_cv_prog_cc_g in
6232 yes)
6233 if test "$Py_DEBUG" = 'true' ; then
6234 # Optimization messes up debuggers, so turn it off for
6235 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006236 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237 else
6238 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6239 fi
6240 ;;
6241 *)
6242 OPT="-O3 -Wall $STRICT_PROTO"
6243 ;;
6244 esac
6245 case $ac_sys_system in
6246 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6247 ;;
6248 esac
6249 ;;
6250
6251 *)
6252 OPT="-O"
6253 ;;
6254 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006255fi
6256
6257
6258
6259# The -arch flags for universal builds on OSX
6260UNIVERSAL_ARCH_FLAGS=
6261
6262
6263# tweak BASECFLAGS based on compiler and platform
6264case $GCC in
6265yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006266 # Python doesn't violate C99 aliasing rules, but older versions of
6267 # GCC produce warnings for legal Python code. Enable
6268 # -fno-strict-aliasing on versions of GCC that support but produce
6269 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6271$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272 ac_save_cc="$CC"
6273 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006274 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006275 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006276 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006277else
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006280
Matthias Kloseb159a552010-04-25 21:00:44 +00006281
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006282int
6283main ()
6284{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006285
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006286 ;
6287 return 0;
6288}
Matthias Kloseb159a552010-04-25 21:00:44 +00006289
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006291if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006292
6293 CC="$ac_save_cc -fstrict-aliasing"
6294 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006296/* end confdefs.h. */
6297
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006298 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006299int
6300main ()
6301{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006302double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006303 ;
6304 return 0;
6305}
Matthias Kloseb159a552010-04-25 21:00:44 +00006306
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006308if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006309
6310 ac_cv_no_strict_aliasing=no
6311
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312else
Matthias Kloseb159a552010-04-25 21:00:44 +00006313
6314 ac_cv_no_strict_aliasing=yes
6315
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006316fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006318
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006319else
Matthias Kloseb159a552010-04-25 21:00:44 +00006320
6321 ac_cv_no_strict_aliasing=no
6322
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006325fi
6326
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006327 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6330$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006331 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332 then
6333 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6334 fi
6335
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6337$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6338 ac_save_cc="$CC"
6339 CC="$CC -Wunused-result -Werror"
6340 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006341 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006342 $as_echo_n "(cached) " >&6
6343else
6344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6345/* end confdefs.h. */
6346
6347
6348int
6349main ()
6350{
6351
6352 ;
6353 return 0;
6354}
6355
6356_ACEOF
6357if ac_fn_c_try_compile "$LINENO"; then :
6358
6359 ac_cv_disable_unused_result_warning=yes
6360
6361else
6362
6363 ac_cv_disable_unused_result_warning=no
6364
6365fi
6366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6367fi
6368
6369 CFLAGS="$save_CFLAGS"
6370 CC="$ac_save_cc"
6371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6372$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6373
6374 if test $ac_cv_disable_unused_result_warning = yes
6375 then
6376 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6377 fi
6378
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6380 # support. Without this, treatment of subnormals doesn't follow
6381 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006382 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383 alpha*)
6384 BASECFLAGS="$BASECFLAGS -mieee"
6385 ;;
6386 esac
6387
6388 case $ac_sys_system in
6389 SCO_SV*)
6390 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6391 ;;
6392 # is there any other compiler on Darwin besides gcc?
6393 Darwin*)
6394 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6395 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006396 if test "${CC}" = gcc
6397 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6399$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006400 case "${UNIVERSALSDK}" in
6401 */MacOSX10.4u.sdk)
6402 # Build using 10.4 SDK, force usage of gcc when the
6403 # compiler is gcc, otherwise the user will get very
6404 # confusing error messages when building on OSX 10.6
6405 CC=gcc-4.0
6406 CPP=cpp-4.0
6407 ;;
6408 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6410$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006411 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412
6413
6414 if test "${enable_universalsdk}"; then
6415 UNIVERSAL_ARCH_FLAGS=""
6416 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6417 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6418 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006419 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6421 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006422 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006423 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424
6425 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6426 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006427 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006428 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006430 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6431 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006432 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006433 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006434
6435 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6436 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006437 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006438 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006439
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006440 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006441 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442
6443 fi
6444
6445
Ronald Oussoren666028b2010-04-18 19:07:43 +00006446 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6447 if test "${UNIVERSALSDK}" != "/"
6448 then
6449 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6450 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006451 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452 fi
6453 fi
6454
6455 # Calculate the right deployment target for this build.
6456 #
6457 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006458 if test ${cur_target} '>' 10.2 && \
6459 test ${cur_target} '<' 10.6
6460 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006461 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006462 if test ${enable_universalsdk}; then
6463 if test "${UNIVERSAL_ARCHS}" = "all"; then
6464 # Ensure that the default platform for a
6465 # 4-way universal build is OSX 10.5,
6466 # that's the first OS release where
6467 # 4-way builds make sense.
6468 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006469
6470 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6471 cur_target='10.5'
6472
6473 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6474 cur_target='10.5'
6475
6476 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6477 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006478 fi
6479 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006480 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006481 # On Intel macs default to a deployment
6482 # target of 10.4, that's the first OSX
6483 # release with Intel support.
6484 cur_target="10.4"
6485 fi
6486 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006487 fi
6488 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6489
6490 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6491 # environment with a value that is the same as what we'll use
6492 # in the Makefile to ensure that we'll get the same compiler
6493 # environment during configure and build time.
6494 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6495 export MACOSX_DEPLOYMENT_TARGET
6496 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6497
6498 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006499 esac
6500 ;;
6501
6502*)
6503 case $ac_sys_system in
6504 OpenUNIX*|UnixWare*)
6505 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6506 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006507 SCO_SV*)
6508 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6509 ;;
6510 esac
6511 ;;
6512esac
6513
6514if test "$Py_DEBUG" = 'true'; then
6515 :
6516else
6517 OPT="-DNDEBUG $OPT"
6518fi
6519
6520if test "$ac_arch_flags"
6521then
6522 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6523fi
6524
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006525# Check whether GCC supports PyArg_ParseTuple format
6526if test "$GCC" = "yes"
6527then
Matthias Kloseb9621712010-04-24 17:59:49 +00006528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6529$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530 save_CFLAGS=$CFLAGS
6531 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006533/* end confdefs.h. */
6534
6535 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006536int
6537main ()
6538{
6539
6540 ;
6541 return 0;
6542}
Matthias Kloseb159a552010-04-25 21:00:44 +00006543
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006545if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006546
Matthias Kloseb159a552010-04-25 21:00:44 +00006547
Matthias Kloseb9621712010-04-24 17:59:49 +00006548$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549
Matthias Kloseb159a552010-04-25 21:00:44 +00006550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006551$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006552
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553else
Matthias Kloseb159a552010-04-25 21:00:44 +00006554
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006556$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006557
6558fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6560 CFLAGS=$save_CFLAGS
6561fi
6562
6563# On some compilers, pthreads are available without further options
6564# (e.g. MacOS X). On some of these systems, the compiler will not
6565# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6566# So we have to see first whether pthreads are available without
6567# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6569$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006570if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006574 ac_cv_pthread_is_default=no
6575else
Matthias Kloseb9621712010-04-24 17:59:49 +00006576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577/* end confdefs.h. */
6578
Stefan Krah7dba5942012-11-22 22:49:11 +01006579#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006580#include <pthread.h>
6581
6582void* routine(void* p){return NULL;}
6583
6584int main(){
6585 pthread_t p;
6586 if(pthread_create(&p,NULL,routine,NULL)!=0)
6587 return 1;
6588 (void)pthread_detach(p);
6589 return 0;
6590}
6591
6592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006593if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006594
6595 ac_cv_pthread_is_default=yes
6596 ac_cv_kthread=no
6597 ac_cv_pthread=no
6598
6599else
Matthias Kloseb9621712010-04-24 17:59:49 +00006600 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6603 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006604fi
6605
6606
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006607fi
6608
Matthias Kloseb9621712010-04-24 17:59:49 +00006609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6610$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006611
6612
6613if test $ac_cv_pthread_is_default = yes
6614then
6615 ac_cv_kpthread=no
6616else
6617# -Kpthread, if available, provides the right #defines
6618# and linker options to make pthread_create available
6619# Some compilers won't report that they do not support -Kpthread,
6620# so we need to run a program to see whether it really made the
6621# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6623$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006624if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006625 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006626else
6627 ac_save_cc="$CC"
6628CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006629if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006630 ac_cv_kpthread=no
6631else
Matthias Kloseb9621712010-04-24 17:59:49 +00006632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006633/* end confdefs.h. */
6634
Stefan Krah7dba5942012-11-22 22:49:11 +01006635#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636#include <pthread.h>
6637
6638void* routine(void* p){return NULL;}
6639
6640int main(){
6641 pthread_t p;
6642 if(pthread_create(&p,NULL,routine,NULL)!=0)
6643 return 1;
6644 (void)pthread_detach(p);
6645 return 0;
6646}
6647
6648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006649if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650 ac_cv_kpthread=yes
6651else
Matthias Kloseb9621712010-04-24 17:59:49 +00006652 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006656fi
6657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658CC="$ac_save_cc"
6659fi
6660
Matthias Kloseb9621712010-04-24 17:59:49 +00006661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6662$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006663fi
6664
6665if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6666then
6667# -Kthread, if available, provides the right #defines
6668# and linker options to make pthread_create available
6669# Some compilers won't report that they do not support -Kthread,
6670# so we need to run a program to see whether it really made the
6671# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6673$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006674if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676else
6677 ac_save_cc="$CC"
6678CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006679if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680 ac_cv_kthread=no
6681else
Matthias Kloseb9621712010-04-24 17:59:49 +00006682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683/* end confdefs.h. */
6684
Stefan Krah7dba5942012-11-22 22:49:11 +01006685#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686#include <pthread.h>
6687
6688void* routine(void* p){return NULL;}
6689
6690int main(){
6691 pthread_t p;
6692 if(pthread_create(&p,NULL,routine,NULL)!=0)
6693 return 1;
6694 (void)pthread_detach(p);
6695 return 0;
6696}
6697
6698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006699if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006700 ac_cv_kthread=yes
6701else
Matthias Kloseb9621712010-04-24 17:59:49 +00006702 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006706fi
6707
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708CC="$ac_save_cc"
6709fi
6710
Matthias Kloseb9621712010-04-24 17:59:49 +00006711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6712$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713fi
6714
6715if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6716then
6717# -pthread, if available, provides the right #defines
6718# and linker options to make pthread_create available
6719# Some compilers won't report that they do not support -pthread,
6720# so we need to run a program to see whether it really made the
6721# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6723$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006724if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726else
6727 ac_save_cc="$CC"
6728CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006729if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730 ac_cv_pthread=no
6731else
Matthias Kloseb9621712010-04-24 17:59:49 +00006732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733/* end confdefs.h. */
6734
Stefan Krah7dba5942012-11-22 22:49:11 +01006735#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736#include <pthread.h>
6737
6738void* routine(void* p){return NULL;}
6739
6740int main(){
6741 pthread_t p;
6742 if(pthread_create(&p,NULL,routine,NULL)!=0)
6743 return 1;
6744 (void)pthread_detach(p);
6745 return 0;
6746}
6747
6748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006749if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750 ac_cv_pthread=yes
6751else
Matthias Kloseb9621712010-04-24 17:59:49 +00006752 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756fi
6757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758CC="$ac_save_cc"
6759fi
6760
Matthias Kloseb9621712010-04-24 17:59:49 +00006761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6762$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763fi
6764
6765# If we have set a CC compiler flag for thread support then
6766# check if it works for CXX, too.
6767ac_cv_cxx_thread=no
6768if test ! -z "$CXX"
6769then
Matthias Kloseb9621712010-04-24 17:59:49 +00006770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6771$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006772ac_save_cxx="$CXX"
6773
6774if test "$ac_cv_kpthread" = "yes"
6775then
6776 CXX="$CXX -Kpthread"
6777 ac_cv_cxx_thread=yes
6778elif test "$ac_cv_kthread" = "yes"
6779then
6780 CXX="$CXX -Kthread"
6781 ac_cv_cxx_thread=yes
6782elif test "$ac_cv_pthread" = "yes"
6783then
6784 CXX="$CXX -pthread"
6785 ac_cv_cxx_thread=yes
6786fi
6787
6788if test $ac_cv_cxx_thread = yes
6789then
6790 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6791 $CXX -c conftest.$ac_ext 2>&5
6792 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6793 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6794 then
6795 ac_cv_cxx_thread=yes
6796 else
6797 ac_cv_cxx_thread=no
6798 fi
6799 rm -fr conftest*
6800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6802$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803fi
6804CXX="$ac_save_cxx"
6805
6806
6807# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6809$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006810if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812else
Matthias Kloseb9621712010-04-24 17:59:49 +00006813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006814/* end confdefs.h. */
6815#include <stdlib.h>
6816#include <stdarg.h>
6817#include <string.h>
6818#include <float.h>
6819
6820int
6821main ()
6822{
6823
6824 ;
6825 return 0;
6826}
6827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006828if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829 ac_cv_header_stdc=yes
6830else
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6834
6835if test $ac_cv_header_stdc = yes; then
6836 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838/* end confdefs.h. */
6839#include <string.h>
6840
6841_ACEOF
6842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006843 $EGREP "memchr" >/dev/null 2>&1; then :
6844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845else
6846 ac_cv_header_stdc=no
6847fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006848rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849
6850fi
6851
6852if test $ac_cv_header_stdc = yes; then
6853 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855/* end confdefs.h. */
6856#include <stdlib.h>
6857
6858_ACEOF
6859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006860 $EGREP "free" >/dev/null 2>&1; then :
6861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862else
6863 ac_cv_header_stdc=no
6864fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006865rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866
6867fi
6868
6869if test $ac_cv_header_stdc = yes; then
6870 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872 :
6873else
Matthias Kloseb9621712010-04-24 17:59:49 +00006874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875/* end confdefs.h. */
6876#include <ctype.h>
6877#include <stdlib.h>
6878#if ((' ' & 0x0FF) == 0x020)
6879# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6880# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6881#else
6882# define ISLOWER(c) \
6883 (('a' <= (c) && (c) <= 'i') \
6884 || ('j' <= (c) && (c) <= 'r') \
6885 || ('s' <= (c) && (c) <= 'z'))
6886# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6887#endif
6888
6889#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6890int
6891main ()
6892{
6893 int i;
6894 for (i = 0; i < 256; i++)
6895 if (XOR (islower (i), ISLOWER (i))
6896 || toupper (i) != TOUPPER (i))
6897 return 2;
6898 return 0;
6899}
6900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006901if ac_fn_c_try_run "$LINENO"; then :
6902
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903else
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908fi
6909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910fi
6911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6913$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914if test $ac_cv_header_stdc = yes; then
6915
Matthias Kloseb9621712010-04-24 17:59:49 +00006916$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917
6918fi
6919
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006920ac_save_cppflags="$CPPFLAGS"
6921CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006922for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006923fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006924ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006925sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006926unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006927poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006928sys/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 +01006929sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006930sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006931sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006932sys/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 -07006933libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006934bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006935do :
6936 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6937ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006938if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006939 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006940#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006941_ACEOF
6942
6943fi
6944
Guido van Rossum627b2d71993-12-24 10:39:16 +00006945done
6946
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006947CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006948ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006949for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6952$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006953if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006954 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006955else
Matthias Kloseb9621712010-04-24 17:59:49 +00006956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006957/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006958#include <sys/types.h>
6959#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006960
Martin v. Löwis11437992002-04-12 09:54:03 +00006961int
6962main ()
6963{
6964if ((DIR *) 0)
6965return 0;
6966 ;
6967 return 0;
6968}
6969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006970if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006971 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006972else
Matthias Kloseb9621712010-04-24 17:59:49 +00006973 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006977eval ac_res=\$$as_ac_Header
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6979$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006980if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006981 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006982#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006983_ACEOF
6984
6985ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006986fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006987
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006988done
6989# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6990if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6992$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006993if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995else
Martin v. Löwis11437992002-04-12 09:54:03 +00006996 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000/* Override any GCC internal prototype to avoid an error.
7001 Use char because int might match the return type of a GCC
7002 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007003#ifdef __cplusplus
7004extern "C"
7005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007006char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007007int
7008main ()
7009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007011 ;
7012 return 0;
7013}
7014_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015for ac_lib in '' dir; do
7016 if test -z "$ac_lib"; then
7017 ac_res="none required"
7018 else
7019 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007020 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007021 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007022 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007025rm -f core conftest.err conftest.$ac_objext \
7026 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007027 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007028 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007030done
Victor Stinnere0be4232011-10-25 13:06:09 +02007031if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033else
7034 ac_cv_search_opendir=no
7035fi
7036rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007037LIBS=$ac_func_search_save_LIBS
7038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7040$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007041ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007042if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007043 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007046
Michael W. Hudson54241132001-12-07 15:38:26 +00007047else
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7049$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007050if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007052else
7053 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057/* Override any GCC internal prototype to avoid an error.
7058 Use char because int might match the return type of a GCC
7059 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007060#ifdef __cplusplus
7061extern "C"
7062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007063char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007064int
7065main ()
7066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 ;
7069 return 0;
7070}
7071_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072for ac_lib in '' x; do
7073 if test -z "$ac_lib"; then
7074 ac_res="none required"
7075 else
7076 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007077 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007079 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007082rm -f core conftest.err conftest.$ac_objext \
7083 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007084 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007085 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007087done
Victor Stinnere0be4232011-10-25 13:06:09 +02007088if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090else
7091 ac_cv_search_opendir=no
7092fi
7093rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007094LIBS=$ac_func_search_save_LIBS
7095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7097$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007098ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007099if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007100 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007102fi
7103
7104fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007105
Matthias Kloseb9621712010-04-24 17:59:49 +00007106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7107$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007108if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007110else
Matthias Kloseb9621712010-04-24 17:59:49 +00007111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007112/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007113#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007114int
7115main ()
7116{
7117return makedev(0, 0);
7118 ;
7119 return 0;
7120}
7121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007122if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007123 ac_cv_header_sys_types_h_makedev=yes
7124else
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127rm -f core conftest.err conftest.$ac_objext \
7128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007129
7130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7132$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007133
7134if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007135ac_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 +02007136if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007137
Matthias Kloseb9621712010-04-24 17:59:49 +00007138$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007139
7140fi
7141
7142
7143
7144 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007145 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 +02007146if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007147
Matthias Kloseb9621712010-04-24 17:59:49 +00007148$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007149
7150fi
7151
7152
7153 fi
7154fi
7155
Michael W. Hudson54241132001-12-07 15:38:26 +00007156
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007157# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7158for ac_header in net/if.h
7159do :
7160 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7161#ifdef STDC_HEADERS
7162# include <stdlib.h>
7163# include <stddef.h>
7164#else
7165# ifdef HAVE_STDLIB_H
7166# include <stdlib.h>
7167# endif
7168#endif
7169#ifdef HAVE_SYS_SOCKET_H
7170# include <sys/socket.h>
7171#endif
7172
7173"
Victor Stinnere0be4232011-10-25 13:06:09 +02007174if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007175 cat >>confdefs.h <<_ACEOF
7176#define HAVE_NET_IF_H 1
7177_ACEOF
7178
7179fi
7180
7181done
7182
7183
7184
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007185# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007186for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007187do :
7188 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007189#ifdef HAVE_CURSES_H
7190#include <curses.h>
7191#endif
7192
Matthias Kloseb9621712010-04-24 17:59:49 +00007193"
Victor Stinnere0be4232011-10-25 13:06:09 +02007194if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007195 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007196#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007197_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007198
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007199fi
7200
7201done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007202
7203
Martin v. Löwis11017b12006-01-14 18:12:57 +00007204# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007205for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007206do :
7207 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 +00007208#ifdef HAVE_ASM_TYPES_H
7209#include <asm/types.h>
7210#endif
7211#ifdef HAVE_SYS_SOCKET_H
7212#include <sys/socket.h>
7213#endif
7214
Matthias Kloseb9621712010-04-24 17:59:49 +00007215"
Victor Stinnere0be4232011-10-25 13:06:09 +02007216if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007217 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007218#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007219_ACEOF
7220
7221fi
7222
7223done
7224
7225
Charles-François Natali47413c12011-10-06 19:47:44 +02007226# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007227for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007228do :
7229 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7230ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7231#ifdef HAVE_SYS_SOCKET_H
7232#include <sys/socket.h>
7233#endif
7234
7235"
7236if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7237 cat >>confdefs.h <<_ACEOF
7238#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7239_ACEOF
7240
7241fi
7242
7243done
7244
7245
Guido van Rossum627b2d71993-12-24 10:39:16 +00007246# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007247was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7249$as_echo_n "checking for clock_t in time.h... " >&6; }
7250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007251/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007252#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
7254_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007257 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007258else
Martin v. Löwis11437992002-04-12 09:54:03 +00007259
7260
Matthias Kloseb9621712010-04-24 17:59:49 +00007261$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007262
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007263
Guido van Rossum627b2d71993-12-24 10:39:16 +00007264fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007265rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007266
Matthias Kloseb9621712010-04-24 17:59:49 +00007267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7268$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007269
Matthias Kloseb9621712010-04-24 17:59:49 +00007270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7271$as_echo_n "checking for makedev... " >&6; }
7272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007273/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007274
Jesus Cea740f53a2010-04-28 11:35:30 +00007275#if defined(MAJOR_IN_MKDEV)
7276#include <sys/mkdev.h>
7277#elif defined(MAJOR_IN_SYSMACROS)
7278#include <sys/sysmacros.h>
7279#else
7280#include <sys/types.h>
7281#endif
7282
Neal Norwitz11690112002-07-30 01:08:28 +00007283int
7284main ()
7285{
Jesus Cea740f53a2010-04-28 11:35:30 +00007286
7287 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007288 ;
7289 return 0;
7290}
Matthias Kloseb159a552010-04-25 21:00:44 +00007291
Neal Norwitz11690112002-07-30 01:08:28 +00007292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007293if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007294 ac_cv_has_makedev=yes
7295else
Matthias Kloseb9621712010-04-24 17:59:49 +00007296 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007298rm -f core conftest.err conftest.$ac_objext \
7299 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7301$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007302if test "$ac_cv_has_makedev" = "yes"; then
7303
Matthias Kloseb9621712010-04-24 17:59:49 +00007304$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007305
7306fi
7307
Martin v. Löwis399a6892002-10-04 10:22:02 +00007308# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7309# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7310# defined, but the compiler does not support pragma redefine_extname,
7311# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7312# structures (such as rlimit64) without declaring them. As a
7313# work-around, disable LFS on such configurations
7314
7315use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7317$as_echo_n "checking Solaris LFS bug... " >&6; }
7318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007319/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007320
7321#define _LARGEFILE_SOURCE 1
7322#define _FILE_OFFSET_BITS 64
7323#include <sys/resource.h>
7324
Martin v. Löwis399a6892002-10-04 10:22:02 +00007325int
7326main ()
7327{
7328struct rlimit foo;
7329 ;
7330 return 0;
7331}
7332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007334 sol_lfs_bug=no
7335else
Matthias Kloseb9621712010-04-24 17:59:49 +00007336 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7340$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007341if test "$sol_lfs_bug" = "yes"; then
7342 use_lfs=no
7343fi
7344
7345if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007346# Two defines needed to enable largefile support on various platforms
7347# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007348case $ac_sys_system/$ac_sys_release in
7349AIX*)
7350
7351$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7352
7353 ;;
7354esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007355
Matthias Kloseb9621712010-04-24 17:59:49 +00007356$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007357
7358
Matthias Kloseb9621712010-04-24 17:59:49 +00007359$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007360
Martin v. Löwis399a6892002-10-04 10:22:02 +00007361fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007362
Guido van Rossum84e7b241996-08-19 21:59:00 +00007363# Add some code to confdefs.h so that the test for off_t works on SCO
7364cat >> confdefs.h <<\EOF
7365#if defined(SCO_DS)
7366#undef _OFF_T
7367#endif
7368EOF
7369
Guido van Rossumef2255b2000-03-10 22:30:29 +00007370# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007371ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007372if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007373
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007374else
Martin v. Löwis11437992002-04-12 09:54:03 +00007375
7376cat >>confdefs.h <<_ACEOF
7377#define mode_t int
7378_ACEOF
7379
7380fi
7381
Matthias Kloseb9621712010-04-24 17:59:49 +00007382ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007383if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007384
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007385else
Martin v. Löwis11437992002-04-12 09:54:03 +00007386
7387cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007388#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007389_ACEOF
7390
7391fi
7392
Matthias Kloseb9621712010-04-24 17:59:49 +00007393ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007394if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007395
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007396else
Martin v. Löwis11437992002-04-12 09:54:03 +00007397
7398cat >>confdefs.h <<_ACEOF
7399#define pid_t int
7400_ACEOF
7401
7402fi
7403
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007404
Martin v. Löwis11437992002-04-12 09:54:03 +00007405cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007406#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007407_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007408
Matthias Kloseb9621712010-04-24 17:59:49 +00007409ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007410if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007411
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007412else
Martin v. Löwis11437992002-04-12 09:54:03 +00007413
7414cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007415#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007416_ACEOF
7417
7418fi
7419
Matthias Kloseb9621712010-04-24 17:59:49 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7421$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007422if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007424else
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007426/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007427#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007428
7429_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007431 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007432 ac_cv_type_uid_t=yes
7433else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007434 ac_cv_type_uid_t=no
7435fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007436rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7440$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007441if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007442
Matthias Kloseb9621712010-04-24 17:59:49 +00007443$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007444
7445
Matthias Kloseb9621712010-04-24 17:59:49 +00007446$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007447
7448fi
7449
Mark Dickinson983bc162012-12-02 12:11:38 +00007450
7451# There are two separate checks for each of the exact-width integer types we
7452# need. First we check whether the type is available using the usual
7453# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7454# and <stdint.h> where available). We then also use the special type checks of
7455# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7456# directly, #define's uint32_t to be a suitable type.
7457
7458ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7459if test "x$ac_cv_type_uint32_t" = xyes; then :
7460
7461$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7462
7463fi
7464
Matthias Kloseb9621712010-04-24 17:59:49 +00007465ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7466case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007467 no|yes) ;; #(
7468 *)
7469
Matthias Kloseb9621712010-04-24 17:59:49 +00007470$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007471
7472
7473cat >>confdefs.h <<_ACEOF
7474#define uint32_t $ac_cv_c_uint32_t
7475_ACEOF
7476;;
7477 esac
7478
Mark Dickinson983bc162012-12-02 12:11:38 +00007479
7480ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7481if test "x$ac_cv_type_uint64_t" = xyes; then :
7482
7483$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7484
7485fi
7486
Matthias Kloseb9621712010-04-24 17:59:49 +00007487ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7488case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007489 no|yes) ;; #(
7490 *)
7491
Matthias Kloseb9621712010-04-24 17:59:49 +00007492$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007493
7494
7495cat >>confdefs.h <<_ACEOF
7496#define uint64_t $ac_cv_c_uint64_t
7497_ACEOF
7498;;
7499 esac
7500
Mark Dickinson983bc162012-12-02 12:11:38 +00007501
7502ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7503if test "x$ac_cv_type_int32_t" = xyes; then :
7504
7505$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7506
7507fi
7508
Matthias Kloseb9621712010-04-24 17:59:49 +00007509ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7510case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007511 no|yes) ;; #(
7512 *)
7513
7514cat >>confdefs.h <<_ACEOF
7515#define int32_t $ac_cv_c_int32_t
7516_ACEOF
7517;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007518esac
7519
Mark Dickinson983bc162012-12-02 12:11:38 +00007520
7521ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7522if test "x$ac_cv_type_int64_t" = xyes; then :
7523
7524$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7525
7526fi
7527
Matthias Kloseb9621712010-04-24 17:59:49 +00007528ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7529case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007530 no|yes) ;; #(
7531 *)
7532
7533cat >>confdefs.h <<_ACEOF
7534#define int64_t $ac_cv_c_int64_t
7535_ACEOF
7536;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007537esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007538
Mark Dickinson983bc162012-12-02 12:11:38 +00007539
Matthias Kloseb9621712010-04-24 17:59:49 +00007540ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007541if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007542
Matthias Kloseb9621712010-04-24 17:59:49 +00007543$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007544
7545fi
7546
Stefan Krah1919b7e2012-03-21 18:25:23 +01007547ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7548if test "x$ac_cv_type___uint128_t" = xyes; then :
7549
7550$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7551
7552fi
7553
Jack Jansendd19cf82001-12-06 22:36:17 +00007554
Michael W. Hudson54241132001-12-07 15:38:26 +00007555# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007556# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007557# The cast to long int works around a bug in the HP C Compiler
7558# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7559# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7560# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7562$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007563if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007565else
Matthias Kloseb9621712010-04-24 17:59:49 +00007566 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 +00007567
Martin v. Löwis11437992002-04-12 09:54:03 +00007568else
Matthias Kloseb9621712010-04-24 17:59:49 +00007569 if test "$ac_cv_type_int" = yes; then
7570 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7571$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007572as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007573See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007574 else
7575 ac_cv_sizeof_int=0
7576 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007578
Martin v. Löwis11437992002-04-12 09:54:03 +00007579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7581$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582
7583
7584
Martin v. Löwis11437992002-04-12 09:54:03 +00007585cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007586#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007587_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007588
7589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007590# The cast to long int works around a bug in the HP C Compiler
7591# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7592# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7593# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7595$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007596if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007597 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007598else
Matthias Kloseb9621712010-04-24 17:59:49 +00007599 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 +00007600
Martin v. Löwis11437992002-04-12 09:54:03 +00007601else
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 if test "$ac_cv_type_long" = yes; then
7603 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007605as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007606See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007607 else
7608 ac_cv_sizeof_long=0
7609 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007611
Martin v. Löwis11437992002-04-12 09:54:03 +00007612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7614$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615
7616
7617
Martin v. Löwis11437992002-04-12 09:54:03 +00007618cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007619#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007620_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007621
7622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623# The cast to long int works around a bug in the HP C Compiler
7624# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7625# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7626# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7628$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007629if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007631else
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 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 +00007633
Martin v. Löwis11437992002-04-12 09:54:03 +00007634else
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 if test "$ac_cv_type_void_p" = yes; then
7636 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007638as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007639See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007640 else
7641 ac_cv_sizeof_void_p=0
7642 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007644
Martin v. Löwis11437992002-04-12 09:54:03 +00007645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7647$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648
7649
7650
Martin v. Löwis11437992002-04-12 09:54:03 +00007651cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007652#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007653_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007654
7655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656# The cast to long int works around a bug in the HP C Compiler
7657# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7658# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7659# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7661$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007662if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 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 +00007666
Martin v. Löwis11437992002-04-12 09:54:03 +00007667else
Matthias Kloseb9621712010-04-24 17:59:49 +00007668 if test "$ac_cv_type_short" = yes; then
7669 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007671as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007672See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673 else
7674 ac_cv_sizeof_short=0
7675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677
Martin v. Löwis11437992002-04-12 09:54:03 +00007678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7680$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681
7682
7683
Martin v. Löwis11437992002-04-12 09:54:03 +00007684cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007685#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007686_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007687
7688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689# The cast to long int works around a bug in the HP C Compiler
7690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7692# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7694$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007695if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 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 +00007699
Martin v. Löwis11437992002-04-12 09:54:03 +00007700else
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 if test "$ac_cv_type_float" = yes; then
7702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007704as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007705See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007706 else
7707 ac_cv_sizeof_float=0
7708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710
Martin v. Löwis11437992002-04-12 09:54:03 +00007711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7713$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714
7715
7716
Martin v. Löwis11437992002-04-12 09:54:03 +00007717cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007718#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007719_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007720
7721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007722# The cast to long int works around a bug in the HP C Compiler
7723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7725# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7727$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007728if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 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 +00007732
Martin v. Löwis11437992002-04-12 09:54:03 +00007733else
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 if test "$ac_cv_type_double" = yes; then
7735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007737as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007738See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739 else
7740 ac_cv_sizeof_double=0
7741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007743
Martin v. Löwis11437992002-04-12 09:54:03 +00007744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7746$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747
7748
7749
Martin v. Löwis11437992002-04-12 09:54:03 +00007750cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007751#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007752_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007753
7754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755# The cast to long int works around a bug in the HP C Compiler
7756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7758# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7760$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007761if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 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 +00007765
Martin v. Löwis11437992002-04-12 09:54:03 +00007766else
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 if test "$ac_cv_type_fpos_t" = yes; then
7768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007770as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007771See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772 else
7773 ac_cv_sizeof_fpos_t=0
7774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007776
Martin v. Löwis11437992002-04-12 09:54:03 +00007777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7779$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007780
7781
7782
Martin v. Löwis11437992002-04-12 09:54:03 +00007783cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007784#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007785_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007786
Michael W. Hudson54241132001-12-07 15:38:26 +00007787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788# The cast to long int works around a bug in the HP C Compiler
7789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7791# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7793$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007794if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007796else
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 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 +00007798
Martin v. Löwis18e16552006-02-15 17:27:45 +00007799else
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 if test "$ac_cv_type_size_t" = yes; then
7801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007803as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007804See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805 else
7806 ac_cv_sizeof_size_t=0
7807 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007809
Martin v. Löwis18e16552006-02-15 17:27:45 +00007810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7812$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813
7814
7815
Martin v. Löwis18e16552006-02-15 17:27:45 +00007816cat >>confdefs.h <<_ACEOF
7817#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7818_ACEOF
7819
7820
Christian Heimes400adb02008-02-01 08:12:03 +00007821# The cast to long int works around a bug in the HP C Compiler
7822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7824# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7826$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007827if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 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 +00007831
Christian Heimes400adb02008-02-01 08:12:03 +00007832else
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 if test "$ac_cv_type_pid_t" = yes; then
7834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007836as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007837See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007838 else
7839 ac_cv_sizeof_pid_t=0
7840 fi
7841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842
Christian Heimes400adb02008-02-01 08:12:03 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7845$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007846
7847
7848
7849cat >>confdefs.h <<_ACEOF
7850#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7851_ACEOF
7852
7853
Michael W. Hudson54241132001-12-07 15:38:26 +00007854
Matthias Kloseb9621712010-04-24 17:59:49 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7856$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007857have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007859/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007860
Martin v. Löwis11437992002-04-12 09:54:03 +00007861int
7862main ()
7863{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007864long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 ;
7866 return 0;
7867}
7868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007869if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
7871
Matthias Kloseb9621712010-04-24 17:59:49 +00007872$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007874 have_long_long=yes
7875
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7879$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007880if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881# The cast to long int works around a bug in the HP C Compiler
7882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7884# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7886$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007887if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007888 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007889else
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 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 +00007891
Martin v. Löwis11437992002-04-12 09:54:03 +00007892else
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 if test "$ac_cv_type_long_long" = yes; then
7894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007896as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007897See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898 else
7899 ac_cv_sizeof_long_long=0
7900 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007902
Martin v. Löwis11437992002-04-12 09:54:03 +00007903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7905$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906
7907
7908
Martin v. Löwis11437992002-04-12 09:54:03 +00007909cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007910#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007911_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007912
Michael W. Hudson54241132001-12-07 15:38:26 +00007913
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007914fi
7915
Matthias Kloseb9621712010-04-24 17:59:49 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7917$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007918have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007920/* end confdefs.h. */
7921
7922int
7923main ()
7924{
7925long double x; x = (long double)0;
7926 ;
7927 return 0;
7928}
7929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007930if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007931
7932
Matthias Kloseb9621712010-04-24 17:59:49 +00007933$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007934
7935 have_long_double=yes
7936
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007937fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7940$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007941if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007942# The cast to long int works around a bug in the HP C Compiler
7943# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7944# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7945# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7947$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007948if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007950else
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 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 +00007952
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007953else
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 if test "$ac_cv_type_long_double" = yes; then
7955 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007957as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007958See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007959 else
7960 ac_cv_sizeof_long_double=0
7961 fi
7962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7966$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007967
7968
7969
7970cat >>confdefs.h <<_ACEOF
7971#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7972_ACEOF
7973
7974
7975fi
7976
7977
Matthias Kloseb9621712010-04-24 17:59:49 +00007978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7979$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007980have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007982/* end confdefs.h. */
7983
7984int
7985main ()
7986{
7987_Bool x; x = (_Bool)0;
7988 ;
7989 return 0;
7990}
7991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007992if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007993
7994
Matthias Kloseb9621712010-04-24 17:59:49 +00007995$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007996
7997 have_c99_bool=yes
7998
Thomas Woutersb2137042007-02-01 18:02:27 +00007999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8002$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008003if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004# The cast to long int works around a bug in the HP C Compiler
8005# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8006# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8007# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8009$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008010if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 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 +00008014
Thomas Woutersb2137042007-02-01 18:02:27 +00008015else
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 if test "$ac_cv_type__Bool" = yes; then
8017 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008019as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008020See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021 else
8022 ac_cv_sizeof__Bool=0
8023 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025
Thomas Woutersb2137042007-02-01 18:02:27 +00008026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8028$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029
8030
8031
Thomas Woutersb2137042007-02-01 18:02:27 +00008032cat >>confdefs.h <<_ACEOF
8033#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8034_ACEOF
8035
8036
8037fi
8038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008040 #include <stdint.h>
8041 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008042 #ifdef HAVE_INTTYPES_H
8043 #include <inttypes.h>
8044 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008045"
Victor Stinnere0be4232011-10-25 13:06:09 +02008046if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008047
8048cat >>confdefs.h <<_ACEOF
8049#define HAVE_UINTPTR_T 1
8050_ACEOF
8051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052# The cast to long int works around a bug in the HP C Compiler
8053# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8054# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8055# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8057$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008058if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008060else
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 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 +00008062
Martin v. Löwis11437992002-04-12 09:54:03 +00008063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 if test "$ac_cv_type_uintptr_t" = yes; then
8065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008067as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008068See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069 else
8070 ac_cv_sizeof_uintptr_t=0
8071 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073
Martin v. Löwis11437992002-04-12 09:54:03 +00008074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8076$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077
8078
8079
Martin v. Löwis11437992002-04-12 09:54:03 +00008080cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008081#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008082_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008083
Michael W. Hudson54241132001-12-07 15:38:26 +00008084
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008085fi
8086
Thomas Wouters89f507f2006-12-13 04:49:30 +00008087
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008088# The cast to long int works around a bug in the HP C Compiler
8089# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8090# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8091# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8093$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008094if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008096else
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008098#ifdef HAVE_SYS_TYPES_H
8099#include <sys/types.h>
8100#endif
8101
Matthias Kloseb9621712010-04-24 17:59:49 +00008102"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008103
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008104else
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 if test "$ac_cv_type_off_t" = yes; then
8106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008108as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008109See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008110 else
8111 ac_cv_sizeof_off_t=0
8112 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008114
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8117$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008118
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008119
8120
Martin v. Löwis11437992002-04-12 09:54:03 +00008121cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008122#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008123_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008124
Michael W. Hudson54241132001-12-07 15:38:26 +00008125
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8128$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008129if test "$have_long_long" = yes
8130then
8131if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008132 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008133
Matthias Kloseb9621712010-04-24 17:59:49 +00008134$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008135
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8137$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8140$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008141fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008142else
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8144$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008145fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008147# The cast to long int works around a bug in the HP C Compiler
8148# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8149# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8150# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8152$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008153if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008155else
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008157#ifdef HAVE_SYS_TYPES_H
8158#include <sys/types.h>
8159#endif
8160#ifdef HAVE_TIME_H
8161#include <time.h>
8162#endif
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008166else
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 if test "$ac_cv_type_time_t" = yes; then
8168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008170as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008171See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008172 else
8173 ac_cv_sizeof_time_t=0
8174 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008176
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8179$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008181
8182
Martin v. Löwis11437992002-04-12 09:54:03 +00008183cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008184#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008185_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008186
Michael W. Hudson54241132001-12-07 15:38:26 +00008187
8188
Trent Mick635f6fb2000-08-23 21:33:05 +00008189# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008190ac_save_cc="$CC"
8191if test "$ac_cv_kpthread" = "yes"
8192then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008193elif test "$ac_cv_kthread" = "yes"
8194then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008195elif test "$ac_cv_pthread" = "yes"
8196then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008197fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008198
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8200$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008201have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008203/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008204
8205 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
8208{
Guido van Rossum12580492000-09-24 16:47:19 +00008209pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ;
8211 return 0;
8212}
Matthias Kloseb159a552010-04-25 21:00:44 +00008213
Martin v. Löwis11437992002-04-12 09:54:03 +00008214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008215if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008216 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8220$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008221if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008223# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8224# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8225# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8227$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008228if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008232#ifdef HAVE_PTHREAD_H
8233#include <pthread.h>
8234#endif
8235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008237
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 if test "$ac_cv_type_pthread_t" = yes; then
8240 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008242as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008243See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008244 else
8245 ac_cv_sizeof_pthread_t=0
8246 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248
Trent Mick635f6fb2000-08-23 21:33:05 +00008249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8251$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008252
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008253
8254
Martin v. Löwis11437992002-04-12 09:54:03 +00008255cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008256#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008257_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008259
Trent Mick635f6fb2000-08-23 21:33:05 +00008260fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008261CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008262
Michael W. Hudson54241132001-12-07 15:38:26 +00008263
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008264case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008265 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008266 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8267 ;;
8268 Darwin/*)
8269 OTHER_LIBTOOL_OPT=""
8270 ;;
8271esac
8272
8273
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008274ARCH_RUN_32BIT=""
8275
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008276case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008277 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008278 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8279 if test "${enable_universalsdk}"; then
8280 :
8281 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008282 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008283 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008284 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008285 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008286 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008287 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008288 if test ${gcc_version} '<' 4.0
8289 then
8290 LIBTOOL_CRUFT="-lcc_dynamic"
8291 else
8292 LIBTOOL_CRUFT=""
8293 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008295 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008296else
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008298/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008299
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008300 #include <unistd.h>
8301 int main(int argc, char*argv[])
8302 {
8303 if (sizeof(long) == 4) {
8304 return 0;
8305 } else {
8306 return 1;
8307 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008308 }
8309
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008311if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008312 ac_osx_32bit=yes
8313else
Matthias Kloseb9621712010-04-24 17:59:49 +00008314 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008318fi
8319
8320
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008321 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008322 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008323 i386)
8324 MACOSX_DEFAULT_ARCH="i386"
8325 ;;
8326 ppc)
8327 MACOSX_DEFAULT_ARCH="ppc"
8328 ;;
8329 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008330 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008331 ;;
8332 esac
8333 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008334 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008335 i386)
8336 MACOSX_DEFAULT_ARCH="x86_64"
8337 ;;
8338 ppc)
8339 MACOSX_DEFAULT_ARCH="ppc64"
8340 ;;
8341 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008342 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008343 ;;
8344 esac
8345
8346 #ARCH_RUN_32BIT="true"
8347 fi
8348
8349 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008350 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008351 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008352esac
8353
Matthias Kloseb9621712010-04-24 17:59:49 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8355$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008356if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008357then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008358 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008360 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8365$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008366 if test $enable_shared = "yes"
8367 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008368 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 +00008369 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8372$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008373fi
8374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8376$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008377case $ac_sys_system/$ac_sys_release in
8378 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008381
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8383$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008384 ;;
8385 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8387$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008388 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008389esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008390
Guido van Rossum0a516c91994-09-12 10:58:40 +00008391# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008392
Michael W. Hudson54241132001-12-07 15:38:26 +00008393
8394
8395
8396
Benjamin Peterson99f03762010-04-11 22:15:28 +00008397
Thomas Wouters477c8d52006-05-27 19:21:47 +00008398
Guido van Rossum0a516c91994-09-12 10:58:40 +00008399# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008400# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008401# (Shared libraries in this instance are shared modules to be loaded into
8402# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8404$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008405if test -z "$LDSHARED"
8406then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008407 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008408 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008409 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008410 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008411 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008412 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008413 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008415 if test "$GCC" = "yes" ; then
8416 LDSHARED='$(CC) -shared'
8417 LDCXXSHARED='$(CXX) -shared'
8418 else
8419 LDSHARED='$(CC) -G'
8420 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008421 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008422 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008423 if test "$GCC" = "yes" ; then
8424 LDSHARED='$(CC) -shared'
8425 LDCXXSHARED='$(CXX) -shared'
8426 else
8427 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008428 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008429 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008430 LDSHARED='$(CC) -bundle'
8431 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008432 if test "$enable_framework" ; then
8433 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008434 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8435 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008436 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008437 else
8438 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008439 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008440 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008441 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008442 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008443 LDSHARED='$(CC) -bundle'
8444 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008445 if test "$enable_framework" ; then
8446 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008447 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8448 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008449 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008450 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008451 # No framework, use the Python app as bundle-loader
8452 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008453 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008454 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008455 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008456 Darwin/*)
8457 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8458 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008459
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008460 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008461 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008462 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008463 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008464 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008465 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8466 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008467 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008468 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008469 LDSHARED='$(CC) -bundle'
8470 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008471 if test "$enable_framework" ; then
8472 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008473 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8474 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008475 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008476 else
8477 # No framework, use the Python app as bundle-loader
8478 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8479 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008480 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008481 fi
8482 fi
8483 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008484 Linux*|GNU*|QNX*)
8485 LDSHARED='$(CC) -shared'
8486 LDCXXSHARED='$(CXX) -shared';;
8487 BSD/OS*/4*)
8488 LDSHARED="gcc -shared"
8489 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008490 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008491 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008492 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008493 LDSHARED='$(CC) -shared'
8494 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008495 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008496 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008497 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008498 OpenBSD*)
8499 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8500 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008501 LDSHARED='$(CC) -shared $(CCSHARED)'
8502 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008503 else
8504 case `uname -r` in
8505 [01].* | 2.[0-7] | 2.[0-7].*)
8506 LDSHARED="ld -Bshareable ${LDFLAGS}"
8507 ;;
8508 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008509 LDSHARED='$(CC) -shared $(CCSHARED)'
8510 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008511 ;;
8512 esac
8513 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008514 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008515 LDSHARED='$(CC) -shared'
8516 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008517 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008518 if test "$GCC" = "yes" ; then
8519 LDSHARED='$(CC) -shared'
8520 LDCXXSHARED='$(CXX) -shared'
8521 else
8522 LDSHARED='$(CC) -G'
8523 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008524 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008525 SCO_SV*)
8526 LDSHARED='$(CC) -Wl,-G,-Bexport'
8527 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8528 CYGWIN*)
8529 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8530 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008531 *) LDSHARED="ld";;
8532 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8535$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008536LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008537BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008538# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008539# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8541$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008542if test -z "$CCSHARED"
8543then
Guido van Rossum07397971997-04-29 21:49:50 +00008544 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008545 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008546 then CCSHARED="-fPIC";
8547 elif test `uname -p` = sparc;
8548 then CCSHARED="-xcode=pic32";
8549 else CCSHARED="-Kpic";
8550 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008551 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008552 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008553 else CCSHARED="+z";
8554 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008555 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008556 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008557 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008558 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008559 if test "$GCC" = "yes"
8560 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008561 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008562 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008563 SCO_SV*)
8564 if test "$GCC" = "yes"
8565 then CCSHARED="-fPIC"
8566 else CCSHARED="-Kpic -belf"
8567 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008568 IRIX*/6*) case $CC in
8569 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008570 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008571 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008572 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8575$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008576# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008577# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8579$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008580if test -z "$LINKFORSHARED"
8581then
Guido van Rossum07397971997-04-29 21:49:50 +00008582 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008583 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008584 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008585 LINKFORSHARED="-Wl,-E -Wl,+s";;
8586# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008587 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008588 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008589 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008591 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008592 if test "$enable_framework"
8593 then
Jack Jansenda49e192005-01-07 13:08:22 +00008594 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008595 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008596 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008597 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008598 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008599 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008600 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008601 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8602 then
8603 LINKFORSHARED="-Wl,--export-dynamic"
8604 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008605 SunOS/5*) case $CC in
8606 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008607 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008608 then
8609 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008610 fi;;
8611 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008612 CYGWIN*)
8613 if test $enable_shared = "no"
8614 then
8615 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8616 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008617 QNX*)
8618 # -Wl,-E causes the symbols to be added to the dynamic
8619 # symbol table so that they can be found when a module
8620 # is loaded. -N 2048K causes the stack size to be set
8621 # to 2048 kilobytes so that the stack doesn't overflow
8622 # when running test_compile.py.
8623 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008624 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8627$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008628
Michael W. Hudson54241132001-12-07 15:38:26 +00008629
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008630
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8632$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008633if test ! "$LIBRARY" = "$LDLIBRARY"
8634then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008635 case $ac_sys_system in
8636 CYGWIN*)
8637 # Cygwin needs CCSHARED when building extension DLLs
8638 # but not when building the interpreter DLL.
8639 CFLAGSFORSHARED='';;
8640 *)
8641 CFLAGSFORSHARED='$(CCSHARED)'
8642 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8645$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008646
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008647# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8648# library (with --enable-shared).
8649# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008650# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8651# if it is not required, since it creates a dependency of the shared library
8652# to LIBS. This, in turn, means that applications linking the shared libpython
8653# don't need to link LIBS explicitly. The default should be only changed
8654# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008655
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8657$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008658case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008659 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008660 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008661esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8663$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008664
8665
Guido van Rossum627b2d71993-12-24 10:39:16 +00008666# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8668$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008669if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008670 $as_echo_n "(cached) " >&6
8671else
8672 ac_check_lib_save_LIBS=$LIBS
8673LIBS="-lsendfile $LIBS"
8674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8675/* end confdefs.h. */
8676
8677/* Override any GCC internal prototype to avoid an error.
8678 Use char because int might match the return type of a GCC
8679 builtin and then its argument prototype would still apply. */
8680#ifdef __cplusplus
8681extern "C"
8682#endif
8683char sendfile ();
8684int
8685main ()
8686{
8687return sendfile ();
8688 ;
8689 return 0;
8690}
8691_ACEOF
8692if ac_fn_c_try_link "$LINENO"; then :
8693 ac_cv_lib_sendfile_sendfile=yes
8694else
8695 ac_cv_lib_sendfile_sendfile=no
8696fi
8697rm -f core conftest.err conftest.$ac_objext \
8698 conftest$ac_exeext conftest.$ac_ext
8699LIBS=$ac_check_lib_save_LIBS
8700fi
8701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8702$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008703if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008704 cat >>confdefs.h <<_ACEOF
8705#define HAVE_LIBSENDFILE 1
8706_ACEOF
8707
8708 LIBS="-lsendfile $LIBS"
8709
8710fi
8711
Matthias Kloseb9621712010-04-24 17:59:49 +00008712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8713$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008714if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008716else
Martin v. Löwis11437992002-04-12 09:54:03 +00008717 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008718LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722/* Override any GCC internal prototype to avoid an error.
8723 Use char because int might match the return type of a GCC
8724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008725#ifdef __cplusplus
8726extern "C"
8727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008728char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008729int
8730main ()
8731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ;
8734 return 0;
8735}
8736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008737if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742rm -f core conftest.err conftest.$ac_objext \
8743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008744LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8747$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008748if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 cat >>confdefs.h <<_ACEOF
8750#define HAVE_LIBDL 1
8751_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008752
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008753 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008754
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008755fi
8756 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8758$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008759if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008761else
Martin v. Löwis11437992002-04-12 09:54:03 +00008762 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008763LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008767/* Override any GCC internal prototype to avoid an error.
8768 Use char because int might match the return type of a GCC
8769 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008770#ifdef __cplusplus
8771extern "C"
8772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008773char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008774int
8775main ()
8776{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 ;
8779 return 0;
8780}
8781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008782if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008787rm -f core conftest.err conftest.$ac_objext \
8788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008789LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8792$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008793if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 cat >>confdefs.h <<_ACEOF
8795#define HAVE_LIBDLD 1
8796_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008797
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008798 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008799
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008800fi
8801 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008802
Georg Brandlb1441c72009-01-03 22:33:39 +00008803# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008804if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8806$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008807if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008809else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008810 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008814/* Override any GCC internal prototype to avoid an error.
8815 Use char because int might match the return type of a GCC
8816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008817#ifdef __cplusplus
8818extern "C"
8819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008820char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008821int
8822main ()
8823{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008825 ;
8826 return 0;
8827}
8828_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829for ac_lib in '' pthread rt posix4; do
8830 if test -z "$ac_lib"; then
8831 ac_res="none required"
8832 else
8833 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008837 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008839rm -f core conftest.err conftest.$ac_objext \
8840 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008841 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008844done
Victor Stinnere0be4232011-10-25 13:06:09 +02008845if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847else
8848 ac_cv_search_sem_init=no
8849fi
8850rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008851LIBS=$ac_func_search_save_LIBS
8852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8854$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008855ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008856if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008858
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008859fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008860 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008861 # posix4 on Solaris 2.6
8862 # pthread (first!) on Linux
8863fi
8864
Martin v. Löwis19d17342003-06-14 21:03:05 +00008865# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8867$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008868if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008870else
8871 ac_check_lib_save_LIBS=$LIBS
8872LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008874/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876/* Override any GCC internal prototype to avoid an error.
8877 Use char because int might match the return type of a GCC
8878 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008879#ifdef __cplusplus
8880extern "C"
8881#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008882char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008883int
8884main ()
8885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008887 ;
8888 return 0;
8889}
8890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008892 ac_cv_lib_intl_textdomain=yes
8893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008896rm -f core conftest.err conftest.$ac_objext \
8897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008898LIBS=$ac_check_lib_save_LIBS
8899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8901$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008902if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008903
Matthias Kloseb9621712010-04-24 17:59:49 +00008904$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008905
Brett Cannonc6d936e2009-06-07 20:09:53 +00008906 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008907fi
8908
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008909
8910# checks for system dependent C++ extensions support
8911case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8913$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008915/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008916
Georg Brandl59e87bd2011-02-15 19:48:59 +00008917 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008918int
8919main ()
8920{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008921loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 ;
8923 return 0;
8924}
Matthias Kloseb159a552010-04-25 21:00:44 +00008925
Martin v. Löwis11437992002-04-12 09:54:03 +00008926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008927if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008928
Matthias Kloseb159a552010-04-25 21:00:44 +00008929
Matthias Kloseb9621712010-04-24 17:59:49 +00008930$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008931
Matthias Kloseb159a552010-04-25 21:00:44 +00008932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008933$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008934
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008935else
Matthias Kloseb159a552010-04-25 21:00:44 +00008936
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008938$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008939
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941rm -f core conftest.err conftest.$ac_objext \
8942 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008943 *) ;;
8944esac
8945
Guido van Rossum70c7f481998-03-26 18:44:10 +00008946# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8948$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008949if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008951else
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008953LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957/* Override any GCC internal prototype to avoid an error.
8958 Use char because int might match the return type of a GCC
8959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008960#ifdef __cplusplus
8961extern "C"
8962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008963char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008964int
8965main ()
8966{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ;
8969 return 0;
8970}
8971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008977rm -f core conftest.err conftest.$ac_objext \
8978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008979LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8982$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008983if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008984 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008985fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008986 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8988$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008989if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008991else
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008993LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008997/* Override any GCC internal prototype to avoid an error.
8998 Use char because int might match the return type of a GCC
8999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000#ifdef __cplusplus
9001extern "C"
9002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009003char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009004int
9005main ()
9006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009007return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 ;
9009 return 0;
9010}
9011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009012if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009014else
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009017rm -f core conftest.err conftest.$ac_objext \
9018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009019LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9022$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009023if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009024 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009025fi
9026 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009027
Matthias Kloseb9621712010-04-24 17:59:49 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9029$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009031# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009032if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9035$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009036LIBS="$withval $LIBS"
9037
9038else
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9040$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009041fi
9042
Guido van Rossum7f43da71994-08-01 12:15:30 +00009043
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009044if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009045 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9046set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9048$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009049if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009051else
9052 case $PKG_CONFIG in
9053 [\\/]* | ?:[\\/]*)
9054 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9055 ;;
9056 *)
9057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9058for as_dir in $PATH
9059do
9060 IFS=$as_save_IFS
9061 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009064 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009066 break 2
9067 fi
9068done
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009070IFS=$as_save_IFS
9071
9072 ;;
9073esac
9074fi
9075PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9076if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9078$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009079else
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9081$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009082fi
9083
9084
9085fi
9086if test -z "$ac_cv_path_PKG_CONFIG"; then
9087 ac_pt_PKG_CONFIG=$PKG_CONFIG
9088 # Extract the first word of "pkg-config", so it can be a program name with args.
9089set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9091$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009092if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009094else
9095 case $ac_pt_PKG_CONFIG in
9096 [\\/]* | ?:[\\/]*)
9097 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9098 ;;
9099 *)
9100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9101for as_dir in $PATH
9102do
9103 IFS=$as_save_IFS
9104 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009107 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009109 break 2
9110 fi
9111done
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009113IFS=$as_save_IFS
9114
9115 ;;
9116esac
9117fi
9118ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9119if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9121$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009122else
Matthias Kloseb9621712010-04-24 17:59:49 +00009123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009125fi
9126
9127 if test "x$ac_pt_PKG_CONFIG" = x; then
9128 PKG_CONFIG=""
9129 else
9130 case $cross_compiling:$ac_tool_warned in
9131yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009134ac_tool_warned=yes ;;
9135esac
9136 PKG_CONFIG=$ac_pt_PKG_CONFIG
9137 fi
9138else
9139 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9140fi
9141
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009142
9143# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9145$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009146
9147# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009148if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009149 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009150else
9151 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009152fi
9153
9154
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9156$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009157
9158# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9160$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009161
9162# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009163if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009164 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009165else
9166 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009167fi
9168
9169
9170if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009171 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9172else
9173 LIBFFI_INCLUDEDIR=""
9174fi
9175
9176
Matthias Kloseb9621712010-04-24 17:59:49 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9178$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009179
Stefan Krah60187b52012-03-23 19:06:27 +01009180# Check for use of the system libmpdec library
9181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9182$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9183
9184# Check whether --with-system_libmpdec was given.
9185if test "${with_system_libmpdec+set}" = set; then :
9186 withval=$with_system_libmpdec;
9187else
9188 with_system_libmpdec="no"
9189fi
9190
9191
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9193$as_echo "$with_system_libmpdec" >&6; }
9194
Benjamin Peterson076ed002010-10-31 17:11:02 +00009195# Check for support for loadable sqlite extensions
9196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9197$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9198# Check whether --enable-loadable-sqlite-extensions was given.
9199if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9200 enableval=$enable_loadable_sqlite_extensions;
9201else
9202 enable_loadable_sqlite_extensions="no"
9203fi
9204
9205
9206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9207$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9208
Matthias Klose55708cc2009-04-30 08:06:49 +00009209# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9211$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009212
9213# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009214if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009215 withval=$with_dbmliborder;
9216if test x$with_dbmliborder = xyes
9217then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009218as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009219else
9220 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9221 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9222 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009223 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009224 fi
9225 done
9226fi
9227fi
9228
Matthias Kloseb9621712010-04-24 17:59:49 +00009229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9230$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009231
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009232# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009233
9234
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9236$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009239if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240 withval=$with_signal_module;
9241fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009242
9243
9244if test -z "$with_signal_module"
9245then with_signal_module="yes"
9246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9248$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009249
9250if test "${with_signal_module}" = "yes"; then
9251 USE_SIGNAL_MODULE=""
9252 SIGNAL_OBJS=""
9253else
9254 USE_SIGNAL_MODULE="#"
9255 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9256fi
9257
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009258# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009259
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009260USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262
Martin v. Löwis11437992002-04-12 09:54:03 +00009263
9264# Templates for things AC_DEFINEd more than once.
9265# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009266
9267
Martin v. Löwis11437992002-04-12 09:54:03 +00009268
Matthias Kloseb9621712010-04-24 17:59:49 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9270$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009273if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009274 withval=$with_threads;
9275fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009276
9277
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009278# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009281if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282 withval=$with_thread; with_threads=$with_thread
9283fi
9284
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009285
9286if test -z "$with_threads"
9287then with_threads="yes"
9288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9290$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009291
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009292
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009293if test "$with_threads" = "no"
9294then
9295 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009296elif test "$ac_cv_pthread_is_default" = yes
9297then
Matthias Kloseb9621712010-04-24 17:59:49 +00009298 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009299
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009300 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009301 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009302
9303 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009305elif test "$ac_cv_kpthread" = "yes"
9306then
9307 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009308 if test "$ac_cv_cxx_thread" = "yes"; then
9309 CXX="$CXX -Kpthread"
9310 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009311 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009312
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009313 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009314 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009315elif test "$ac_cv_kthread" = "yes"
9316then
9317 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009318 if test "$ac_cv_cxx_thread" = "yes"; then
9319 CXX="$CXX -Kthread"
9320 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009321 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009322
9323 posix_threads=yes
9324 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009325elif test "$ac_cv_pthread" = "yes"
9326then
9327 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009328 if test "$ac_cv_cxx_thread" = "yes"; then
9329 CXX="$CXX -pthread"
9330 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009331 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009332
9333 posix_threads=yes
9334 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009335else
9336 if test ! -z "$with_threads" -a -d "$with_threads"
9337 then LDFLAGS="$LDFLAGS -L$with_threads"
9338 fi
9339 if test ! -z "$withval" -a -d "$withval"
9340 then LDFLAGS="$LDFLAGS -L$withval"
9341 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009342
9343 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009344 # define _POSIX_THREADS in unistd.h. Some apparently don't
9345 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9347$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009349/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009350
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009351#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009352#ifdef _POSIX_THREADS
9353yes
9354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009355
9356_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009359 unistd_defines_pthreads=yes
9360else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009361 unistd_defines_pthreads=no
9362fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009363rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9366$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009367
Matthias Kloseb9621712010-04-24 17:59:49 +00009368 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009369
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009370 # Just looking for pthread_create in libpthread is not enough:
9371 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9372 # So we really have to include pthread.h, and then link.
9373 _libs=$LIBS
9374 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9376$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009378/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009379
9380#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009381#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009382
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009383void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009384int
9385main ()
9386{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009387
9388pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 ;
9390 return 0;
9391}
9392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009394
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9396$as_echo "yes" >&6; }
9397 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009398
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009399 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009400 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009401else
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009403 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009405if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009406 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009407
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009408 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009409 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009410else
Guido van Rossumad678af1998-10-02 14:42:15 +00009411
Matthias Kloseb9621712010-04-24 17:59:49 +00009412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9413$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009414if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009416else
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009418LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422/* Override any GCC internal prototype to avoid an error.
9423 Use char because int might match the return type of a GCC
9424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009425#ifdef __cplusplus
9426extern "C"
9427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009428char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009429int
9430main ()
9431{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ;
9434 return 0;
9435}
9436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009437if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009439else
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009442rm -f core conftest.err conftest.$ac_objext \
9443 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009444LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9447$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009448if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009450
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009451 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009452 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009453 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009454else
Greg Steinadf63d62000-07-05 10:38:09 +00009455
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9457$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009458if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009460else
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009462LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009466/* Override any GCC internal prototype to avoid an error.
9467 Use char because int might match the return type of a GCC
9468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009469#ifdef __cplusplus
9470extern "C"
9471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009472char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009473int
9474main ()
9475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ;
9478 return 0;
9479}
9480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009483else
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009486rm -f core conftest.err conftest.$ac_objext \
9487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009488LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9491$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009492if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009494
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009495 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009496 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009497 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009498else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009499
Matthias Kloseb9621712010-04-24 17:59:49 +00009500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9501$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009502if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009503 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009504else
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009506LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510/* Override any GCC internal prototype to avoid an error.
9511 Use char because int might match the return type of a GCC
9512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009513#ifdef __cplusplus
9514extern "C"
9515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009516char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009517int
9518main ()
9519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ;
9522 return 0;
9523}
9524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009527else
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009530rm -f core conftest.err conftest.$ac_objext \
9531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009532LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9535$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009536if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009538
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009539 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009540 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009541 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009542else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009543
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9545$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009546if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009547 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009548else
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009550LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009554/* Override any GCC internal prototype to avoid an error.
9555 Use char because int might match the return type of a GCC
9556 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009557#ifdef __cplusplus
9558extern "C"
9559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009560char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009561int
9562main ()
9563{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 ;
9566 return 0;
9567}
9568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009569if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009571else
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574rm -f core conftest.err conftest.$ac_objext \
9575 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009576LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9579$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009580if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009581 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009582
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009583 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009584 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009585 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009586else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009587
Martin v. Löwis130fb172001-07-19 11:00:41 +00009588 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009589fi
9590
Guido van Rossum627b2d71993-12-24 10:39:16 +00009591
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009592fi
9593
Guido van Rossum0be3e491997-05-22 20:33:33 +00009594fi
9595
Guido van Rossum49545951997-12-02 19:28:29 +00009596fi
9597
Guido van Rossumb93a8621998-05-07 13:27:32 +00009598fi
9599
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009601rm -f core conftest.err conftest.$ac_objext \
9602 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009603
Matthias Kloseb9621712010-04-24 17:59:49 +00009604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9605$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009606if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009607 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009608else
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009610LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614/* Override any GCC internal prototype to avoid an error.
9615 Use char because int might match the return type of a GCC
9616 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009617#ifdef __cplusplus
9618extern "C"
9619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009620char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009621int
9622main ()
9623{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 ;
9626 return 0;
9627}
9628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009631else
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009634rm -f core conftest.err conftest.$ac_objext \
9635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009636LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9639$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009640if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009642
Martin v. Löwis130fb172001-07-19 11:00:41 +00009643 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009644 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009645 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009646fi
9647
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009648
Neal Norwitza978ab02002-11-02 16:58:05 +00009649 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9651$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009652if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009653 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009654else
Martin v. Löwis11437992002-04-12 09:54:03 +00009655 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009656LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660/* Override any GCC internal prototype to avoid an error.
9661 Use char because int might match the return type of a GCC
9662 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009663#ifdef __cplusplus
9664extern "C"
9665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009666char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009667int
9668main ()
9669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ;
9672 return 0;
9673}
9674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009675if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009677else
Matthias Kloseb9621712010-04-24 17:59:49 +00009678 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009680rm -f core conftest.err conftest.$ac_objext \
9681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9685$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009686if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009687 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009688
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009689 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009690 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009691 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692fi
9693
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009694 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009695fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009696
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009697if test "$posix_threads" = "yes"; then
9698 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009699
Matthias Kloseb9621712010-04-24 17:59:49 +00009700$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009701
9702 fi
9703
9704 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9705 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009706 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009707$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009708
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009709 ;;
9710 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009711$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009712
9713 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009714 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009715$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009716
9717 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009718 esac
9719
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9721$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009722 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009724else
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009726 ac_cv_pthread_system_supported=no
9727else
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009729/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009730
9731 #include <stdio.h>
9732 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009733 void *foo(void *parm) {
9734 return NULL;
9735 }
9736 main() {
9737 pthread_attr_t attr;
9738 pthread_t id;
9739 if (pthread_attr_init(&attr)) exit(-1);
9740 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9741 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9742 exit(0);
9743 }
9744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009745if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009746 ac_cv_pthread_system_supported=yes
9747else
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009752fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754
Guido van Rossum627b2d71993-12-24 10:39:16 +00009755fi
9756
Matthias Kloseb9621712010-04-24 17:59:49 +00009757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9758$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009759 if test "$ac_cv_pthread_system_supported" = "yes"; then
9760
Matthias Kloseb9621712010-04-24 17:59:49 +00009761$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009762
9763 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 for ac_func in pthread_sigmask
9765do :
9766 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009767if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009768 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009769#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009770_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009771 case $ac_sys_system in
9772 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009773
Matthias Kloseb9621712010-04-24 17:59:49 +00009774$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009775
9776 ;;
9777 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009778fi
9779done
9780
9781fi
9782
9783
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009784# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009785
Matthias Kloseb9621712010-04-24 17:59:49 +00009786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9787$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009789if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009790 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009791 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9793$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009794 ipv6=no
9795 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9797$as_echo "yes" >&6; }
9798 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009799
9800 ipv6=yes
9801 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009806/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009807 /* AF_INET6 available check */
9808#include <sys/types.h>
9809#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009810int
9811main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009812{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009813int domain = AF_INET6;
9814 ;
9815 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009816}
Martin v. Löwis11437992002-04-12 09:54:03 +00009817_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009818if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009819
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9821$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009822 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009823
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009824else
Matthias Kloseb159a552010-04-25 21:00:44 +00009825
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9827$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009828 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009829
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009830fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009833if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9835$as_echo_n "checking if RFC2553 API is available... " >&6; }
9836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009837/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009838
9839 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009840#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009841int
9842main ()
9843{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009844struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009845 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 ;
9847 return 0;
9848}
Matthias Kloseb159a552010-04-25 21:00:44 +00009849
Martin v. Löwis11437992002-04-12 09:54:03 +00009850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009851if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009852
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009854$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009855 ipv6=yes
9856
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009857else
Matthias Kloseb159a552010-04-25 21:00:44 +00009858
9859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009860$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009861 ipv6=no
9862
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009865fi
9866
9867if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009868 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009869
9870fi
9871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872fi
9873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009874
9875ipv6type=unknown
9876ipv6lib=none
9877ipv6trylibc=no
9878
9879if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9881$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009882 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9883 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009884 case $i in
9885 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009887/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009888
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889#include <netinet/in.h>
9890#ifdef IPV6_INRIA_VERSION
9891yes
9892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009893_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009896 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009898rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899
9900 ;;
9901 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009904
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905#include <netinet/in.h>
9906#ifdef __KAME__
9907yes
9908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009909_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912 ipv6type=$i;
9913 ipv6lib=inet6
9914 ipv6libdir=/usr/local/v6/lib
9915 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009917rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009918
9919 ;;
9920 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009922/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009923
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009924#include <features.h>
9925#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9926yes
9927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009928_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009930 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931 ipv6type=$i;
9932 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009933fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009934rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009935
9936 ;;
9937 linux-inet6)
9938 if test -d /usr/inet6; then
9939 ipv6type=$i
9940 ipv6lib=inet6
9941 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009942 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009943 fi
9944 ;;
9945 solaris)
9946 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009947 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009948 ipv6type=$i
9949 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009950 fi
9951 fi
9952 ;;
9953 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009955/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009956
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009957#include <sys/param.h>
9958#ifdef _TOSHIBA_INET6
9959yes
9960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009961_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009964 ipv6type=$i;
9965 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009966 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009967fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009968rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009969
9970 ;;
9971 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009973/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009974
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009975#include </usr/local/v6/include/sys/v6config.h>
9976#ifdef __V6D__
9977yes
9978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009979_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009982 ipv6type=$i;
9983 ipv6lib=v6;
9984 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009985 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009986fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009987rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009988
9989 ;;
9990 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009992/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009993
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009994#include <sys/param.h>
9995#ifdef _ZETA_MINAMI_INET6
9996yes
9997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009998_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010000 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010001 ipv6type=$i;
10002 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010003 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010004fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010005rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010006
10007 ;;
10008 esac
10009 if test "$ipv6type" != "unknown"; then
10010 break
10011 fi
10012 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10014$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010015fi
10016
10017if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10018 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10019 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10020 echo "using lib$ipv6lib"
10021 else
10022 if test $ipv6trylibc = "yes"; then
10023 echo "using libc"
10024 else
10025 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10026 echo "You need to fetch lib$ipv6lib.a from appropriate"
10027 echo 'ipv6 kit and compile beforehand.'
10028 exit 1
10029 fi
10030 fi
10031fi
10032
Matthias Kloseb9621712010-04-24 17:59:49 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10034$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010036/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010037
10038 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010039int
10040main ()
10041{
10042FSIORefNum fRef = 0
10043 ;
10044 return 0;
10045}
Matthias Kloseb159a552010-04-25 21:00:44 +000010046
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010048if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010049
Matthias Kloseb159a552010-04-25 21:00:44 +000010050
Matthias Kloseb9621712010-04-24 17:59:49 +000010051$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10054$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010055
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010056else
Matthias Kloseb159a552010-04-25 21:00:44 +000010057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010060
10061fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10063
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010064# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10066$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010069if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070 withval=$with_doc_strings;
10071fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010072
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010073
10074if test -z "$with_doc_strings"
10075then with_doc_strings="yes"
10076fi
10077if test "$with_doc_strings" != "no"
10078then
10079
Matthias Kloseb9621712010-04-24 17:59:49 +000010080$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010081
10082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10084$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010085
Antoine Pitrou042b1282010-08-13 21:15:58 +000010086# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10088$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010091if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010093if test "$withval" != no
10094then
10095
Matthias Kloseb9621712010-04-24 17:59:49 +000010096$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10099$as_echo "yes" >&6; }
10100else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10101$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010102fi
10103else
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10105$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106fi
10107
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010108
10109# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10111$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010113# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010114if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115 withval=$with_pymalloc;
10116fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010117
Neil Schemenauera35c6882001-02-27 04:45:05 +000010118
Neil Schemenauer16c22972002-03-22 15:34:49 +000010119if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010120then
10121 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010122fi
10123if test "$with_pymalloc" != "no"
10124then
Martin v. Löwis11437992002-04-12 09:54:03 +000010125
Matthias Kloseb9621712010-04-24 17:59:49 +000010126$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010127
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010128 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10131$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010132
Benjamin Peterson05159c42009-12-03 03:01:27 +000010133# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10135$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010136
10137# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010138if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010139 withval=$with_valgrind;
10140else
10141 with_valgrind=no
10142fi
10143
Matthias Kloseb9621712010-04-24 17:59:49 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10145$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010146if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 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 +020010148if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010149
Matthias Kloseb9621712010-04-24 17:59:49 +000010150$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010151
10152else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010153 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010154
10155fi
10156
10157
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010158 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010159fi
10160
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010161# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010162
Guido van Rossum98935bf2001-09-05 19:13:16 +000010163DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010164
Guido van Rossume97ee181999-12-20 21:27:22 +000010165# the dlopen() function means we might want to use dynload_shlib.o. some
10166# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010167for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010168do :
10169 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010170if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010172#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010173_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010174
Guido van Rossume97ee181999-12-20 21:27:22 +000010175fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010176done
Guido van Rossume97ee181999-12-20 21:27:22 +000010177
Michael W. Hudson54241132001-12-07 15:38:26 +000010178
Guido van Rossume97ee181999-12-20 21:27:22 +000010179# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10180# loading of modules.
10181
Matthias Kloseb9621712010-04-24 17:59:49 +000010182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10183$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010184if test -z "$DYNLOADFILE"
10185then
10186 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010187 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10188 if test "$ac_cv_func_dlopen" = yes
10189 then DYNLOADFILE="dynload_shlib.o"
10190 else DYNLOADFILE="dynload_aix.o"
10191 fi
10192 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010193 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010194 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10195 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010196 *)
10197 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10198 # out any dynamic loading
10199 if test "$ac_cv_func_dlopen" = yes
10200 then DYNLOADFILE="dynload_shlib.o"
10201 else DYNLOADFILE="dynload_stub.o"
10202 fi
10203 ;;
10204 esac
10205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10207$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010208if test "$DYNLOADFILE" != "dynload_stub.o"
10209then
Martin v. Löwis11437992002-04-12 09:54:03 +000010210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010212
10213fi
10214
Neil Schemenauer4e425612001-06-19 15:44:15 +000010215# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10216
Michael W. Hudson54241132001-12-07 15:38:26 +000010217
Matthias Kloseb9621712010-04-24 17:59:49 +000010218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10219$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010220if test -z "$MACHDEP_OBJS"
10221then
Jack Jansene578a632001-08-15 01:27:14 +000010222 MACHDEP_OBJS=$extra_machdep_objs
10223else
10224 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010225fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010226if test -z "$MACHDEP_OBJS"; then
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10228$as_echo "none" >&6; }
10229else
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10231$as_echo "$MACHDEP_OBJS" >&6; }
10232fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010233
Guido van Rossum627b2d71993-12-24 10:39:16 +000010234# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010235for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010236 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010237 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010238 futimens futimes gai_strerror \
10239 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010240 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010241 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010242 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10243 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010244 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010245 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010246 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010247 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010248 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010249 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010250 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10251 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010252 sigaction sigaltstack siginterrupt sigpending sigrelse \
10253 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010254 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010255 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10256 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010257do :
10258 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10259ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010260if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010262#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010263_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010264
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010265fi
10266done
10267
Michael W. Hudson54241132001-12-07 15:38:26 +000010268
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010269ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10270 #include <dirent.h>
10271"
10272if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10273
10274$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10275
10276fi
10277
10278
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010279# For some functions, having a definition is not sufficient, since
10280# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10282$as_echo_n "checking for chroot... " >&6; }
10283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010284/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010285#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010286int
10287main ()
10288{
10289void *x=chroot
10290 ;
10291 return 0;
10292}
10293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010294if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010295
Matthias Kloseb9621712010-04-24 17:59:49 +000010296$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010297
Matthias Kloseb159a552010-04-25 21:00:44 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010299$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010300else
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010303
10304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10307$as_echo_n "checking for link... " >&6; }
10308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010310#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010311int
10312main ()
10313{
10314void *x=link
10315 ;
10316 return 0;
10317}
10318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010320
Matthias Kloseb9621712010-04-24 17:59:49 +000010321$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010322
Matthias Kloseb159a552010-04-25 21:00:44 +000010323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010324$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010325else
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10327$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010328
10329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10332$as_echo_n "checking for symlink... " >&6; }
10333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010334/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010335#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010336int
10337main ()
10338{
10339void *x=symlink
10340 ;
10341 return 0;
10342}
10343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010345
Matthias Kloseb9621712010-04-24 17:59:49 +000010346$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010347
Matthias Kloseb159a552010-04-25 21:00:44 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010349$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010350else
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10352$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010353
10354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10357$as_echo_n "checking for fchdir... " >&6; }
10358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010359/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010360#include <unistd.h>
10361int
10362main ()
10363{
10364void *x=fchdir
10365 ;
10366 return 0;
10367}
10368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010370
Matthias Kloseb9621712010-04-24 17:59:49 +000010371$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010372
Matthias Kloseb159a552010-04-25 21:00:44 +000010373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010374$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010375else
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010378
10379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10382$as_echo_n "checking for fsync... " >&6; }
10383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010384/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010385#include <unistd.h>
10386int
10387main ()
10388{
10389void *x=fsync
10390 ;
10391 return 0;
10392}
10393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010395
Matthias Kloseb9621712010-04-24 17:59:49 +000010396$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010397
Matthias Kloseb159a552010-04-25 21:00:44 +000010398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010399$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010400else
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10402$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010403
10404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10407$as_echo_n "checking for fdatasync... " >&6; }
10408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010409/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010410#include <unistd.h>
10411int
10412main ()
10413{
10414void *x=fdatasync
10415 ;
10416 return 0;
10417}
10418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010422
Matthias Kloseb159a552010-04-25 21:00:44 +000010423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010424$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010425else
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010428
10429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10432$as_echo_n "checking for epoll... " >&6; }
10433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010434/* end confdefs.h. */
10435#include <sys/epoll.h>
10436int
10437main ()
10438{
10439void *x=epoll_create
10440 ;
10441 return 0;
10442}
10443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010447
Matthias Kloseb159a552010-04-25 21:00:44 +000010448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010449$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010450else
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10452$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010453
10454fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10457$as_echo_n "checking for epoll_create1... " >&6; }
10458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10459/* end confdefs.h. */
10460#include <sys/epoll.h>
10461int
10462main ()
10463{
10464void *x=epoll_create1
10465 ;
10466 return 0;
10467}
10468_ACEOF
10469if ac_fn_c_try_compile "$LINENO"; then :
10470
10471$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10472
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10474$as_echo "yes" >&6; }
10475else
10476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10477$as_echo "no" >&6; }
10478
10479fi
10480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10482$as_echo_n "checking for kqueue... " >&6; }
10483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010484/* end confdefs.h. */
10485
10486#include <sys/types.h>
10487#include <sys/event.h>
10488
10489int
10490main ()
10491{
10492int x=kqueue()
10493 ;
10494 return 0;
10495}
10496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010497if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010498
Matthias Kloseb9621712010-04-24 17:59:49 +000010499$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010500
Matthias Kloseb159a552010-04-25 21:00:44 +000010501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010502$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010503else
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010506
10507fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010509# On some systems (eg. FreeBSD 5), we would find a definition of the
10510# functions ctermid_r, setgroups in the library, but no prototype
10511# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10512# address to avoid compiler warnings and potential miscompilations
10513# because of the missing prototypes.
10514
Matthias Kloseb9621712010-04-24 17:59:49 +000010515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10516$as_echo_n "checking for ctermid_r... " >&6; }
10517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010518/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010519
Martin v. Löwisd5843682002-11-21 20:41:28 +000010520#include <stdio.h>
10521
Martin v. Löwisd5843682002-11-21 20:41:28 +000010522int
10523main ()
10524{
10525void* p = ctermid_r
10526 ;
10527 return 0;
10528}
10529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010531
Matthias Kloseb9621712010-04-24 17:59:49 +000010532$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010533
Matthias Kloseb159a552010-04-25 21:00:44 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010535$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010536else
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10538$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010539
10540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10542
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10544$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010545if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010546 $as_echo_n "(cached) " >&6
10547else
10548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010549/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010550#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010551int
10552main ()
10553{
10554void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010555
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010556 ;
10557 return 0;
10558}
10559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010560if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010561 ac_cv_flock_decl=yes
10562else
10563 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010564
10565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010567
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010568fi
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10570$as_echo "$ac_cv_flock_decl" >&6; }
10571if test "x${ac_cv_flock_decl}" = xyes; then
10572 for ac_func in flock
10573do :
10574 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010575if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010576 cat >>confdefs.h <<_ACEOF
10577#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010578_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010579
Antoine Pitroua3000072010-09-07 14:52:42 +000010580else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010582$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010583if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010584 $as_echo_n "(cached) " >&6
10585else
10586 ac_check_lib_save_LIBS=$LIBS
10587LIBS="-lbsd $LIBS"
10588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10589/* end confdefs.h. */
10590
10591/* Override any GCC internal prototype to avoid an error.
10592 Use char because int might match the return type of a GCC
10593 builtin and then its argument prototype would still apply. */
10594#ifdef __cplusplus
10595extern "C"
10596#endif
10597char flock ();
10598int
10599main ()
10600{
10601return flock ();
10602 ;
10603 return 0;
10604}
10605_ACEOF
10606if ac_fn_c_try_link "$LINENO"; then :
10607 ac_cv_lib_bsd_flock=yes
10608else
10609 ac_cv_lib_bsd_flock=no
10610fi
10611rm -f core conftest.err conftest.$ac_objext \
10612 conftest$ac_exeext conftest.$ac_ext
10613LIBS=$ac_check_lib_save_LIBS
10614fi
10615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10616$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010617if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010618 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010619
10620
10621$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10622
10623
10624fi
10625
10626
10627fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010628done
10629
Antoine Pitroua3000072010-09-07 14:52:42 +000010630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10633$as_echo_n "checking for getpagesize... " >&6; }
10634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010636
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010637#include <unistd.h>
10638
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010639int
10640main ()
10641{
10642void* p = getpagesize
10643 ;
10644 return 0;
10645}
10646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010650
Matthias Kloseb159a552010-04-25 21:00:44 +000010651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010652$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010653else
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10655$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010656
10657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010659
Victor Stinner984890f2011-11-24 13:53:38 +010010660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10661$as_echo_n "checking for broken unsetenv... " >&6; }
10662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10663/* end confdefs.h. */
10664
10665#include <stdlib.h>
10666
10667int
10668main ()
10669{
10670int res = unsetenv("DUMMY")
10671 ;
10672 return 0;
10673}
10674_ACEOF
10675if ac_fn_c_try_compile "$LINENO"; then :
10676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10677$as_echo "no" >&6; }
10678else
10679
10680$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10681
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10683$as_echo "yes" >&6; }
10684
10685fi
10686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10687
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010688for ac_prog in true
10689do
10690 # Extract the first word of "$ac_prog", so it can be a program name with args.
10691set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10693$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010694if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010696else
10697 if test -n "$TRUE"; then
10698 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10699else
10700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10701for as_dir in $PATH
10702do
10703 IFS=$as_save_IFS
10704 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010707 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 $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 +000010709 break 2
10710 fi
10711done
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010714
10715fi
10716fi
10717TRUE=$ac_cv_prog_TRUE
10718if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10720$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010721else
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10723$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010724fi
10725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010727 test -n "$TRUE" && break
10728done
10729test -n "$TRUE" || TRUE="/bin/true"
10730
10731
Matthias Kloseb9621712010-04-24 17:59:49 +000010732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10733$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010734if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010736else
10737 ac_check_lib_save_LIBS=$LIBS
10738LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010740/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742/* Override any GCC internal prototype to avoid an error.
10743 Use char because int might match the return type of a GCC
10744 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010745#ifdef __cplusplus
10746extern "C"
10747#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010748char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010749int
10750main ()
10751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010753 ;
10754 return 0;
10755}
10756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010758 ac_cv_lib_c_inet_aton=yes
10759else
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010762rm -f core conftest.err conftest.$ac_objext \
10763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010764LIBS=$ac_check_lib_save_LIBS
10765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10767$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010768if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010769 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010770else
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10772$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010773if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010775else
10776 ac_check_lib_save_LIBS=$LIBS
10777LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781/* Override any GCC internal prototype to avoid an error.
10782 Use char because int might match the return type of a GCC
10783 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010784#ifdef __cplusplus
10785extern "C"
10786#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010787char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010788int
10789main ()
10790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010792 ;
10793 return 0;
10794}
10795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010797 ac_cv_lib_resolv_inet_aton=yes
10798else
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010801rm -f core conftest.err conftest.$ac_objext \
10802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010803LIBS=$ac_check_lib_save_LIBS
10804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10806$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010807if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010808 cat >>confdefs.h <<_ACEOF
10809#define HAVE_LIBRESOLV 1
10810_ACEOF
10811
10812 LIBS="-lresolv $LIBS"
10813
10814fi
10815
10816
10817fi
10818
10819
Christian Heimesd0764e22007-12-04 15:00:33 +000010820# On Tru64, chflags seems to be present, but calling it will
10821# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10823$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010824if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010826else
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010828 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010829else
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010831/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010832
Christian Heimesd0764e22007-12-04 15:00:33 +000010833#include <sys/stat.h>
10834#include <unistd.h>
10835int main(int argc, char*argv[])
10836{
10837 if(chflags(argv[0], 0) != 0)
10838 return 1;
10839 return 0;
10840}
Ned Deily3eb67d52011-06-28 00:00:28 -070010841
Christian Heimesd0764e22007-12-04 15:00:33 +000010842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010843if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010844 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010845else
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010850fi
10851
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10855$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010856if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010858if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010859 ac_cv_have_chflags="yes"
10860else
10861 ac_cv_have_chflags="no"
10862fi
10863
10864fi
10865if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010868
10869fi
10870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10872$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010873if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010875else
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010877 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010878else
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010880/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010881
Christian Heimesd0764e22007-12-04 15:00:33 +000010882#include <sys/stat.h>
10883#include <unistd.h>
10884int main(int argc, char*argv[])
10885{
10886 if(lchflags(argv[0], 0) != 0)
10887 return 1;
10888 return 0;
10889}
Ned Deily3eb67d52011-06-28 00:00:28 -070010890
Christian Heimesd0764e22007-12-04 15:00:33 +000010891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010892if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010893 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010894else
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010899fi
10900
10901
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10904$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010905if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010907if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010908 ac_cv_have_lchflags="yes"
10909else
10910 ac_cv_have_lchflags="no"
10911fi
10912
10913fi
10914if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010917
10918fi
10919
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010920case $ac_sys_system/$ac_sys_release in
10921Darwin/*)
10922 _CUR_CFLAGS="${CFLAGS}"
10923 _CUR_LDFLAGS="${LDFLAGS}"
10924 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10925 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10926 ;;
10927esac
10928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10930$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010931if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010933else
10934 ac_check_lib_save_LIBS=$LIBS
10935LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010937/* end confdefs.h. */
10938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010939/* Override any GCC internal prototype to avoid an error.
10940 Use char because int might match the return type of a GCC
10941 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010942#ifdef __cplusplus
10943extern "C"
10944#endif
10945char inflateCopy ();
10946int
10947main ()
10948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010950 ;
10951 return 0;
10952}
10953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010954if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010955 ac_cv_lib_z_inflateCopy=yes
10956else
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010959rm -f core conftest.err conftest.$ac_objext \
10960 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010961LIBS=$ac_check_lib_save_LIBS
10962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10964$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010965if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010968
10969fi
10970
10971
10972case $ac_sys_system/$ac_sys_release in
10973Darwin/*)
10974 CFLAGS="${_CUR_CFLAGS}"
10975 LDFLAGS="${_CUR_LDFLAGS}"
10976 ;;
10977esac
10978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10980$as_echo_n "checking for hstrerror... " >&6; }
10981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010982/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010983
Martin v. Löwise9416172003-05-03 10:12:45 +000010984#include <netdb.h>
10985
Martin v. Löwise9416172003-05-03 10:12:45 +000010986int
10987main ()
10988{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010989void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010990 ;
10991 return 0;
10992}
10993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010994if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010995
Matthias Kloseb9621712010-04-24 17:59:49 +000010996$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010997
Matthias Kloseb159a552010-04-25 21:00:44 +000010998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010999$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011000else
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11002$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011003
11004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011005rm -f core conftest.err conftest.$ac_objext \
11006 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11009$as_echo_n "checking for inet_aton... " >&6; }
11010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011011/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011012
Martin v. Löwis86d66262006-02-17 08:40:11 +000011013#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011014#include <sys/socket.h>
11015#include <netinet/in.h>
11016#include <arpa/inet.h>
11017
Martin v. Löwise9416172003-05-03 10:12:45 +000011018int
11019main ()
11020{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011021void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011022 ;
11023 return 0;
11024}
11025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011026if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011029
Matthias Kloseb159a552010-04-25 21:00:44 +000011030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011031$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011032else
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11034$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011035
11036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011037rm -f core conftest.err conftest.$ac_objext \
11038 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011039
Matthias Kloseb9621712010-04-24 17:59:49 +000011040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11041$as_echo_n "checking for inet_pton... " >&6; }
11042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011043/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011044
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011045#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011046#include <sys/socket.h>
11047#include <netinet/in.h>
11048#include <arpa/inet.h>
11049
Martin v. Löwise9416172003-05-03 10:12:45 +000011050int
11051main ()
11052{
11053void* p = inet_pton
11054 ;
11055 return 0;
11056}
11057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011061
Matthias Kloseb159a552010-04-25 21:00:44 +000011062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011063$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011064else
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11066$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011067
11068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011070
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011071# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11073$as_echo_n "checking for setgroups... " >&6; }
11074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011075/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011076
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011077#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011078#ifdef HAVE_GRP_H
11079#include <grp.h>
11080#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011081
Martin v. Löwisd5843682002-11-21 20:41:28 +000011082int
11083main ()
11084{
11085void* p = setgroups
11086 ;
11087 return 0;
11088}
11089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011091
Matthias Kloseb9621712010-04-24 17:59:49 +000011092$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011093
Matthias Kloseb159a552010-04-25 21:00:44 +000011094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011095$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011096else
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11098$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011099
11100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011102
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011103# check for openpty and forkpty
11104
11105for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011106do :
11107 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011108if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011111_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011112
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011113else
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11115$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011116if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011118else
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011120LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011124/* Override any GCC internal prototype to avoid an error.
11125 Use char because int might match the return type of a GCC
11126 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011127#ifdef __cplusplus
11128extern "C"
11129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011130char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011131int
11132main ()
11133{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 ;
11136 return 0;
11137}
11138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011139if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011140 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011141else
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011144rm -f core conftest.err conftest.$ac_objext \
11145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011146LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11149$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011150if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011152 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011153else
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11155$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011156if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011157 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011158else
11159 ac_check_lib_save_LIBS=$LIBS
11160LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011162/* end confdefs.h. */
11163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164/* Override any GCC internal prototype to avoid an error.
11165 Use char because int might match the return type of a GCC
11166 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011167#ifdef __cplusplus
11168extern "C"
11169#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011170char openpty ();
11171int
11172main ()
11173{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011175 ;
11176 return 0;
11177}
11178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011179if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011180 ac_cv_lib_bsd_openpty=yes
11181else
Matthias Kloseb9621712010-04-24 17:59:49 +000011182 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011184rm -f core conftest.err conftest.$ac_objext \
11185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011186LIBS=$ac_check_lib_save_LIBS
11187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11189$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011190if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011191 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011192 LIBS="$LIBS -lbsd"
11193fi
11194
11195
11196fi
11197
Fred Drake8cef4cf2000-06-28 16:40:38 +000011198
11199fi
11200done
11201
11202for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011203do :
11204 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011205if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011206 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011207#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011208_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011209
Fred Drake8cef4cf2000-06-28 16:40:38 +000011210else
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11212$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011213if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011214 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011215else
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011217LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011221/* Override any GCC internal prototype to avoid an error.
11222 Use char because int might match the return type of a GCC
11223 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011224#ifdef __cplusplus
11225extern "C"
11226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011227char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011228int
11229main ()
11230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011231return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 ;
11233 return 0;
11234}
11235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011238else
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011241rm -f core conftest.err conftest.$ac_objext \
11242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011243LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11246$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011247if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011249 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011250else
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11252$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011253if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011254 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011255else
11256 ac_check_lib_save_LIBS=$LIBS
11257LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011259/* end confdefs.h. */
11260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011261/* Override any GCC internal prototype to avoid an error.
11262 Use char because int might match the return type of a GCC
11263 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011264#ifdef __cplusplus
11265extern "C"
11266#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011267char forkpty ();
11268int
11269main ()
11270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011271return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011272 ;
11273 return 0;
11274}
11275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011276if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011277 ac_cv_lib_bsd_forkpty=yes
11278else
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011281rm -f core conftest.err conftest.$ac_objext \
11282 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011283LIBS=$ac_check_lib_save_LIBS
11284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11286$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011287if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011289 LIBS="$LIBS -lbsd"
11290fi
11291
11292
11293fi
11294
Fred Drake8cef4cf2000-06-28 16:40:38 +000011295
11296fi
11297done
11298
Jack Jansendd19cf82001-12-06 22:36:17 +000011299
Christian Heimesb186d002008-03-18 15:15:01 +000011300# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011301for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011302do :
11303 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011304if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011305 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011306#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011307_ACEOF
11308
11309fi
11310done
11311
11312
Michael W. Hudson54241132001-12-07 15:38:26 +000011313# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011314for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011315do :
11316 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11317ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011318if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011319 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011320#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011321_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011322
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011323fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011324done
11325
Michael W. Hudson54241132001-12-07 15:38:26 +000011326
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011327ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011328if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011329 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011330
Martin v. Löwis1142de32002-03-29 16:28:31 +000011331else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011333 *" dup2.$ac_objext "* ) ;;
11334 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011336esac
11337
Martin v. Löwis1142de32002-03-29 16:28:31 +000011338fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011339
11340ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011341if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011342 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11343
11344else
11345 case " $LIBOBJS " in
11346 *" getcwd.$ac_objext "* ) ;;
11347 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11348 ;;
11349esac
11350
11351fi
11352
11353ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011354if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011355 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11356
11357else
11358 case " $LIBOBJS " in
11359 *" strdup.$ac_objext "* ) ;;
11360 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11361 ;;
11362esac
11363
11364fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011365
11366
11367for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011368do :
11369 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011370if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011372#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011375/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011376#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011377int
11378main ()
11379{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011380getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 ;
11382 return 0;
11383}
11384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
Matthias Kloseb9621712010-04-24 17:59:49 +000011387$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011388
Guido van Rossum627b2d71993-12-24 10:39:16 +000011389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011391
Guido van Rossum627b2d71993-12-24 10:39:16 +000011392fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011393done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011394
Jack Jansen150753c2003-03-29 22:07:47 +000011395for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011396do :
11397 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011398if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011399 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011400#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011403/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011404#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011405int
11406main ()
11407{
11408setpgrp(0,0);
11409 ;
11410 return 0;
11411}
11412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011416
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011419
11420fi
11421done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011422
Thomas Wouters3a584202000-08-05 23:28:51 +000011423for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011424do :
11425 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011426if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011428#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011431/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011432#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011433int
11434main ()
11435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011436gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 ;
11438 return 0;
11439}
11440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011441if ac_fn_c_try_compile "$LINENO"; then :
11442
Guido van Rossum627b2d71993-12-24 10:39:16 +000011443else
Skip Montanaro6dead952003-09-25 14:50:04 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011446
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Guido van Rossum627b2d71993-12-24 10:39:16 +000011448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011451fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011452done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011453
Michael W. Hudson54241132001-12-07 15:38:26 +000011454
Victor Stinnere0be4232011-10-25 13:06:09 +020011455for ac_func in clock_gettime
11456do :
11457 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11458if test "x$ac_cv_func_clock_gettime" = xyes; then :
11459 cat >>confdefs.h <<_ACEOF
11460#define HAVE_CLOCK_GETTIME 1
11461_ACEOF
11462
11463else
11464
11465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11466$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11467if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11468 $as_echo_n "(cached) " >&6
11469else
11470 ac_check_lib_save_LIBS=$LIBS
11471LIBS="-lrt $LIBS"
11472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473/* end confdefs.h. */
11474
11475/* Override any GCC internal prototype to avoid an error.
11476 Use char because int might match the return type of a GCC
11477 builtin and then its argument prototype would still apply. */
11478#ifdef __cplusplus
11479extern "C"
11480#endif
11481char clock_gettime ();
11482int
11483main ()
11484{
11485return clock_gettime ();
11486 ;
11487 return 0;
11488}
11489_ACEOF
11490if ac_fn_c_try_link "$LINENO"; then :
11491 ac_cv_lib_rt_clock_gettime=yes
11492else
11493 ac_cv_lib_rt_clock_gettime=no
11494fi
11495rm -f core conftest.err conftest.$ac_objext \
11496 conftest$ac_exeext conftest.$ac_ext
11497LIBS=$ac_check_lib_save_LIBS
11498fi
11499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11500$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11501if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11502
11503 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11504
11505
11506$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11507
11508
11509fi
11510
11511
11512fi
11513done
11514
11515
11516for ac_func in clock_getres
11517do :
11518 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11519if test "x$ac_cv_func_clock_getres" = xyes; then :
11520 cat >>confdefs.h <<_ACEOF
11521#define HAVE_CLOCK_GETRES 1
11522_ACEOF
11523
11524else
11525
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11527$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11528if ${ac_cv_lib_rt_clock_getres+:} false; then :
11529 $as_echo_n "(cached) " >&6
11530else
11531 ac_check_lib_save_LIBS=$LIBS
11532LIBS="-lrt $LIBS"
11533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11534/* end confdefs.h. */
11535
11536/* Override any GCC internal prototype to avoid an error.
11537 Use char because int might match the return type of a GCC
11538 builtin and then its argument prototype would still apply. */
11539#ifdef __cplusplus
11540extern "C"
11541#endif
11542char clock_getres ();
11543int
11544main ()
11545{
11546return clock_getres ();
11547 ;
11548 return 0;
11549}
11550_ACEOF
11551if ac_fn_c_try_link "$LINENO"; then :
11552 ac_cv_lib_rt_clock_getres=yes
11553else
11554 ac_cv_lib_rt_clock_getres=no
11555fi
11556rm -f core conftest.err conftest.$ac_objext \
11557 conftest$ac_exeext conftest.$ac_ext
11558LIBS=$ac_check_lib_save_LIBS
11559fi
11560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11561$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11562if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11563
11564 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11565
11566
11567fi
11568
11569
11570fi
11571done
11572
11573
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11575$as_echo_n "checking for major... " >&6; }
11576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011578
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011579#if defined(MAJOR_IN_MKDEV)
11580#include <sys/mkdev.h>
11581#elif defined(MAJOR_IN_SYSMACROS)
11582#include <sys/sysmacros.h>
11583#else
11584#include <sys/types.h>
11585#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011586
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011587int
11588main ()
11589{
11590
11591 makedev(major(0),minor(0));
11592
11593 ;
11594 return 0;
11595}
11596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011598
11599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11603$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011604
11605else
Skip Montanaro6dead952003-09-25 14:50:04 +000011606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11608$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011609
11610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011611rm -f core conftest.err conftest.$ac_objext \
11612 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011613
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011614# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011615# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11617$as_echo_n "checking for getaddrinfo... " >&6; }
11618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011619/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011620
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011621#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011622#include <sys/socket.h>
11623#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011624#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626int
11627main ()
11628{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011629getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011635 have_getaddrinfo=yes
11636else
Matthias Kloseb9621712010-04-24 17:59:49 +000011637 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011639rm -f core conftest.err conftest.$ac_objext \
11640 conftest$ac_exeext conftest.$ac_ext
11641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11642$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011643if test $have_getaddrinfo = yes
11644then
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11646$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011647 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011651
11652if test "${enable_ipv6+set}" = set; then
11653 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11654else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011655 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011656fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011659/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011660
Stefan Krah19c21392012-11-22 23:47:32 +010011661#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011662#include <sys/types.h>
11663#include <netdb.h>
11664#include <string.h>
11665#include <sys/socket.h>
11666#include <netinet/in.h>
11667
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011668int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011669{
11670 int passive, gaierr, inet4 = 0, inet6 = 0;
11671 struct addrinfo hints, *ai, *aitop;
11672 char straddr[INET6_ADDRSTRLEN], strport[16];
11673
11674 for (passive = 0; passive <= 1; passive++) {
11675 memset(&hints, 0, sizeof(hints));
11676 hints.ai_family = AF_UNSPEC;
11677 hints.ai_flags = passive ? AI_PASSIVE : 0;
11678 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011679 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011680 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11681 (void)gai_strerror(gaierr);
11682 goto bad;
11683 }
11684 for (ai = aitop; ai; ai = ai->ai_next) {
11685 if (ai->ai_addr == NULL ||
11686 ai->ai_addrlen == 0 ||
11687 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11688 straddr, sizeof(straddr), strport, sizeof(strport),
11689 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11690 goto bad;
11691 }
11692 switch (ai->ai_family) {
11693 case AF_INET:
11694 if (strcmp(strport, "54321") != 0) {
11695 goto bad;
11696 }
11697 if (passive) {
11698 if (strcmp(straddr, "0.0.0.0") != 0) {
11699 goto bad;
11700 }
11701 } else {
11702 if (strcmp(straddr, "127.0.0.1") != 0) {
11703 goto bad;
11704 }
11705 }
11706 inet4++;
11707 break;
11708 case AF_INET6:
11709 if (strcmp(strport, "54321") != 0) {
11710 goto bad;
11711 }
11712 if (passive) {
11713 if (strcmp(straddr, "::") != 0) {
11714 goto bad;
11715 }
11716 } else {
11717 if (strcmp(straddr, "::1") != 0) {
11718 goto bad;
11719 }
11720 }
11721 inet6++;
11722 break;
11723 case AF_UNSPEC:
11724 goto bad;
11725 break;
11726 default:
11727 /* another family support? */
11728 break;
11729 }
11730 }
11731 }
11732
11733 if (!(inet4 == 0 || inet4 == 2))
11734 goto bad;
11735 if (!(inet6 == 0 || inet6 == 2))
11736 goto bad;
11737
11738 if (aitop)
11739 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011740 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011741
11742 bad:
11743 if (aitop)
11744 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011745 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011746}
11747
Martin v. Löwis11437992002-04-12 09:54:03 +000011748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011749if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011750 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011751else
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011757
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011758fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011759
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011761
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11763$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11764
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011765if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011766then
11767 if test $ipv6 = yes
11768 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011769 echo 'Fatal: You must get working getaddrinfo() function.'
11770 echo ' or you can specify "--disable-ipv6"'.
11771 exit 1
11772 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011773else
Martin v. Löwis11437992002-04-12 09:54:03 +000011774
Matthias Kloseb9621712010-04-24 17:59:49 +000011775$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011776
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011777fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011778
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011779for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011780do :
11781 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011782if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011783 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011784#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011785_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011786
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011787fi
11788done
11789
Michael W. Hudson54241132001-12-07 15:38:26 +000011790
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011791# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11793$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011794if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011796else
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011798/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011799#include <sys/types.h>
11800#include <sys/time.h>
11801#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011802
Martin v. Löwis11437992002-04-12 09:54:03 +000011803int
11804main ()
11805{
11806if ((struct tm *) 0)
11807return 0;
11808 ;
11809 return 0;
11810}
11811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011812if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011813 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11820$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011821if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011824
11825fi
11826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11828$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011829if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011831else
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011833/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011834#include <sys/types.h>
11835#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011836
Martin v. Löwis11437992002-04-12 09:54:03 +000011837int
11838main ()
11839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011840struct tm tm;
11841 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 ;
11844 return 0;
11845}
11846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011847if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011848 ac_cv_struct_tm=time.h
11849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11855$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011856if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011857
Matthias Kloseb9621712010-04-24 17:59:49 +000011858$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011859
11860fi
11861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862ac_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 +000011863#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865"
Victor Stinnere0be4232011-10-25 13:06:09 +020011866if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011867
11868cat >>confdefs.h <<_ACEOF
11869#define HAVE_STRUCT_TM_TM_ZONE 1
11870_ACEOF
11871
11872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011873fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011874
Martin v. Löwis11437992002-04-12 09:54:03 +000011875if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11876
Matthias Kloseb9621712010-04-24 17:59:49 +000011877$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011878
11879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11881"
Victor Stinnere0be4232011-10-25 13:06:09 +020011882if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011884else
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886fi
11887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011889#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890_ACEOF
11891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11893$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011894if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011896else
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011898/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011899#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011900#if !HAVE_DECL_TZNAME
11901extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011903
Martin v. Löwis11437992002-04-12 09:54:03 +000011904int
11905main ()
11906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011907return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011908 ;
11909 return 0;
11910}
11911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011912if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011913 ac_cv_var_tzname=yes
11914else
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011917rm -f core conftest.err conftest.$ac_objext \
11918 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11921$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011922 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011925
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011926 fi
11927fi
11928
Matthias Kloseb9621712010-04-24 17:59:49 +000011929ac_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 +020011930if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011931
11932cat >>confdefs.h <<_ACEOF
11933#define HAVE_STRUCT_STAT_ST_RDEV 1
11934_ACEOF
11935
11936
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011937fi
11938
Matthias Kloseb9621712010-04-24 17:59:49 +000011939ac_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 +020011940if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011941
Martin v. Löwis11437992002-04-12 09:54:03 +000011942cat >>confdefs.h <<_ACEOF
11943#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11944_ACEOF
11945
11946
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011947fi
11948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949ac_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 +020011950if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011951
11952cat >>confdefs.h <<_ACEOF
11953#define HAVE_STRUCT_STAT_ST_FLAGS 1
11954_ACEOF
11955
11956
11957fi
11958
Matthias Kloseb9621712010-04-24 17:59:49 +000011959ac_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 +020011960if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011961
11962cat >>confdefs.h <<_ACEOF
11963#define HAVE_STRUCT_STAT_ST_GEN 1
11964_ACEOF
11965
11966
11967fi
11968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969ac_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 +020011970if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011971
11972cat >>confdefs.h <<_ACEOF
11973#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11974_ACEOF
11975
11976
11977fi
11978
Matthias Kloseb9621712010-04-24 17:59:49 +000011979ac_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 +020011980if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011981
Martin v. Löwis11437992002-04-12 09:54:03 +000011982cat >>confdefs.h <<_ACEOF
11983#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11984_ACEOF
11985
11986
Matthias Kloseb9621712010-04-24 17:59:49 +000011987$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011988
11989else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011990 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011991 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011992 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11993 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011994esac
11995
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011996fi
11997
Michael W. Hudson54241132001-12-07 15:38:26 +000011998
Martin v. Löwis11437992002-04-12 09:54:03 +000011999
Matthias Kloseb9621712010-04-24 17:59:49 +000012000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12001$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012002if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004else
Matthias Kloseb159a552010-04-25 21:00:44 +000012005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012007/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012008#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012009int
12010main ()
12011{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 ;
12014 return 0;
12015}
12016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012017if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012018 ac_cv_header_time_altzone=yes
12019else
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012024fi
12025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12027$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012029
Matthias Kloseb9621712010-04-24 17:59:49 +000012030$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012031
12032fi
12033
Guido van Rossumda88dad1995-01-26 00:46:29 +000012034was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12036$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012038/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012039
12040#include <sys/types.h>
12041#include <sys/select.h>
12042#include <sys/time.h>
12043
Martin v. Löwis11437992002-04-12 09:54:03 +000012044int
12045main ()
12046{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012047;
Martin v. Löwis11437992002-04-12 09:54:03 +000012048 ;
12049 return 0;
12050}
12051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012052if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012053
12054
Matthias Kloseb9621712010-04-24 17:59:49 +000012055$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012056
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012057 was_it_defined=yes
12058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12062$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012063
Matthias Kloseb9621712010-04-24 17:59:49 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12065$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012066if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012068else
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012070/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012071#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012072int
12073main ()
12074{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012075struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012076 ;
12077 return 0;
12078}
12079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012080if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012081 ac_cv_struct_addrinfo=yes
12082else
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12086fi
12087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12089$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012090if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012093
12094fi
12095
Matthias Kloseb9621712010-04-24 17:59:49 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12097$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012098if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012102/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012103
12104# include <sys/types.h>
12105# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012106int
12107main ()
12108{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012109struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 ;
12111 return 0;
12112}
12113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012115 ac_cv_struct_sockaddr_storage=yes
12116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12120fi
12121
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12123$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012124if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012127
12128fi
12129
Guido van Rossum627b2d71993-12-24 10:39:16 +000012130# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012131
Matthias Kloseb9621712010-04-24 17:59:49 +000012132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12133$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012134if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012136else
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012139$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012140int
12141main ()
12142{
12143static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012144test_array [0] = 0;
12145return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012146
12147 ;
12148 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012149}
Martin v. Löwis11437992002-04-12 09:54:03 +000012150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012152 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12159$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012162
12163fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012164
Matthias Kloseb9621712010-04-24 17:59:49 +000012165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12166$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012167if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012171/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012172
Martin v. Löwis11437992002-04-12 09:54:03 +000012173int
12174main ()
12175{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012176
Martin v. Löwis11437992002-04-12 09:54:03 +000012177#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012178 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012180 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182 char const *const *pcpcc;
12183 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 /* NEC SVR4.0.2 mips cc rejects this. */
12185 struct point {int x, y;};
12186 static struct point const zero = {0,0};
12187 /* AIX XL C 1.02.0.0 rejects this.
12188 It does not let you subtract one const X* pointer from another in
12189 an arm of an if-expression whose if-part is not a constant
12190 expression */
12191 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012192 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012193 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012194 ++pcpcc;
12195 ppc = (char**) pcpcc;
12196 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012197 { /* SCO 3.2v4 cc rejects this sort of thing. */
12198 char tx;
12199 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012203 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 }
12205 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12206 int x[] = {25, 17};
12207 const int *foo = &x[0];
12208 ++foo;
12209 }
12210 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12211 typedef const int *iptr;
12212 iptr p = 0;
12213 ++p;
12214 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012215 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012217 struct s { int j; const int *ap[3]; } bx;
12218 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 }
12220 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12221 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012225#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012226
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 ;
12228 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012229}
Martin v. Löwis11437992002-04-12 09:54:03 +000012230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012231if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012232 ac_cv_c_const=yes
12233else
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12239$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012240if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012241
Matthias Kloseb9621712010-04-24 17:59:49 +000012242$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012243
12244fi
12245
Michael W. Hudson54241132001-12-07 15:38:26 +000012246
Guido van Rossumda88dad1995-01-26 00:46:29 +000012247works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12249$as_echo_n "checking for working volatile... " >&6; }
12250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012252
Martin v. Löwis11437992002-04-12 09:54:03 +000012253int
12254main ()
12255{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 ;
12258 return 0;
12259}
12260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012261if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012262 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012263else
Skip Montanaro6dead952003-09-25 14:50:04 +000012264
Matthias Kloseb9621712010-04-24 17:59:49 +000012265$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012266
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012267
Guido van Rossum627b2d71993-12-24 10:39:16 +000012268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12271$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012272
Guido van Rossumda88dad1995-01-26 00:46:29 +000012273works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12275$as_echo_n "checking for working signed char... " >&6; }
12276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012277/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279int
12280main ()
12281{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012282signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 ;
12284 return 0;
12285}
12286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012287if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012288 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012289else
Skip Montanaro6dead952003-09-25 14:50:04 +000012290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012292
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012293
Guido van Rossum7f43da71994-08-01 12:15:30 +000012294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12297$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012298
Guido van Rossumda88dad1995-01-26 00:46:29 +000012299have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12301$as_echo_n "checking for prototypes... " >&6; }
12302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012303/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012304int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012305int
12306main ()
12307{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012308return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 ;
12310 return 0;
12311}
12312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012314
Matthias Kloseb9621712010-04-24 17:59:49 +000012315$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Matthias Kloseb159a552010-04-25 21:00:44 +000012317 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12321$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012322
Guido van Rossumda88dad1995-01-26 00:46:29 +000012323works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12325$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012327/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012328
12329#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012330int foo(int x, ...) {
12331 va_list va;
12332 va_start(va, x);
12333 va_arg(va, int);
12334 va_arg(va, char *);
12335 va_arg(va, double);
12336 return 0;
12337}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012338
Martin v. Löwis11437992002-04-12 09:54:03 +000012339int
12340main ()
12341{
Guido van Rossum90eea071996-08-30 20:58:57 +000012342return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012343 ;
12344 return 0;
12345}
12346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012348
12349
Matthias Kloseb9621712010-04-24 17:59:49 +000012350$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012351
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012352 works=yes
12353
Guido van Rossum627b2d71993-12-24 10:39:16 +000012354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12357$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012358
Martin v. Löwisd6320502004-08-12 13:45:08 +000012359# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12361$as_echo_n "checking for socketpair... " >&6; }
12362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012363/* end confdefs.h. */
12364
12365#include <sys/types.h>
12366#include <sys/socket.h>
12367
12368int
12369main ()
12370{
12371void *x=socketpair
12372 ;
12373 return 0;
12374}
12375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012377
Matthias Kloseb9621712010-04-24 17:59:49 +000012378$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012379
Matthias Kloseb159a552010-04-25 21:00:44 +000012380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012381$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012382else
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12384$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012385
12386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012388
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012389# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12391$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012393/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012394#include <sys/types.h>
12395#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012396int
12397main ()
12398{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012399struct sockaddr x;
12400x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012401 ;
12402 return 0;
12403}
12404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405if ac_fn_c_try_compile "$LINENO"; then :
12406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12407$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012410
12411else
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12413$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012414
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012417
Guido van Rossumda88dad1995-01-26 00:46:29 +000012418va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12420$as_echo_n "checking whether va_list is an array... " >&6; }
12421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012422/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012423
12424#ifdef HAVE_STDARG_PROTOTYPES
12425#include <stdarg.h>
12426#else
12427#include <varargs.h>
12428#endif
12429
Martin v. Löwis11437992002-04-12 09:54:03 +000012430int
12431main ()
12432{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012433va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 ;
12435 return 0;
12436}
12437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012438if ac_fn_c_try_compile "$LINENO"; then :
12439
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440else
Skip Montanaro6dead952003-09-25 14:50:04 +000012441
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
Guido van Rossumda88dad1995-01-26 00:46:29 +000012445 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012446
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12450$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012452# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012453
12454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012456if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12461$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012462 OLD_CFLAGS=$CFLAGS
12463 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012465/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012466
12467# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
Martin v. Löwis11437992002-04-12 09:54:03 +000012469int
12470main ()
12471{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012472
12473 char *name;
12474 struct hostent *he, *res;
12475 char buffer[2048];
12476 int buflen = 2048;
12477 int h_errnop;
12478
12479 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
12481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012488
Martin v. Löwis11437992002-04-12 09:54:03 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12493$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012494
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012495else
Skip Montanaro6dead952003-09-25 14:50:04 +000012496
Matthias Kloseb9621712010-04-24 17:59:49 +000012497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12498$as_echo "no" >&6; }
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12500$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012502/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012503
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012504# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Martin v. Löwis11437992002-04-12 09:54:03 +000012506int
12507main ()
12508{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012509
12510 char *name;
12511 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012512 char buffer[2048];
12513 int buflen = 2048;
12514 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012515
Matthias Kloseb159a552010-04-25 21:00:44 +000012516 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
12518 ;
12519 return 0;
12520}
12521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012523
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012525
Martin v. Löwis11437992002-04-12 09:54:03 +000012526
Matthias Kloseb159a552010-04-25 21:00:44 +000012527$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012528
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12530$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012531
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012532else
Skip Montanaro6dead952003-09-25 14:50:04 +000012533
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12535$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12537$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12539/* end confdefs.h. */
12540
12541# include <netdb.h>
12542
12543int
12544main ()
12545{
12546
12547 char *name;
12548 struct hostent *he;
12549 struct hostent_data data;
12550
12551 (void) gethostbyname_r(name, he, &data);
12552
12553 ;
12554 return 0;
12555}
12556_ACEOF
12557if ac_fn_c_try_compile "$LINENO"; then :
12558
12559 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12560
12561
12562$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12563
12564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12565$as_echo "yes" >&6; }
12566
12567else
12568
12569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12570$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012571
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012574
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012577
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012580 CFLAGS=$OLD_CFLAGS
12581
12582else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012583
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 for ac_func in gethostbyname
12585do :
12586 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012587if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012589#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012590_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012592fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012593done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012594
Michael W. Hudson54241132001-12-07 15:38:26 +000012595
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012596fi
12597
Michael W. Hudson54241132001-12-07 15:38:26 +000012598
12599
12600
12601
12602
12603
Guido van Rossum627b2d71993-12-24 10:39:16 +000012604# checks for system services
12605# (none yet)
12606
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012608ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012609if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012610
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012611else
Matthias Kloseb9621712010-04-24 17:59:49 +000012612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12613$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012614if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012615 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012616else
Martin v. Löwis11437992002-04-12 09:54:03 +000012617 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012618LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012622/* Override any GCC internal prototype to avoid an error.
12623 Use char because int might match the return type of a GCC
12624 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012625#ifdef __cplusplus
12626extern "C"
12627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012628char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ;
12634 return 0;
12635}
12636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012638 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012639else
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642rm -f core conftest.err conftest.$ac_objext \
12643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012644LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12647$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012648if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 cat >>confdefs.h <<_ACEOF
12650#define HAVE_LIBIEEE 1
12651_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012652
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012653 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654
Guido van Rossum627b2d71993-12-24 10:39:16 +000012655fi
12656
Michael W. Hudson54241132001-12-07 15:38:26 +000012657
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012658fi
12659
Michael W. Hudson54241132001-12-07 15:38:26 +000012660
Guido van Rossum7f253911997-05-09 02:42:48 +000012661# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12663$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012667 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012668if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012669then
12670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012672
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12674$as_echo "yes" >&6; }
12675else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12676$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012677fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012678else
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12680$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681fi
12682
Guido van Rossum7f253911997-05-09 02:42:48 +000012683
Guido van Rossum7f43da71994-08-01 12:15:30 +000012684# check for --with-libm=...
12685
Guido van Rossum563e7081996-09-10 18:20:48 +000012686case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012687Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012688*) LIBM=-lm
12689esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12691$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012694if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012696if test "$withval" = no
12697then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12699$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012700elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012701then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12703$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012704else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012705fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012706else
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12708$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709fi
12710
Guido van Rossum7f43da71994-08-01 12:15:30 +000012711
12712# check for --with-libc=...
12713
Matthias Kloseb9621712010-04-24 17:59:49 +000012714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12715$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012718if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012720if test "$withval" = no
12721then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12723$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012724elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012725then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12727$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012728else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012729fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012730else
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12732$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733fi
12734
Guido van Rossum7f43da71994-08-01 12:15:30 +000012735
Stefan Krah1919b7e2012-03-21 18:25:23 +010012736# **************************************
12737# * Check for gcc x64 inline assembler *
12738# **************************************
12739
12740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12741$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743/* end confdefs.h. */
12744
12745int
12746main ()
12747{
12748
12749 __asm__ __volatile__ ("movq %rcx, %rax");
12750
12751 ;
12752 return 0;
12753}
12754_ACEOF
12755if ac_fn_c_try_compile "$LINENO"; then :
12756 have_gcc_asm_for_x64=yes
12757else
12758 have_gcc_asm_for_x64=no
12759fi
12760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12762$as_echo "$have_gcc_asm_for_x64" >&6; }
12763if test "$have_gcc_asm_for_x64" = yes
12764then
12765
12766$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12767
12768fi
12769
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012770# **************************************************
12771# * Check for various properties of floating point *
12772# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012773
Matthias Kloseb9621712010-04-24 17:59:49 +000012774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12775$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012776if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012778else
12779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012781 ac_cv_little_endian_double=no
12782else
Matthias Kloseb9621712010-04-24 17:59:49 +000012783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012784/* end confdefs.h. */
12785
12786#include <string.h>
12787int main() {
12788 double x = 9006104071832581.0;
12789 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12790 return 0;
12791 else
12792 return 1;
12793}
12794
12795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012797 ac_cv_little_endian_double=yes
12798else
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012803fi
12804
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012805fi
12806
Matthias Kloseb9621712010-04-24 17:59:49 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12808$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012809if test "$ac_cv_little_endian_double" = yes
12810then
12811
Matthias Kloseb9621712010-04-24 17:59:49 +000012812$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012813
12814fi
12815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12817$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012818if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012820else
12821
Matthias Kloseb9621712010-04-24 17:59:49 +000012822if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012823 ac_cv_big_endian_double=no
12824else
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012826/* end confdefs.h. */
12827
12828#include <string.h>
12829int main() {
12830 double x = 9006104071832581.0;
12831 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12832 return 0;
12833 else
12834 return 1;
12835}
12836
12837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012838if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012839 ac_cv_big_endian_double=yes
12840else
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012845fi
12846
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012847fi
12848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12850$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012851if test "$ac_cv_big_endian_double" = yes
12852then
12853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012855
12856fi
12857
12858# Some ARM platforms use a mixed-endian representation for doubles.
12859# While Python doesn't currently have full support for these platforms
12860# (see e.g., issue 1762561), we can at least make sure that float <-> string
12861# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12863$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012864if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012866else
12867
Matthias Kloseb9621712010-04-24 17:59:49 +000012868if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012869 ac_cv_mixed_endian_double=no
12870else
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012872/* end confdefs.h. */
12873
12874#include <string.h>
12875int main() {
12876 double x = 9006104071832581.0;
12877 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12878 return 0;
12879 else
12880 return 1;
12881}
12882
12883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012885 ac_cv_mixed_endian_double=yes
12886else
Matthias Kloseb9621712010-04-24 17:59:49 +000012887 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012891fi
12892
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012893fi
12894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12896$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012897if test "$ac_cv_mixed_endian_double" = yes
12898then
12899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012901
12902fi
12903
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012904# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012905# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012906# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012907# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012908# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012909# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012910
12911# This inline assembler syntax may also work for suncc and icc,
12912# so we try it on all platforms.
12913
Matthias Kloseb9621712010-04-24 17:59:49 +000012914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12915$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012917/* end confdefs.h. */
12918
12919int
12920main ()
12921{
12922
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012923 unsigned short cw;
12924 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12925 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012926
12927 ;
12928 return 0;
12929}
12930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012931if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012932 have_gcc_asm_for_x87=yes
12933else
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012935fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12938$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012939if test "$have_gcc_asm_for_x87" = yes
12940then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012943
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012944fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012945
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012946# Detect whether system arithmetic is subject to x87-style double
12947# rounding issues. The result of this test has little meaning on non
12948# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12949# mode is round-to-nearest and double rounding issues are present, and
12950# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12952$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012953# $BASECFLAGS may affect the result
12954ac_save_cc="$CC"
12955CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012956if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012957 ac_cv_x87_double_rounding=no
12958else
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012960/* end confdefs.h. */
12961
12962#include <stdlib.h>
12963#include <math.h>
12964int main() {
12965 volatile double x, y, z;
12966 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12967 x = 0.99999999999999989; /* 1-2**-53 */
12968 y = 1./x;
12969 if (y != 1.)
12970 exit(0);
12971 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12972 x = 1e16;
12973 y = 2.99999;
12974 z = x + y;
12975 if (z != 1e16+4.)
12976 exit(0);
12977 /* both tests show evidence of double rounding */
12978 exit(1);
12979}
12980
12981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012982if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012983 ac_cv_x87_double_rounding=no
12984else
Matthias Kloseb9621712010-04-24 17:59:49 +000012985 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012989fi
12990
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012991CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12993$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012994if test "$ac_cv_x87_double_rounding" = yes
12995then
12996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012998
12999fi
13000
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013001# ************************************
13002# * Check for mathematical functions *
13003# ************************************
13004
13005LIBS_SAVE=$LIBS
13006LIBS="$LIBS $LIBM"
13007
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013008for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13009do :
13010 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13011ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013012if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013013 cat >>confdefs.h <<_ACEOF
13014#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13015_ACEOF
13016
13017fi
13018done
13019
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013020for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013021do :
13022 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13023ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013024if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013025 cat >>confdefs.h <<_ACEOF
13026#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13027_ACEOF
13028
13029fi
13030done
13031
13032ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13033"
Victor Stinnere0be4232011-10-25 13:06:09 +020013034if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013035 ac_have_decl=1
13036else
13037 ac_have_decl=0
13038fi
13039
13040cat >>confdefs.h <<_ACEOF
13041#define HAVE_DECL_ISINF $ac_have_decl
13042_ACEOF
13043ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13044"
Victor Stinnere0be4232011-10-25 13:06:09 +020013045if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013046 ac_have_decl=1
13047else
13048 ac_have_decl=0
13049fi
13050
13051cat >>confdefs.h <<_ACEOF
13052#define HAVE_DECL_ISNAN $ac_have_decl
13053_ACEOF
13054ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13055"
Victor Stinnere0be4232011-10-25 13:06:09 +020013056if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013057 ac_have_decl=1
13058else
13059 ac_have_decl=0
13060fi
13061
13062cat >>confdefs.h <<_ACEOF
13063#define HAVE_DECL_ISFINITE $ac_have_decl
13064_ACEOF
13065
13066
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013067# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13068# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13070$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013071if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013073else
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013076 ac_cv_tanh_preserves_zero_sign=no
13077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013079/* end confdefs.h. */
13080
13081#include <math.h>
13082#include <stdlib.h>
13083int main() {
13084 /* return 0 if either negative zeros don't exist
13085 on this platform or if negative zeros exist
13086 and tanh(-0.) == -0. */
13087 if (atan2(0., -1.) == atan2(-0., -1.) ||
13088 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13089 else exit(1);
13090}
13091
13092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013093if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013094 ac_cv_tanh_preserves_zero_sign=yes
13095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013100fi
13101
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013102fi
13103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13105$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013106if test "$ac_cv_tanh_preserves_zero_sign" = yes
13107then
13108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013110
13111fi
13112
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013113if test "$ac_cv_func_log1p" = yes
13114then
13115 # On some versions of AIX, log1p(-0.) returns 0. instead of
13116 # -0. See issue #9920.
13117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13118$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013119 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013120 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013121else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013122
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013123 if test "$cross_compiling" = yes; then :
13124 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013125else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13127/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013128
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013129 #include <math.h>
13130 #include <stdlib.h>
13131 int main() {
13132 /* Fail if the signs of log1p(-0.) and -0. can be
13133 distinguished. */
13134 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13135 return 0;
13136 else
13137 return 1;
13138 }
13139
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013140_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013141if ac_fn_c_try_run "$LINENO"; then :
13142 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013143else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013144 ac_cv_log1p_drops_zero_sign=yes
13145fi
13146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13147 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013148fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013149
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013150fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013151
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13153$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13154fi
13155if test "$ac_cv_log1p_drops_zero_sign" = yes
13156then
13157
13158$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13159
13160fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013161
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013162LIBS=$LIBS_SAVE
13163
Mark Dickinsona614f042009-11-28 12:48:43 +000013164# For multiprocessing module, check that sem_open
13165# actually works. For FreeBSD versions <= 7.2,
13166# the kernel module that provides POSIX semaphores
13167# isn't loaded by default, so an attempt to call
13168# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13170$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013171if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013173else
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013175 ac_cv_posix_semaphores_enabled=yes
13176else
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013178/* end confdefs.h. */
13179
13180#include <unistd.h>
13181#include <fcntl.h>
13182#include <stdio.h>
13183#include <semaphore.h>
13184#include <sys/stat.h>
13185
13186int main(void) {
13187 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13188 if (a == SEM_FAILED) {
13189 perror("sem_open");
13190 return 1;
13191 }
13192 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013193 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013194 return 0;
13195}
13196
13197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013198if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013199 ac_cv_posix_semaphores_enabled=yes
13200else
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13204 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013205fi
13206
13207
Mark Dickinsona614f042009-11-28 12:48:43 +000013208fi
13209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13211$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013212if test $ac_cv_posix_semaphores_enabled = no
13213then
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013216
13217fi
13218
Mark Dickinson10683072009-04-18 21:18:19 +000013219# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13221$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013222if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013224else
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013226 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013229/* end confdefs.h. */
13230
13231#include <unistd.h>
13232#include <fcntl.h>
13233#include <stdio.h>
13234#include <semaphore.h>
13235#include <sys/stat.h>
13236
13237int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013238 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013239 int count;
13240 int res;
13241 if(a==SEM_FAILED){
13242 perror("sem_open");
13243 return 1;
13244
13245 }
13246 res = sem_getvalue(a, &count);
13247 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013248 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013249 return res==-1 ? 1 : 0;
13250}
13251
Mark Dickinson10683072009-04-18 21:18:19 +000013252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013253if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013254 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013255else
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13259 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013260fi
13261
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013262
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013263fi
13264
Matthias Kloseb9621712010-04-24 17:59:49 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13266$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267if test $ac_cv_broken_sem_getvalue = yes
13268then
13269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271
13272fi
13273
Mark Dickinsonbd792642009-03-18 20:06:12 +000013274# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13276$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013277# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013278if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013279 enableval=$enable_big_digits; case $enable_big_digits in
13280yes)
13281 enable_big_digits=30 ;;
13282no)
13283 enable_big_digits=15 ;;
1328415|30)
13285 ;;
13286*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013287 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 +000013288esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13290$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013291
13292cat >>confdefs.h <<_ACEOF
13293#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13294_ACEOF
13295
13296
13297else
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13299$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013300fi
13301
13302
Guido van Rossumef2255b2000-03-10 22:30:29 +000013303# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013304ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013305if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013306
13307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013310 wchar_h="yes"
13311
Guido van Rossumef2255b2000-03-10 22:30:29 +000013312else
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013314
13315fi
13316
Michael W. Hudson54241132001-12-07 15:38:26 +000013317
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013319# determine wchar_t size
13320if test "$wchar_h" = yes
13321then
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13324# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13325# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13327$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013328if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013330else
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13332"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334else
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 if test "$ac_cv_type_wchar_t" = yes; then
13336 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013338as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013339See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340 else
13341 ac_cv_sizeof_wchar_t=0
13342 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013344
Martin v. Löwis11437992002-04-12 09:54:03 +000013345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13347$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348
13349
13350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013352#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013353_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013354
Michael W. Hudson54241132001-12-07 15:38:26 +000013355
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013356fi
13357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13359$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013360have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013362/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013363
13364#include <tcl.h>
13365#if TCL_UTF_MAX != 6
13366# error "NOT UCS4_TCL"
13367#endif
13368int
13369main ()
13370{
13371
13372 ;
13373 return 0;
13374}
13375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013377
13378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013380
13381 have_ucs4_tcl=yes
13382
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13386$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013387
Skip Montanaro6dead952003-09-25 14:50:04 +000013388# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013389if test "$wchar_h" = yes
13390then
13391 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13393$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013394 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013396else
13397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013399 ac_cv_wchar_t_signed=yes
13400else
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013402/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013403
13404 #include <wchar.h>
13405 int main()
13406 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013407 /* Success: exit code 0 */
13408 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013409 }
13410
13411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013412if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013413 ac_cv_wchar_t_signed=yes
13414else
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13418 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013419fi
13420
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013421fi
13422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13424$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013425fi
13426
Georg Brandl52d168a2008-01-07 18:10:24 +000013427# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013428if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013429 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013430then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013431 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
Georg Brandl52d168a2008-01-07 18:10:24 +000013435else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013436 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013437fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13439$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013440
13441# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13443$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013444if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013446else
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 ac_cv_c_bigendian=unknown
13448 # See if we're dealing with a universal compiler.
13449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13450/* end confdefs.h. */
13451#ifndef __APPLE_CC__
13452 not a universal capable compiler
13453 #endif
13454 typedef int dummy;
13455
Skip Montanaro6dead952003-09-25 14:50:04 +000013456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013457if ac_fn_c_try_compile "$LINENO"; then :
13458
13459 # Check for potential -arch flags. It is not universal unless
13460 # there are at least two -arch flags with different values.
13461 ac_arch=
13462 ac_prev=
13463 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13464 if test -n "$ac_prev"; then
13465 case $ac_word in
13466 i?86 | x86_64 | ppc | ppc64)
13467 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13468 ac_arch=$ac_word
13469 else
13470 ac_cv_c_bigendian=universal
13471 break
13472 fi
13473 ;;
13474 esac
13475 ac_prev=
13476 elif test "x$ac_word" = "x-arch"; then
13477 ac_prev=arch
13478 fi
13479 done
13480fi
13481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13482 if test $ac_cv_c_bigendian = unknown; then
13483 # See if sys/param.h defines the BYTE_ORDER macro.
13484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013485/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013486#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013488
Martin v. Löwis11437992002-04-12 09:54:03 +000013489int
13490main ()
13491{
Matthias Kloseb9621712010-04-24 17:59:49 +000013492#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13493 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13494 && LITTLE_ENDIAN)
13495 bogus endian macros
13496 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013497
13498 ;
13499 return 0;
13500}
13501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013502if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013503 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013506#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013508
Martin v. Löwis11437992002-04-12 09:54:03 +000013509int
13510main ()
13511{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013512#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 not big endian
13514 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
13516 ;
13517 return 0;
13518}
13519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013520if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013521 ac_cv_c_bigendian=yes
13522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013526fi
13527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13528 fi
13529 if test $ac_cv_c_bigendian = unknown; then
13530 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013532/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013533#include <limits.h>
13534
Martin v. Löwis11437992002-04-12 09:54:03 +000013535int
13536main ()
13537{
Matthias Kloseb9621712010-04-24 17:59:49 +000013538#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13539 bogus endian macros
13540 #endif
13541
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 ;
13543 return 0;
13544}
13545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013546if ac_fn_c_try_compile "$LINENO"; then :
13547 # It does; now see whether it defined to _BIG_ENDIAN or not.
13548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13549/* end confdefs.h. */
13550#include <limits.h>
13551
13552int
13553main ()
13554{
13555#ifndef _BIG_ENDIAN
13556 not big endian
13557 #endif
13558
13559 ;
13560 return 0;
13561}
13562_ACEOF
13563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013565else
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13569fi
13570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13571 fi
13572 if test $ac_cv_c_bigendian = unknown; then
13573 # Compile a test program.
13574 if test "$cross_compiling" = yes; then :
13575 # Try to guess by grepping values from an object file.
13576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13577/* end confdefs.h. */
13578short int ascii_mm[] =
13579 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13580 short int ascii_ii[] =
13581 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13582 int use_ascii (int i) {
13583 return ascii_mm[i] + ascii_ii[i];
13584 }
13585 short int ebcdic_ii[] =
13586 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13587 short int ebcdic_mm[] =
13588 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13589 int use_ebcdic (int i) {
13590 return ebcdic_mm[i] + ebcdic_ii[i];
13591 }
13592 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594int
13595main ()
13596{
13597return use_ascii (foo) == use_ebcdic (foo);
13598 ;
13599 return 0;
13600}
13601_ACEOF
13602if ac_fn_c_try_compile "$LINENO"; then :
13603 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13604 ac_cv_c_bigendian=yes
13605 fi
13606 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13607 if test "$ac_cv_c_bigendian" = unknown; then
13608 ac_cv_c_bigendian=no
13609 else
13610 # finding both strings is unlikely to happen, but who knows?
13611 ac_cv_c_bigendian=unknown
13612 fi
13613 fi
13614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013616else
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013618/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013619$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013620int
13621main ()
13622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 /* Are we little or big endian? From Harbison&Steele. */
13625 union
13626 {
13627 long int l;
13628 char c[sizeof (long int)];
13629 } u;
13630 u.l = 1;
13631 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013632
13633 ;
13634 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013635}
Martin v. Löwis11437992002-04-12 09:54:03 +000013636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013637if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013638 ac_cv_c_bigendian=no
13639else
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13649$as_echo "$ac_cv_c_bigendian" >&6; }
13650 case $ac_cv_c_bigendian in #(
13651 yes)
13652 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13653;; #(
13654 no)
13655 ;; #(
13656 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 ;; #(
13661 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013662 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013663 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013665
Michael W. Hudson54241132001-12-07 15:38:26 +000013666
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013667# ABI version string for Python extension modules. This appears between the
13668# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13669# from the following attributes which affect the ABI of this Python build (in
13670# this order):
13671#
13672# * The Python implementation (always 'cpython-' for us)
13673# * The major and minor version numbers
13674# * --with-pydebug (adds a 'd')
13675# * --with-pymalloc (adds a 'm')
13676# * --with-wide-unicode (adds a 'u')
13677#
13678# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013679# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13680# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013681
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13683$as_echo_n "checking ABIFLAGS... " >&6; }
13684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13685$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13687$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013688SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13690$as_echo "$SOABI" >&6; }
13691
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13693$as_echo_n "checking LDVERSION... " >&6; }
13694LDVERSION='$(VERSION)$(ABIFLAGS)'
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13696$as_echo "$LDVERSION" >&6; }
13697
doko@python.org87421192013-01-26 11:39:31 +010013698
13699LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13700
13701
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013702# SO is the extension of shared libraries `(including the dot!)
13703# -- usually .so, .sl on HP-UX, .dll on Cygwin
13704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13705$as_echo_n "checking SO... " >&6; }
13706if test -z "$SO"
13707then
13708 case $ac_sys_system in
13709 hp*|HP*)
13710 case `uname -m` in
13711 ia64) SO=.so;;
13712 *) SO=.sl;;
13713 esac
13714 ;;
13715 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013716 Linux*|GNU*)
13717 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013718 *) SO=.so;;
13719 esac
13720else
13721 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013722 echo
13723 echo '====================================================================='
13724 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013725 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013726 echo '+ Do you really mean to change the extension for shared libraries? +'
13727 echo '+ Continuing in 10 seconds to let you to ponder. +'
13728 echo '+ +'
13729 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013730 sleep 10
13731fi
13732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13733$as_echo "$SO" >&6; }
13734
Stefan Krah8c8adf62013-01-17 20:41:56 +010013735
13736cat >>confdefs.h <<_ACEOF
13737#define SHLIB_EXT "$SO"
13738_ACEOF
13739
13740
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013741# Check whether right shifting a negative integer extends the sign bit
13742# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13744$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013745if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013747else
Martin v. Löwis11437992002-04-12 09:54:03 +000013748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013750 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013751else
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013753/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013754
13755int main()
13756{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013757 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013758}
13759
Martin v. Löwis11437992002-04-12 09:54:03 +000013760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013762 ac_cv_rshift_extends_sign=yes
13763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013768fi
13769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770fi
13771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13773$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013774if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013775then
Martin v. Löwis11437992002-04-12 09:54:03 +000013776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013778
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013779fi
13780
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013781# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13783$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013784if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013786else
Martin v. Löwis11437992002-04-12 09:54:03 +000013787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013789/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013790#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013791int
13792main ()
13793{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013794
13795 FILE *f = fopen("/dev/null", "r");
13796 flockfile(f);
13797 getc_unlocked(f);
13798 funlockfile(f);
13799
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ;
13801 return 0;
13802}
13803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013804if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013805 ac_cv_have_getc_unlocked=yes
13806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 ac_cv_have_getc_unlocked=no
13808fi
13809rm -f core conftest.err conftest.$ac_objext \
13810 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13814$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013815if test "$ac_cv_have_getc_unlocked" = yes
13816then
Martin v. Löwis11437992002-04-12 09:54:03 +000013817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013819
13820fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013821
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013822# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013823# save the value of LIBS so we don't actually link Python with readline
13824LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013825
Gregory P. Smith18820942008-09-07 06:24:49 +000013826# On some systems we need to link readline to a termcap compatible
13827# library. NOTE: Keep the precedence of listed libraries synchronised
13828# with setup.py.
13829py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13831$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013832for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013833 if test -z "$py_libtermcap"; then
13834 READLINE_LIBS="-lreadline"
13835 else
13836 READLINE_LIBS="-lreadline -l$py_libtermcap"
13837 fi
13838 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013840/* end confdefs.h. */
13841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842/* Override any GCC internal prototype to avoid an error.
13843 Use char because int might match the return type of a GCC
13844 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013845#ifdef __cplusplus
13846extern "C"
13847#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013848char readline ();
13849int
13850main ()
13851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013853 ;
13854 return 0;
13855}
13856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013857if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013858 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013860rm -f core conftest.err conftest.$ac_objext \
13861 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013862 if test $py_cv_lib_readline = yes; then
13863 break
13864 fi
13865done
13866# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13867#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013868if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13870$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013871else
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13873$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013874
Matthias Kloseb9621712010-04-24 17:59:49 +000013875$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013876
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013877fi
13878
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013879# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13881$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013882if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013884else
13885 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013886LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013888/* end confdefs.h. */
13889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890/* Override any GCC internal prototype to avoid an error.
13891 Use char because int might match the return type of a GCC
13892 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013893#ifdef __cplusplus
13894extern "C"
13895#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013896char rl_callback_handler_install ();
13897int
13898main ()
13899{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013901 ;
13902 return 0;
13903}
13904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013905if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013906 ac_cv_lib_readline_rl_callback_handler_install=yes
13907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013910rm -f core conftest.err conftest.$ac_objext \
13911 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013912LIBS=$ac_check_lib_save_LIBS
13913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13915$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013916if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013919
13920fi
13921
13922
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013923# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013925/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013926#include <readline/readline.h>
13927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013928if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013929 have_readline=yes
13930else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013931 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013932
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013933fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013934rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013935if test $have_readline = yes
13936then
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013938/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013939#include <readline/readline.h>
13940
13941_ACEOF
13942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013944
Matthias Kloseb9621712010-04-24 17:59:49 +000013945$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013946
13947fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013948rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013951/* end confdefs.h. */
13952#include <readline/readline.h>
13953
13954_ACEOF
13955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013959
13960fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013961rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013962
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013963fi
13964
Martin v. Löwis0daad592001-09-30 21:09:59 +000013965# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13967$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013968if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013970else
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013972LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976/* Override any GCC internal prototype to avoid an error.
13977 Use char because int might match the return type of a GCC
13978 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013979#ifdef __cplusplus
13980extern "C"
13981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013982char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013983int
13984main ()
13985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 ;
13988 return 0;
13989}
13990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013991if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013992 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013993else
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013996rm -f core conftest.err conftest.$ac_objext \
13997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013998LIBS=$ac_check_lib_save_LIBS
13999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14001$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014002if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014003
Matthias Kloseb9621712010-04-24 17:59:49 +000014004$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014005
Martin v. Löwis0daad592001-09-30 21:09:59 +000014006fi
14007
Michael W. Hudson54241132001-12-07 15:38:26 +000014008
Thomas Wouters89d996e2007-09-08 17:39:28 +000014009# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14011$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014012if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014014else
14015 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014016LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014018/* end confdefs.h. */
14019
14020/* Override any GCC internal prototype to avoid an error.
14021 Use char because int might match the return type of a GCC
14022 builtin and then its argument prototype would still apply. */
14023#ifdef __cplusplus
14024extern "C"
14025#endif
14026char rl_completion_display_matches_hook ();
14027int
14028main ()
14029{
14030return rl_completion_display_matches_hook ();
14031 ;
14032 return 0;
14033}
14034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014035if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014036 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14037else
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014040rm -f core conftest.err conftest.$ac_objext \
14041 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014042LIBS=$ac_check_lib_save_LIBS
14043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14045$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014046if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014047
Matthias Kloseb9621712010-04-24 17:59:49 +000014048$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014049
14050fi
14051
14052
Martin v. Löwis0daad592001-09-30 21:09:59 +000014053# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14055$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014056if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014057 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014058else
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014060LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064/* Override any GCC internal prototype to avoid an error.
14065 Use char because int might match the return type of a GCC
14066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014067#ifdef __cplusplus
14068extern "C"
14069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014070char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014071int
14072main ()
14073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 ;
14076 return 0;
14077}
14078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014080 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014081else
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014084rm -f core conftest.err conftest.$ac_objext \
14085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014086LIBS=$ac_check_lib_save_LIBS
14087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14089$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014090if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014091
Matthias Kloseb9621712010-04-24 17:59:49 +000014092$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014093
Guido van Rossum353ae582001-07-10 16:45:32 +000014094fi
14095
Jack Jansendd19cf82001-12-06 22:36:17 +000014096
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014097# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014099/* end confdefs.h. */
14100#include <readline/readline.h>
14101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014102if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014103 have_readline=yes
14104else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014105 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014106
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014107fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014108rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014109if test $have_readline = yes
14110then
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014112/* end confdefs.h. */
14113#include <readline/readline.h>
14114
14115_ACEOF
14116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014120
14121fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014122rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014123
14124fi
14125
Martin v. Löwis82bca632006-02-10 20:49:30 +000014126# End of readline checks: restore LIBS
14127LIBS=$LIBS_no_readline
14128
Matthias Kloseb9621712010-04-24 17:59:49 +000014129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14130$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014131if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014133else
Martin v. Löwis11437992002-04-12 09:54:03 +000014134
Matthias Kloseb9621712010-04-24 17:59:49 +000014135if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014136 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014137else
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014139/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014140
14141int main()
14142{
14143 int val1 = nice(1);
14144 if (val1 != -1 && val1 == nice(2))
14145 exit(0);
14146 exit(1);
14147}
14148
Martin v. Löwis11437992002-04-12 09:54:03 +000014149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014150if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014151 ac_cv_broken_nice=yes
14152else
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14156 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014157fi
14158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159fi
14160
Matthias Kloseb9621712010-04-24 17:59:49 +000014161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14162$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014163if test "$ac_cv_broken_nice" = yes
14164then
Martin v. Löwis11437992002-04-12 09:54:03 +000014165
Matthias Kloseb9621712010-04-24 17:59:49 +000014166$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014167
14168fi
14169
Matthias Kloseb9621712010-04-24 17:59:49 +000014170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14171$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014172if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014174else
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014176 ac_cv_broken_poll=no
14177else
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014179/* end confdefs.h. */
14180
14181#include <poll.h>
14182
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014183int main()
14184{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014185 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014186 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014187
14188 close (42);
14189
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014190 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014191 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014192 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014193 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014194 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014195 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014196 return 1;
14197}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014198
14199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014200if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014201 ac_cv_broken_poll=yes
14202else
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014209fi
14210
Matthias Kloseb9621712010-04-24 17:59:49 +000014211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14212$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014213if test "$ac_cv_broken_poll" = yes
14214then
14215
Matthias Kloseb9621712010-04-24 17:59:49 +000014216$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014217
14218fi
14219
Brett Cannon43802422005-02-10 20:48:03 +000014220# 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 +000014221# (which is not required by ISO C or UNIX spec) and/or if we support
14222# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014223ac_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 +000014224#include <$ac_cv_struct_tm>
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226"
Victor Stinnere0be4232011-10-25 13:06:09 +020014227if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014228
14229cat >>confdefs.h <<_ACEOF
14230#define HAVE_STRUCT_TM_TM_ZONE 1
14231_ACEOF
14232
14233
14234fi
14235
14236if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14237
Matthias Kloseb9621712010-04-24 17:59:49 +000014238$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014239
14240else
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14242"
Victor Stinnere0be4232011-10-25 13:06:09 +020014243if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245else
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247fi
14248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014250#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251_ACEOF
14252
Matthias Kloseb9621712010-04-24 17:59:49 +000014253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14254$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014255if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257else
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014259/* end confdefs.h. */
14260#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261#if !HAVE_DECL_TZNAME
14262extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014263#endif
14264
14265int
14266main ()
14267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014269 ;
14270 return 0;
14271}
14272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014273if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014274 ac_cv_var_tzname=yes
14275else
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014278rm -f core conftest.err conftest.$ac_objext \
14279 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14282$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014283 if test $ac_cv_var_tzname = yes; then
14284
Matthias Kloseb9621712010-04-24 17:59:49 +000014285$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014286
14287 fi
14288fi
14289
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014290
Martin v. Löwis1d459062005-03-14 21:23:33 +000014291# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14293$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014294if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014296else
14297
Matthias Kloseb9621712010-04-24 17:59:49 +000014298if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014299 ac_cv_working_tzset=no
14300else
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014302/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014303
14304#include <stdlib.h>
14305#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014306#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014307
14308#if HAVE_TZNAME
14309extern char *tzname[];
14310#endif
14311
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014312int main()
14313{
Brett Cannon18367812003-09-19 00:59:16 +000014314 /* Note that we need to ensure that not only does tzset(3)
14315 do 'something' with localtime, but it works as documented
14316 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014317 This includes making sure that tzname is set properly if
14318 tm->tm_zone does not exist since it is the alternative way
14319 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014320
14321 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014322 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014323 */
14324
Martin v. Löwis1d459062005-03-14 21:23:33 +000014325 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014326 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14327
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014328 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014329 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014330 if (localtime(&groundhogday)->tm_hour != 0)
14331 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014332#if HAVE_TZNAME
14333 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14334 if (strcmp(tzname[0], "UTC") ||
14335 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14336 exit(1);
14337#endif
Brett Cannon18367812003-09-19 00:59:16 +000014338
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014339 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014340 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014341 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014342 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014343#if HAVE_TZNAME
14344 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14345 exit(1);
14346#endif
Brett Cannon18367812003-09-19 00:59:16 +000014347
14348 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14349 tzset();
14350 if (localtime(&groundhogday)->tm_hour != 11)
14351 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014352#if HAVE_TZNAME
14353 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14354 exit(1);
14355#endif
14356
14357#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014358 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14359 exit(1);
14360 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14361 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014362#endif
Brett Cannon18367812003-09-19 00:59:16 +000014363
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014364 exit(0);
14365}
14366
14367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014368if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014369 ac_cv_working_tzset=yes
14370else
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14374 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014375fi
14376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014377fi
14378
Matthias Kloseb9621712010-04-24 17:59:49 +000014379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14380$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014381if test "$ac_cv_working_tzset" = yes
14382then
14383
Matthias Kloseb9621712010-04-24 17:59:49 +000014384$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014385
14386fi
14387
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014388# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14390$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014391if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014392 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014393else
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014395/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014396#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014397int
14398main ()
14399{
14400
14401struct stat st;
14402st.st_mtim.tv_nsec = 1;
14403
14404 ;
14405 return 0;
14406}
14407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014409 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014410else
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14414fi
14415
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14417$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014418if test "$ac_cv_stat_tv_nsec" = yes
14419then
14420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014422
14423fi
14424
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014425# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14427$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014428if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014430else
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014432/* end confdefs.h. */
14433#include <sys/stat.h>
14434int
14435main ()
14436{
14437
14438struct stat st;
14439st.st_mtimespec.tv_nsec = 1;
14440
14441 ;
14442 return 0;
14443}
14444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014446 ac_cv_stat_tv_nsec2=yes
14447else
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14451fi
14452
Matthias Kloseb9621712010-04-24 17:59:49 +000014453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14454$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014455if test "$ac_cv_stat_tv_nsec2" = yes
14456then
14457
Matthias Kloseb9621712010-04-24 17:59:49 +000014458$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014459
14460fi
14461
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014462ac_save_cppflags="$CPPFLAGS"
14463CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014464# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14466$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014467if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014469else
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014471/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014472#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014473int
14474main ()
14475{
Jack Jansen666b1e72001-10-31 12:11:48 +000014476
14477 int rtn;
14478 rtn = mvwdelch(0,0,0);
14479
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 ;
14481 return 0;
14482}
14483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014484if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014485 ac_cv_mvwdelch_is_expression=yes
14486else
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14490fi
14491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14493$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014494
14495if test "$ac_cv_mvwdelch_is_expression" = yes
14496then
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014499
14500fi
14501
Matthias Kloseb9621712010-04-24 17:59:49 +000014502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14503$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014504if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014506else
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014508/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014509#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014510int
14511main ()
14512{
Jack Jansen666b1e72001-10-31 12:11:48 +000014513
14514 WINDOW *w;
14515 w->_flags = 0;
14516
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 ;
14518 return 0;
14519}
14520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014521if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014522 ac_cv_window_has_flags=yes
14523else
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14527fi
14528
Matthias Kloseb9621712010-04-24 17:59:49 +000014529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14530$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014531
Jack Jansen666b1e72001-10-31 12:11:48 +000014532
14533if test "$ac_cv_window_has_flags" = yes
14534then
Martin v. Löwis11437992002-04-12 09:54:03 +000014535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014537
14538fi
14539
Matthias Kloseb9621712010-04-24 17:59:49 +000014540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14541$as_echo_n "checking for is_term_resized... " >&6; }
14542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014543/* end confdefs.h. */
14544#include <curses.h>
14545int
14546main ()
14547{
14548void *x=is_term_resized
14549 ;
14550 return 0;
14551}
14552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014556
Matthias Kloseb159a552010-04-25 21:00:44 +000014557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014558$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014559else
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14561$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014562
14563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14567$as_echo_n "checking for resize_term... " >&6; }
14568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014569/* end confdefs.h. */
14570#include <curses.h>
14571int
14572main ()
14573{
14574void *x=resize_term
14575 ;
14576 return 0;
14577}
14578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014579if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014580
Matthias Kloseb9621712010-04-24 17:59:49 +000014581$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014582
Matthias Kloseb159a552010-04-25 21:00:44 +000014583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014584$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014585else
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14587$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014588
14589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14593$as_echo_n "checking for resizeterm... " >&6; }
14594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014595/* end confdefs.h. */
14596#include <curses.h>
14597int
14598main ()
14599{
14600void *x=resizeterm
14601 ;
14602 return 0;
14603}
14604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014605if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014606
Matthias Kloseb9621712010-04-24 17:59:49 +000014607$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014608
Matthias Kloseb159a552010-04-25 21:00:44 +000014609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014610$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014611else
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14613$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014614
14615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014617# last curses configure check
14618CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14621$as_echo "$as_me: checking for device files" >&6;}
14622
14623if test "x$cross_compiling" = xyes; then
14624 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14626$as_echo_n "checking for /dev/ptmx... " >&6; }
14627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14628$as_echo "not set" >&6; }
14629 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14630 fi
14631 if test "${ac_cv_file__dev_ptc+set}" != set; then
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14633$as_echo_n "checking for /dev/ptc... " >&6; }
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14635$as_echo "not set" >&6; }
14636 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14637 fi
14638fi
14639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14641$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014642if ${ac_cv_file__dev_ptmx+:} false; then :
14643 $as_echo_n "(cached) " >&6
14644else
14645 test "$cross_compiling" = yes &&
14646 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14647if test -r "/dev/ptmx"; then
14648 ac_cv_file__dev_ptmx=yes
14649else
14650 ac_cv_file__dev_ptmx=no
14651fi
14652fi
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14654$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14655if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014656
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014657fi
14658
14659if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014662
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14665$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014666if ${ac_cv_file__dev_ptc+:} false; then :
14667 $as_echo_n "(cached) " >&6
14668else
14669 test "$cross_compiling" = yes &&
14670 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14671if test -r "/dev/ptc"; then
14672 ac_cv_file__dev_ptc=yes
14673else
14674 ac_cv_file__dev_ptc=no
14675fi
14676fi
14677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14678$as_echo "$ac_cv_file__dev_ptc" >&6; }
14679if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014680
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014681fi
14682
14683if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014684
Matthias Kloseb9621712010-04-24 17:59:49 +000014685$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014686
Neal Norwitz865400f2003-03-21 01:42:58 +000014687fi
14688
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014689if test "$have_long_long" = yes
14690then
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14692$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014693 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014695else
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014697 ac_cv_have_long_long_format="cross -- assuming no"
14698 if test x$GCC = xyes; then
14699 save_CFLAGS=$CFLAGS
14700 CFLAGS="$CFLAGS -Werror -Wformat"
14701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14702/* end confdefs.h. */
14703
14704 #include <stdio.h>
14705 #include <stddef.h>
14706
14707int
14708main ()
14709{
14710
14711 char *buffer;
14712 sprintf(buffer, "%lld", (long long)123);
14713 sprintf(buffer, "%lld", (long long)-123);
14714 sprintf(buffer, "%llu", (unsigned long long)123);
14715
14716 ;
14717 return 0;
14718}
14719_ACEOF
14720if ac_fn_c_try_compile "$LINENO"; then :
14721 ac_cv_have_long_long_format=yes
14722
14723fi
14724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14725 CFLAGS=$save_CFLAGS
14726 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014727else
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014729/* end confdefs.h. */
14730
14731 #include <stdio.h>
14732 #include <stddef.h>
14733 #include <string.h>
14734
14735 #ifdef HAVE_SYS_TYPES_H
14736 #include <sys/types.h>
14737 #endif
14738
14739 int main()
14740 {
14741 char buffer[256];
14742
14743 if (sprintf(buffer, "%lld", (long long)123) < 0)
14744 return 1;
14745 if (strcmp(buffer, "123"))
14746 return 1;
14747
14748 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14749 return 1;
14750 if (strcmp(buffer, "-123"))
14751 return 1;
14752
14753 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14754 return 1;
14755 if (strcmp(buffer, "123"))
14756 return 1;
14757
14758 return 0;
14759 }
14760
14761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014762if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014763 ac_cv_have_long_long_format=yes
14764else
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014769fi
14770
14771
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014772fi
14773
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14775$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014776fi
14777
Mark Dickinson89d7d412009-12-31 20:50:59 +000014778if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014779then
14780
Matthias Kloseb9621712010-04-24 17:59:49 +000014781$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014782
14783fi
14784
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014785if test $ac_sys_system = Darwin
14786then
14787 LIBS="$LIBS -framework CoreFoundation"
14788fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014789
Matthias Kloseb9621712010-04-24 17:59:49 +000014790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14791$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014792if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014794else
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014796 ac_cv_have_size_t_format="cross -- assuming yes"
14797
Thomas Wouters477c8d52006-05-27 19:21:47 +000014798else
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014800/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014801
Thomas Wouters477c8d52006-05-27 19:21:47 +000014802#include <stdio.h>
14803#include <stddef.h>
14804#include <string.h>
14805
Christian Heimes2c181612007-12-17 20:04:13 +000014806#ifdef HAVE_SYS_TYPES_H
14807#include <sys/types.h>
14808#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014809
14810#ifdef HAVE_SSIZE_T
14811typedef ssize_t Py_ssize_t;
14812#elif SIZEOF_VOID_P == SIZEOF_LONG
14813typedef long Py_ssize_t;
14814#else
14815typedef int Py_ssize_t;
14816#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014817
Christian Heimes2c181612007-12-17 20:04:13 +000014818int main()
14819{
14820 char buffer[256];
14821
Thomas Wouters477c8d52006-05-27 19:21:47 +000014822 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14823 return 1;
14824
Thomas Wouters89f507f2006-12-13 04:49:30 +000014825 if (strcmp(buffer, "123"))
14826 return 1;
14827
14828 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14829 return 1;
14830
14831 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014832 return 1;
14833
14834 return 0;
14835}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014836
Thomas Wouters477c8d52006-05-27 19:21:47 +000014837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014838if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014839 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014840else
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014845fi
14846
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14849$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014850if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014853
14854fi
14855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014857#ifdef HAVE_SYS_TYPES_H
14858#include <sys/types.h>
14859#endif
14860#ifdef HAVE_SYS_SOCKET_H
14861#include <sys/socket.h>
14862#endif
14863
Matthias Kloseb9621712010-04-24 17:59:49 +000014864"
Victor Stinnere0be4232011-10-25 13:06:09 +020014865if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014866
Martin v. Löwis11437992002-04-12 09:54:03 +000014867else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014868
Matthias Kloseb9621712010-04-24 17:59:49 +000014869$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014870
14871fi
14872
Michael W. Hudson54241132001-12-07 15:38:26 +000014873
Matthias Kloseb9621712010-04-24 17:59:49 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14875$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014876if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014878else
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014880 ac_cv_broken_mbstowcs=no
14881else
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014883/* end confdefs.h. */
14884
Stefan Krah19c21392012-11-22 23:47:32 +010014885#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014886#include<stdlib.h>
14887int main() {
14888 size_t len = -1;
14889 const char *str = "text";
14890 len = mbstowcs(NULL, str, 0);
14891 return (len != 4);
14892}
14893
14894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014895if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014896 ac_cv_broken_mbstowcs=no
14897else
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014902fi
14903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014904fi
14905
Matthias Kloseb9621712010-04-24 17:59:49 +000014906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14907$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014908if test "$ac_cv_broken_mbstowcs" = yes
14909then
14910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014912
14913fi
14914
Antoine Pitroub52ec782009-01-25 16:34:23 +000014915# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14917$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014918
14919# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014920if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014921 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014922if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014923then
14924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014926
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14928$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014929fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014930if test "$withval" = no
14931then
14932
14933$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14934
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14936$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014937fi
14938
Antoine Pitrou042b1282010-08-13 21:15:58 +000014939else
14940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14941$as_echo "no value specified" >&6; }
14942fi
14943
Antoine Pitroub52ec782009-01-25 16:34:23 +000014944
Matthias Kloseb17289e2012-03-15 19:51:34 +010014945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14946$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14947if ${ac_cv_computed_gotos+:} false; then :
14948 $as_echo_n "(cached) " >&6
14949else
14950 if test "$cross_compiling" = yes; then :
14951 if test "${with_computed_gotos+set}" = set; then
14952 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14953 else
14954 ac_cv_computed_gotos=no
14955 fi
14956else
14957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958/* end confdefs.h. */
14959
14960int main(int argc, char **argv)
14961{
14962 static void *targets[1] = { &&LABEL1 };
14963 goto LABEL2;
14964LABEL1:
14965 return 0;
14966LABEL2:
14967 goto *targets[0];
14968 return 1;
14969}
14970
14971_ACEOF
14972if ac_fn_c_try_run "$LINENO"; then :
14973 ac_cv_computed_gotos=yes
14974else
14975 ac_cv_computed_gotos=no
14976fi
14977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14978 conftest.$ac_objext conftest.beam conftest.$ac_ext
14979fi
14980
14981fi
14982
14983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14984$as_echo "$ac_cv_computed_gotos" >&6; }
14985case "$ac_cv_computed_gotos" in yes*)
14986
14987$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14988
14989esac
14990
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014991case $ac_sys_system in
14992AIX*)
14993
14994$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14995 ;;
14996esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014997
Michael W. Hudson54241132001-12-07 15:38:26 +000014998
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014999
15000
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015001for h in `(cd $srcdir;echo Python/thread_*.h)`
15002do
15003 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15004done
15005
Michael W. Hudson54241132001-12-07 15:38:26 +000015006
Neal Norwitzd24499d2005-12-18 21:36:39 +000015007SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15009$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015010for dir in $SRCDIRS; do
15011 if test ! -d $dir; then
15012 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015013 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015014done
Matthias Kloseb9621712010-04-24 17:59:49 +000015015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15016$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015017
Stefan Krah1919b7e2012-03-21 18:25:23 +010015018# Availability of -O2:
15019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15020$as_echo_n "checking for -O2... " >&6; }
15021saved_cflags="$CFLAGS"
15022CFLAGS="-O2"
15023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15024/* end confdefs.h. */
15025
15026int
15027main ()
15028{
15029
15030
15031 ;
15032 return 0;
15033}
15034_ACEOF
15035if ac_fn_c_try_compile "$LINENO"; then :
15036 have_O2=yes
15037else
15038 have_O2=no
15039fi
15040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15042$as_echo "$have_O2" >&6; }
15043CFLAGS="$saved_cflags"
15044
15045# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15046# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15048$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15049saved_cflags="$CFLAGS"
15050CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15051if test "$have_O2" = no; then
15052 CFLAGS=""
15053fi
15054if test "$cross_compiling" = yes; then :
15055 have_glibc_memmove_bug=undefined
15056else
15057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15058/* end confdefs.h. */
15059
15060#include <stdio.h>
15061#include <stdlib.h>
15062#include <string.h>
15063void foo(void *p, void *q) { memmove(p, q, 19); }
15064int main() {
15065 char a[32] = "123456789000000000";
15066 foo(&a[9], a);
15067 if (strcmp(a, "123456789123456789000000000") != 0)
15068 return 1;
15069 foo(a, &a[9]);
15070 if (strcmp(a, "123456789000000000") != 0)
15071 return 1;
15072 return 0;
15073}
15074
15075_ACEOF
15076if ac_fn_c_try_run "$LINENO"; then :
15077 have_glibc_memmove_bug=no
15078else
15079 have_glibc_memmove_bug=yes
15080fi
15081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15082 conftest.$ac_objext conftest.beam conftest.$ac_ext
15083fi
15084
15085CFLAGS="$saved_cflags"
15086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15087$as_echo "$have_glibc_memmove_bug" >&6; }
15088if test "$have_glibc_memmove_bug" = yes; then
15089
15090$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15091
15092fi
15093
15094if test "$have_gcc_asm_for_x87" = yes; then
15095 # Some versions of gcc miscompile inline asm:
15096 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15097 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15098 case $CC in
15099 *gcc*)
15100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15101$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15102 saved_cflags="$CFLAGS"
15103 CFLAGS="-O2"
15104 if test "$cross_compiling" = yes; then :
15105 have_ipa_pure_const_bug=undefined
15106else
15107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15108/* end confdefs.h. */
15109
15110 __attribute__((noinline)) int
15111 foo(int *p) {
15112 int r;
15113 asm ( "movl \$6, (%1)\n\t"
15114 "xorl %0, %0\n\t"
15115 : "=r" (r) : "r" (p) : "memory"
15116 );
15117 return r;
15118 }
15119 int main() {
15120 int p = 8;
15121 if ((foo(&p) ? : p) != 6)
15122 return 1;
15123 return 0;
15124 }
15125
15126_ACEOF
15127if ac_fn_c_try_run "$LINENO"; then :
15128 have_ipa_pure_const_bug=no
15129else
15130 have_ipa_pure_const_bug=yes
15131fi
15132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15133 conftest.$ac_objext conftest.beam conftest.$ac_ext
15134fi
15135
15136 CFLAGS="$saved_cflags"
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15138$as_echo "$have_ipa_pure_const_bug" >&6; }
15139 if test "$have_ipa_pure_const_bug" = yes; then
15140
15141$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15142
15143 fi
15144 ;;
15145 esac
15146fi
15147
Guido van Rossum627b2d71993-12-24 10:39:16 +000015148# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015149ac_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 +000015150
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015151ac_config_files="$ac_config_files Modules/ld_so_aix"
15152
Martin v. Löwis11437992002-04-12 09:54:03 +000015153cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154# This file is a shell script that caches the results of configure
15155# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015156# scripts and configure runs, see configure's option --config-cache.
15157# It is not useful on other systems. If it contains results you don't
15158# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015159#
Martin v. Löwis11437992002-04-12 09:54:03 +000015160# config.status only pays attention to the cache file if you give it
15161# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015162#
Skip Montanaro6dead952003-09-25 14:50:04 +000015163# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015164# loading this file, other *unset* `ac_cv_foo' will be assigned the
15165# following values.
15166
15167_ACEOF
15168
Guido van Rossumf78abae1997-01-21 22:02:36 +000015169# The following way of writing the cache mishandles newlines in values,
15170# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015172# Ultrix sh set writes to stderr and can't be redirected directly,
15173# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174(
15175 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15176 eval ac_val=\$$ac_var
15177 case $ac_val in #(
15178 *${as_nl}*)
15179 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15181$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182 esac
15183 case $ac_var in #(
15184 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15186 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187 esac ;;
15188 esac
15189 done
15190
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15193 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015194 # `set' does not quote correctly, so add quotes: double-quote
15195 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015197 "s/'/'\\\\''/g;
15198 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 *)
15201 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204 esac |
15205 sort
15206) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015210 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15212 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15214 :end' >>confcache
15215if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15216 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015217 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15219$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015220 if test ! -f "$cache_file" || test -h "$cache_file"; then
15221 cat confcache >"$cache_file"
15222 else
15223 case $cache_file in #(
15224 */* | ?:*)
15225 mv -f confcache "$cache_file"$$ &&
15226 mv -f "$cache_file"$$ "$cache_file" ;; #(
15227 *)
15228 mv -f confcache "$cache_file" ;;
15229 esac
15230 fi
15231 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015232 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015233 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15234$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015235 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015236fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015237rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015238
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015239test "x$prefix" = xNONE && prefix=$ac_default_prefix
15240# Let make expand exec_prefix.
15241test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015242
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015243DEFS=-DHAVE_CONFIG_H
15244
Skip Montanaro6dead952003-09-25 14:50:04 +000015245ac_libobjs=
15246ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015247U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015248for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15249 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15253 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015254 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15255 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015256done
15257LIBOBJS=$ac_libobjs
15258
15259LTLIBOBJS=$ac_ltlibobjs
15260
15261
Martin v. Löwis11437992002-04-12 09:54:03 +000015262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263
Victor Stinnere0be4232011-10-25 13:06:09 +020015264: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015265ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015266ac_clean_files_save=$ac_clean_files
15267ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015268{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15269$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15270as_write_fail=0
15271cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015272#! $SHELL
15273# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015274# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015275# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015276# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015277
Martin v. Löwis11437992002-04-12 09:54:03 +000015278debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015279ac_cs_recheck=false
15280ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015281
Matthias Kloseb9621712010-04-24 17:59:49 +000015282SHELL=\${CONFIG_SHELL-$SHELL}
15283export SHELL
15284_ASEOF
15285cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15286## -------------------- ##
15287## M4sh Initialization. ##
15288## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290# Be more Bourne compatible
15291DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015292if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015293 emulate sh
15294 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015296 # is contrary to our usage. Disable this feature.
15297 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015299else
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 case `(set -o) 2>/dev/null` in #(
15301 *posix*) :
15302 set -o posix ;; #(
15303 *) :
15304 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015305esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015306fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015307
15308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309as_nl='
15310'
15311export as_nl
15312# Printing a long string crashes Solaris 7 /usr/bin/printf.
15313as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15314as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15315as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15316# Prefer a ksh shell builtin over an external printf program on Solaris,
15317# but without wasting forks for bash or zsh.
15318if test -z "$BASH_VERSION$ZSH_VERSION" \
15319 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15320 as_echo='print -r --'
15321 as_echo_n='print -rn --'
15322elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15323 as_echo='printf %s\n'
15324 as_echo_n='printf %s'
15325else
15326 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15327 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15328 as_echo_n='/usr/ucb/echo -n'
15329 else
15330 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15331 as_echo_n_body='eval
15332 arg=$1;
15333 case $arg in #(
15334 *"$as_nl"*)
15335 expr "X$arg" : "X\\(.*\\)$as_nl";
15336 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15337 esac;
15338 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15339 '
15340 export as_echo_n_body
15341 as_echo_n='sh -c $as_echo_n_body as_echo'
15342 fi
15343 export as_echo_body
15344 as_echo='sh -c $as_echo_body as_echo'
15345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015346
15347# The user is always right.
15348if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015349 PATH_SEPARATOR=:
15350 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15351 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15352 PATH_SEPARATOR=';'
15353 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356
15357# IFS
15358# We need space, tab and new line, in precisely that order. Quoting is
15359# there to prevent editors from complaining about space-tab.
15360# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15361# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362IFS=" "" $as_nl"
15363
15364# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015365as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015366case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367 *[\\/]* ) as_myself=$0 ;;
15368 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015369for as_dir in $PATH
15370do
15371 IFS=$as_save_IFS
15372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15374 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015377 ;;
15378esac
15379# We did not find ourselves, most probably we were run as `sh COMMAND'
15380# in which case we are not to be found in the path.
15381if test "x$as_myself" = x; then
15382 as_myself=$0
15383fi
15384if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15386 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015387fi
15388
Matthias Kloseb9621712010-04-24 17:59:49 +000015389# Unset variables that we do not need and which cause bugs (e.g. in
15390# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15391# suppresses any "Segmentation fault" message there. '((' could
15392# trigger a bug in pdksh 5.2.14.
15393for as_var in BASH_ENV ENV MAIL MAILPATH
15394do eval test x\${$as_var+set} = xset \
15395 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396done
15397PS1='$ '
15398PS2='> '
15399PS4='+ '
15400
15401# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015402LC_ALL=C
15403export LC_ALL
15404LANGUAGE=C
15405export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015406
Matthias Kloseb9621712010-04-24 17:59:49 +000015407# CDPATH.
15408(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15409
15410
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015411# as_fn_error STATUS ERROR [LINENO LOG_FD]
15412# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015413# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15414# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015415# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015416as_fn_error ()
15417{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015418 as_status=$1; test $as_status -eq 0 && as_status=1
15419 if test "$4"; then
15420 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15421 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015423 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015424 as_fn_exit $as_status
15425} # as_fn_error
15426
15427
15428# as_fn_set_status STATUS
15429# -----------------------
15430# Set $? to STATUS, without forking.
15431as_fn_set_status ()
15432{
15433 return $1
15434} # as_fn_set_status
15435
15436# as_fn_exit STATUS
15437# -----------------
15438# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15439as_fn_exit ()
15440{
15441 set +e
15442 as_fn_set_status $1
15443 exit $1
15444} # as_fn_exit
15445
15446# as_fn_unset VAR
15447# ---------------
15448# Portably unset VAR.
15449as_fn_unset ()
15450{
15451 { eval $1=; unset $1;}
15452}
15453as_unset=as_fn_unset
15454# as_fn_append VAR VALUE
15455# ----------------------
15456# Append the text in VALUE to the end of the definition contained in VAR. Take
15457# advantage of any shell optimizations that allow amortized linear growth over
15458# repeated appends, instead of the typical quadratic growth present in naive
15459# implementations.
15460if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15461 eval 'as_fn_append ()
15462 {
15463 eval $1+=\$2
15464 }'
15465else
15466 as_fn_append ()
15467 {
15468 eval $1=\$$1\$2
15469 }
15470fi # as_fn_append
15471
15472# as_fn_arith ARG...
15473# ------------------
15474# Perform arithmetic evaluation on the ARGs, and store the result in the
15475# global $as_val. Take advantage of shells that can avoid forks. The arguments
15476# must be portable across $(()) and expr.
15477if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15478 eval 'as_fn_arith ()
15479 {
15480 as_val=$(( $* ))
15481 }'
15482else
15483 as_fn_arith ()
15484 {
15485 as_val=`expr "$@" || test $? -eq 1`
15486 }
15487fi # as_fn_arith
15488
15489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015490if expr a : '\(a\)' >/dev/null 2>&1 &&
15491 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15492 as_expr=expr
15493else
15494 as_expr=false
15495fi
15496
15497if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15498 as_basename=basename
15499else
15500 as_basename=false
15501fi
15502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15504 as_dirname=dirname
15505else
15506 as_dirname=false
15507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509as_me=`$as_basename -- "$0" ||
15510$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15511 X"$0" : 'X\(//\)$' \| \
15512 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015513$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015514 sed '/^.*\/\([^/][^/]*\)\/*$/{
15515 s//\1/
15516 q
15517 }
15518 /^X\/\(\/\/\)$/{
15519 s//\1/
15520 q
15521 }
15522 /^X\/\(\/\).*/{
15523 s//\1/
15524 q
15525 }
15526 s/.*/./; q'`
15527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528# Avoid depending upon Character Ranges.
15529as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15530as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15531as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15532as_cr_digits='0123456789'
15533as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015534
15535ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015536case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015539 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 xy) ECHO_C='\c';;
15541 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15542 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543 esac;;
15544*)
15545 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015547
Martin v. Löwis11437992002-04-12 09:54:03 +000015548rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549if test -d conf$$.dir; then
15550 rm -f conf$$.dir/conf$$.file
15551else
15552 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015555if (echo >conf$$.file) 2>/dev/null; then
15556 if ln -s conf$$.file conf$$ 2>/dev/null; then
15557 as_ln_s='ln -s'
15558 # ... but there are two gotchas:
15559 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15560 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015561 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015563 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 elif ln conf$$.file conf$$ 2>/dev/null; then
15565 as_ln_s=ln
15566 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015567 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015569else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015570 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015572rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15573rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015574
Matthias Kloseb9621712010-04-24 17:59:49 +000015575
15576# as_fn_mkdir_p
15577# -------------
15578# Create "$as_dir" as a directory, including parents if necessary.
15579as_fn_mkdir_p ()
15580{
15581
15582 case $as_dir in #(
15583 -*) as_dir=./$as_dir;;
15584 esac
15585 test -d "$as_dir" || eval $as_mkdir_p || {
15586 as_dirs=
15587 while :; do
15588 case $as_dir in #(
15589 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15590 *) as_qdir=$as_dir;;
15591 esac
15592 as_dirs="'$as_qdir' $as_dirs"
15593 as_dir=`$as_dirname -- "$as_dir" ||
15594$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15595 X"$as_dir" : 'X\(//\)[^/]' \| \
15596 X"$as_dir" : 'X\(//\)$' \| \
15597 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15598$as_echo X"$as_dir" |
15599 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15600 s//\1/
15601 q
15602 }
15603 /^X\(\/\/\)[^/].*/{
15604 s//\1/
15605 q
15606 }
15607 /^X\(\/\/\)$/{
15608 s//\1/
15609 q
15610 }
15611 /^X\(\/\).*/{
15612 s//\1/
15613 q
15614 }
15615 s/.*/./; q'`
15616 test -d "$as_dir" && break
15617 done
15618 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015619 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015620
15621
15622} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015623if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015624 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015625else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015626 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015627 as_mkdir_p=false
15628fi
15629
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015630
15631# as_fn_executable_p FILE
15632# -----------------------
15633# Test if FILE is an executable regular file.
15634as_fn_executable_p ()
15635{
15636 test -f "$1" && test -x "$1"
15637} # as_fn_executable_p
15638as_test_x='test -x'
15639as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015640
15641# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015642as_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 +000015643
15644# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015645as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015646
15647
Martin v. Löwis11437992002-04-12 09:54:03 +000015648exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015649## ----------------------------------- ##
15650## Main body of $CONFIG_STATUS script. ##
15651## ----------------------------------- ##
15652_ASEOF
15653test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015654
Matthias Kloseb9621712010-04-24 17:59:49 +000015655cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15656# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015657# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658# values after options handling.
15659ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015660This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015661generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015662
15663 CONFIG_FILES = $CONFIG_FILES
15664 CONFIG_HEADERS = $CONFIG_HEADERS
15665 CONFIG_LINKS = $CONFIG_LINKS
15666 CONFIG_COMMANDS = $CONFIG_COMMANDS
15667 $ $0 $@
15668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669on `(hostname || uname -n) 2>/dev/null | sed 1q`
15670"
15671
Martin v. Löwis11437992002-04-12 09:54:03 +000015672_ACEOF
15673
Matthias Kloseb9621712010-04-24 17:59:49 +000015674case $ac_config_files in *"
15675"*) set x $ac_config_files; shift; ac_config_files=$*;;
15676esac
15677
15678case $ac_config_headers in *"
15679"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15680esac
15681
15682
15683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015684# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015685config_files="$ac_config_files"
15686config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015688_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015689
Matthias Kloseb9621712010-04-24 17:59:49 +000015690cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015691ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015692\`$as_me' instantiates files and other configuration actions
15693from templates according to the current configuration. Unless the files
15694and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015695
Matthias Kloseb9621712010-04-24 17:59:49 +000015696Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
15698 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015699 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 --config print configuration, then exit
15701 -q, --quiet, --silent
15702 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 -d, --debug don't remove temporary files
15704 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 --file=FILE[:TEMPLATE]
15706 instantiate the configuration file FILE
15707 --header=FILE[:TEMPLATE]
15708 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015709
15710Configuration files:
15711$config_files
15712
15713Configuration headers:
15714$config_headers
15715
Matthias Kloseb9621712010-04-24 17:59:49 +000015716Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15720ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015721ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015722python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015723configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015725
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015726Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015727This config.status script is free software; the Free Software Foundation
15728gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015729
15730ac_pwd='$ac_pwd'
15731srcdir='$srcdir'
15732INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015733MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015734test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015735_ACEOF
15736
Matthias Kloseb9621712010-04-24 17:59:49 +000015737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15738# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015739ac_need_defaults=:
15740while test $# != 0
15741do
15742 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015743 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15745 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015746 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015748 --*=)
15749 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15750 ac_optarg=
15751 ac_shift=:
15752 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015754 ac_option=$1
15755 ac_optarg=$2
15756 ac_shift=shift
15757 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 esac
15759
Skip Montanaro6dead952003-09-25 14:50:04 +000015760 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015762 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15763 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015765 $as_echo "$ac_cs_version"; exit ;;
15766 --config | --confi | --conf | --con | --co | --c )
15767 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015768 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 debug=: ;;
15770 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015771 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 case $ac_optarg in
15773 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015774 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 esac
15776 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015777 ac_need_defaults=false;;
15778 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015779 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015780 case $ac_optarg in
15781 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15782 esac
15783 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015784 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785 --he | --h)
15786 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015787 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015788Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015790 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015791 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15792 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15793 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015794
15795 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015796 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015797Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015801
15802 esac
15803 shift
15804done
15805
Skip Montanaro6dead952003-09-25 14:50:04 +000015806ac_configure_extra_args=
15807
15808if $ac_cs_silent; then
15809 exec 6>/dev/null
15810 ac_configure_extra_args="$ac_configure_extra_args --silent"
15811fi
15812
15813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015814cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015815if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015816 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015817 shift
15818 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15819 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015822fi
15823
Martin v. Löwis11437992002-04-12 09:54:03 +000015824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015825cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826exec 5>>config.log
15827{
15828 echo
15829 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15830## Running $as_me. ##
15831_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015836cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840
15841# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015842for ac_config_target in $ac_config_targets
15843do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844 case $ac_config_target in
15845 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15846 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15847 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015848 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15849 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15851 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015852 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010015853 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015854 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015855
Victor Stinnere0be4232011-10-25 13:06:09 +020015856 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 esac
15858done
15859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860
Martin v. Löwis11437992002-04-12 09:54:03 +000015861# If the user did not use the arguments to specify the items to instantiate,
15862# then the envvar interface is used. Set only those that are not.
15863# We use the long form for the default assignment because of an extremely
15864# bizarre bug on SunOS 4.1.3.
15865if $ac_need_defaults; then
15866 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15867 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15868fi
15869
Skip Montanaro6dead952003-09-25 14:50:04 +000015870# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015872# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873# Hook for its removal unless debugging.
15874# Note that there is a small window in which the directory will not be cleaned:
15875# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015876$debug ||
15877{
Victor Stinnere0be4232011-10-25 13:06:09 +020015878 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015880 : "${ac_tmp:=$tmp}"
15881 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015883 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015884}
Martin v. Löwis11437992002-04-12 09:54:03 +000015885# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015886
Martin v. Löwis11437992002-04-12 09:54:03 +000015887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015888 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015889 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015890} ||
15891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015892 tmp=./conf$$-$RANDOM
15893 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015894} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015895ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015896
Matthias Kloseb9621712010-04-24 17:59:49 +000015897# Set up the scripts for CONFIG_FILES section.
15898# No need to generate them if there are no CONFIG_FILES.
15899# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015900if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015901
Matthias Kloseb9621712010-04-24 17:59:49 +000015902
15903ac_cr=`echo X | tr X '\015'`
15904# On cygwin, bash can eat \r inside `` if the user requested igncr.
15905# But we know of no other shell where ac_cr would be empty at this
15906# point, so we can use a bashism as a fallback.
15907if test "x$ac_cr" = x; then
15908 eval ac_cr=\$\'\\r\'
15909fi
15910ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15911if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015912 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015913else
15914 ac_cs_awk_cr=$ac_cr
15915fi
15916
Victor Stinnere0be4232011-10-25 13:06:09 +020015917echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015918_ACEOF
15919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015920
Matthias Kloseb9621712010-04-24 17:59:49 +000015921{
15922 echo "cat >conf$$subs.awk <<_ACEOF" &&
15923 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15924 echo "_ACEOF"
15925} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015926 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15927ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928ac_delim='%!_!# '
15929for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015930 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015931 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15934 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015935 break
15936 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015937 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015938 else
15939 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015941done
Matthias Kloseb9621712010-04-24 17:59:49 +000015942rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015943
Matthias Kloseb9621712010-04-24 17:59:49 +000015944cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015945cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015947sed -n '
15948h
15949s/^/S["/; s/!.*/"]=/
15950p
15951g
15952s/^[^!]*!//
15953:repl
15954t repl
15955s/'"$ac_delim"'$//
15956t delim
15957:nl
15958h
15959s/\(.\{148\}\)..*/\1/
15960t more1
15961s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15962p
15963n
15964b repl
15965:more1
15966s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15967p
15968g
15969s/.\{148\}//
15970t nl
15971:delim
15972h
15973s/\(.\{148\}\)..*/\1/
15974t more2
15975s/["\\]/\\&/g; s/^/"/; s/$/"/
15976p
15977b
15978:more2
15979s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15980p
15981g
15982s/.\{148\}//
15983t delim
15984' <conf$$subs.awk | sed '
15985/^[^""]/{
15986 N
15987 s/\n//
15988}
15989' >>$CONFIG_STATUS || ac_write_fail=1
15990rm -f conf$$subs.awk
15991cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15992_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015993cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015994 for (key in S) S_is_set[key] = 1
15995 FS = ""
15996
15997}
15998{
15999 line = $ 0
16000 nfields = split(line, field, "@")
16001 substed = 0
16002 len = length(field[1])
16003 for (i = 2; i < nfields; i++) {
16004 key = field[i]
16005 keylen = length(key)
16006 if (S_is_set[key]) {
16007 value = S[key]
16008 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16009 len += length(value) + length(field[++i])
16010 substed = 1
16011 } else
16012 len += 1 + keylen
16013 }
16014
16015 print line
16016}
16017
16018_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016020cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16021if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16022 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16023else
16024 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016025fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016026 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016027_ACEOF
16028
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016029# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16030# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016031# trailing colons and then remove the whole line if VPATH becomes empty
16032# (actually we leave an empty line to preserve line numbers).
16033if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016034 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16035h
16036s///
16037s/^/:/
16038s/[ ]*$/:/
16039s/:\$(srcdir):/:/g
16040s/:\${srcdir}:/:/g
16041s/:@srcdir@:/:/g
16042s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016043s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016044x
16045s/\(=[ ]*\).*/\1/
16046G
16047s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048s/^[^=]*=[ ]*$//
16049}'
16050fi
16051
Matthias Kloseb9621712010-04-24 17:59:49 +000016052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016053fi # test -n "$CONFIG_FILES"
16054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055# Set up the scripts for CONFIG_HEADERS section.
16056# No need to generate them if there are no CONFIG_HEADERS.
16057# This happens for instance with `./config.status Makefile'.
16058if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016059cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016060BEGIN {
16061_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016062
Matthias Kloseb9621712010-04-24 17:59:49 +000016063# Transform confdefs.h into an awk script `defines.awk', embedded as
16064# here-document in config.status, that substitutes the proper values into
16065# config.h.in to produce config.h.
16066
16067# Create a delimiter string that does not exist in confdefs.h, to ease
16068# handling of long lines.
16069ac_delim='%!_!# '
16070for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016071 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16072 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016073 break
16074 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016075 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016076 else
16077 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16078 fi
16079done
16080
16081# For the awk script, D is an array of macro values keyed by name,
16082# likewise P contains macro parameters if any. Preserve backslash
16083# newline sequences.
16084
16085ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16086sed -n '
16087s/.\{148\}/&'"$ac_delim"'/g
16088t rset
16089:rset
16090s/^[ ]*#[ ]*define[ ][ ]*/ /
16091t def
16092d
16093:def
16094s/\\$//
16095t bsnl
16096s/["\\]/\\&/g
16097s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16098D["\1"]=" \3"/p
16099s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16100d
16101:bsnl
16102s/["\\]/\\&/g
16103s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16104D["\1"]=" \3\\\\\\n"\\/p
16105t cont
16106s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16107t cont
16108d
16109:cont
16110n
16111s/.\{148\}/&'"$ac_delim"'/g
16112t clear
16113:clear
16114s/\\$//
16115t bsnlc
16116s/["\\]/\\&/g; s/^/"/; s/$/"/p
16117d
16118:bsnlc
16119s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16120b cont
16121' <confdefs.h | sed '
16122s/'"$ac_delim"'/"\\\
16123"/g' >>$CONFIG_STATUS || ac_write_fail=1
16124
16125cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16126 for (key in D) D_is_set[key] = 1
16127 FS = ""
16128}
16129/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16130 line = \$ 0
16131 split(line, arg, " ")
16132 if (arg[1] == "#") {
16133 defundef = arg[2]
16134 mac1 = arg[3]
16135 } else {
16136 defundef = substr(arg[1], 2)
16137 mac1 = arg[2]
16138 }
16139 split(mac1, mac2, "(") #)
16140 macro = mac2[1]
16141 prefix = substr(line, 1, index(line, defundef) - 1)
16142 if (D_is_set[macro]) {
16143 # Preserve the white space surrounding the "#".
16144 print prefix "define", macro P[macro] D[macro]
16145 next
16146 } else {
16147 # Replace #undef with comments. This is necessary, for example,
16148 # in the case of _POSIX_SOURCE, which is predefined and required
16149 # on some systems where configure will not decide to define it.
16150 if (defundef == "undef") {
16151 print "/*", prefix defundef, macro, "*/"
16152 next
16153 }
16154 }
16155}
16156{ print }
16157_ACAWK
16158_ACEOF
16159cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016160 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016161fi # test -n "$CONFIG_HEADERS"
16162
16163
16164eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16165shift
16166for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167do
16168 case $ac_tag in
16169 :[FHLC]) ac_mode=$ac_tag; continue;;
16170 esac
16171 case $ac_mode$ac_tag in
16172 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016173 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174 :[FH]-) ac_tag=-:-;;
16175 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16176 esac
16177 ac_save_IFS=$IFS
16178 IFS=:
16179 set x $ac_tag
16180 IFS=$ac_save_IFS
16181 shift
16182 ac_file=$1
16183 shift
16184
16185 case $ac_mode in
16186 :L) ac_source=$1;;
16187 :[FH])
16188 ac_file_inputs=
16189 for ac_f
16190 do
16191 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016192 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193 *) # Look for the file first in the build tree, then in the source tree
16194 # (if the path is not absolute). The absolute path cannot be DOS-style,
16195 # because $ac_f cannot contain `:'.
16196 test -f "$ac_f" ||
16197 case $ac_f in
16198 [\\/$]*) false;;
16199 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16200 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016201 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016203 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16204 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205 done
16206
16207 # Let's still pretend it is `configure' which instantiates (i.e., don't
16208 # use $as_me), people would be surprised to read:
16209 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016210 configure_input='Generated from '`
16211 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16212 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213 if test x"$ac_file" != x-; then
16214 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016215 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16216$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016217 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016218 # Neutralize special characters interpreted by sed in replacement strings.
16219 case $configure_input in #(
16220 *\&* | *\|* | *\\* )
16221 ac_sed_conf_input=`$as_echo "$configure_input" |
16222 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16223 *) ac_sed_conf_input=$configure_input;;
16224 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225
16226 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016227 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16228 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016229 esac
16230 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 esac
16232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016234$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016235 X"$ac_file" : 'X\(//\)[^/]' \| \
16236 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016238$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16240 s//\1/
16241 q
16242 }
16243 /^X\(\/\/\)[^/].*/{
16244 s//\1/
16245 q
16246 }
16247 /^X\(\/\/\)$/{
16248 s//\1/
16249 q
16250 }
16251 /^X\(\/\).*/{
16252 s//\1/
16253 q
16254 }
16255 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016256 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016257 ac_builddir=.
16258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259case "$ac_dir" in
16260.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16261*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016262 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016264 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265 case $ac_top_builddir_sub in
16266 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16267 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16268 esac ;;
16269esac
16270ac_abs_top_builddir=$ac_pwd
16271ac_abs_builddir=$ac_pwd$ac_dir_suffix
16272# for backward compatibility:
16273ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016274
16275case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278 ac_top_srcdir=$ac_top_builddir_sub
16279 ac_abs_top_srcdir=$ac_pwd ;;
16280 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282 ac_top_srcdir=$srcdir
16283 ac_abs_top_srcdir=$srcdir ;;
16284 *) # Relative name.
16285 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16286 ac_top_srcdir=$ac_top_build_prefix$srcdir
16287 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016288esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016290
Martin v. Löwis11437992002-04-12 09:54:03 +000016291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292 case $ac_mode in
16293 :F)
16294 #
16295 # CONFIG_FILE
16296 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016297
16298 case $INSTALL in
16299 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016302 ac_MKDIR_P=$MKDIR_P
16303 case $MKDIR_P in
16304 [\\/$]* | ?:[\\/]* ) ;;
16305 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16306 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016307_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308
Matthias Kloseb9621712010-04-24 17:59:49 +000016309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310# If the template does not know about datarootdir, expand it.
16311# FIXME: This hack should be removed a few years after 2.60.
16312ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016313ac_sed_dataroot='
16314/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315 p
16316 q
16317}
16318/@datadir@/p
16319/@docdir@/p
16320/@infodir@/p
16321/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016322/@mandir@/p'
16323case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324*datarootdir*) ac_datarootdir_seen=yes;;
16325*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16327$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016329cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330 ac_datarootdir_hack='
16331 s&@datadir@&$datadir&g
16332 s&@docdir@&$docdir&g
16333 s&@infodir@&$infodir&g
16334 s&@localedir@&$localedir&g
16335 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016336 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016337esac
16338_ACEOF
16339
16340# Neutralize VPATH when `$srcdir' = `.'.
16341# Shell code in configure.ac might set extrasub.
16342# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16344ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016345$extrasub
16346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016348:t
16349/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016350s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016352s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353s&@srcdir@&$ac_srcdir&;t t
16354s&@abs_srcdir@&$ac_abs_srcdir&;t t
16355s&@top_srcdir@&$ac_top_srcdir&;t t
16356s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16357s&@builddir@&$ac_builddir&;t t
16358s&@abs_builddir@&$ac_abs_builddir&;t t
16359s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16360s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016361s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016363"
Victor Stinnere0be4232011-10-25 13:06:09 +020016364eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16365 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016368 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16369 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16370 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016372which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016373$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016374which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016375
Victor Stinnere0be4232011-10-25 13:06:09 +020016376 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016377 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016378 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16379 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016380 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016381 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016382 ;;
16383 :H)
16384 #
16385 # CONFIG_HEADER
16386 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 {
16389 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016390 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16391 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016392 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016393 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016394 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16395$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016397 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016398 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016399 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016400 fi
16401 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016402 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016403 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016404 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408
16409 esac
16410
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016411
16412 case $ac_file$ac_mode in
16413 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16414
16415 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416done # for ac_tag
16417
Guido van Rossum627b2d71993-12-24 10:39:16 +000016418
Matthias Kloseb9621712010-04-24 17:59:49 +000016419as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016420_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016421ac_clean_files=$ac_clean_files_save
16422
Matthias Kloseb9621712010-04-24 17:59:49 +000016423test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016424 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016425
Martin v. Löwis11437992002-04-12 09:54:03 +000016426
16427# configure is writing to config.log, and then calls config.status.
16428# config.status does its own redirection, appending to config.log.
16429# Unfortunately, on DOS this fails, as config.log is still kept open
16430# by configure, so config.status won't be able to write to it; its
16431# output is simply discarded. So we exec the FD to /dev/null,
16432# effectively closing config.log, so it can be properly (re)opened and
16433# appended to by config.status. When coming back to configure, we
16434# need to make the FD available again.
16435if test "$no_create" != yes; then
16436 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016437 ac_config_status_args=
16438 test "$silent" = yes &&
16439 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016441 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016442 exec 5>>config.log
16443 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16444 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016445 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016446fi
16447if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16448 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16449$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016450fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016451
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016452
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016453echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016454if test ! -f Modules/Setup
16455then
16456 cp $srcdir/Modules/Setup.dist Modules/Setup
16457fi
16458
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016459echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016460if test ! -f Modules/Setup.local
16461then
16462 echo "# Edit this file for local setup changes" >Modules/Setup.local
16463fi
16464
16465echo "creating Makefile"
16466$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16467 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016468 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016469mv config.c Modules