blob: 2b52d511cbbb327d3225d7b2115c242bfc9ca18e [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
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000628SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000629LIBC
630LIBM
631HAVE_GETHOSTBYNAME
632HAVE_GETHOSTBYNAME_R
633HAVE_GETHOSTBYNAME_R_3_ARG
634HAVE_GETHOSTBYNAME_R_5_ARG
635HAVE_GETHOSTBYNAME_R_6_ARG
636LIBOBJS
637TRUE
638MACHDEP_OBJS
639DYNLOADFILE
640DLINCLDIR
641THREADOBJ
642LDLAST
643USE_THREAD_MODULE
644SIGNAL_OBJS
645USE_SIGNAL_MODULE
646LIBFFI_INCLUDEDIR
647PKG_CONFIG
648SHLIBS
649CFLAGSFORSHARED
650LINKFORSHARED
651CCSHARED
652BLDSHARED
653LDCXXSHARED
654LDSHARED
655SO
656LIBTOOL_CRUFT
657OTHER_LIBTOOL_OPT
658UNIVERSAL_ARCH_FLAGS
659BASECFLAGS
660OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000661ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100663MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200667PYTHON
668ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200669ac_ct_READELF
670READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000671ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200672ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000673AR
674RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000675USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000676GNULD
677LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000678LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000679RUNSHARED
680INSTSONAME
681LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000682PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000683BLDLIBRARY
684DLLLIBRARY
685LDLIBRARY
686LIBRARY
687BUILDEXEEXT
688EGREP
689GREP
690CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200691NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200692ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000693MAINCC
694CXX
695OBJEXT
696EXEEXT
697ac_ct_CC
698CPPFLAGS
699LDFLAGS
700CFLAGS
701CC
702EXPORT_MACOSX_DEPLOYMENT_TARGET
703CONFIGURE_MACOSX_DEPLOYMENT_TARGET
704SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200705_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000706MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000707FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000708FRAMEWORKUNIXTOOLSPREFIX
709FRAMEWORKALTINSTALLLAST
710FRAMEWORKALTINSTALLFIRST
711FRAMEWORKINSTALLLAST
712FRAMEWORKINSTALLFIRST
713PYTHONFRAMEWORKINSTALLDIR
714PYTHONFRAMEWORKPREFIX
715PYTHONFRAMEWORKDIR
716PYTHONFRAMEWORKIDENTIFIER
717PYTHONFRAMEWORK
718LIPO_32BIT_FLAGS
719ARCH_RUN_32BIT
720UNIVERSALSDK
721CONFIG_ARGS
722SOVERSION
723VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200724PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100725host_os
726host_vendor
727host_cpu
728host
729build_os
730build_vendor
731build_cpu
732build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500733HAS_HG
734HGBRANCH
735HGTAG
736HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400737BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000738target_alias
739host_alias
740build_alias
741LIBS
742ECHO_T
743ECHO_N
744ECHO_C
745DEFS
746mandir
747localedir
748libdir
749psdir
750pdfdir
751dvidir
752htmldir
753infodir
754docdir
755oldincludedir
756includedir
757localstatedir
758sharedstatedir
759sysconfdir
760datadir
761datarootdir
762libexecdir
763sbindir
764bindir
765program_transform_name
766prefix
767exec_prefix
768PACKAGE_URL
769PACKAGE_BUGREPORT
770PACKAGE_STRING
771PACKAGE_VERSION
772PACKAGE_TARNAME
773PACKAGE_NAME
774PATH_SEPARATOR
775SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000776ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000777ac_user_opts='
778enable_option_checking
779enable_universalsdk
780with_universal_archs
781with_framework_name
782enable_framework
783with_gcc
784with_cxx_main
785with_suffix
786enable_shared
787enable_profiling
788with_pydebug
789with_libs
790with_system_expat
791with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100792with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000793enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000794with_dbmliborder
795with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000796with_threads
797with_thread
798enable_ipv6
799with_doc_strings
800with_tsc
801with_pymalloc
802with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000803with_fpectl
804with_libm
805with_libc
806enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_computed_gotos
808'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 ac_precious_vars='build_alias
810host_alias
811target_alias
812CC
813CFLAGS
814LDFLAGS
815LIBS
816CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200817CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000821ac_init_help=
822ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000823ac_unrecognized_opts=
824ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825# The variables have the same names as the options, with
826# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000827cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830no_recursion=
831prefix=NONE
832program_prefix=NONE
833program_suffix=NONE
834program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839x_includes=NONE
840x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000841
842# Installation directory options.
843# These are left unexpanded so users can "make install exec_prefix=/foo"
844# and all the variables that are supposed to be based on exec_prefix
845# by default will actually change.
846# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848bindir='${exec_prefix}/bin'
849sbindir='${exec_prefix}/sbin'
850libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851datarootdir='${prefix}/share'
852datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853sysconfdir='${prefix}/etc'
854sharedstatedir='${prefix}/com'
855localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856includedir='${prefix}/include'
857oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
859infodir='${datarootdir}/info'
860htmldir='${docdir}'
861dvidir='${docdir}'
862pdfdir='${docdir}'
863psdir='${docdir}'
864libdir='${exec_prefix}/lib'
865localedir='${datarootdir}/locale'
866mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872 # If the previous option needs an argument, assign it.
873 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 ac_prev=
876 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200880 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
881 *=) ac_optarg= ;;
882 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Accept the important Cygnus configure options, so we can diagnose typos.
886
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887 case $ac_dashdash$ac_option in
888 --)
889 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891 -bindir | --bindir | --bindi | --bind | --bin | --bi)
892 ac_prev=bindir ;;
893 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895
896 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 -cache-file | --cache-file | --cache-fil | --cache-fi \
902 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
903 ac_prev=cache_file ;;
904 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
905 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 cache_file=$ac_optarg ;;
907
908 --config-cache | -C)
909 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
917 | --dataroo | --dataro | --datar)
918 ac_prev=datarootdir ;;
919 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
920 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
921 datarootdir=$ac_optarg ;;
922
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000924 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000926 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200927 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000928 ac_useropt_orig=$ac_useropt
929 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
930 case $ac_user_opts in
931 *"
932"enable_$ac_useropt"
933"*) ;;
934 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
935 ac_unrecognized_sep=', ';;
936 esac
937 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938
939 -docdir | --docdir | --docdi | --doc | --do)
940 ac_prev=docdir ;;
941 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
942 docdir=$ac_optarg ;;
943
944 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
945 ac_prev=dvidir ;;
946 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
947 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000950 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000952 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200953 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000954 ac_useropt_orig=$ac_useropt
955 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
956 case $ac_user_opts in
957 *"
958"enable_$ac_useropt"
959"*) ;;
960 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
961 ac_unrecognized_sep=', ';;
962 esac
963 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
966 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
967 | --exec | --exe | --ex)
968 ac_prev=exec_prefix ;;
969 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
970 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
971 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975 # Obsolete; use --with-gas.
976 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 -help | --help | --hel | --he | -h)
979 ac_init_help=long ;;
980 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
981 ac_init_help=recursive ;;
982 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
983 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
991 ac_prev=htmldir ;;
992 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
993 | --ht=*)
994 htmldir=$ac_optarg ;;
995
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996 -includedir | --includedir | --includedi | --included | --include \
997 | --includ | --inclu | --incl | --inc)
998 ac_prev=includedir ;;
999 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1000 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
1003 -infodir | --infodir | --infodi | --infod | --info | --inf)
1004 ac_prev=infodir ;;
1005 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
1008 -libdir | --libdir | --libdi | --libd)
1009 ac_prev=libdir ;;
1010 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
1013 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1014 | --libexe | --libex | --libe)
1015 ac_prev=libexecdir ;;
1016 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1017 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001020 -localedir | --localedir | --localedi | --localed | --locale)
1021 ac_prev=localedir ;;
1022 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1023 localedir=$ac_optarg ;;
1024
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001026 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 ac_prev=localstatedir ;;
1028 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1033 ac_prev=mandir ;;
1034 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 # Obsolete; use --without-fp.
1039 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 no_create=yes ;;
1044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1046 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1047 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1050 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1051 | --oldin | --oldi | --old | --ol | --o)
1052 ac_prev=oldincludedir ;;
1053 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1054 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1055 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1059 ac_prev=prefix ;;
1060 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1064 | --program-pre | --program-pr | --program-p)
1065 ac_prev=program_prefix ;;
1066 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1067 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1071 | --program-suf | --program-su | --program-s)
1072 ac_prev=program_suffix ;;
1073 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1074 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -program-transform-name | --program-transform-name \
1078 | --program-transform-nam | --program-transform-na \
1079 | --program-transform-n | --program-transform- \
1080 | --program-transform | --program-transfor \
1081 | --program-transfo | --program-transf \
1082 | --program-trans | --program-tran \
1083 | --progr-tra | --program-tr | --program-t)
1084 ac_prev=program_transform_name ;;
1085 -program-transform-name=* | --program-transform-name=* \
1086 | --program-transform-nam=* | --program-transform-na=* \
1087 | --program-transform-n=* | --program-transform-=* \
1088 | --program-transform=* | --program-transfor=* \
1089 | --program-transfo=* | --program-transf=* \
1090 | --program-trans=* | --program-tran=* \
1091 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001094 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1095 ac_prev=pdfdir ;;
1096 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1097 pdfdir=$ac_optarg ;;
1098
1099 -psdir | --psdir | --psdi | --psd | --ps)
1100 ac_prev=psdir ;;
1101 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1102 psdir=$ac_optarg ;;
1103
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1105 | -silent | --silent | --silen | --sile | --sil)
1106 silent=yes ;;
1107
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1109 ac_prev=sbindir ;;
1110 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1111 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113
1114 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1115 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1116 | --sharedst | --shareds | --shared | --share | --shar \
1117 | --sha | --sh)
1118 ac_prev=sharedstatedir ;;
1119 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1120 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1121 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1122 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125 -site | --site | --sit)
1126 ac_prev=site ;;
1127 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1131 ac_prev=srcdir ;;
1132 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1136 | --syscon | --sysco | --sysc | --sys | --sy)
1137 ac_prev=sysconfdir ;;
1138 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1139 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146
1147 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1148 verbose=yes ;;
1149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 -version | --version | --versio | --versi | --vers | -V)
1151 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001154 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001156 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001157 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001158 ac_useropt_orig=$ac_useropt
1159 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1160 case $ac_user_opts in
1161 *"
1162"with_$ac_useropt"
1163"*) ;;
1164 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1165 ac_unrecognized_sep=', ';;
1166 esac
1167 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001173 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 ac_useropt_orig=$ac_useropt
1175 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176 case $ac_user_opts in
1177 *"
1178"with_$ac_useropt"
1179"*) ;;
1180 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
1182 esac
1183 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185 --x)
1186 # Obsolete; use --with-x.
1187 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1190 | --x-incl | --x-inc | --x-in | --x-i)
1191 ac_prev=x_includes ;;
1192 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1193 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1197 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1198 ac_prev=x_libraries ;;
1199 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1200 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1204Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 ;;
1206
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 *=*)
1208 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 case $ac_envvar in #(
1211 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001214 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 export $ac_envvar ;;
1216
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001217 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001222 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223 ;;
1224
1225 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226done
1227
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001230 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231fi
1232
Matthias Kloseb9621712010-04-24 17:59:49 +00001233if test -n "$ac_unrecognized_opts"; then
1234 case $enable_option_checking in
1235 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1238 esac
1239fi
1240
1241# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1243 datadir sysconfdir sharedstatedir localstatedir includedir \
1244 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1245 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001246do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 # Remove trailing slashes.
1249 case $ac_val in
1250 */ )
1251 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1252 eval $ac_var=\$ac_val;;
1253 esac
1254 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 [\\/$]* | ?:[\\/]* ) continue;;
1257 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001260done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261
Martin v. Löwis11437992002-04-12 09:54:03 +00001262# There might be people who depend on the old broken behavior: `$host'
1263# used to hold the argument of --host etc.
1264# FIXME: To remove some day.
1265build=$build_alias
1266host=$host_alias
1267target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269# FIXME: To remove some day.
1270if test "x$host_alias" != x; then
1271 if test "x$build_alias" = x; then
1272 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 elif test "x$build_alias" != "x$host_alias"; then
1274 cross_compiling=yes
1275 fi
1276fi
1277
1278ac_tool_prefix=
1279test -n "$host_alias" && ac_tool_prefix=$host_alias-
1280
1281test "$silent" = yes && exec 6>/dev/null
1282
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284ac_pwd=`pwd` && test -n "$ac_pwd" &&
1285ac_ls_di=`ls -di .` &&
1286ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290
1291
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292# Find the source files, if location was not specified.
1293if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001296 ac_confdir=`$as_dirname -- "$as_myself" ||
1297$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1298 X"$as_myself" : 'X\(//\)[^/]' \| \
1299 X"$as_myself" : 'X\(//\)$' \| \
1300 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1301$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1303 s//\1/
1304 q
1305 }
1306 /^X\(\/\/\)[^/].*/{
1307 s//\1/
1308 q
1309 }
1310 /^X\(\/\/\)$/{
1311 s//\1/
1312 q
1313 }
1314 /^X\(\/\).*/{
1315 s//\1/
1316 q
1317 }
1318 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001319 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321 srcdir=..
1322 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323else
1324 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326if test ! -r "$srcdir/$ac_unique_file"; then
1327 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1331ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333 pwd)`
1334# When building in place, set srcdir=.
1335if test "$ac_abs_confdir" = "$ac_pwd"; then
1336 srcdir=.
1337fi
1338# Remove unnecessary trailing slashes from srcdir.
1339# Double slashes in file names in object file debugging info
1340# mess up M-x gdb in Emacs.
1341case $srcdir in
1342*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1343esac
1344for ac_var in $ac_precious_vars; do
1345 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1346 eval ac_env_${ac_var}_value=\$${ac_var}
1347 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1348 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1349done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350
Martin v. Löwis11437992002-04-12 09:54:03 +00001351#
1352# Report the --help message.
1353#
1354if test "$ac_init_help" = "long"; then
1355 # Omit some internal or obsolete options to make the list less imposing.
1356 # This message is too long to be a string in the A/UX 3.1 sh.
1357 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001358\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001359
1360Usage: $0 [OPTION]... [VAR=VALUE]...
1361
1362To assign environment variables (e.g., CC, CFLAGS...), specify them as
1363VAR=VALUE. See below for descriptions of some of the useful variables.
1364
1365Defaults for the options are specified in brackets.
1366
1367Configuration:
1368 -h, --help display this help and exit
1369 --help=short display options specific to this package
1370 --help=recursive display the short help of all the included packages
1371 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 --cache-file=FILE cache test results in FILE [disabled]
1374 -C, --config-cache alias for \`--cache-file=config.cache'
1375 -n, --no-create do not create output files
1376 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1377
Martin v. Löwis11437992002-04-12 09:54:03 +00001378Installation directories:
1379 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001380 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001381 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001383
1384By default, \`make install' will install all the files in
1385\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1386an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1387for instance \`--prefix=\$HOME'.
1388
1389For better control, use the options below.
1390
1391Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001392 --bindir=DIR user executables [EPREFIX/bin]
1393 --sbindir=DIR system admin executables [EPREFIX/sbin]
1394 --libexecdir=DIR program executables [EPREFIX/libexec]
1395 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1396 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1397 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1398 --libdir=DIR object code libraries [EPREFIX/lib]
1399 --includedir=DIR C header files [PREFIX/include]
1400 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1401 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1402 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1403 --infodir=DIR info documentation [DATAROOTDIR/info]
1404 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1405 --mandir=DIR man documentation [DATAROOTDIR/man]
1406 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1407 --htmldir=DIR html documentation [DOCDIR]
1408 --dvidir=DIR dvi documentation [DOCDIR]
1409 --pdfdir=DIR pdf documentation [DOCDIR]
1410 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001411_ACEOF
1412
1413 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001414
1415System types:
1416 --build=BUILD configure for building on BUILD [guessed]
1417 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001418_ACEOF
1419fi
1420
1421if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001422 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001423 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001424 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 cat <<\_ACEOF
1426
1427Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1430 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001431 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001432 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --enable-framework[=INSTALLDIR]
1434 Build (MacOSX|Darwin) framework
1435 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001436 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001437 --enable-loadable-sqlite-extensions
1438 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --enable-ipv6 Enable ipv6 (with ipv4) support
1440 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001441 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444Optional Packages:
1445 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1446 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001447 --with-universal-archs=ARCH
1448 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001449 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001450 --with-framework-name=FRAMEWORK
1451 specify an alternate name of the framework built
1452 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001454 --with-cxx-main=<compiler>
1455 compile main() and link python executable with C++
1456 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --with-suffix=.exe set executable suffix
1458 --with-pydebug build with Py_DEBUG defined
1459 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001460 --with-system-expat build pyexpat module using an installed expat
1461 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001462 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001463 --with-system-libmpdec build _decimal module using an installed libmpdec
1464 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001465 --with-dbmliborder=db1:db2:...
1466 order to check db backends for dbm. Valid value is a
1467 colon separated string with the backend names
1468 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --with(out)-threads[=DIRECTORY]
1471 disable/enable thread support
1472 --with(out)-thread[=DIRECTORY]
1473 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001475 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001477 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-fpectl enable SIGFPE catching
1479 --with-libm=STRING math library
1480 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001481 --with(out)-computed-gotos
1482 Use computed gotos in evaluation loop (enabled by
1483 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001484
1485Some influential environment variables:
1486 CC C compiler command
1487 CFLAGS C compiler flags
1488 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1489 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 CPP C preprocessor
1494
1495Use these variables to override the choices made by `configure' or to help
1496it to find libraries and programs with nonstandard names/locations.
1497
Georg Brandle2e15612009-05-20 18:25:10 +00001498Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001501fi
1502
1503if test "$ac_init_help" = "recursive"; then
1504 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001506 test -d "$ac_dir" ||
1507 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1508 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 ac_builddir=.
1510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511case "$ac_dir" in
1512.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1513*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001514 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001516 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 case $ac_top_builddir_sub in
1518 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1519 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1520 esac ;;
1521esac
1522ac_abs_top_builddir=$ac_pwd
1523ac_abs_builddir=$ac_pwd$ac_dir_suffix
1524# for backward compatibility:
1525ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
1527case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 ac_top_srcdir=$ac_top_builddir_sub
1531 ac_abs_top_srcdir=$ac_pwd ;;
1532 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 ac_top_srcdir=$srcdir
1535 ac_abs_top_srcdir=$srcdir ;;
1536 *) # Relative name.
1537 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1538 ac_top_srcdir=$ac_top_build_prefix$srcdir
1539 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001540esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 cd "$ac_dir" || { ac_status=$?; continue; }
1544 # Check for guested configure.
1545 if test -f "$ac_srcdir/configure.gnu"; then
1546 echo &&
1547 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1548 elif test -f "$ac_srcdir/configure"; then
1549 echo &&
1550 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001552 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 fi || ac_status=$?
1554 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 done
1556fi
1557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001559if $ac_init_version; then
1560 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001561python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001562generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001564Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565This configure script is free software; the Free Software Foundation
1566gives unlimited permission to copy, distribute and modify it.
1567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001570
1571## ------------------------ ##
1572## Autoconf initialization. ##
1573## ------------------------ ##
1574
1575# ac_fn_c_try_compile LINENO
1576# --------------------------
1577# Try to compile conftest.$ac_ext, and return whether this succeeded.
1578ac_fn_c_try_compile ()
1579{
1580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581 rm -f conftest.$ac_objext
1582 if { { ac_try="$ac_compile"
1583case "(($ac_try" in
1584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1585 *) ac_try_echo=$ac_try;;
1586esac
1587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1588$as_echo "$ac_try_echo"; } >&5
1589 (eval "$ac_compile") 2>conftest.err
1590 ac_status=$?
1591 if test -s conftest.err; then
1592 grep -v '^ *+' conftest.err >conftest.er1
1593 cat conftest.er1 >&5
1594 mv -f conftest.er1 conftest.err
1595 fi
1596 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1597 test $ac_status = 0; } && {
1598 test -z "$ac_c_werror_flag" ||
1599 test ! -s conftest.err
1600 } && test -s conftest.$ac_objext; then :
1601 ac_retval=0
1602else
1603 $as_echo "$as_me: failed program was:" >&5
1604sed 's/^/| /' conftest.$ac_ext >&5
1605
1606 ac_retval=1
1607fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001608 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001609 as_fn_set_status $ac_retval
1610
1611} # ac_fn_c_try_compile
1612
Matthias Kloseb9621712010-04-24 17:59:49 +00001613# ac_fn_c_try_link LINENO
1614# -----------------------
1615# Try to link conftest.$ac_ext, and return whether this succeeded.
1616ac_fn_c_try_link ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619 rm -f conftest.$ac_objext conftest$ac_exeext
1620 if { { ac_try="$ac_link"
1621case "(($ac_try" in
1622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1623 *) ac_try_echo=$ac_try;;
1624esac
1625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1626$as_echo "$ac_try_echo"; } >&5
1627 (eval "$ac_link") 2>conftest.err
1628 ac_status=$?
1629 if test -s conftest.err; then
1630 grep -v '^ *+' conftest.err >conftest.er1
1631 cat conftest.er1 >&5
1632 mv -f conftest.er1 conftest.err
1633 fi
1634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635 test $ac_status = 0; } && {
1636 test -z "$ac_c_werror_flag" ||
1637 test ! -s conftest.err
1638 } && test -s conftest$ac_exeext && {
1639 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001640 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001641 }; then :
1642 ac_retval=0
1643else
1644 $as_echo "$as_me: failed program was:" >&5
1645sed 's/^/| /' conftest.$ac_ext >&5
1646
1647 ac_retval=1
1648fi
1649 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1650 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1651 # interfere with the next link command; also delete a directory that is
1652 # left behind by Apple's compiler. We do this before executing the actions.
1653 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001654 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001655 as_fn_set_status $ac_retval
1656
1657} # ac_fn_c_try_link
1658
Matthias Kloseb9621712010-04-24 17:59:49 +00001659# ac_fn_c_try_cpp LINENO
1660# ----------------------
1661# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1662ac_fn_c_try_cpp ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 if { { ac_try="$ac_cpp conftest.$ac_ext"
1666case "(($ac_try" in
1667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668 *) ac_try_echo=$ac_try;;
1669esac
1670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671$as_echo "$ac_try_echo"; } >&5
1672 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1673 ac_status=$?
1674 if test -s conftest.err; then
1675 grep -v '^ *+' conftest.err >conftest.er1
1676 cat conftest.er1 >&5
1677 mv -f conftest.er1 conftest.err
1678 fi
1679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001680 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1682 test ! -s conftest.err
1683 }; then :
1684 ac_retval=0
1685else
1686 $as_echo "$as_me: failed program was:" >&5
1687sed 's/^/| /' conftest.$ac_ext >&5
1688
1689 ac_retval=1
1690fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001691 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001692 as_fn_set_status $ac_retval
1693
1694} # ac_fn_c_try_cpp
1695
1696# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1697# -------------------------------------------------------
1698# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1699# the include files in INCLUDES and setting the cache variable VAR
1700# accordingly.
1701ac_fn_c_check_header_mongrel ()
1702{
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001704 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1706$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001707if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001708 $as_echo_n "(cached) " >&6
1709fi
1710eval ac_res=\$$3
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1712$as_echo "$ac_res" >&6; }
1713else
1714 # Is the header compilable?
1715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1716$as_echo_n "checking $2 usability... " >&6; }
1717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1718/* end confdefs.h. */
1719$4
1720#include <$2>
1721_ACEOF
1722if ac_fn_c_try_compile "$LINENO"; then :
1723 ac_header_compiler=yes
1724else
1725 ac_header_compiler=no
1726fi
1727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1729$as_echo "$ac_header_compiler" >&6; }
1730
1731# Is the header present?
1732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1733$as_echo_n "checking $2 presence... " >&6; }
1734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1735/* end confdefs.h. */
1736#include <$2>
1737_ACEOF
1738if ac_fn_c_try_cpp "$LINENO"; then :
1739 ac_header_preproc=yes
1740else
1741 ac_header_preproc=no
1742fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001743rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1745$as_echo "$ac_header_preproc" >&6; }
1746
1747# So? What about this header?
1748case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1749 yes:no: )
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1751$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1753$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1754 ;;
1755 no:yes:* )
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1757$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1759$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1761$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1763$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1765$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001766( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001767## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001768## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001769 ) | sed "s/^/$as_me: WARNING: /" >&2
1770 ;;
1771esac
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1773$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001774if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 $as_echo_n "(cached) " >&6
1776else
1777 eval "$3=\$ac_header_compiler"
1778fi
1779eval ac_res=\$$3
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1781$as_echo "$ac_res" >&6; }
1782fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001784
1785} # ac_fn_c_check_header_mongrel
1786
1787# ac_fn_c_try_run LINENO
1788# ----------------------
1789# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1790# that executables *can* be run.
1791ac_fn_c_try_run ()
1792{
1793 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1794 if { { ac_try="$ac_link"
1795case "(($ac_try" in
1796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1797 *) ac_try_echo=$ac_try;;
1798esac
1799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1800$as_echo "$ac_try_echo"; } >&5
1801 (eval "$ac_link") 2>&5
1802 ac_status=$?
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1805 { { case "(($ac_try" in
1806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1807 *) ac_try_echo=$ac_try;;
1808esac
1809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1810$as_echo "$ac_try_echo"; } >&5
1811 (eval "$ac_try") 2>&5
1812 ac_status=$?
1813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1814 test $ac_status = 0; }; }; then :
1815 ac_retval=0
1816else
1817 $as_echo "$as_me: program exited with status $ac_status" >&5
1818 $as_echo "$as_me: failed program was:" >&5
1819sed 's/^/| /' conftest.$ac_ext >&5
1820
1821 ac_retval=$ac_status
1822fi
1823 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 as_fn_set_status $ac_retval
1826
1827} # ac_fn_c_try_run
1828
1829# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1830# -------------------------------------------------------
1831# Tests whether HEADER exists and can be compiled using the include files in
1832# INCLUDES, setting the cache variable VAR accordingly.
1833ac_fn_c_check_header_compile ()
1834{
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1837$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001838if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 $as_echo_n "(cached) " >&6
1840else
1841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842/* end confdefs.h. */
1843$4
1844#include <$2>
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 eval "$3=yes"
1848else
1849 eval "$3=no"
1850fi
1851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_compile
1859
Matthias Kloseb9621712010-04-24 17:59:49 +00001860# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1861# -------------------------------------------
1862# Tests whether TYPE exists after having included INCLUDES, setting cache
1863# variable VAR accordingly.
1864ac_fn_c_check_type ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1868$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001869if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001870 $as_echo_n "(cached) " >&6
1871else
1872 eval "$3=no"
1873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874/* end confdefs.h. */
1875$4
1876int
1877main ()
1878{
1879if (sizeof ($2))
1880 return 0;
1881 ;
1882 return 0;
1883}
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$4
1889int
1890main ()
1891{
1892if (sizeof (($2)))
1893 return 0;
1894 ;
1895 return 0;
1896}
1897_ACEOF
1898if ac_fn_c_try_compile "$LINENO"; then :
1899
1900else
1901 eval "$3=yes"
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1904fi
1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1906fi
1907eval ac_res=\$$3
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1909$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001911
1912} # ac_fn_c_check_type
1913
1914# ac_fn_c_find_uintX_t LINENO BITS VAR
1915# ------------------------------------
1916# Finds an unsigned integer type with width BITS, setting cache variable VAR
1917# accordingly.
1918ac_fn_c_find_uintX_t ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1922$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001923if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001924 $as_echo_n "(cached) " >&6
1925else
1926 eval "$3=no"
1927 # Order is important - never check a type that is potentially smaller
1928 # than half of the expected target width.
1929 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1930 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1932/* end confdefs.h. */
1933$ac_includes_default
1934int
1935main ()
1936{
1937static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001938test_array [0] = 0;
1939return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001940
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 case $ac_type in #(
1947 uint$2_t) :
1948 eval "$3=yes" ;; #(
1949 *) :
1950 eval "$3=\$ac_type" ;;
1951esac
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001954 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001955
1956else
1957 break
1958fi
1959 done
1960fi
1961eval ac_res=\$$3
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1963$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001964 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001965
1966} # ac_fn_c_find_uintX_t
1967
1968# ac_fn_c_find_intX_t LINENO BITS VAR
1969# -----------------------------------
1970# Finds a signed integer type with width BITS, setting cache variable VAR
1971# accordingly.
1972ac_fn_c_find_intX_t ()
1973{
1974 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1976$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001977if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001978 $as_echo_n "(cached) " >&6
1979else
1980 eval "$3=no"
1981 # Order is important - never check a type that is potentially smaller
1982 # than half of the expected target width.
1983 for ac_type in int$2_t 'int' 'long int' \
1984 'long long int' 'short int' 'signed char'; do
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001988 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001989int
1990main ()
1991{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001992static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002004 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002005int
2006main ()
2007{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002008static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002009 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018
2019else
2020 case $ac_type in #(
2021 int$2_t) :
2022 eval "$3=yes" ;; #(
2023 *) :
2024 eval "$3=\$ac_type" ;;
2025esac
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028fi
2029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002030 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002031
2032else
2033 break
2034fi
2035 done
2036fi
2037eval ac_res=\$$3
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002040 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002041
2042} # ac_fn_c_find_intX_t
2043
2044# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2045# --------------------------------------------
2046# Tries to find the compile-time value of EXPR in a program that includes
2047# INCLUDES, setting VAR accordingly. Returns whether the value could be
2048# computed
2049ac_fn_c_compute_int ()
2050{
2051 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2052 if test "$cross_compiling" = yes; then
2053 # Depending upon the size, compute the lo and hi bounds.
2054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=0 ac_mid=0
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002078test_array [0] = 0;
2079return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_hi=$ac_mid; break
2087else
2088 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2089 if test $ac_lo -le $ac_mid; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002105test_array [0] = 0;
2106return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=-1 ac_mid=-1
2114 while :; do
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002122test_array [0] = 0;
2123return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130 ac_lo=$ac_mid; break
2131else
2132 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2133 if test $ac_mid -le $ac_hi; then
2134 ac_lo= ac_hi=
2135 break
2136 fi
2137 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2138fi
2139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2140 done
2141else
2142 ac_lo= ac_hi=
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147# Binary search between lo and hi bounds.
2148while test "x$ac_lo" != "x$ac_hi"; do
2149 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h. */
2152$4
2153int
2154main ()
2155{
2156static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002157test_array [0] = 0;
2158return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_compile "$LINENO"; then :
2165 ac_hi=$ac_mid
2166else
2167 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170done
2171case $ac_lo in #((
2172?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2173'') ac_retval=1 ;;
2174esac
2175 else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179static long int longval () { return $2; }
2180static unsigned long int ulongval () { return $2; }
2181#include <stdio.h>
2182#include <stdlib.h>
2183int
2184main ()
2185{
2186
2187 FILE *f = fopen ("conftest.val", "w");
2188 if (! f)
2189 return 1;
2190 if (($2) < 0)
2191 {
2192 long int i = longval ();
2193 if (i != ($2))
2194 return 1;
2195 fprintf (f, "%ld", i);
2196 }
2197 else
2198 {
2199 unsigned long int i = ulongval ();
2200 if (i != ($2))
2201 return 1;
2202 fprintf (f, "%lu", i);
2203 }
2204 /* Do not output a trailing newline, as this causes \r\n confusion
2205 on some platforms. */
2206 return ferror (f) || fclose (f) != 0;
2207
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_run "$LINENO"; then :
2213 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2214else
2215 ac_retval=1
2216fi
2217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2218 conftest.$ac_objext conftest.beam conftest.$ac_ext
2219rm -f conftest.val
2220
2221 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002222 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002223 as_fn_set_status $ac_retval
2224
2225} # ac_fn_c_compute_int
2226
2227# ac_fn_c_check_func LINENO FUNC VAR
2228# ----------------------------------
2229# Tests whether FUNC exists, setting the cache variable VAR accordingly
2230ac_fn_c_check_func ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2234$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002235if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002236 $as_echo_n "(cached) " >&6
2237else
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2241 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2242#define $2 innocuous_$2
2243
2244/* System header to define __stub macros and hopefully few prototypes,
2245 which can conflict with char $2 (); below.
2246 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2247 <limits.h> exists even on freestanding compilers. */
2248
2249#ifdef __STDC__
2250# include <limits.h>
2251#else
2252# include <assert.h>
2253#endif
2254
2255#undef $2
2256
2257/* Override any GCC internal prototype to avoid an error.
2258 Use char because int might match the return type of a GCC
2259 builtin and then its argument prototype would still apply. */
2260#ifdef __cplusplus
2261extern "C"
2262#endif
2263char $2 ();
2264/* The GNU C library defines this for functions which it implements
2265 to always fail with ENOSYS. Some functions are actually named
2266 something starting with __ and the normal name is an alias. */
2267#if defined __stub_$2 || defined __stub___$2
2268choke me
2269#endif
2270
2271int
2272main ()
2273{
2274return $2 ();
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_link "$LINENO"; then :
2280 eval "$3=yes"
2281else
2282 eval "$3=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext \
2285 conftest$ac_exeext conftest.$ac_ext
2286fi
2287eval ac_res=\$$3
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002291
2292} # ac_fn_c_check_func
2293
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002294# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2295# ---------------------------------------------
2296# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2297# accordingly.
2298ac_fn_c_check_decl ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 as_decl_name=`echo $2|sed 's/ *(.*//'`
2302 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2304$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2305if eval \${$3+:} false; then :
2306 $as_echo_n "(cached) " >&6
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$4
2311int
2312main ()
2313{
2314#ifndef $as_decl_name
2315#ifdef __cplusplus
2316 (void) $as_decl_use;
2317#else
2318 (void) $as_decl_name;
2319#endif
2320#endif
2321
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_compile "$LINENO"; then :
2327 eval "$3=yes"
2328else
2329 eval "$3=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$3
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
2336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337
2338} # ac_fn_c_check_decl
2339
Matthias Kloseb9621712010-04-24 17:59:49 +00002340# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2341# ----------------------------------------------------
2342# Tries to find if the field MEMBER exists in type AGGR, after including
2343# INCLUDES, setting cache variable VAR accordingly.
2344ac_fn_c_check_member ()
2345{
2346 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2348$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002349if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002350 $as_echo_n "(cached) " >&6
2351else
2352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h. */
2354$5
2355int
2356main ()
2357{
2358static $2 ac_aggr;
2359if (ac_aggr.$3)
2360return 0;
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$4=yes"
2367else
2368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2369/* end confdefs.h. */
2370$5
2371int
2372main ()
2373{
2374static $2 ac_aggr;
2375if (sizeof ac_aggr.$3)
2376return 0;
2377 ;
2378 return 0;
2379}
2380_ACEOF
2381if ac_fn_c_try_compile "$LINENO"; then :
2382 eval "$4=yes"
2383else
2384 eval "$4=no"
2385fi
2386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387fi
2388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2389fi
2390eval ac_res=\$$4
2391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2392$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002393 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002394
2395} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002397This file contains any messages produced by compilers while
2398running configure, to aid debugging if configure makes a mistake.
2399
Georg Brandl08a90122012-09-29 09:34:13 +02002400It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002401generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
2403 $ $0 $@
2404
2405_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002406exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002407{
2408cat <<_ASUNAME
2409## --------- ##
2410## Platform. ##
2411## --------- ##
2412
2413hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2414uname -m = `(uname -m) 2>/dev/null || echo unknown`
2415uname -r = `(uname -r) 2>/dev/null || echo unknown`
2416uname -s = `(uname -s) 2>/dev/null || echo unknown`
2417uname -v = `(uname -v) 2>/dev/null || echo unknown`
2418
2419/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2420/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2421
2422/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2423/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2424/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002426/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2427/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2428/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2429
2430_ASUNAME
2431
2432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2433for as_dir in $PATH
2434do
2435 IFS=$as_save_IFS
2436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 $as_echo "PATH: $as_dir"
2438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441} >&5
2442
2443cat >&5 <<_ACEOF
2444
2445
2446## ----------- ##
2447## Core tests. ##
2448## ----------- ##
2449
2450_ACEOF
2451
2452
2453# Keep a trace of the command line.
2454# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002455# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002456# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002457# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002458ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002459ac_configure_args0=
2460ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002461ac_must_keep_next=false
2462for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002463do
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 for ac_arg
2465 do
2466 case $ac_arg in
2467 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2468 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2469 | -silent | --silent | --silen | --sile | --sil)
2470 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 esac
2474 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002479 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002481 case $ac_arg in
2482 *=* | --config-cache | -C | -disable-* | --disable-* \
2483 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2484 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2485 | -with-* | --with-* | -without-* | --without-* | --x)
2486 case "$ac_configure_args0 " in
2487 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2488 esac
2489 ;;
2490 -* ) ac_must_keep_next=true ;;
2491 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 ;;
2495 esac
2496 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002497done
Matthias Kloseb9621712010-04-24 17:59:49 +00002498{ ac_configure_args0=; unset ac_configure_args0;}
2499{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501# When interrupted or exit'd, cleanup temporary files, and complete
2502# config.log. We remove comments because anyway the quotes in there
2503# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504# WARNING: Use '\'' to represent an apostrophe within the trap.
2505# 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 +00002506trap 'exit_status=$?
2507 # Save into config.log some information that might help in debugging.
2508 {
2509 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002510
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
2515 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516(
2517 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2518 eval ac_val=\$$ac_var
2519 case $ac_val in #(
2520 *${as_nl}*)
2521 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2523$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
2525 case $ac_var in #(
2526 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2528 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac ;;
2530 esac
2531 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2534 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 "s/'\''/'\''\\\\'\'''\''/g;
2537 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2538 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002539 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002541 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 esac |
2543 sort
2544)
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002546
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002547 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002548## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002550 echo
2551 for ac_var in $ac_subst_vars
2552 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 eval ac_val=\$$ac_var
2554 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 done | sort
2559 echo
2560
2561 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002565 echo
2566 for ac_var in $ac_subst_files
2567 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 eval ac_val=\$$ac_var
2569 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002570 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002573 done | sort
2574 echo
2575 fi
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002579## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo
2584 fi
2585 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 $as_echo "$as_me: caught signal $ac_signal"
2587 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 rm -f core *.core core.conftest.* &&
2590 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002593for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002595done
2596ac_signal=0
2597
2598# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002600
Matthias Kloseb9621712010-04-24 17:59:49 +00002601$as_echo "/* confdefs.h */" > confdefs.h
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603# Predefined preprocessor variables.
2604
2605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_NAME "$PACKAGE_NAME"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2611_ACEOF
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613cat >>confdefs.h <<_ACEOF
2614#define PACKAGE_VERSION "$PACKAGE_VERSION"
2615_ACEOF
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_STRING "$PACKAGE_STRING"
2619_ACEOF
2620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2623_ACEOF
2624
Matthias Kloseb9621712010-04-24 17:59:49 +00002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_URL "$PACKAGE_URL"
2627_ACEOF
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629
2630# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002631# Prefer an explicitly selected file to automatically selected ones.
2632ac_site_file1=NONE
2633ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002635 # We do not want a PATH search for config.site.
2636 case $CONFIG_SITE in #((
2637 -*) ac_site_file1=./$CONFIG_SITE;;
2638 */*) ac_site_file1=$CONFIG_SITE;;
2639 *) ac_site_file1=./$CONFIG_SITE;;
2640 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 ac_site_file1=$prefix/share/config.site
2643 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644else
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 ac_site_file1=$ac_default_prefix/share/config.site
2646 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002648for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002649do
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 test "x$ac_site_file" = xNONE && continue
2651 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2653$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002655 . "$ac_site_file" \
2656 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2658as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002659See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660 fi
2661done
2662
2663if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 # Some versions of bash will fail to source /dev/null (special files
2665 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2666 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2668$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2671 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 esac
2673 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674else
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2676$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 >$cache_file
2678fi
2679
2680# Check that the precious variables saved in the cache have kept the same
2681# value.
2682ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2685 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2687 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 case $ac_old_set,$ac_new_set in
2689 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2691$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 +00002692 ac_cache_corrupted=: ;;
2693 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2695$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 ac_cache_corrupted=: ;;
2697 ,);;
2698 *)
2699 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 # differences in whitespace do not lead to failure.
2701 ac_old_val_w=`echo x $ac_old_val`
2702 ac_new_val_w=`echo x $ac_new_val`
2703 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2705$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2706 ac_cache_corrupted=:
2707 else
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2709$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2710 eval $ac_var=\$ac_old_val
2711 fi
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2713$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2715$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 fi;;
2717 esac
2718 # Pass precious variables to config.status.
2719 if test "$ac_new_set" = set; then
2720 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002721 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 *) ac_arg=$ac_var=$ac_new_val ;;
2723 esac
2724 case " $ac_configure_args " in
2725 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 esac
2728 fi
2729done
2730if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2734$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002735 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002737## -------------------- ##
2738## Main body of script. ##
2739## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002740
Guido van Rossum7f43da71994-08-01 12:15:30 +00002741ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002742ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2745ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002746
Guido van Rossum627b2d71993-12-24 10:39:16 +00002747
Michael W. Hudson54241132001-12-07 15:38:26 +00002748
Trent Nelson4d4ec652012-10-16 08:51:24 -04002749
Trent Nelson5595ab52012-10-17 04:47:31 -04002750if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002751 # If we're building out-of-tree, we need to make sure the following
2752 # resources get picked up before their $srcdir counterparts.
2753 # Objects/ -> typeslots.inc
2754 # Include/ -> Python-ast.h, graminit.h
2755 # Python/ -> importlib.h
2756 # (A side effect of this is that these resources will automatically be
2757 # regenerated when building out-of-tree, regardless of whether or not
2758 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2759 # off.)
2760 BASECPPFLAGS="-IObjects -IInclude -IPython"
2761else
2762 BASECPPFLAGS=""
2763fi
2764
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765
2766
2767
2768
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002769if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770then
2771# Extract the first word of "hg", so it can be a program name with args.
2772set dummy hg; ac_word=$2
2773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002775if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002776 $as_echo_n "(cached) " >&6
2777else
2778 if test -n "$HAS_HG"; then
2779 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2780else
2781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782for as_dir in $PATH
2783do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
2786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788 ac_cv_prog_HAS_HG="found"
2789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 break 2
2791 fi
2792done
2793 done
2794IFS=$as_save_IFS
2795
2796 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2797fi
2798fi
2799HAS_HG=$ac_cv_prog_HAS_HG
2800if test -n "$HAS_HG"; then
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2802$as_echo "$HAS_HG" >&6; }
2803else
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
2806fi
2807
2808
2809else
2810HAS_HG=no-repository
2811fi
2812if test $HAS_HG = found
2813then
2814 HGVERSION="hg id -i \$(srcdir)"
2815 HGTAG="hg id -t \$(srcdir)"
2816 HGBRANCH="hg id -b \$(srcdir)"
2817else
2818 HGVERSION=""
2819 HGTAG=""
2820 HGBRANCH=""
2821fi
2822
2823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002824ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002825
2826
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002827ac_aux_dir=
2828for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2829 if test -f "$ac_dir/install-sh"; then
2830 ac_aux_dir=$ac_dir
2831 ac_install_sh="$ac_aux_dir/install-sh -c"
2832 break
2833 elif test -f "$ac_dir/install.sh"; then
2834 ac_aux_dir=$ac_dir
2835 ac_install_sh="$ac_aux_dir/install.sh -c"
2836 break
2837 elif test -f "$ac_dir/shtool"; then
2838 ac_aux_dir=$ac_dir
2839 ac_install_sh="$ac_aux_dir/shtool install -c"
2840 break
2841 fi
2842done
2843if test -z "$ac_aux_dir"; then
2844 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2845fi
2846
2847# These three variables are undocumented and unsupported,
2848# and are intended to be withdrawn in a future Autoconf release.
2849# They can cause serious problems if a builder's source tree is in a directory
2850# whose full name contains unusual characters.
2851ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2852ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2853ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2854
2855
2856# Make sure we can run config.sub.
2857$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2858 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2859
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2861$as_echo_n "checking build system type... " >&6; }
2862if ${ac_cv_build+:} false; then :
2863 $as_echo_n "(cached) " >&6
2864else
2865 ac_build_alias=$build_alias
2866test "x$ac_build_alias" = x &&
2867 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2868test "x$ac_build_alias" = x &&
2869 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2870ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2871 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2872
2873fi
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2875$as_echo "$ac_cv_build" >&6; }
2876case $ac_cv_build in
2877*-*-*) ;;
2878*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2879esac
2880build=$ac_cv_build
2881ac_save_IFS=$IFS; IFS='-'
2882set x $ac_cv_build
2883shift
2884build_cpu=$1
2885build_vendor=$2
2886shift; shift
2887# Remember, the first character of IFS is used to create $*,
2888# except with old shells:
2889build_os=$*
2890IFS=$ac_save_IFS
2891case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2892
2893
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2895$as_echo_n "checking host system type... " >&6; }
2896if ${ac_cv_host+:} false; then :
2897 $as_echo_n "(cached) " >&6
2898else
2899 if test "x$host_alias" = x; then
2900 ac_cv_host=$ac_cv_build
2901else
2902 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2903 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2904fi
2905
2906fi
2907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2908$as_echo "$ac_cv_host" >&6; }
2909case $ac_cv_host in
2910*-*-*) ;;
2911*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2912esac
2913host=$ac_cv_host
2914ac_save_IFS=$IFS; IFS='-'
2915set x $ac_cv_host
2916shift
2917host_cpu=$1
2918host_vendor=$2
2919shift; shift
2920# Remember, the first character of IFS is used to create $*,
2921# except with old shells:
2922host_os=$*
2923IFS=$ac_save_IFS
2924case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2925
2926
2927
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002928if test "$cross_compiling" = yes; then
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2930$as_echo_n "checking for python interpreter for cross build... " >&6; }
2931 if test -z "$PYTHON_FOR_BUILD"; then
2932 for interp in python$PACKAGE_VERSION python3 python; do
2933 which $interp >/dev/null 2>&1 || continue
2934 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2935 break
2936 fi
2937 interp=
2938 done
2939 if test x$interp = x; then
2940 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2941 fi
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2943$as_echo "$interp" >&6; }
doko@ubuntu.com7e6c2e22012-06-30 22:35:00 +02002944 PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002945 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002946elif test "$cross_compiling" = maybe; then
2947 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002948else
2949 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2950fi
2951
2952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953
Benjamin Petersond23f8222009-04-05 19:13:16 +00002954if test "$prefix" != "/"; then
2955 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2956fi
2957
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959
2960
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002961# We don't use PACKAGE_ variables, and they cause conflicts
2962# with other autoconf-based packages that include Python.h
2963grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2964rm confdefs.h
2965mv confdefs.h.new confdefs.h
2966
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002967
Georg Brandl08a90122012-09-29 09:34:13 +02002968VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002969
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002970# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002971
2972SOVERSION=1.0
2973
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002974# The later defininition of _XOPEN_SOURCE disables certain features
2975# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2976
Matthias Kloseb9621712010-04-24 17:59:49 +00002977$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002978
2979
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2982# them.
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002985
2986
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2988# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2989# them.
2990
Matthias Kloseb9621712010-04-24 17:59:49 +00002991$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002992
2993
Martin v. Löwisd6320502004-08-12 13:45:08 +00002994# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2995# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002998
2999
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003000# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3001# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3002# them.
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005
3006
3007
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003008define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003009
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003010# Arguments passed to configure.
3011
3012CONFIG_ARGS="$ac_configure_args"
3013
Matthias Kloseb9621712010-04-24 17:59:49 +00003014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3015$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003017if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 case $enableval in
3020 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003021 # Locate the best usable SDK, see Mac/README.txt for more
3022 # information
3023 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3024 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3027 if test ! -d "${enableval}"
3028 then
3029 enableval=/
3030 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032 ;;
3033 esac
3034 case $enableval in
3035 no)
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038 ;;
3039 *)
3040 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 if test ! -d "${UNIVERSALSDK}"
3042 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003043 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045 ;;
3046 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049else
3050
3051 UNIVERSALSDK=
3052 enable_universalsdk=
3053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056if test -n "${UNIVERSALSDK}"
3057then
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3059$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060else
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003066
3067
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068# For backward compatibility reasons we prefer to select '32-bit' if available,
3069# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071if test "`uname -s`" = "Darwin"
3072then
3073 if test -n "${UNIVERSALSDK}"
3074 then
3075 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3076 then
3077 UNIVERSAL_ARCHS="intel"
3078 fi
3079 fi
3080fi
3081
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3084$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003085
3086# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003087if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3090$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091 UNIVERSAL_ARCHS="$withval"
3092
3093else
3094
Ned Deilycbfb9a52012-06-23 16:02:19 -07003095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3096$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003097
3098fi
3099
3100
3101
3102
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103
3104# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106 withval=$with_framework_name;
3107 PYTHONFRAMEWORK=${withval}
3108 PYTHONFRAMEWORKDIR=${withval}.framework
3109 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3110
3111else
3112
3113 PYTHONFRAMEWORK=Python
3114 PYTHONFRAMEWORKDIR=Python.framework
3115 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3116
3117fi
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003122 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003124 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 esac
3126 case $enableval in
3127 no)
3128 PYTHONFRAMEWORK=
3129 PYTHONFRAMEWORKDIR=no-framework
3130 PYTHONFRAMEWORKPREFIX=
3131 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST=
3133 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 FRAMEWORKALTINSTALLFIRST=
3135 FRAMEWORKALTINSTALLLAST=
3136 if test "x${prefix}" = "xNONE"; then
3137 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3138 else
3139 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3140 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003141 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003142 ;;
3143 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003146 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003147 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003148 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3149 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003151
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003152 if test "x${prefix}" = "xNONE" ; then
3153 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003154
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003155 else
3156 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3157 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158
3159 case "${enableval}" in
3160 /System*)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 if test "${prefix}" = "NONE" ; then
3163 # See below
3164 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3165 fi
3166 ;;
3167
3168 /Library*)
3169 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3170 ;;
3171
3172 */Library/Frameworks)
3173 MDIR="`dirname "${enableval}"`"
3174 MDIR="`dirname "${MDIR}"`"
3175 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3176
3177 if test "${prefix}" = "NONE"; then
3178 # User hasn't specified the
3179 # --prefix option, but wants to install
3180 # the framework in a non-default location,
3181 # ensure that the compatibility links get
3182 # installed relative to that prefix as well
3183 # instead of in /usr/local.
3184 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3185 fi
3186 ;;
3187
3188 *)
3189 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3190 ;;
3191 esac
3192
Jack Jansen127e56e2001-09-11 14:41:54 +00003193 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003195 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003201 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3202
3203 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3204
Jack Jansene578a632001-08-15 01:27:14 +00003205 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Guido van Rossum563e7081996-09-10 18:20:48 +00003207else
Martin v. Löwis11437992002-04-12 09:54:03 +00003208
Jack Jansene578a632001-08-15 01:27:14 +00003209 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003210 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003211 PYTHONFRAMEWORKPREFIX=
3212 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003213 FRAMEWORKINSTALLFIRST=
3214 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215 FRAMEWORKALTINSTALLFIRST=
3216 FRAMEWORKALTINSTALLLAST=
3217 if test "x${prefix}" = "xNONE" ; then
3218 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3219 else
3220 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3221 fi
Jack Jansene578a632001-08-15 01:27:14 +00003222 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003223
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
3228
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
3230
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003234
3235
3236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003238
Jack Jansene578a632001-08-15 01:27:14 +00003239##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003240## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003241## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003242##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243# Set name for machine-dependent library files
3244
Matthias Kloseb9621712010-04-24 17:59:49 +00003245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3246$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003247if test -z "$MACHDEP"
3248then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 # avoid using uname for cross builds
3250 if test "$cross_compiling" = yes; then
3251 # ac_sys_system and ac_sys_release are only used for setting
3252 # `define_xopen_source' in the case statement below. For the
3253 # current supported cross builds, this macro is not adjusted.
3254 case "$host" in
3255 *-*-linux*)
3256 ac_sys_system=Linux
3257 ;;
3258 *-*-cygwin*)
3259 ac_sys_system=Cygwin
3260 ;;
3261 *)
3262 # for now, limit cross builds to known configurations
3263 MACHDEP="unknown"
3264 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3265 esac
3266 ac_sys_release=
3267 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003269 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003270 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003274 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003275 fi
3276 ac_md_system=`echo $ac_sys_system |
3277 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3278 ac_md_release=`echo $ac_sys_release |
3279 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3280 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003281
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003283 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003284 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003285 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003286 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003287 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003288 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289fi
Guido van Rossum91922671997-10-09 20:24:13 +00003290
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003291
3292if test "$cross_compiling" = yes; then
3293 case "$host" in
3294 *-*-linux*)
3295 case "$host_cpu" in
3296 arm*)
3297 _host_cpu=arm
3298 ;;
3299 *)
3300 _host_cpu=$host_cpu
3301 esac
3302 ;;
3303 *-*-cygwin*)
3304 _host_cpu=
3305 ;;
3306 *)
3307 # for now, limit cross builds to known configurations
3308 MACHDEP="unknown"
3309 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3310 esac
3311 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3312fi
3313
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003314# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3315# disable features if it is defined, without any means to access these
3316# features as extensions. For these systems, we skip the definition of
3317# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3318# some feature, make sure there is no alternative way to access this
3319# feature. Also, when using wildcards, make sure you have verified the
3320# need for not defining _XOPEN_SOURCE on all systems matching the
3321# wildcard, and that the wildcard does not include future systems
3322# (which may remove their limitations).
3323case $ac_sys_system/$ac_sys_release in
3324 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3325 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003326 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003327 # In addition, Stefan Krah confirms that issue #1244610 exists through
3328 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003329 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003330 define_xopen_source=no
3331 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3332 # also defined. This can be overridden by defining _BSD_SOURCE
3333 # As this has a different meaning on Linux, only define it on OpenBSD
3334
Matthias Kloseb9621712010-04-24 17:59:49 +00003335$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003336
3337 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3340 # also defined. This can be overridden by defining _BSD_SOURCE
3341 # As this has a different meaning on Linux, only define it on OpenBSD
3342
Matthias Kloseb9621712010-04-24 17:59:49 +00003343$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003344
3345 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003346 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3347 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3348 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003349 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 +00003350 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003351 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3352 # request to enable features supported by the standard as a request
3353 # to disable features not supported by the standard. The best way
3354 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3355 # entirely and define __EXTENSIONS__ instead.
3356 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003357 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3359 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003360 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003361 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003362 define_xopen_source=no;;
3363 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003365 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003366 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003367 # On FreeBSD 4, the math functions C89 does not cover are never defined
3368 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3369 FreeBSD/4.*)
3370 define_xopen_source=no;;
3371 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3372 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3373 # identifies itself as Darwin/7.*
3374 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # disables platform specific features beyond repair.
3376 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3377 # has no effect, don't bother defining them
3378 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003379 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003380 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003381 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003382 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3383 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3384 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003385 AIX/4)
3386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 AIX/5)
3388 if test `uname -r` -eq 1; then
3389 define_xopen_source=no
3390 fi
3391 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003392 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3393 # defining NI_NUMERICHOST.
3394 QNX/6.3.2)
3395 define_xopen_source=no
3396 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003397
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003398esac
3399
3400if test $define_xopen_source = yes
3401then
Victor Stinner14d098d2011-09-07 22:29:43 +02003402 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
Victor Stinner14d098d2011-09-07 22:29:43 +02003404$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003405
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003406
3407 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3408 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3409 # several APIs are not declared. Since this is also needed in some
3410 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
Matthias Kloseb9621712010-04-24 17:59:49 +00003412$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
3414
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003415
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003416$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003418fi
3419
Guido van Rossum91922671997-10-09 20:24:13 +00003420#
3421# SGI compilers allow the specification of the both the ABI and the
3422# ISA on the command line. Depending on the values of these switches,
3423# different and often incompatable code will be generated.
3424#
3425# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3426# thus supply support for various ABI/ISA combinations. The MACHDEP
3427# variable is also adjusted.
3428#
3429
3430if test ! -z "$SGI_ABI"
3431then
3432 CC="cc $SGI_ABI"
3433 LDFLAGS="$SGI_ABI $LDFLAGS"
3434 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3437$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003438
Jack Jansen6b08a402004-06-03 12:41:45 +00003439# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3440# it may influence the way we can build extensions, so distutils
3441# needs to check it
3442
Thomas Wouters477c8d52006-05-27 19:21:47 +00003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003445EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003446
Guido van Rossum627b2d71993-12-24 10:39:16 +00003447# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003448
3449# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3450# for debug/optimization stuff. BASECFLAGS is for flags that are required
3451# just to get things to compile and link. Users are free to override OPT
3452# when running configure or make. The build should not break if they do.
3453# BASECFLAGS should generally not be messed with, however.
3454
3455# XXX shouldn't some/most/all of this code be merged with the stuff later
3456# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3458$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003461if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003463 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003464 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003465 without_gcc=yes;;
3466 yes) CC=gcc
3467 without_gcc=no;;
3468 *) CC=$withval
3469 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003470 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003471else
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003473 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003474 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003475 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003476 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003477 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478fi
3479
Matthias Kloseb9621712010-04-24 17:59:49 +00003480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3481$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003482
Guido van Rossum8b131c51995-03-09 14:10:13 +00003483# If the user switches compilers, we can't believe the cache
3484if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3485then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003486 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003487(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003488fi
3489
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003490# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3491# when the compiler supports them, but we don't always want -O2, and
3492# we set -g later.
3493if test -z "$CFLAGS"; then
3494 CFLAGS=
3495fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003496
3497if test "$ac_sys_system" = "Darwin"
3498then
3499 # Compiler selection on MacOSX is more complicated than
3500 # AC_PROG_CC can handle, see Mac/README.txt for more
3501 # information
3502 if test -z "${CC}"
3503 then
3504 found_gcc=
3505 found_clang=
3506 as_save_IFS=$IFS; IFS=:
3507 for as_dir in $PATH
3508 do
3509 IFS=$as_save_IFS
3510 if test -x $as_dir/gcc; then
3511 if test -z "${found_gcc}"; then
3512 found_gcc=$as_dir/gcc
3513 fi
3514 fi
3515 if test -x $as_dir/clang; then
3516 if test -z "${found_clang}"; then
3517 found_clang=$as_dir/clang
3518 fi
3519 fi
3520 done
3521 IFS=$as_save_IFS
3522
3523 if test -n "$found_gcc" -a -n "$found_clang"
3524 then
3525 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3526 then
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3528$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3529 CC="$found_clang"
3530 CXX="$found_clang++"
3531 fi
3532
3533
3534 elif test -z "$found_gcc" -a -n "$found_clang"
3535 then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3537$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3538 CC="$found_clang"
3539 CXX="$found_clang++"
3540
3541 elif test -z "$found_gcc" -a -z "$found_clang"
3542 then
3543 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3544 if test -n "${found_clang}"
3545 then
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3547$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3548 CC="${found_clang}"
3549 CXX="`/usr/bin/xcrun -find clang++`"
3550
3551 # else: use default behaviour
3552 fi
3553 fi
3554 fi
3555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003556ac_ext=c
3557ac_cpp='$CPP $CPPFLAGS'
3558ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3559ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3560ac_compiler_gnu=$ac_cv_c_compiler_gnu
3561if test -n "$ac_tool_prefix"; then
3562 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3563set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003566if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003568else
3569 if test -n "$CC"; then
3570 ac_cv_prog_CC="$CC" # Let the user override the test.
3571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3573for as_dir in $PATH
3574do
3575 IFS=$as_save_IFS
3576 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $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 +00003581 break 2
3582 fi
3583done
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003586
Jack Jansendd19cf82001-12-06 22:36:17 +00003587fi
3588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003589CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003590if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3592$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003593else
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003596fi
3597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599fi
3600if test -z "$ac_cv_prog_CC"; then
3601 ac_ct_CC=$CC
3602 # Extract the first word of "gcc", so it can be a program name with args.
3603set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3605$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003606if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003608else
3609 if test -n "$ac_ct_CC"; then
3610 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3611else
3612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613for as_dir in $PATH
3614do
3615 IFS=$as_save_IFS
3616 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003618 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $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 +00003621 break 2
3622 fi
3623done
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003626
3627fi
3628fi
3629ac_ct_CC=$ac_cv_prog_ac_ct_CC
3630if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3632$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003633else
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3635$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003636fi
3637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 if test "x$ac_ct_CC" = x; then
3639 CC=""
3640 else
3641 case $cross_compiling:$ac_tool_warned in
3642yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645ac_tool_warned=yes ;;
3646esac
3647 CC=$ac_ct_CC
3648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
3650 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003651fi
3652
Jack Jansendd19cf82001-12-06 22:36:17 +00003653if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654 if test -n "$ac_tool_prefix"; then
3655 # 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 +00003656set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3658$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003659if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003661else
3662 if test -n "$CC"; then
3663 ac_cv_prog_CC="$CC" # Let the user override the test.
3664else
Martin v. Löwis11437992002-04-12 09:54:03 +00003665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $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 +00003674 break 2
3675 fi
3676done
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003679
3680fi
3681fi
3682CC=$ac_cv_prog_CC
3683if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3685$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003686else
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3688$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003689fi
3690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693fi
3694if test -z "$CC"; then
3695 # Extract the first word of "cc", so it can be a program name with args.
3696set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003699if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003701else
3702 if test -n "$CC"; then
3703 ac_cv_prog_CC="$CC" # Let the user override the test.
3704else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003705 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3707for as_dir in $PATH
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3714 ac_prog_rejected=yes
3715 continue
3716 fi
3717 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $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 +00003719 break 2
3720 fi
3721done
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725if test $ac_prog_rejected = yes; then
3726 # We found a bogon in the path, so make sure we never use it.
3727 set dummy $ac_cv_prog_CC
3728 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730 # We chose a different compiler from the bogus one.
3731 # However, it has the same basename, so the bogon will be chosen
3732 # first if we set CC to just the basename; use the full file name.
3733 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003734 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 fi
3736fi
3737fi
3738fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003739CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3742$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743else
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746fi
3747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750if test -z "$CC"; then
3751 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 do
3754 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3755set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003758if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003760else
3761 if test -n "$CC"; then
3762 ac_cv_prog_CC="$CC" # Let the user override the test.
3763else
Martin v. Löwis11437992002-04-12 09:54:03 +00003764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $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 +00003773 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003775done
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
3779fi
3780fi
3781CC=$ac_cv_prog_CC
3782if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3784$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003788fi
3789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 test -n "$CC" && break
3792 done
3793fi
3794if test -z "$CC"; then
3795 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797do
3798 # Extract the first word of "$ac_prog", so it can be a program name with args.
3799set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003802if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003804else
3805 if test -n "$ac_ct_CC"; then
3806 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3807else
3808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $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 +00003817 break 2
3818 fi
3819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003822
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
3824fi
3825ac_ct_CC=$ac_cv_prog_ac_ct_CC
3826if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3828$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$ac_ct_CC" && break
3836done
Michael W. Hudson54241132001-12-07 15:38:26 +00003837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838 if test "x$ac_ct_CC" = x; then
3839 CC=""
3840 else
3841 case $cross_compiling:$ac_tool_warned in
3842yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003843{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3844$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845ac_tool_warned=yes ;;
3846esac
3847 CC=$ac_ct_CC
3848 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850
3851fi
3852
3853
Matthias Kloseb9621712010-04-24 17:59:49 +00003854test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003856as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003857See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858
3859# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3861set X $ac_compile
3862ac_compiler=$2
3863for ac_option in --version -v -V -qversion; do
3864 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865case "(($ac_try" in
3866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3867 *) ac_try_echo=$ac_try;;
3868esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3870$as_echo "$ac_try_echo"; } >&5
3871 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 if test -s conftest.err; then
3874 sed '10a\
3875... rest of stderr output deleted ...
3876 10q' conftest.err >conftest.er1
3877 cat conftest.er1 >&5
3878 fi
3879 rm -f conftest.er1 conftest.err
3880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3881 test $ac_status = 0; }
3882done
Martin v. Löwis11437992002-04-12 09:54:03 +00003883
Matthias Kloseb9621712010-04-24 17:59:49 +00003884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003885/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003886
Martin v. Löwis11437992002-04-12 09:54:03 +00003887int
3888main ()
3889{
3890
3891 ;
3892 return 0;
3893}
3894_ACEOF
3895ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003896ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003897# Try to create an executable without -o first, disregard a.out.
3898# It will help us diagnose broken compilers, and finding out an intuition
3899# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3901$as_echo_n "checking whether the C compiler works... " >&6; }
3902ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3903
3904# The possible output files:
3905ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907ac_rmfiles=
3908for ac_file in $ac_files
3909do
3910 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3913 esac
3914done
3915rm -f $ac_rmfiles
3916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918case "(($ac_try" in
3919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3920 *) ac_try_echo=$ac_try;;
3921esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3923$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003925 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3927 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3929# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3930# in a Makefile. We should not override ac_cv_exeext if it was cached,
3931# so that the user can short-circuit this test for compilers unknown to
3932# Autoconf.
3933for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003934do
3935 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003938 ;;
3939 [ab].out )
3940 # We found the default executable, but exeext='' is most
3941 # certainly right.
3942 break;;
3943 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 then :; else
3946 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3947 fi
3948 # We set ac_cv_exeext here because the later test for it is not
3949 # safe: cross compilers may not add the suffix if given an `-o'
3950 # argument, so we may need to know it at that point already.
3951 # Even if this section looks crufty: it has the advantage of
3952 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953 break;;
3954 * )
3955 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003956 esac
3957done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958test "$ac_cv_exeext" = no && ac_cv_exeext=
3959
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003960else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 ac_file=''
3962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003963if test -z "$ac_file"; then :
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3965$as_echo "no" >&6; }
3966$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003967sed 's/^/| /' conftest.$ac_ext >&5
3968
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003971as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003972See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003973else
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3975$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3978$as_echo_n "checking for C compiler default output file name... " >&6; }
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3980$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982
Matthias Kloseb9621712010-04-24 17:59:49 +00003983rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003984ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3986$as_echo_n "checking for suffix of executables... " >&6; }
3987if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988case "(($ac_try" in
3989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3990 *) ac_try_echo=$ac_try;;
3991esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3993$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3997 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3999# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4000# work properly (i.e., refer to `conftest.exe'), while it won't with
4001# `rm'.
4002for ac_file in conftest.exe conftest conftest.*; do
4003 test -f "$ac_file" || continue
4004 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4007 break;;
4008 * ) break;;
4009 esac
4010done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004011else
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004014as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004015See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004017rm -f conftest conftest$ac_cv_exeext
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4019$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020
4021rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004022EXEEXT=$ac_cv_exeext
4023ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4025/* end confdefs.h. */
4026#include <stdio.h>
4027int
4028main ()
4029{
4030FILE *f = fopen ("conftest.out", "w");
4031 return ferror (f) || fclose (f) != 0;
4032
4033 ;
4034 return 0;
4035}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004037ac_clean_files="$ac_clean_files conftest.out"
4038# Check that the compiler produces executables we can run. If not, either
4039# the compiler is broken, or we cross compile.
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4041$as_echo_n "checking whether we are cross compiling... " >&6; }
4042if test "$cross_compiling" != yes; then
4043 { { ac_try="$ac_link"
4044case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
4048eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4049$as_echo "$ac_try_echo"; } >&5
4050 (eval "$ac_link") 2>&5
4051 ac_status=$?
4052 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4053 test $ac_status = 0; }
4054 if { ac_try='./conftest$ac_cv_exeext'
4055 { { case "(($ac_try" in
4056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4057 *) ac_try_echo=$ac_try;;
4058esac
4059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4060$as_echo "$ac_try_echo"; } >&5
4061 (eval "$ac_try") 2>&5
4062 ac_status=$?
4063 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4064 test $ac_status = 0; }; }; then
4065 cross_compiling=no
4066 else
4067 if test "$cross_compiling" = maybe; then
4068 cross_compiling=yes
4069 else
4070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004072as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004073If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004074See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 fi
4076 fi
4077fi
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4079$as_echo "$cross_compiling" >&6; }
4080
4081rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4082ac_clean_files=$ac_clean_files_save
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4084$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004085if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo_n "(cached) " >&6
4087else
4088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004089/* end confdefs.h. */
4090
4091int
4092main ()
4093{
4094
4095 ;
4096 return 0;
4097}
4098_ACEOF
4099rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004100if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111 for ac_file in conftest.o conftest.obj conftest.*; do
4112 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4116 break;;
4117 esac
4118done
4119else
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004121sed 's/^/| /' conftest.$ac_ext >&5
4122
Matthias Kloseb9621712010-04-24 17:59:49 +00004123{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004125as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004126See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004127fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004128rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4131$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004132OBJEXT=$ac_cv_objext
4133ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4135$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004136if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004138else
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004141
Martin v. Löwis11437992002-04-12 09:54:03 +00004142int
4143main ()
4144{
4145#ifndef __GNUC__
4146 choke me
4147#endif
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 ac_compiler_gnu=yes
4155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004159ac_cv_c_compiler_gnu=$ac_compiler_gnu
4160
4161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4163$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4164if test $ac_compiler_gnu = yes; then
4165 GCC=yes
4166else
4167 GCC=
4168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004169ac_test_CFLAGS=${CFLAGS+set}
4170ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4172$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004173if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004175else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 ac_save_c_werror_flag=$ac_c_werror_flag
4177 ac_c_werror_flag=yes
4178 ac_cv_prog_cc_g=no
4179 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004182
Martin v. Löwis11437992002-04-12 09:54:03 +00004183int
4184main ()
4185{
4186
4187 ;
4188 return 0;
4189}
4190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004191if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004192 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193else
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 CFLAGS=""
4195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196/* end confdefs.h. */
4197
4198int
4199main ()
4200{
4201
4202 ;
4203 return 0;
4204}
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207
Matthias Kloseb9621712010-04-24 17:59:49 +00004208else
4209 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212/* end confdefs.h. */
4213
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4230 ac_c_werror_flag=$ac_save_c_werror_flag
4231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4233$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004234if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004236elif test $ac_cv_prog_cc_g = yes; then
4237 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004238 CFLAGS="-g -O2"
4239 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004240 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241 fi
4242else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004243 if test "$GCC" = yes; then
4244 CFLAGS="-O2"
4245 else
4246 CFLAGS=
4247 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4250$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004251if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004252 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004253else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004255ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
4258#include <stdarg.h>
4259#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004260struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004261/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4262struct buf { int x; };
4263FILE * (*rcsopen) (struct buf *, struct stat *, int);
4264static char *e (p, i)
4265 char **p;
4266 int i;
4267{
4268 return p[i];
4269}
4270static char *f (char * (*g) (char **, int), char **p, ...)
4271{
4272 char *s;
4273 va_list v;
4274 va_start (v,p);
4275 s = g (p, va_arg (v,int));
4276 va_end (v);
4277 return s;
4278}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004279
4280/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4281 function prototypes and stuff, but not '\xHH' hex character constants.
4282 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4285 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4290 inside strings and character constants. */
4291#define FOO(x) 'x'
4292int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4293
Skip Montanaro6dead952003-09-25 14:50:04 +00004294int test (int i, double x);
4295struct s1 {int (*f) (int a);};
4296struct s2 {int (*f) (double a);};
4297int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4298int argc;
4299char **argv;
4300int
4301main ()
4302{
4303return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4304 ;
4305 return 0;
4306}
4307_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4309 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004310do
4311 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315rm -f core conftest.err conftest.$ac_objext
4316 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004317done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004319CC=$ac_save_CC
4320
4321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322# AC_CACHE_VAL
4323case "x$ac_cv_prog_cc_c89" in
4324 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4326$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4329$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004330 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4333$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004334esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004335if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004336
Matthias Kloseb9621712010-04-24 17:59:49 +00004337fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004338
Martin v. Löwis11437992002-04-12 09:54:03 +00004339ac_ext=c
4340ac_cpp='$CPP $CPPFLAGS'
4341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4343ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004345
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004346
4347
Matthias Kloseb9621712010-04-24 17:59:49 +00004348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4349$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004352if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004354
4355 case $withval in
4356 no) with_cxx_main=no
4357 MAINCC='$(CC)';;
4358 yes) with_cxx_main=yes
4359 MAINCC='$(CXX)';;
4360 *) with_cxx_main=yes
4361 MAINCC=$withval
4362 if test -z "$CXX"
4363 then
4364 CXX=$withval
4365 fi;;
4366 esac
4367else
4368
4369 with_cxx_main=no
4370 MAINCC='$(CC)'
4371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372fi
4373
Matthias Kloseb9621712010-04-24 17:59:49 +00004374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4375$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004376
4377preset_cxx="$CXX"
4378if test -z "$CXX"
4379then
4380 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004381 gcc) if test -n "$ac_tool_prefix"; then
4382 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4383set dummy ${ac_tool_prefix}g++; ac_word=$2
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4385$as_echo_n "checking for $ac_word... " >&6; }
4386if ${ac_cv_path_CXX+:} false; then :
4387 $as_echo_n "(cached) " >&6
4388else
4389 case $CXX in
4390 [\\/]* | ?:[\\/]*)
4391 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4392 ;;
4393 *)
4394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in notfound
4396do
4397 IFS=$as_save_IFS
4398 test -z "$as_dir" && as_dir=.
4399 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004401 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4403 break 2
4404 fi
4405done
4406 done
4407IFS=$as_save_IFS
4408
4409 ;;
4410esac
4411fi
4412CXX=$ac_cv_path_CXX
4413if test -n "$CXX"; then
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4415$as_echo "$CXX" >&6; }
4416else
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4418$as_echo "no" >&6; }
4419fi
4420
4421
4422fi
4423if test -z "$ac_cv_path_CXX"; then
4424 ac_pt_CXX=$CXX
4425 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004426set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4428$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004429if ${ac_cv_path_ac_pt_CXX+:} false; then :
4430 $as_echo_n "(cached) " >&6
4431else
4432 case $ac_pt_CXX in
4433 [\\/]* | ?:[\\/]*)
4434 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4435 ;;
4436 *)
4437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4438for as_dir in notfound
4439do
4440 IFS=$as_save_IFS
4441 test -z "$as_dir" && as_dir=.
4442 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004444 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4446 break 2
4447 fi
4448done
4449 done
4450IFS=$as_save_IFS
4451
4452 ;;
4453esac
4454fi
4455ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4456if test -n "$ac_pt_CXX"; then
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4458$as_echo "$ac_pt_CXX" >&6; }
4459else
4460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4461$as_echo "no" >&6; }
4462fi
4463
4464 if test "x$ac_pt_CXX" = x; then
4465 CXX="g++"
4466 else
4467 case $cross_compiling:$ac_tool_warned in
4468yes:)
4469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4471ac_tool_warned=yes ;;
4472esac
4473 CXX=$ac_pt_CXX
4474 fi
4475else
4476 CXX="$ac_cv_path_CXX"
4477fi
4478 ;;
4479 cc) if test -n "$ac_tool_prefix"; then
4480 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4481set dummy ${ac_tool_prefix}c++; ac_word=$2
4482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4483$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004484if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004485 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004486else
4487 case $CXX in
4488 [\\/]* | ?:[\\/]*)
4489 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4490 ;;
4491 *)
4492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493for as_dir in notfound
4494do
4495 IFS=$as_save_IFS
4496 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004497 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004499 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004501 break 2
4502 fi
4503done
Matthias Kloseb9621712010-04-24 17:59:49 +00004504 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004505IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004506
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004507 ;;
4508esac
4509fi
4510CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004511if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4513$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004514else
Matthias Kloseb9621712010-04-24 17:59:49 +00004515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4516$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004518
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004519
4520fi
4521if test -z "$ac_cv_path_CXX"; then
4522 ac_pt_CXX=$CXX
4523 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004524set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4526$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004527if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004528 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004529else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004530 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004531 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004532 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 +00004533 ;;
4534 *)
4535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4536for as_dir in notfound
4537do
4538 IFS=$as_save_IFS
4539 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004540 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004541 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004542 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004544 break 2
4545 fi
4546done
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004548IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550 ;;
4551esac
4552fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004553ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4554if test -n "$ac_pt_CXX"; then
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4556$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004557else
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4559$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004561
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004562 if test "x$ac_pt_CXX" = x; then
4563 CXX="c++"
4564 else
4565 case $cross_compiling:$ac_tool_warned in
4566yes:)
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4568$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4569ac_tool_warned=yes ;;
4570esac
4571 CXX=$ac_pt_CXX
4572 fi
4573else
4574 CXX="$ac_cv_path_CXX"
4575fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004576 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004577 clang|*/clang) if test -n "$ac_tool_prefix"; then
4578 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4579set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4581$as_echo_n "checking for $ac_word... " >&6; }
4582if ${ac_cv_path_CXX+:} false; then :
4583 $as_echo_n "(cached) " >&6
4584else
4585 case $CXX in
4586 [\\/]* | ?:[\\/]*)
4587 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4588 ;;
4589 *)
4590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4591for as_dir in notfound
4592do
4593 IFS=$as_save_IFS
4594 test -z "$as_dir" && as_dir=.
4595 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004597 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4599 break 2
4600 fi
4601done
4602 done
4603IFS=$as_save_IFS
4604
Ned Deilycbfb9a52012-06-23 16:02:19 -07004605 ;;
4606esac
4607fi
4608CXX=$ac_cv_path_CXX
4609if test -n "$CXX"; then
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4611$as_echo "$CXX" >&6; }
4612else
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4614$as_echo "no" >&6; }
4615fi
4616
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004617
4618fi
4619if test -z "$ac_cv_path_CXX"; then
4620 ac_pt_CXX=$CXX
4621 # Extract the first word of "clang++", so it can be a program name with args.
4622set dummy clang++; ac_word=$2
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_ac_pt_CXX+:} false; then :
4626 $as_echo_n "(cached) " >&6
4627else
4628 case $ac_pt_CXX in
4629 [\\/]* | ?:[\\/]*)
4630 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4631 ;;
4632 *)
4633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in notfound
4635do
4636 IFS=$as_save_IFS
4637 test -z "$as_dir" && as_dir=.
4638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642 break 2
4643 fi
4644done
4645 done
4646IFS=$as_save_IFS
4647
4648 ;;
4649esac
4650fi
4651ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4652if test -n "$ac_pt_CXX"; then
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4654$as_echo "$ac_pt_CXX" >&6; }
4655else
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660 if test "x$ac_pt_CXX" = x; then
4661 CXX="clang++"
4662 else
4663 case $cross_compiling:$ac_tool_warned in
4664yes:)
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4667ac_tool_warned=yes ;;
4668esac
4669 CXX=$ac_pt_CXX
4670 fi
4671else
4672 CXX="$ac_cv_path_CXX"
4673fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004674 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004675 esac
4676 if test "$CXX" = "notfound"
4677 then
4678 CXX=""
4679 fi
4680fi
4681if test -z "$CXX"
4682then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 if test -n "$ac_tool_prefix"; then
4684 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4685 do
4686 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4687set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4689$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004690if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004691 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004692else
4693 if test -n "$CXX"; then
4694 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4695else
4696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in $PATH
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004703 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004705 break 2
4706 fi
4707done
Matthias Kloseb9621712010-04-24 17:59:49 +00004708 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004709IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710
4711fi
4712fi
4713CXX=$ac_cv_prog_CXX
4714if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4716$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004717else
Matthias Kloseb9621712010-04-24 17:59:49 +00004718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720fi
4721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004722
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004723 test -n "$CXX" && break
4724 done
4725fi
4726if test -z "$CXX"; then
4727 ac_ct_CXX=$CXX
4728 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4729do
4730 # Extract the first word of "$ac_prog", so it can be a program name with args.
4731set dummy $ac_prog; ac_word=$2
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
4734if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4735 $as_echo_n "(cached) " >&6
4736else
4737 if test -n "$ac_ct_CXX"; then
4738 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4739else
4740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743 IFS=$as_save_IFS
4744 test -z "$as_dir" && as_dir=.
4745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004747 ac_cv_prog_ac_ct_CXX="$ac_prog"
4748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4749 break 2
4750 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004752 done
4753IFS=$as_save_IFS
4754
4755fi
4756fi
4757ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4758if test -n "$ac_ct_CXX"; then
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4760$as_echo "$ac_ct_CXX" >&6; }
4761else
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
4764fi
4765
4766
4767 test -n "$ac_ct_CXX" && break
4768done
4769
4770 if test "x$ac_ct_CXX" = x; then
4771 CXX="notfound"
4772 else
4773 case $cross_compiling:$ac_tool_warned in
4774yes:)
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4777ac_tool_warned=yes ;;
4778esac
4779 CXX=$ac_ct_CXX
4780 fi
4781fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782
4783 if test "$CXX" = "notfound"
4784 then
4785 CXX=""
4786 fi
4787fi
4788if test "$preset_cxx" != "$CXX"
4789then
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791
4792 By default, distutils will build C++ extension modules with \"$CXX\".
4793 If this is not intended, then set CXX on the configure command line.
4794 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004795$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796
4797 By default, distutils will build C++ extension modules with \"$CXX\".
4798 If this is not intended, then set CXX on the configure command line.
4799 " >&2;}
4800fi
4801
4802
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4804$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4805save_LDFLAGS="$LDFLAGS"
4806LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004807
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4809/* end confdefs.h. */
4810
4811int
4812main ()
4813{
4814
4815 ;
4816 return 0;
4817}
4818_ACEOF
4819if ac_fn_c_try_link "$LINENO"; then :
4820 NO_AS_NEEDED="-Wl,--no-as-needed"
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4822$as_echo "yes" >&6; }
4823else
4824 NO_AS_NEEDED=""
4825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826$as_echo "no" >&6; }
4827fi
4828rm -f core conftest.err conftest.$ac_objext \
4829 conftest$ac_exeext conftest.$ac_ext
4830LDFLAGS="$save_LDFLAGS"
4831
4832
4833
4834# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004835ac_ext=c
4836ac_cpp='$CPP $CPPFLAGS'
4837ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4838ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4839ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4841$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004842# On Suns, sometimes $CPP names a directory.
4843if test -n "$CPP" && test -d "$CPP"; then
4844 CPP=
4845fi
4846if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004847 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004849else
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 # Double quotes because CPP needs to be expanded
4851 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4852 do
4853 ac_preproc_ok=false
4854for ac_c_preproc_warn_flag in '' yes
4855do
4856 # Use a header file that comes with gcc, so configuring glibc
4857 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004858 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4859 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004860 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004861 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004863/* end confdefs.h. */
4864#ifdef __STDC__
4865# include <limits.h>
4866#else
4867# include <assert.h>
4868#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004869 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004871if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004872
Matthias Kloseb9621712010-04-24 17:59:49 +00004873else
Martin v. Löwis11437992002-04-12 09:54:03 +00004874 # Broken: fails on valid input.
4875continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004876fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004877rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004879 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004883#include <ac_nonexistent.h>
4884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004885if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004886 # Broken: success on invalid input.
4887continue
4888else
Martin v. Löwis11437992002-04-12 09:54:03 +00004889 # Passes both tests.
4890ac_preproc_ok=:
4891break
4892fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004893rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004894
4895done
4896# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004897rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004898if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004899 break
4900fi
4901
4902 done
4903 ac_cv_prog_CPP=$CPP
4904
4905fi
4906 CPP=$ac_cv_prog_CPP
4907else
4908 ac_cv_prog_CPP=$CPP
4909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4911$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004912ac_preproc_ok=false
4913for ac_c_preproc_warn_flag in '' yes
4914do
4915 # Use a header file that comes with gcc, so configuring glibc
4916 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004917 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4918 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004919 # On the NeXT, cc -E runs the code through the compiler's parser,
4920 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004922/* end confdefs.h. */
4923#ifdef __STDC__
4924# include <limits.h>
4925#else
4926# include <assert.h>
4927#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004928 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004930if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004931
Matthias Kloseb9621712010-04-24 17:59:49 +00004932else
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # Broken: fails on valid input.
4934continue
4935fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004936rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004938 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004939 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004942#include <ac_nonexistent.h>
4943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004944if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004945 # Broken: success on invalid input.
4946continue
4947else
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 # Passes both tests.
4949ac_preproc_ok=:
4950break
4951fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004952rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004953
4954done
4955# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004956rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004957if $ac_preproc_ok; then :
4958
Martin v. Löwis11437992002-04-12 09:54:03 +00004959else
Matthias Kloseb9621712010-04-24 17:59:49 +00004960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004962as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004963See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004964fi
4965
4966ac_ext=c
4967ac_cpp='$CPP $CPPFLAGS'
4968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4970ac_compiler_gnu=$ac_cv_c_compiler_gnu
4971
4972
Matthias Kloseb9621712010-04-24 17:59:49 +00004973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4974$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004975if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004977else
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004979 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004980 # Loop through the user's path and test for each of PROGNAME-LIST
4981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004982for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4983do
4984 IFS=$as_save_IFS
4985 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004986 for ac_prog in grep ggrep; do
4987 for ac_exec_ext in '' $ac_executable_extensions; do
4988 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004989 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004990# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004991 # Check for GNU $ac_path_GREP
4992case `"$ac_path_GREP" --version 2>&1` in
4993*GNU*)
4994 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4995*)
4996 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998 while :
4999 do
5000 cat "conftest.in" "conftest.in" >"conftest.tmp"
5001 mv "conftest.tmp" "conftest.in"
5002 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005003 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005004 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5005 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005007 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5008 # Best one so far, save it but keep looking for a better one
5009 ac_cv_path_GREP="$ac_path_GREP"
5010 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005011 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005012 # 10*(2^10) chars as input seems more than enough
5013 test $ac_count -gt 10 && break
5014 done
5015 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5016esac
5017
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 $ac_path_GREP_found && break 3
5019 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005022IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005024 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 +00005025 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026else
5027 ac_cv_path_GREP=$GREP
5028fi
5029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5032$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005033 GREP="$ac_cv_path_GREP"
5034
5035
Matthias Kloseb9621712010-04-24 17:59:49 +00005036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5037$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005038if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005040else
5041 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5042 then ac_cv_path_EGREP="$GREP -E"
5043 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005045 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 # Loop through the user's path and test for each of PROGNAME-LIST
5047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5049do
5050 IFS=$as_save_IFS
5051 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 for ac_prog in egrep; do
5053 for ac_exec_ext in '' $ac_executable_extensions; do
5054 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005055 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005056# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005057 # Check for GNU $ac_path_EGREP
5058case `"$ac_path_EGREP" --version 2>&1` in
5059*GNU*)
5060 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5061*)
5062 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064 while :
5065 do
5066 cat "conftest.in" "conftest.in" >"conftest.tmp"
5067 mv "conftest.tmp" "conftest.in"
5068 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005070 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5071 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5074 # Best one so far, save it but keep looking for a better one
5075 ac_cv_path_EGREP="$ac_path_EGREP"
5076 ac_path_EGREP_max=$ac_count
5077 fi
5078 # 10*(2^10) chars as input seems more than enough
5079 test $ac_count -gt 10 && break
5080 done
5081 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5082esac
5083
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 $ac_path_EGREP_found && break 3
5085 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005086 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005088IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005090 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 +00005091 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092else
5093 ac_cv_path_EGREP=$EGREP
5094fi
5095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005096 fi
5097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5099$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005100 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005101
5102
Matthias Kloseb9621712010-04-24 17:59:49 +00005103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5104$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005105if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo_n "(cached) " >&6
5107else
5108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005109/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005110#include <stdlib.h>
5111#include <stdarg.h>
5112#include <string.h>
5113#include <float.h>
5114
5115int
5116main ()
5117{
5118
5119 ;
5120 return 0;
5121}
5122_ACEOF
5123if ac_fn_c_try_compile "$LINENO"; then :
5124 ac_cv_header_stdc=yes
5125else
5126 ac_cv_header_stdc=no
5127fi
5128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5129
5130if test $ac_cv_header_stdc = yes; then
5131 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5133/* end confdefs.h. */
5134#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005135
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005136_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005138 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005140else
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005142fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005143rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144
Matthias Kloseb9621712010-04-24 17:59:49 +00005145fi
5146
5147if test $ac_cv_header_stdc = yes; then
5148 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5150/* end confdefs.h. */
5151#include <stdlib.h>
5152
5153_ACEOF
5154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5155 $EGREP "free" >/dev/null 2>&1; then :
5156
5157else
5158 ac_cv_header_stdc=no
5159fi
5160rm -f conftest*
5161
5162fi
5163
5164if test $ac_cv_header_stdc = yes; then
5165 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5166 if test "$cross_compiling" = yes; then :
5167 :
5168else
5169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5170/* end confdefs.h. */
5171#include <ctype.h>
5172#include <stdlib.h>
5173#if ((' ' & 0x0FF) == 0x020)
5174# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5175# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5176#else
5177# define ISLOWER(c) \
5178 (('a' <= (c) && (c) <= 'i') \
5179 || ('j' <= (c) && (c) <= 'r') \
5180 || ('s' <= (c) && (c) <= 'z'))
5181# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5182#endif
5183
5184#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5185int
5186main ()
5187{
5188 int i;
5189 for (i = 0; i < 256; i++)
5190 if (XOR (islower (i), ISLOWER (i))
5191 || toupper (i) != TOUPPER (i))
5192 return 2;
5193 return 0;
5194}
5195_ACEOF
5196if ac_fn_c_try_run "$LINENO"; then :
5197
5198else
5199 ac_cv_header_stdc=no
5200fi
5201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5202 conftest.$ac_objext conftest.beam conftest.$ac_ext
5203fi
5204
5205fi
5206fi
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5208$as_echo "$ac_cv_header_stdc" >&6; }
5209if test $ac_cv_header_stdc = yes; then
5210
5211$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5212
5213fi
5214
5215# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5216for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5217 inttypes.h stdint.h unistd.h
5218do :
5219 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5220ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5221"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005222if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005223 cat >>confdefs.h <<_ACEOF
5224#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5225_ACEOF
5226
5227fi
5228
5229done
5230
5231
5232
5233 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 +02005234if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005235 MINIX=yes
5236else
5237 MINIX=
5238fi
5239
5240
5241 if test "$MINIX" = yes; then
5242
5243$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5244
5245
5246$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5247
5248
5249$as_echo "#define _MINIX 1" >>confdefs.h
5250
5251 fi
5252
5253
5254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5255$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005256if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005257 $as_echo_n "(cached) " >&6
5258else
5259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5260/* end confdefs.h. */
5261
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005262# define __EXTENSIONS__ 1
5263 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005264int
5265main ()
5266{
5267
5268 ;
5269 return 0;
5270}
5271_ACEOF
5272if ac_fn_c_try_compile "$LINENO"; then :
5273 ac_cv_safe_to_define___extensions__=yes
5274else
5275 ac_cv_safe_to_define___extensions__=no
5276fi
5277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5278fi
5279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5280$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5281 test $ac_cv_safe_to_define___extensions__ = yes &&
5282 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5283
5284 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5285
5286 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5287
5288 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5289
5290 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5291
5292
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294# Check for unsupported systems
5295case $ac_sys_system/$ac_sys_release in
5296atheos*|Linux*/1*)
5297 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5298 echo See README for details.
5299 exit 1;;
5300esac
5301
5302
Matthias Kloseb9621712010-04-24 17:59:49 +00005303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5304$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305
5306# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005307if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308 withval=$with_suffix;
5309 case $withval in
5310 no) EXEEXT=;;
5311 yes) EXEEXT=.exe;;
5312 *) EXEEXT=$withval;;
5313 esac
5314fi
5315
Matthias Kloseb9621712010-04-24 17:59:49 +00005316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5317$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318
5319# Test whether we're running on a non-case-sensitive system, in which
5320# case we give a warning if no ext is given
5321
Matthias Kloseb9621712010-04-24 17:59:49 +00005322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5323$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324if test ! -d CaseSensitiveTestDir; then
5325mkdir CaseSensitiveTestDir
5326fi
5327
5328if test -d casesensitivetestdir
5329then
Matthias Kloseb9621712010-04-24 17:59:49 +00005330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5331$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332 BUILDEXEEXT=.exe
5333else
Matthias Kloseb9621712010-04-24 17:59:49 +00005334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005336 BUILDEXEEXT=$EXEEXT
5337fi
5338rmdir CaseSensitiveTestDir
5339
5340case $MACHDEP in
5341bsdos*)
5342 case $CC in
5343 gcc) CC="$CC -D_HAVE_BSDI";;
5344 esac;;
5345esac
5346
5347case $ac_sys_system in
5348hp*|HP*)
5349 case $CC in
5350 cc|*/cc) CC="$CC -Ae";;
5351 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352esac
5353
5354
5355
Matthias Kloseb9621712010-04-24 17:59:49 +00005356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5357$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358if test -z "$LIBRARY"
5359then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005360 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5363$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365# LDLIBRARY is the name of the library to link against (as opposed to the
5366# name of the library into which to insert object files). BLDLIBRARY is also
5367# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5368# is blank as the main program is not linked directly against LDLIBRARY.
5369# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5370# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5371# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5372# DLLLIBRARY is the shared (i.e., DLL) library.
5373#
5374# RUNSHARED is used to run shared python without installed libraries
5375#
5376# INSTSONAME is the name of the shared library that will be use to install
5377# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005378#
5379# LDVERSION is the shared library version number, normally the Python version
5380# with the ABI build flags appended.
5381
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382
5383
5384
5385
5386
5387
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005388
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389LDLIBRARY="$LIBRARY"
5390BLDLIBRARY='$(LDLIBRARY)'
5391INSTSONAME='$(LDLIBRARY)'
5392DLLLIBRARY=''
5393LDLIBRARYDIR=''
5394RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005395LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396
5397# LINKCC is the command that links the python executable -- default is $(CC).
5398# If CXX is set, and if it is needed to link a main function that was
5399# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5400# python might then depend on the C++ runtime
5401# This is altered for AIX in order to build the export list before
5402# linking.
5403
Matthias Kloseb9621712010-04-24 17:59:49 +00005404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5405$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406if test -z "$LINKCC"
5407then
5408 LINKCC='$(PURIFY) $(MAINCC)'
5409 case $ac_sys_system in
5410 AIX*)
5411 exp_extra="\"\""
5412 if test $ac_sys_release -ge 5 -o \
5413 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5414 exp_extra="."
5415 fi
5416 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417 QNX*)
5418 # qcc must be used because the other compilers do not
5419 # support -N.
5420 LINKCC=qcc;;
5421 esac
5422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5424$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425
5426# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5427# make sure we default having it set to "no": this is used by
5428# distutils.unixccompiler to know if it should add --enable-new-dtags
5429# to linker command lines, and failing to detect GNU ld simply results
5430# in the same bahaviour as before.
5431
Matthias Kloseb9621712010-04-24 17:59:49 +00005432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5433$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434ac_prog=ld
5435if test "$GCC" = yes; then
5436 ac_prog=`$CC -print-prog-name=ld`
5437fi
5438case `"$ac_prog" -V 2>&1 < /dev/null` in
5439 *GNU*)
5440 GNULD=yes;;
5441 *)
5442 GNULD=no;;
5443esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5445$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5448$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005449if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005450 $as_echo_n "(cached) " >&6
5451else
5452 ac_cv_c_inline=no
5453for ac_kw in inline __inline__ __inline; do
5454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5455/* end confdefs.h. */
5456#ifndef __cplusplus
5457typedef int foo_t;
5458static $ac_kw foo_t static_foo () {return 0; }
5459$ac_kw foo_t foo () {return 0; }
5460#endif
5461
5462_ACEOF
5463if ac_fn_c_try_compile "$LINENO"; then :
5464 ac_cv_c_inline=$ac_kw
5465fi
5466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5467 test "$ac_cv_c_inline" != no && break
5468done
5469
5470fi
5471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5472$as_echo "$ac_cv_c_inline" >&6; }
5473
5474case $ac_cv_c_inline in
5475 inline | yes) ;;
5476 *)
5477 case $ac_cv_c_inline in
5478 no) ac_val=;;
5479 *) ac_val=$ac_cv_c_inline;;
5480 esac
5481 cat >>confdefs.h <<_ACEOF
5482#ifndef __cplusplus
5483#define inline $ac_val
5484#endif
5485_ACEOF
5486 ;;
5487esac
5488
5489if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005490
5491$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005492
5493
5494fi
5495
5496
Matthias Kloseb9621712010-04-24 17:59:49 +00005497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5498$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005500if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501 enableval=$enable_shared;
5502fi
5503
5504
5505if test -z "$enable_shared"
5506then
5507 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005508 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509 enable_shared="yes";;
5510 *)
5511 enable_shared="no";;
5512 esac
5513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5515$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516
Matthias Kloseb9621712010-04-24 17:59:49 +00005517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5518$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005519# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005520if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005521 enableval=$enable_profiling;
5522fi
5523
5524if test "x$enable_profiling" = xyes; then
5525 ac_save_cc="$CC"
5526 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528/* end confdefs.h. */
5529int main() { return 0; }
5530_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005531if ac_fn_c_try_link "$LINENO"; then :
5532
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005534 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005535fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005536rm -f core conftest.err conftest.$ac_objext \
5537 conftest$ac_exeext conftest.$ac_ext
5538 CC="$ac_save_cc"
5539else
5540 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5543$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544
doko@ubuntu.comba015832012-06-30 16:52:05 +02005545if test "x$enable_profiling" = xyes; then
5546 BASECFLAGS="-pg $BASECFLAGS"
5547 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548fi
5549
Matthias Kloseb9621712010-04-24 17:59:49 +00005550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5551$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552
5553# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5554# library that we build, but we do not want to link against it (we
5555# will find it with a -framework option). For this reason there is an
5556# extra variable BLDLIBRARY against which Python and the extension
5557# modules are linked, BLDLIBRARY. This is normally the same as
5558# LDLIBRARY, but empty for MacOSX framework builds.
5559if test "$enable_framework"
5560then
5561 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5562 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5563 BLDLIBRARY=''
5564else
5565 BLDLIBRARY='$(LDLIBRARY)'
5566fi
5567
5568# Other platforms follow
5569if test $enable_shared = "yes"; then
5570
Matthias Kloseb9621712010-04-24 17:59:49 +00005571$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005572
5573 case $ac_sys_system in
5574 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005575 LDLIBRARY='libpython$(LDVERSION).dll.a'
5576 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005577 ;;
5578 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005579 LDLIBRARY='libpython$(LDVERSION).so'
5580 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5582 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005583 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005584 then
5585 PY3LIBRARY=libpython3.so
5586 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005588 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005589 LDLIBRARY='libpython$(LDVERSION).so'
5590 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5592 case $ac_sys_system in
5593 FreeBSD*)
5594 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5595 ;;
5596 esac
5597 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005598 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005599 then
5600 PY3LIBRARY=libpython3.so
5601 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602 ;;
5603 hp*|HP*)
5604 case `uname -m` in
5605 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005606 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 ;;
5608 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005609 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 ;;
5611 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005612 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5614 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005616 LDLIBRARY='libpython$(LDVERSION).dylib'
5617 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5619 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005620 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005621 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005622 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5623 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624
5625 esac
5626else # shared is disabled
5627 case $ac_sys_system in
5628 CYGWIN*)
5629 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631 ;;
5632 esac
5633fi
5634
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005635if test "$cross_compiling" = yes; then
5636 RUNSHARED=
5637fi
5638
Matthias Kloseb9621712010-04-24 17:59:49 +00005639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5640$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
5642if test -n "$ac_tool_prefix"; then
5643 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5644set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005647if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005648 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649else
5650 if test -n "$RANLIB"; then
5651 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5652else
5653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5654for as_dir in $PATH
5655do
5656 IFS=$as_save_IFS
5657 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 break 2
5663 fi
5664done
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666IFS=$as_save_IFS
5667
5668fi
5669fi
5670RANLIB=$ac_cv_prog_RANLIB
5671if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5673$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674else
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677fi
5678
5679
5680fi
5681if test -z "$ac_cv_prog_RANLIB"; then
5682 ac_ct_RANLIB=$RANLIB
5683 # Extract the first word of "ranlib", so it can be a program name with args.
5684set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5686$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005687if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689else
5690 if test -n "$ac_ct_RANLIB"; then
5691 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5692else
5693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5694for as_dir in $PATH
5695do
5696 IFS=$as_save_IFS
5697 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 break 2
5703 fi
5704done
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706IFS=$as_save_IFS
5707
5708fi
5709fi
5710ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5711if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5713$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714else
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5716$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717fi
5718
5719 if test "x$ac_ct_RANLIB" = x; then
5720 RANLIB=":"
5721 else
5722 case $cross_compiling:$ac_tool_warned in
5723yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726ac_tool_warned=yes ;;
5727esac
5728 RANLIB=$ac_ct_RANLIB
5729 fi
5730else
5731 RANLIB="$ac_cv_prog_RANLIB"
5732fi
5733
5734
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005735if test -n "$ac_tool_prefix"; then
5736 for ac_prog in ar aal
5737 do
5738 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5739set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5741$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005742if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744else
5745 if test -n "$AR"; then
5746 ac_cv_prog_AR="$AR" # Let the user override the test.
5747else
5748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5749for as_dir in $PATH
5750do
5751 IFS=$as_save_IFS
5752 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005755 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 break 2
5758 fi
5759done
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761IFS=$as_save_IFS
5762
5763fi
5764fi
5765AR=$ac_cv_prog_AR
5766if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5768$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769else
Matthias Kloseb9621712010-04-24 17:59:49 +00005770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772fi
5773
5774
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005775 test -n "$AR" && break
5776 done
5777fi
5778if test -z "$AR"; then
5779 ac_ct_AR=$AR
5780 for ac_prog in ar aal
5781do
5782 # Extract the first word of "$ac_prog", so it can be a program name with args.
5783set dummy $ac_prog; ac_word=$2
5784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5785$as_echo_n "checking for $ac_word... " >&6; }
5786if ${ac_cv_prog_ac_ct_AR+:} false; then :
5787 $as_echo_n "(cached) " >&6
5788else
5789 if test -n "$ac_ct_AR"; then
5790 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5791else
5792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5793for as_dir in $PATH
5794do
5795 IFS=$as_save_IFS
5796 test -z "$as_dir" && as_dir=.
5797 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005799 ac_cv_prog_ac_ct_AR="$ac_prog"
5800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5801 break 2
5802 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005804 done
5805IFS=$as_save_IFS
5806
5807fi
5808fi
5809ac_ct_AR=$ac_cv_prog_ac_ct_AR
5810if test -n "$ac_ct_AR"; then
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5812$as_echo "$ac_ct_AR" >&6; }
5813else
5814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5815$as_echo "no" >&6; }
5816fi
5817
5818
5819 test -n "$ac_ct_AR" && break
5820done
5821
5822 if test "x$ac_ct_AR" = x; then
5823 AR="ar"
5824 else
5825 case $cross_compiling:$ac_tool_warned in
5826yes:)
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5829ac_tool_warned=yes ;;
5830esac
5831 AR=$ac_ct_AR
5832 fi
5833fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834
5835
5836# tweak ARFLAGS only if the user didn't set it on the command line
5837
5838if test -z "$ARFLAGS"
5839then
5840 ARFLAGS="rc"
5841fi
5842
doko@ubuntu.com58844492012-06-30 18:25:32 +02005843if test -n "$ac_tool_prefix"; then
5844 for ac_prog in readelf
5845 do
5846 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5847set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5849$as_echo_n "checking for $ac_word... " >&6; }
5850if ${ac_cv_prog_READELF+:} false; then :
5851 $as_echo_n "(cached) " >&6
5852else
5853 if test -n "$READELF"; then
5854 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5855else
5856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859 IFS=$as_save_IFS
5860 test -z "$as_dir" && as_dir=.
5861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005863 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5865 break 2
5866 fi
5867done
5868 done
5869IFS=$as_save_IFS
5870
5871fi
5872fi
5873READELF=$ac_cv_prog_READELF
5874if test -n "$READELF"; then
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5876$as_echo "$READELF" >&6; }
5877else
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879$as_echo "no" >&6; }
5880fi
5881
5882
5883 test -n "$READELF" && break
5884 done
5885fi
5886if test -z "$READELF"; then
5887 ac_ct_READELF=$READELF
5888 for ac_prog in readelf
5889do
5890 # Extract the first word of "$ac_prog", so it can be a program name with args.
5891set dummy $ac_prog; ac_word=$2
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5893$as_echo_n "checking for $ac_word... " >&6; }
5894if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5895 $as_echo_n "(cached) " >&6
5896else
5897 if test -n "$ac_ct_READELF"; then
5898 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5899else
5900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5901for as_dir in $PATH
5902do
5903 IFS=$as_save_IFS
5904 test -z "$as_dir" && as_dir=.
5905 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005906 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005907 ac_cv_prog_ac_ct_READELF="$ac_prog"
5908 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5909 break 2
5910 fi
5911done
5912 done
5913IFS=$as_save_IFS
5914
5915fi
5916fi
5917ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5918if test -n "$ac_ct_READELF"; then
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5920$as_echo "$ac_ct_READELF" >&6; }
5921else
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5923$as_echo "no" >&6; }
5924fi
5925
5926
5927 test -n "$ac_ct_READELF" && break
5928done
5929
5930 if test "x$ac_ct_READELF" = x; then
5931 READELF=":"
5932 else
5933 case $cross_compiling:$ac_tool_warned in
5934yes:)
5935{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5936$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5937ac_tool_warned=yes ;;
5938esac
5939 READELF=$ac_ct_READELF
5940 fi
5941fi
5942
5943if test "$cross_compiling" = yes; then
5944 case "$READELF" in
5945 readelf|:)
5946 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5947 ;;
5948 esac
5949fi
5950
5951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952
Matthias Klosec4c48422012-10-21 23:05:35 +02005953for ac_prog in python$PACKAGE_VERSION python3 python
5954do
5955 # Extract the first word of "$ac_prog", so it can be a program name with args.
5956set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005959if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005960 $as_echo_n "(cached) " >&6
5961else
Matthias Klosec4c48422012-10-21 23:05:35 +02005962 if test -n "$PYTHON"; then
5963 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005964else
5965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968 IFS=$as_save_IFS
5969 test -z "$as_dir" && as_dir=.
5970 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005972 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5974 break 2
5975 fi
5976done
5977 done
5978IFS=$as_save_IFS
5979
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005980fi
5981fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005982PYTHON=$ac_cv_prog_PYTHON
5983if test -n "$PYTHON"; then
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5985$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005986else
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
5989fi
5990
5991
Matthias Klosec4c48422012-10-21 23:05:35 +02005992 test -n "$PYTHON" && break
5993done
5994test -n "$PYTHON" || PYTHON="not-found"
5995
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005996if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005997 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5998else
5999 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006000fi
6001
6002
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003case $MACHDEP in
6004bsdos*|hp*|HP*)
6005 # install -d does not work on BSDI or HP-UX
6006 if test -z "$INSTALL"
6007 then
6008 INSTALL="${srcdir}/install-sh -c"
6009 fi
6010esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011# Find a good install program. We prefer a C program (faster),
6012# so one script is as good as another. But avoid the broken or
6013# incompatible versions:
6014# SysV /etc/install, /usr/sbin/install
6015# SunOS /usr/etc/install
6016# IRIX /sbin/install
6017# AIX /bin/install
6018# AmigaOS /C/install, which installs bootblocks on floppy discs
6019# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6020# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6021# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6022# OS/2's system install, which has a completely different semantic
6023# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006024# Reject install programs that cannot install multiple files.
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6026$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006028if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030else
6031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034 IFS=$as_save_IFS
6035 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 # Account for people who put trailing slashes in PATH elements.
6037case $as_dir/ in #((
6038 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 /usr/ucb/* ) ;;
6042 *)
6043 # OSF1 and SCO ODT 3.0 have their own names for install.
6044 # Don't use installbsd from OSF since it installs stuff as root
6045 # by default.
6046 for ac_prog in ginstall scoinst install; do
6047 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006048 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049 if test $ac_prog = install &&
6050 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6051 # AIX install. It has an incompatible calling convention.
6052 :
6053 elif test $ac_prog = install &&
6054 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6055 # program-specific install script used by HP pwplus--don't use.
6056 :
6057 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006058 rm -rf conftest.one conftest.two conftest.dir
6059 echo one > conftest.one
6060 echo two > conftest.two
6061 mkdir conftest.dir
6062 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6063 test -s conftest.one && test -s conftest.two &&
6064 test -s conftest.dir/conftest.one &&
6065 test -s conftest.dir/conftest.two
6066 then
6067 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6068 break 3
6069 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070 fi
6071 fi
6072 done
6073 done
6074 ;;
6075esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006076
6077 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078IFS=$as_save_IFS
6079
Matthias Kloseb9621712010-04-24 17:59:49 +00006080rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081
6082fi
6083 if test "${ac_cv_path_install+set}" = set; then
6084 INSTALL=$ac_cv_path_install
6085 else
6086 # As a last resort, use the slow shell script. Don't cache a
6087 # value for INSTALL within a source directory, because that will
6088 # break other packages using the cache if that directory is
6089 # removed, or if the value is a relative name.
6090 INSTALL=$ac_install_sh
6091 fi
6092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6094$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095
6096# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6097# It thinks the first close brace ends the variable substitution.
6098test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6099
6100test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6101
6102test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6103
Matthias Klose93a0ef12012-03-15 18:08:34 +01006104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6105$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6106if test -z "$MKDIR_P"; then
6107 if ${ac_cv_path_mkdir+:} false; then :
6108 $as_echo_n "(cached) " >&6
6109else
6110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6111for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6112do
6113 IFS=$as_save_IFS
6114 test -z "$as_dir" && as_dir=.
6115 for ac_prog in mkdir gmkdir; do
6116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006117 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006118 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6119 'mkdir (GNU coreutils) '* | \
6120 'mkdir (coreutils) '* | \
6121 'mkdir (fileutils) '4.1*)
6122 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6123 break 3;;
6124 esac
6125 done
6126 done
6127 done
6128IFS=$as_save_IFS
6129
6130fi
6131
6132 test -d ./--version && rmdir ./--version
6133 if test "${ac_cv_path_mkdir+set}" = set; then
6134 MKDIR_P="$ac_cv_path_mkdir -p"
6135 else
6136 # As a last resort, use the slow shell script. Don't cache a
6137 # value for MKDIR_P within a source directory, because that will
6138 # break other packages using the cache if that directory is
6139 # removed, or if the value is a relative name.
6140 MKDIR_P="$ac_install_sh -d"
6141 fi
6142fi
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6144$as_echo "$MKDIR_P" >&6; }
6145
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146
6147# Not every filesystem supports hard links
6148
6149if test -z "$LN" ; then
6150 case $ac_sys_system in
6151 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152 *) LN=ln;;
6153 esac
6154fi
6155
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006156# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006157
6158ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006159
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6162$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163
6164# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006165if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166 withval=$with_pydebug;
6167if test "$withval" != no
6168then
6169
Matthias Kloseb9621712010-04-24 17:59:49 +00006170$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171
Matthias Kloseb9621712010-04-24 17:59:49 +00006172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6173$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006175 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006176else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6177$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178fi
6179else
Matthias Kloseb9621712010-04-24 17:59:49 +00006180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182fi
6183
6184
6185# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6186# merged with this chunk of code?
6187
6188# Optimizer/debugger flags
6189# ------------------------
6190# (The following bit of code is complicated enough - please keep things
6191# indented properly. Just pretend you're editing Python code. ;-)
6192
6193# There are two parallel sets of case statements below, one that checks to
6194# see if OPT was set and one that does BASECFLAGS setting based upon
6195# compiler and platform. BASECFLAGS tweaks need to be made even if the
6196# user set OPT.
6197
6198# tweak OPT based on compiler and platform, only if the user didn't set
6199# it on the command line
6200
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006201if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202then
6203 case $GCC in
6204 yes)
6205 if test "$CC" != 'g++' ; then
6206 STRICT_PROTO="-Wstrict-prototypes"
6207 fi
6208 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6209 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6210 WRAP="-fwrapv"
6211 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006212
6213 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006214 case $CC in
6215 *clang*) WRAP="-fwrapv"
6216 ;;
6217 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006218
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219 case $ac_cv_prog_cc_g in
6220 yes)
6221 if test "$Py_DEBUG" = 'true' ; then
6222 # Optimization messes up debuggers, so turn it off for
6223 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006224 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225 else
6226 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6227 fi
6228 ;;
6229 *)
6230 OPT="-O3 -Wall $STRICT_PROTO"
6231 ;;
6232 esac
6233 case $ac_sys_system in
6234 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6235 ;;
6236 esac
6237 ;;
6238
6239 *)
6240 OPT="-O"
6241 ;;
6242 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243fi
6244
6245
6246
6247# The -arch flags for universal builds on OSX
6248UNIVERSAL_ARCH_FLAGS=
6249
6250
6251# tweak BASECFLAGS based on compiler and platform
6252case $GCC in
6253yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006254 # Python doesn't violate C99 aliasing rules, but older versions of
6255 # GCC produce warnings for legal Python code. Enable
6256 # -fno-strict-aliasing on versions of GCC that support but produce
6257 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6259$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260 ac_save_cc="$CC"
6261 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006262 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006263 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006264 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006265else
Matthias Kloseb9621712010-04-24 17:59:49 +00006266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006268
Matthias Kloseb159a552010-04-25 21:00:44 +00006269
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006270int
6271main ()
6272{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006273
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006274 ;
6275 return 0;
6276}
Matthias Kloseb159a552010-04-25 21:00:44 +00006277
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006279if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006280
6281 CC="$ac_save_cc -fstrict-aliasing"
6282 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006284/* end confdefs.h. */
6285
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006286 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006287int
6288main ()
6289{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006290double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006291 ;
6292 return 0;
6293}
Matthias Kloseb159a552010-04-25 21:00:44 +00006294
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006296if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006297
6298 ac_cv_no_strict_aliasing=no
6299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300else
Matthias Kloseb159a552010-04-25 21:00:44 +00006301
6302 ac_cv_no_strict_aliasing=yes
6303
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006304fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006306
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006307else
Matthias Kloseb159a552010-04-25 21:00:44 +00006308
6309 ac_cv_no_strict_aliasing=no
6310
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006313fi
6314
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006315 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6318$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006319 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 then
6321 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6322 fi
6323
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6325$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6326 ac_save_cc="$CC"
6327 CC="$CC -Wunused-result -Werror"
6328 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006329 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006330 $as_echo_n "(cached) " >&6
6331else
6332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6333/* end confdefs.h. */
6334
6335
6336int
6337main ()
6338{
6339
6340 ;
6341 return 0;
6342}
6343
6344_ACEOF
6345if ac_fn_c_try_compile "$LINENO"; then :
6346
6347 ac_cv_disable_unused_result_warning=yes
6348
6349else
6350
6351 ac_cv_disable_unused_result_warning=no
6352
6353fi
6354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6355fi
6356
6357 CFLAGS="$save_CFLAGS"
6358 CC="$ac_save_cc"
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6360$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6361
6362 if test $ac_cv_disable_unused_result_warning = yes
6363 then
6364 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6365 fi
6366
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6368 # support. Without this, treatment of subnormals doesn't follow
6369 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006370 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 alpha*)
6372 BASECFLAGS="$BASECFLAGS -mieee"
6373 ;;
6374 esac
6375
6376 case $ac_sys_system in
6377 SCO_SV*)
6378 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6379 ;;
6380 # is there any other compiler on Darwin besides gcc?
6381 Darwin*)
6382 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6383 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006384 if test "${CC}" = gcc
6385 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6387$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006388 case "${UNIVERSALSDK}" in
6389 */MacOSX10.4u.sdk)
6390 # Build using 10.4 SDK, force usage of gcc when the
6391 # compiler is gcc, otherwise the user will get very
6392 # confusing error messages when building on OSX 10.6
6393 CC=gcc-4.0
6394 CPP=cpp-4.0
6395 ;;
6396 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6398$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006399 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400
6401
6402 if test "${enable_universalsdk}"; then
6403 UNIVERSAL_ARCH_FLAGS=""
6404 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6405 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6406 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006407 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6409 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006410 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006411 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412
6413 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6414 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006415 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006416 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006418 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6419 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006420 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006421 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006422
6423 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6424 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006425 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006426 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006427
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006429 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 +00006430
6431 fi
6432
6433
Ronald Oussoren666028b2010-04-18 19:07:43 +00006434 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6435 if test "${UNIVERSALSDK}" != "/"
6436 then
6437 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6438 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006439 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006440 fi
6441 fi
6442
6443 # Calculate the right deployment target for this build.
6444 #
6445 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006446 if test ${cur_target} '>' 10.2 && \
6447 test ${cur_target} '<' 10.6
6448 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006449 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006450 if test ${enable_universalsdk}; then
6451 if test "${UNIVERSAL_ARCHS}" = "all"; then
6452 # Ensure that the default platform for a
6453 # 4-way universal build is OSX 10.5,
6454 # that's the first OS release where
6455 # 4-way builds make sense.
6456 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006457
6458 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6459 cur_target='10.5'
6460
6461 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6462 cur_target='10.5'
6463
6464 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6465 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006466 fi
6467 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006468 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006469 # On Intel macs default to a deployment
6470 # target of 10.4, that's the first OSX
6471 # release with Intel support.
6472 cur_target="10.4"
6473 fi
6474 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006475 fi
6476 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6477
6478 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6479 # environment with a value that is the same as what we'll use
6480 # in the Makefile to ensure that we'll get the same compiler
6481 # environment during configure and build time.
6482 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6483 export MACOSX_DEPLOYMENT_TARGET
6484 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6485
6486 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006487 esac
6488 ;;
6489
6490*)
6491 case $ac_sys_system in
6492 OpenUNIX*|UnixWare*)
6493 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6494 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006495 SCO_SV*)
6496 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6497 ;;
6498 esac
6499 ;;
6500esac
6501
6502if test "$Py_DEBUG" = 'true'; then
6503 :
6504else
6505 OPT="-DNDEBUG $OPT"
6506fi
6507
6508if test "$ac_arch_flags"
6509then
6510 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6511fi
6512
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513# Check whether GCC supports PyArg_ParseTuple format
6514if test "$GCC" = "yes"
6515then
Matthias Kloseb9621712010-04-24 17:59:49 +00006516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6517$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006518 save_CFLAGS=$CFLAGS
6519 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006521/* end confdefs.h. */
6522
6523 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524int
6525main ()
6526{
6527
6528 ;
6529 return 0;
6530}
Matthias Kloseb159a552010-04-25 21:00:44 +00006531
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006533if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534
Matthias Kloseb159a552010-04-25 21:00:44 +00006535
Matthias Kloseb9621712010-04-24 17:59:49 +00006536$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006537
Matthias Kloseb159a552010-04-25 21:00:44 +00006538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006539$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541else
Matthias Kloseb159a552010-04-25 21:00:44 +00006542
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006544$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545
6546fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6548 CFLAGS=$save_CFLAGS
6549fi
6550
6551# On some compilers, pthreads are available without further options
6552# (e.g. MacOS X). On some of these systems, the compiler will not
6553# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6554# So we have to see first whether pthreads are available without
6555# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6557$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006558if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006559 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006560else
Matthias Kloseb9621712010-04-24 17:59:49 +00006561 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562 ac_cv_pthread_is_default=no
6563else
Matthias Kloseb9621712010-04-24 17:59:49 +00006564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565/* end confdefs.h. */
6566
Stefan Krah7dba5942012-11-22 22:49:11 +01006567#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568#include <pthread.h>
6569
6570void* routine(void* p){return NULL;}
6571
6572int main(){
6573 pthread_t p;
6574 if(pthread_create(&p,NULL,routine,NULL)!=0)
6575 return 1;
6576 (void)pthread_detach(p);
6577 return 0;
6578}
6579
6580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006581if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006582
6583 ac_cv_pthread_is_default=yes
6584 ac_cv_kthread=no
6585 ac_cv_pthread=no
6586
6587else
Matthias Kloseb9621712010-04-24 17:59:49 +00006588 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006592fi
6593
6594
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006595fi
6596
Matthias Kloseb9621712010-04-24 17:59:49 +00006597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6598$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006599
6600
6601if test $ac_cv_pthread_is_default = yes
6602then
6603 ac_cv_kpthread=no
6604else
6605# -Kpthread, if available, provides the right #defines
6606# and linker options to make pthread_create available
6607# Some compilers won't report that they do not support -Kpthread,
6608# so we need to run a program to see whether it really made the
6609# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6611$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006612if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006613 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006614else
6615 ac_save_cc="$CC"
6616CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006617if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618 ac_cv_kpthread=no
6619else
Matthias Kloseb9621712010-04-24 17:59:49 +00006620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006621/* end confdefs.h. */
6622
Stefan Krah7dba5942012-11-22 22:49:11 +01006623#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006624#include <pthread.h>
6625
6626void* routine(void* p){return NULL;}
6627
6628int main(){
6629 pthread_t p;
6630 if(pthread_create(&p,NULL,routine,NULL)!=0)
6631 return 1;
6632 (void)pthread_detach(p);
6633 return 0;
6634}
6635
6636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006637if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006638 ac_cv_kpthread=yes
6639else
Matthias Kloseb9621712010-04-24 17:59:49 +00006640 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644fi
6645
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006646CC="$ac_save_cc"
6647fi
6648
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6650$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651fi
6652
6653if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6654then
6655# -Kthread, if available, provides the right #defines
6656# and linker options to make pthread_create available
6657# Some compilers won't report that they do not support -Kthread,
6658# so we need to run a program to see whether it really made the
6659# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6661$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006662if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006663 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664else
6665 ac_save_cc="$CC"
6666CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006667if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006668 ac_cv_kthread=no
6669else
Matthias Kloseb9621712010-04-24 17:59:49 +00006670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006671/* end confdefs.h. */
6672
Stefan Krah7dba5942012-11-22 22:49:11 +01006673#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674#include <pthread.h>
6675
6676void* routine(void* p){return NULL;}
6677
6678int main(){
6679 pthread_t p;
6680 if(pthread_create(&p,NULL,routine,NULL)!=0)
6681 return 1;
6682 (void)pthread_detach(p);
6683 return 0;
6684}
6685
6686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006687if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688 ac_cv_kthread=yes
6689else
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6693 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694fi
6695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696CC="$ac_save_cc"
6697fi
6698
Matthias Kloseb9621712010-04-24 17:59:49 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6700$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006701fi
6702
6703if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6704then
6705# -pthread, if available, provides the right #defines
6706# and linker options to make pthread_create available
6707# Some compilers won't report that they do not support -pthread,
6708# so we need to run a program to see whether it really made the
6709# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6711$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006712if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714else
6715 ac_save_cc="$CC"
6716CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006717if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006718 ac_cv_pthread=no
6719else
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721/* end confdefs.h. */
6722
Stefan Krah7dba5942012-11-22 22:49:11 +01006723#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724#include <pthread.h>
6725
6726void* routine(void* p){return NULL;}
6727
6728int main(){
6729 pthread_t p;
6730 if(pthread_create(&p,NULL,routine,NULL)!=0)
6731 return 1;
6732 (void)pthread_detach(p);
6733 return 0;
6734}
6735
6736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006737if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 ac_cv_pthread=yes
6739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6743 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744fi
6745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746CC="$ac_save_cc"
6747fi
6748
Matthias Kloseb9621712010-04-24 17:59:49 +00006749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6750$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751fi
6752
6753# If we have set a CC compiler flag for thread support then
6754# check if it works for CXX, too.
6755ac_cv_cxx_thread=no
6756if test ! -z "$CXX"
6757then
Matthias Kloseb9621712010-04-24 17:59:49 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6759$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760ac_save_cxx="$CXX"
6761
6762if test "$ac_cv_kpthread" = "yes"
6763then
6764 CXX="$CXX -Kpthread"
6765 ac_cv_cxx_thread=yes
6766elif test "$ac_cv_kthread" = "yes"
6767then
6768 CXX="$CXX -Kthread"
6769 ac_cv_cxx_thread=yes
6770elif test "$ac_cv_pthread" = "yes"
6771then
6772 CXX="$CXX -pthread"
6773 ac_cv_cxx_thread=yes
6774fi
6775
6776if test $ac_cv_cxx_thread = yes
6777then
6778 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6779 $CXX -c conftest.$ac_ext 2>&5
6780 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6781 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6782 then
6783 ac_cv_cxx_thread=yes
6784 else
6785 ac_cv_cxx_thread=no
6786 fi
6787 rm -fr conftest*
6788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6790$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791fi
6792CXX="$ac_save_cxx"
6793
6794
6795# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6797$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006798if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006799 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800else
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006802/* end confdefs.h. */
6803#include <stdlib.h>
6804#include <stdarg.h>
6805#include <string.h>
6806#include <float.h>
6807
6808int
6809main ()
6810{
6811
6812 ;
6813 return 0;
6814}
6815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006816if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817 ac_cv_header_stdc=yes
6818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6822
6823if test $ac_cv_header_stdc = yes; then
6824 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826/* end confdefs.h. */
6827#include <string.h>
6828
6829_ACEOF
6830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 $EGREP "memchr" >/dev/null 2>&1; then :
6832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833else
6834 ac_cv_header_stdc=no
6835fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006836rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837
6838fi
6839
6840if test $ac_cv_header_stdc = yes; then
6841 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843/* end confdefs.h. */
6844#include <stdlib.h>
6845
6846_ACEOF
6847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 $EGREP "free" >/dev/null 2>&1; then :
6849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850else
6851 ac_cv_header_stdc=no
6852fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006853rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854
6855fi
6856
6857if test $ac_cv_header_stdc = yes; then
6858 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 :
6861else
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863/* end confdefs.h. */
6864#include <ctype.h>
6865#include <stdlib.h>
6866#if ((' ' & 0x0FF) == 0x020)
6867# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6868# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6869#else
6870# define ISLOWER(c) \
6871 (('a' <= (c) && (c) <= 'i') \
6872 || ('j' <= (c) && (c) <= 'r') \
6873 || ('s' <= (c) && (c) <= 'z'))
6874# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6875#endif
6876
6877#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6878int
6879main ()
6880{
6881 int i;
6882 for (i = 0; i < 256; i++)
6883 if (XOR (islower (i), ISLOWER (i))
6884 || toupper (i) != TOUPPER (i))
6885 return 2;
6886 return 0;
6887}
6888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006889if ac_fn_c_try_run "$LINENO"; then :
6890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891else
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896fi
6897
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006898fi
6899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6901$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902if test $ac_cv_header_stdc = yes; then
6903
Matthias Kloseb9621712010-04-24 17:59:49 +00006904$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905
6906fi
6907
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006908ac_save_cppflags="$CPPFLAGS"
6909CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006910for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006911fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006912ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006913sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006914unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006915poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006916sys/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 +01006917sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006918sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006919sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006920sys/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 -07006921libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006922bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006923do :
6924 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6925ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006926if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006927 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006928#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006929_ACEOF
6930
6931fi
6932
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933done
6934
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006935CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006936ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006937for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6940$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006941if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006943else
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006945/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006946#include <sys/types.h>
6947#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006948
Martin v. Löwis11437992002-04-12 09:54:03 +00006949int
6950main ()
6951{
6952if ((DIR *) 0)
6953return 0;
6954 ;
6955 return 0;
6956}
6957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006960else
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006965eval ac_res=\$$as_ac_Header
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6967$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006968if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006970#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006971_ACEOF
6972
6973ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006974fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006975
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006976done
6977# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6978if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6980$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006981if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983else
Martin v. Löwis11437992002-04-12 09:54:03 +00006984 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006988/* Override any GCC internal prototype to avoid an error.
6989 Use char because int might match the return type of a GCC
6990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006991#ifdef __cplusplus
6992extern "C"
6993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006994char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006995int
6996main ()
6997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006999 ;
7000 return 0;
7001}
7002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007003for ac_lib in '' dir; do
7004 if test -z "$ac_lib"; then
7005 ac_res="none required"
7006 else
7007 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007008 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007009 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007010 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007013rm -f core conftest.err conftest.$ac_objext \
7014 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007015 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007016 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018done
Victor Stinnere0be4232011-10-25 13:06:09 +02007019if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007021else
7022 ac_cv_search_opendir=no
7023fi
7024rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007025LIBS=$ac_func_search_save_LIBS
7026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7028$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007030if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007032
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007033fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007034
Michael W. Hudson54241132001-12-07 15:38:26 +00007035else
Matthias Kloseb9621712010-04-24 17:59:49 +00007036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7037$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007038if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007039 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007040else
7041 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007045/* Override any GCC internal prototype to avoid an error.
7046 Use char because int might match the return type of a GCC
7047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007048#ifdef __cplusplus
7049extern "C"
7050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007051char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007052int
7053main ()
7054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007056 ;
7057 return 0;
7058}
7059_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060for ac_lib in '' x; do
7061 if test -z "$ac_lib"; then
7062 ac_res="none required"
7063 else
7064 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007065 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007070rm -f core conftest.err conftest.$ac_objext \
7071 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007072 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075done
Victor Stinnere0be4232011-10-25 13:06:09 +02007076if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078else
7079 ac_cv_search_opendir=no
7080fi
7081rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007082LIBS=$ac_func_search_save_LIBS
7083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7085$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007087if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007088 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007090fi
7091
7092fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007093
Matthias Kloseb9621712010-04-24 17:59:49 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7095$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007096if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007097 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007098else
Matthias Kloseb9621712010-04-24 17:59:49 +00007099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007100/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007101#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007102int
7103main ()
7104{
7105return makedev(0, 0);
7106 ;
7107 return 0;
7108}
7109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007111 ac_cv_header_sys_types_h_makedev=yes
7112else
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007115rm -f core conftest.err conftest.$ac_objext \
7116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007117
7118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7120$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007121
7122if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007123ac_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 +02007124if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007125
Matthias Kloseb9621712010-04-24 17:59:49 +00007126$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007127
7128fi
7129
7130
7131
7132 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007133 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 +02007134if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007135
Matthias Kloseb9621712010-04-24 17:59:49 +00007136$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007137
7138fi
7139
7140
7141 fi
7142fi
7143
Michael W. Hudson54241132001-12-07 15:38:26 +00007144
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007145# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7146for ac_header in net/if.h
7147do :
7148 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7149#ifdef STDC_HEADERS
7150# include <stdlib.h>
7151# include <stddef.h>
7152#else
7153# ifdef HAVE_STDLIB_H
7154# include <stdlib.h>
7155# endif
7156#endif
7157#ifdef HAVE_SYS_SOCKET_H
7158# include <sys/socket.h>
7159#endif
7160
7161"
Victor Stinnere0be4232011-10-25 13:06:09 +02007162if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007163 cat >>confdefs.h <<_ACEOF
7164#define HAVE_NET_IF_H 1
7165_ACEOF
7166
7167fi
7168
7169done
7170
7171
7172
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007173# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007174for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007175do :
7176 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007177#ifdef HAVE_CURSES_H
7178#include <curses.h>
7179#endif
7180
Matthias Kloseb9621712010-04-24 17:59:49 +00007181"
Victor Stinnere0be4232011-10-25 13:06:09 +02007182if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007183 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007184#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007185_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007186
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007187fi
7188
7189done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007190
7191
Martin v. Löwis11017b12006-01-14 18:12:57 +00007192# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007193for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007194do :
7195 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 +00007196#ifdef HAVE_ASM_TYPES_H
7197#include <asm/types.h>
7198#endif
7199#ifdef HAVE_SYS_SOCKET_H
7200#include <sys/socket.h>
7201#endif
7202
Matthias Kloseb9621712010-04-24 17:59:49 +00007203"
Victor Stinnere0be4232011-10-25 13:06:09 +02007204if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007205 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007206#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007207_ACEOF
7208
7209fi
7210
7211done
7212
7213
Charles-François Natali47413c12011-10-06 19:47:44 +02007214# On Linux, can.h and can/raw.h require sys/socket.h
7215for ac_header in linux/can.h linux/can/raw.h
7216do :
7217 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7218ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7219#ifdef HAVE_SYS_SOCKET_H
7220#include <sys/socket.h>
7221#endif
7222
7223"
7224if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7225 cat >>confdefs.h <<_ACEOF
7226#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7227_ACEOF
7228
7229fi
7230
7231done
7232
7233
Guido van Rossum627b2d71993-12-24 10:39:16 +00007234# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007235was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7237$as_echo_n "checking for clock_t in time.h... " >&6; }
7238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007239/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007240#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007241
7242_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007245 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007246else
Martin v. Löwis11437992002-04-12 09:54:03 +00007247
7248
Matthias Kloseb9621712010-04-24 17:59:49 +00007249$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007250
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007251
Guido van Rossum627b2d71993-12-24 10:39:16 +00007252fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007253rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007254
Matthias Kloseb9621712010-04-24 17:59:49 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7256$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7259$as_echo_n "checking for makedev... " >&6; }
7260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007261/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007262
Jesus Cea740f53a2010-04-28 11:35:30 +00007263#if defined(MAJOR_IN_MKDEV)
7264#include <sys/mkdev.h>
7265#elif defined(MAJOR_IN_SYSMACROS)
7266#include <sys/sysmacros.h>
7267#else
7268#include <sys/types.h>
7269#endif
7270
Neal Norwitz11690112002-07-30 01:08:28 +00007271int
7272main ()
7273{
Jesus Cea740f53a2010-04-28 11:35:30 +00007274
7275 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007276 ;
7277 return 0;
7278}
Matthias Kloseb159a552010-04-25 21:00:44 +00007279
Neal Norwitz11690112002-07-30 01:08:28 +00007280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007281if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007282 ac_cv_has_makedev=yes
7283else
Matthias Kloseb9621712010-04-24 17:59:49 +00007284 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286rm -f core conftest.err conftest.$ac_objext \
7287 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7289$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007290if test "$ac_cv_has_makedev" = "yes"; then
7291
Matthias Kloseb9621712010-04-24 17:59:49 +00007292$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007293
7294fi
7295
Martin v. Löwis399a6892002-10-04 10:22:02 +00007296# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7297# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7298# defined, but the compiler does not support pragma redefine_extname,
7299# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7300# structures (such as rlimit64) without declaring them. As a
7301# work-around, disable LFS on such configurations
7302
7303use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7305$as_echo_n "checking Solaris LFS bug... " >&6; }
7306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007307/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007308
7309#define _LARGEFILE_SOURCE 1
7310#define _FILE_OFFSET_BITS 64
7311#include <sys/resource.h>
7312
Martin v. Löwis399a6892002-10-04 10:22:02 +00007313int
7314main ()
7315{
7316struct rlimit foo;
7317 ;
7318 return 0;
7319}
7320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007322 sol_lfs_bug=no
7323else
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7328$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007329if test "$sol_lfs_bug" = "yes"; then
7330 use_lfs=no
7331fi
7332
7333if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007334# Two defines needed to enable largefile support on various platforms
7335# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007336case $ac_sys_system/$ac_sys_release in
7337AIX*)
7338
7339$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7340
7341 ;;
7342esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007345
7346
Matthias Kloseb9621712010-04-24 17:59:49 +00007347$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007348
Martin v. Löwis399a6892002-10-04 10:22:02 +00007349fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007350
Guido van Rossum84e7b241996-08-19 21:59:00 +00007351# Add some code to confdefs.h so that the test for off_t works on SCO
7352cat >> confdefs.h <<\EOF
7353#if defined(SCO_DS)
7354#undef _OFF_T
7355#endif
7356EOF
7357
Guido van Rossumef2255b2000-03-10 22:30:29 +00007358# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007359ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007360if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007361
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007362else
Martin v. Löwis11437992002-04-12 09:54:03 +00007363
7364cat >>confdefs.h <<_ACEOF
7365#define mode_t int
7366_ACEOF
7367
7368fi
7369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007371if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007373else
Martin v. Löwis11437992002-04-12 09:54:03 +00007374
7375cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007376#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007377_ACEOF
7378
7379fi
7380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007382if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007384else
Martin v. Löwis11437992002-04-12 09:54:03 +00007385
7386cat >>confdefs.h <<_ACEOF
7387#define pid_t int
7388_ACEOF
7389
7390fi
7391
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007392
Martin v. Löwis11437992002-04-12 09:54:03 +00007393cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007394#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007395_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007398if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007399
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007400else
Martin v. Löwis11437992002-04-12 09:54:03 +00007401
7402cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007403#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007404_ACEOF
7405
7406fi
7407
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7409$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007410if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007412else
Matthias Kloseb9621712010-04-24 17:59:49 +00007413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007415#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007416
7417_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007419 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007420 ac_cv_type_uid_t=yes
7421else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007422 ac_cv_type_uid_t=no
7423fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007424rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7428$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007429if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007430
Matthias Kloseb9621712010-04-24 17:59:49 +00007431$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007432
7433
Matthias Kloseb9621712010-04-24 17:59:49 +00007434$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007435
7436fi
7437
Mark Dickinson983bc162012-12-02 12:11:38 +00007438
7439# There are two separate checks for each of the exact-width integer types we
7440# need. First we check whether the type is available using the usual
7441# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7442# and <stdint.h> where available). We then also use the special type checks of
7443# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7444# directly, #define's uint32_t to be a suitable type.
7445
7446ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7447if test "x$ac_cv_type_uint32_t" = xyes; then :
7448
7449$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7450
7451fi
7452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7454case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007455 no|yes) ;; #(
7456 *)
7457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007459
7460
7461cat >>confdefs.h <<_ACEOF
7462#define uint32_t $ac_cv_c_uint32_t
7463_ACEOF
7464;;
7465 esac
7466
Mark Dickinson983bc162012-12-02 12:11:38 +00007467
7468ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7469if test "x$ac_cv_type_uint64_t" = xyes; then :
7470
7471$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7472
7473fi
7474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7476case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007477 no|yes) ;; #(
7478 *)
7479
Matthias Kloseb9621712010-04-24 17:59:49 +00007480$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007481
7482
7483cat >>confdefs.h <<_ACEOF
7484#define uint64_t $ac_cv_c_uint64_t
7485_ACEOF
7486;;
7487 esac
7488
Mark Dickinson983bc162012-12-02 12:11:38 +00007489
7490ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7491if test "x$ac_cv_type_int32_t" = xyes; then :
7492
7493$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7494
7495fi
7496
Matthias Kloseb9621712010-04-24 17:59:49 +00007497ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7498case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007499 no|yes) ;; #(
7500 *)
7501
7502cat >>confdefs.h <<_ACEOF
7503#define int32_t $ac_cv_c_int32_t
7504_ACEOF
7505;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007506esac
7507
Mark Dickinson983bc162012-12-02 12:11:38 +00007508
7509ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7510if test "x$ac_cv_type_int64_t" = xyes; then :
7511
7512$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7513
7514fi
7515
Matthias Kloseb9621712010-04-24 17:59:49 +00007516ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7517case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007518 no|yes) ;; #(
7519 *)
7520
7521cat >>confdefs.h <<_ACEOF
7522#define int64_t $ac_cv_c_int64_t
7523_ACEOF
7524;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007525esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007526
Mark Dickinson983bc162012-12-02 12:11:38 +00007527
Matthias Kloseb9621712010-04-24 17:59:49 +00007528ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007529if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530
Matthias Kloseb9621712010-04-24 17:59:49 +00007531$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007532
7533fi
7534
Stefan Krah1919b7e2012-03-21 18:25:23 +01007535ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7536if test "x$ac_cv_type___uint128_t" = xyes; then :
7537
7538$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7539
7540fi
7541
Jack Jansendd19cf82001-12-06 22:36:17 +00007542
Michael W. Hudson54241132001-12-07 15:38:26 +00007543# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007544# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007545# The cast to long int works around a bug in the HP C Compiler
7546# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7547# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7548# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7550$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007551if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 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 +00007555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 if test "$ac_cv_type_int" = yes; then
7558 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7559$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007560as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007561See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007562 else
7563 ac_cv_sizeof_int=0
7564 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007566
Martin v. Löwis11437992002-04-12 09:54:03 +00007567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7569$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007570
7571
7572
Martin v. Löwis11437992002-04-12 09:54:03 +00007573cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007574#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007575_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007576
7577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007578# The cast to long int works around a bug in the HP C Compiler
7579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7581# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7583$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007584if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007586else
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 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 +00007588
Martin v. Löwis11437992002-04-12 09:54:03 +00007589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 if test "$ac_cv_type_long" = yes; then
7591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007593as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007594See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595 else
7596 ac_cv_sizeof_long=0
7597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007599
Martin v. Löwis11437992002-04-12 09:54:03 +00007600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7602$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603
7604
7605
Martin v. Löwis11437992002-04-12 09:54:03 +00007606cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007607#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007608_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007609
7610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611# The cast to long int works around a bug in the HP C Compiler
7612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7614# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7616$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007617if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007619else
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 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 +00007621
Martin v. Löwis11437992002-04-12 09:54:03 +00007622else
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 if test "$ac_cv_type_void_p" = yes; then
7624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007626as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007627See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628 else
7629 ac_cv_sizeof_void_p=0
7630 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007632
Martin v. Löwis11437992002-04-12 09:54:03 +00007633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7635$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636
7637
7638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007640#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007641_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007642
7643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007644# The cast to long int works around a bug in the HP C Compiler
7645# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7646# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7647# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7649$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007650if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007652else
Matthias Kloseb9621712010-04-24 17:59:49 +00007653 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 +00007654
Martin v. Löwis11437992002-04-12 09:54:03 +00007655else
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 if test "$ac_cv_type_short" = yes; then
7657 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007659as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007660See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661 else
7662 ac_cv_sizeof_short=0
7663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007665
Martin v. Löwis11437992002-04-12 09:54:03 +00007666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7668$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669
7670
7671
Martin v. Löwis11437992002-04-12 09:54:03 +00007672cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007673#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007674_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007675
7676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677# The cast to long int works around a bug in the HP C Compiler
7678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7680# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7682$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007683if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007685else
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 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 +00007687
Martin v. Löwis11437992002-04-12 09:54:03 +00007688else
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 if test "$ac_cv_type_float" = yes; then
7690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007692as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007693See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007694 else
7695 ac_cv_sizeof_float=0
7696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007698
Martin v. Löwis11437992002-04-12 09:54:03 +00007699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7701$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702
7703
7704
Martin v. Löwis11437992002-04-12 09:54:03 +00007705cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007706#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007707_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007708
7709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710# The cast to long int works around a bug in the HP C Compiler
7711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7713# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7715$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007716if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007717 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007718else
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 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 +00007720
Martin v. Löwis11437992002-04-12 09:54:03 +00007721else
Matthias Kloseb9621712010-04-24 17:59:49 +00007722 if test "$ac_cv_type_double" = yes; then
7723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007725as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007726See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727 else
7728 ac_cv_sizeof_double=0
7729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007731
Martin v. Löwis11437992002-04-12 09:54:03 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7734$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735
7736
7737
Martin v. Löwis11437992002-04-12 09:54:03 +00007738cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007739#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007740_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007741
7742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743# The cast to long int works around a bug in the HP C Compiler
7744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7746# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7748$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007749if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007750 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007751else
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 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 +00007753
Martin v. Löwis11437992002-04-12 09:54:03 +00007754else
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 if test "$ac_cv_type_fpos_t" = yes; then
7756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007758as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007759See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760 else
7761 ac_cv_sizeof_fpos_t=0
7762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764
Martin v. Löwis11437992002-04-12 09:54:03 +00007765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7767$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768
7769
7770
Martin v. Löwis11437992002-04-12 09:54:03 +00007771cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007772#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007773_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007774
Michael W. Hudson54241132001-12-07 15:38:26 +00007775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776# The cast to long int works around a bug in the HP C Compiler
7777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7779# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7781$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007782if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 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 +00007786
Martin v. Löwis18e16552006-02-15 17:27:45 +00007787else
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 if test "$ac_cv_type_size_t" = yes; then
7789 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007791as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007792See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793 else
7794 ac_cv_sizeof_size_t=0
7795 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797
Martin v. Löwis18e16552006-02-15 17:27:45 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7800$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801
7802
7803
Martin v. Löwis18e16552006-02-15 17:27:45 +00007804cat >>confdefs.h <<_ACEOF
7805#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7806_ACEOF
7807
7808
Christian Heimes400adb02008-02-01 08:12:03 +00007809# The cast to long int works around a bug in the HP C Compiler
7810# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7811# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7812# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7814$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007815if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007816 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007817else
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 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 +00007819
Christian Heimes400adb02008-02-01 08:12:03 +00007820else
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 if test "$ac_cv_type_pid_t" = yes; then
7822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007824as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007825See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007826 else
7827 ac_cv_sizeof_pid_t=0
7828 fi
7829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007830
Christian Heimes400adb02008-02-01 08:12:03 +00007831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7833$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007834
7835
7836
7837cat >>confdefs.h <<_ACEOF
7838#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7839_ACEOF
7840
7841
Michael W. Hudson54241132001-12-07 15:38:26 +00007842
Matthias Kloseb9621712010-04-24 17:59:49 +00007843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7844$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007845have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007847/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
7851{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007852long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 ;
7854 return 0;
7855}
7856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
7859
Matthias Kloseb9621712010-04-24 17:59:49 +00007860$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007861
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007862 have_long_long=yes
7863
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7867$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007868if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869# The cast to long int works around a bug in the HP C Compiler
7870# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7871# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7872# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7874$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007875if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007877else
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 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 +00007879
Martin v. Löwis11437992002-04-12 09:54:03 +00007880else
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 if test "$ac_cv_type_long_long" = yes; then
7882 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007884as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007885See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886 else
7887 ac_cv_sizeof_long_long=0
7888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890
Martin v. Löwis11437992002-04-12 09:54:03 +00007891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7893$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894
7895
7896
Martin v. Löwis11437992002-04-12 09:54:03 +00007897cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007898#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007899_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007900
Michael W. Hudson54241132001-12-07 15:38:26 +00007901
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007902fi
7903
Matthias Kloseb9621712010-04-24 17:59:49 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7905$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007906have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007908/* end confdefs.h. */
7909
7910int
7911main ()
7912{
7913long double x; x = (long double)0;
7914 ;
7915 return 0;
7916}
7917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007918if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007919
7920
Matthias Kloseb9621712010-04-24 17:59:49 +00007921$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007922
7923 have_long_double=yes
7924
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007925fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7928$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007929if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007930# The cast to long int works around a bug in the HP C Compiler
7931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7935$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007936if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007938else
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 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 +00007940
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007941else
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 if test "$ac_cv_type_long_double" = yes; then
7943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007945as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007946See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007947 else
7948 ac_cv_sizeof_long_double=0
7949 fi
7950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7954$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007955
7956
7957
7958cat >>confdefs.h <<_ACEOF
7959#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7960_ACEOF
7961
7962
7963fi
7964
7965
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7967$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007968have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007970/* end confdefs.h. */
7971
7972int
7973main ()
7974{
7975_Bool x; x = (_Bool)0;
7976 ;
7977 return 0;
7978}
7979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007980if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007981
7982
Matthias Kloseb9621712010-04-24 17:59:49 +00007983$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007984
7985 have_c99_bool=yes
7986
Thomas Woutersb2137042007-02-01 18:02:27 +00007987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7990$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007991if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992# The cast to long int works around a bug in the HP C Compiler
7993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7995# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7997$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007998if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 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 +00008002
Thomas Woutersb2137042007-02-01 18:02:27 +00008003else
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 if test "$ac_cv_type__Bool" = yes; then
8005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008007as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008008See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009 else
8010 ac_cv_sizeof__Bool=0
8011 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013
Thomas Woutersb2137042007-02-01 18:02:27 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8016$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017
8018
8019
Thomas Woutersb2137042007-02-01 18:02:27 +00008020cat >>confdefs.h <<_ACEOF
8021#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8022_ACEOF
8023
8024
8025fi
8026
Matthias Kloseb9621712010-04-24 17:59:49 +00008027ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008028 #include <stdint.h>
8029 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008030 #ifdef HAVE_INTTYPES_H
8031 #include <inttypes.h>
8032 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008033"
Victor Stinnere0be4232011-10-25 13:06:09 +02008034if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008035
8036cat >>confdefs.h <<_ACEOF
8037#define HAVE_UINTPTR_T 1
8038_ACEOF
8039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040# The cast to long int works around a bug in the HP C Compiler
8041# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8042# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8043# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8045$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008046if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008048else
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 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 +00008050
Martin v. Löwis11437992002-04-12 09:54:03 +00008051else
Matthias Kloseb9621712010-04-24 17:59:49 +00008052 if test "$ac_cv_type_uintptr_t" = yes; then
8053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008055as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008056See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 else
8058 ac_cv_sizeof_uintptr_t=0
8059 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008061
Martin v. Löwis11437992002-04-12 09:54:03 +00008062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8064$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065
8066
8067
Martin v. Löwis11437992002-04-12 09:54:03 +00008068cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008069#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008070_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008071
Michael W. Hudson54241132001-12-07 15:38:26 +00008072
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008073fi
8074
Thomas Wouters89f507f2006-12-13 04:49:30 +00008075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008076# The cast to long int works around a bug in the HP C Compiler
8077# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8078# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8079# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8081$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008082if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008084else
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008086#ifdef HAVE_SYS_TYPES_H
8087#include <sys/types.h>
8088#endif
8089
Matthias Kloseb9621712010-04-24 17:59:49 +00008090"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008091
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008092else
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 if test "$ac_cv_type_off_t" = yes; then
8094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008096as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008097See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008098 else
8099 ac_cv_sizeof_off_t=0
8100 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008102
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8105$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008107
8108
Martin v. Löwis11437992002-04-12 09:54:03 +00008109cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008110#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008111_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008112
Michael W. Hudson54241132001-12-07 15:38:26 +00008113
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8116$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008117if test "$have_long_long" = yes
8118then
8119if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008120 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8125$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008126else
Matthias Kloseb9621712010-04-24 17:59:49 +00008127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008129fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8132$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008133fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008135# The cast to long int works around a bug in the HP C Compiler
8136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8138# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8140$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008141if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008143else
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008145#ifdef HAVE_SYS_TYPES_H
8146#include <sys/types.h>
8147#endif
8148#ifdef HAVE_TIME_H
8149#include <time.h>
8150#endif
8151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008154else
Matthias Kloseb9621712010-04-24 17:59:49 +00008155 if test "$ac_cv_type_time_t" = yes; then
8156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008158as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008159See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008160 else
8161 ac_cv_sizeof_time_t=0
8162 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008164
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8167$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169
8170
Martin v. Löwis11437992002-04-12 09:54:03 +00008171cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008172#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008173_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008174
Michael W. Hudson54241132001-12-07 15:38:26 +00008175
8176
Trent Mick635f6fb2000-08-23 21:33:05 +00008177# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008178ac_save_cc="$CC"
8179if test "$ac_cv_kpthread" = "yes"
8180then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008181elif test "$ac_cv_kthread" = "yes"
8182then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008183elif test "$ac_cv_pthread" = "yes"
8184then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008185fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8188$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008189have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008191/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008192
8193 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008194int
8195main ()
8196{
Guido van Rossum12580492000-09-24 16:47:19 +00008197pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008198 ;
8199 return 0;
8200}
Matthias Kloseb159a552010-04-25 21:00:44 +00008201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008203if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008204 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8208$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008209if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008210 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8213# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8215$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008216if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008218else
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008220#ifdef HAVE_PTHREAD_H
8221#include <pthread.h>
8222#endif
8223
Matthias Kloseb9621712010-04-24 17:59:49 +00008224"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 if test "$ac_cv_type_pthread_t" = yes; then
8228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008230as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008231See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008232 else
8233 ac_cv_sizeof_pthread_t=0
8234 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008236
Trent Mick635f6fb2000-08-23 21:33:05 +00008237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8239$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008241
8242
Martin v. Löwis11437992002-04-12 09:54:03 +00008243cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008244#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008245_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008247
Trent Mick635f6fb2000-08-23 21:33:05 +00008248fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008249CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008250
Michael W. Hudson54241132001-12-07 15:38:26 +00008251
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008252case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008253 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008254 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8255 ;;
8256 Darwin/*)
8257 OTHER_LIBTOOL_OPT=""
8258 ;;
8259esac
8260
8261
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008262ARCH_RUN_32BIT=""
8263
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008264case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008265 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008266 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8267 if test "${enable_universalsdk}"; then
8268 :
8269 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008270 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008271 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008272 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008274 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008275 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008276 if test ${gcc_version} '<' 4.0
8277 then
8278 LIBTOOL_CRUFT="-lcc_dynamic"
8279 else
8280 LIBTOOL_CRUFT=""
8281 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008283 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008286/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008287
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008288 #include <unistd.h>
8289 int main(int argc, char*argv[])
8290 {
8291 if (sizeof(long) == 4) {
8292 return 0;
8293 } else {
8294 return 1;
8295 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008296 }
8297
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008299if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008300 ac_osx_32bit=yes
8301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008306fi
8307
8308
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008309 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008310 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008311 i386)
8312 MACOSX_DEFAULT_ARCH="i386"
8313 ;;
8314 ppc)
8315 MACOSX_DEFAULT_ARCH="ppc"
8316 ;;
8317 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008318 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008319 ;;
8320 esac
8321 else
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="x86_64"
8325 ;;
8326 ppc)
8327 MACOSX_DEFAULT_ARCH="ppc64"
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
8334 #ARCH_RUN_32BIT="true"
8335 fi
8336
8337 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008338 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008340esac
8341
Matthias Kloseb9621712010-04-24 17:59:49 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8343$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008344if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008345then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008346 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008347 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008348 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8353$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008354 if test $enable_shared = "yes"
8355 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008356 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 +00008357 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008358else
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8360$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008361fi
8362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8364$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008365case $ac_sys_system/$ac_sys_release in
8366 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8371$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008372 ;;
8373 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8375$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008376 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008377esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008378
Guido van Rossum0a516c91994-09-12 10:58:40 +00008379# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008380
Michael W. Hudson54241132001-12-07 15:38:26 +00008381
8382
8383
8384
Benjamin Peterson99f03762010-04-11 22:15:28 +00008385
Thomas Wouters477c8d52006-05-27 19:21:47 +00008386
Guido van Rossum0a516c91994-09-12 10:58:40 +00008387# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008388# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008389# (Shared libraries in this instance are shared modules to be loaded into
8390# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8392$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008393if test -z "$LDSHARED"
8394then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008395 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008396 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008397 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008398 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008399 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008400 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008401 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008403 if test "$GCC" = "yes" ; then
8404 LDSHARED='$(CC) -shared'
8405 LDCXXSHARED='$(CXX) -shared'
8406 else
8407 LDSHARED='$(CC) -G'
8408 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008409 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008410 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008411 if test "$GCC" = "yes" ; then
8412 LDSHARED='$(CC) -shared'
8413 LDCXXSHARED='$(CXX) -shared'
8414 else
8415 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008416 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008417 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008418 LDSHARED='$(CC) -bundle'
8419 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008420 if test "$enable_framework" ; then
8421 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008422 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8423 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008424 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008425 else
8426 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008427 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008428 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008429 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008430 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008431 LDSHARED='$(CC) -bundle'
8432 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008433 if test "$enable_framework" ; then
8434 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008435 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8436 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008437 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008438 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008439 # No framework, use the Python app as bundle-loader
8440 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008441 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008442 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008443 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008444 Darwin/*)
8445 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8446 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008447
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008448 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008449 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008450 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008451 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008452 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008453 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8454 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008455 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008456 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008457 LDSHARED='$(CC) -bundle'
8458 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008459 if test "$enable_framework" ; then
8460 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008461 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8462 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008463 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008464 else
8465 # No framework, use the Python app as bundle-loader
8466 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8467 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008468 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008469 fi
8470 fi
8471 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008472 Linux*|GNU*|QNX*)
8473 LDSHARED='$(CC) -shared'
8474 LDCXXSHARED='$(CXX) -shared';;
8475 BSD/OS*/4*)
8476 LDSHARED="gcc -shared"
8477 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008478 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008479 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008480 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008481 LDSHARED='$(CC) -shared'
8482 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008483 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008484 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008485 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008486 OpenBSD*)
8487 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8488 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008489 LDSHARED='$(CC) -shared $(CCSHARED)'
8490 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008491 else
8492 case `uname -r` in
8493 [01].* | 2.[0-7] | 2.[0-7].*)
8494 LDSHARED="ld -Bshareable ${LDFLAGS}"
8495 ;;
8496 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008497 LDSHARED='$(CC) -shared $(CCSHARED)'
8498 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008499 ;;
8500 esac
8501 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008502 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008503 LDSHARED='$(CC) -shared'
8504 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008505 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008506 if test "$GCC" = "yes" ; then
8507 LDSHARED='$(CC) -shared'
8508 LDCXXSHARED='$(CXX) -shared'
8509 else
8510 LDSHARED='$(CC) -G'
8511 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008512 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008513 SCO_SV*)
8514 LDSHARED='$(CC) -Wl,-G,-Bexport'
8515 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8516 CYGWIN*)
8517 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8518 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008519 *) LDSHARED="ld";;
8520 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8523$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008524LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008525BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008526# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008527# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8529$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008530if test -z "$CCSHARED"
8531then
Guido van Rossum07397971997-04-29 21:49:50 +00008532 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008533 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008534 then CCSHARED="-fPIC";
8535 elif test `uname -p` = sparc;
8536 then CCSHARED="-xcode=pic32";
8537 else CCSHARED="-Kpic";
8538 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008539 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008540 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008541 else CCSHARED="+z";
8542 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008543 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008544 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008545 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008546 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008547 if test "$GCC" = "yes"
8548 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008549 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008550 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008551 SCO_SV*)
8552 if test "$GCC" = "yes"
8553 then CCSHARED="-fPIC"
8554 else CCSHARED="-Kpic -belf"
8555 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008556 IRIX*/6*) case $CC in
8557 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008558 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008559 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008560 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8563$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008564# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008565# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8567$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008568if test -z "$LINKFORSHARED"
8569then
Guido van Rossum07397971997-04-29 21:49:50 +00008570 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008571 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008572 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008573 LINKFORSHARED="-Wl,-E -Wl,+s";;
8574# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008575 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008576 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008577 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008579 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008580 if test "$enable_framework"
8581 then
Jack Jansenda49e192005-01-07 13:08:22 +00008582 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008583 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008584 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008585 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008586 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008587 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008588 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008589 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8590 then
8591 LINKFORSHARED="-Wl,--export-dynamic"
8592 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008593 SunOS/5*) case $CC in
8594 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008595 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008596 then
8597 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008598 fi;;
8599 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008600 CYGWIN*)
8601 if test $enable_shared = "no"
8602 then
8603 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8604 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008605 QNX*)
8606 # -Wl,-E causes the symbols to be added to the dynamic
8607 # symbol table so that they can be found when a module
8608 # is loaded. -N 2048K causes the stack size to be set
8609 # to 2048 kilobytes so that the stack doesn't overflow
8610 # when running test_compile.py.
8611 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008612 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8615$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008616
Michael W. Hudson54241132001-12-07 15:38:26 +00008617
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008618
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8620$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008621if test ! "$LIBRARY" = "$LDLIBRARY"
8622then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008623 case $ac_sys_system in
8624 CYGWIN*)
8625 # Cygwin needs CCSHARED when building extension DLLs
8626 # but not when building the interpreter DLL.
8627 CFLAGSFORSHARED='';;
8628 *)
8629 CFLAGSFORSHARED='$(CCSHARED)'
8630 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8633$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008634
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008635# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8636# library (with --enable-shared).
8637# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008638# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8639# if it is not required, since it creates a dependency of the shared library
8640# to LIBS. This, in turn, means that applications linking the shared libpython
8641# don't need to link LIBS explicitly. The default should be only changed
8642# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008643
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8645$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008646case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008647 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008648 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008649esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8651$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008652
8653
Guido van Rossum627b2d71993-12-24 10:39:16 +00008654# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8656$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008657if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008658 $as_echo_n "(cached) " >&6
8659else
8660 ac_check_lib_save_LIBS=$LIBS
8661LIBS="-lsendfile $LIBS"
8662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8663/* end confdefs.h. */
8664
8665/* Override any GCC internal prototype to avoid an error.
8666 Use char because int might match the return type of a GCC
8667 builtin and then its argument prototype would still apply. */
8668#ifdef __cplusplus
8669extern "C"
8670#endif
8671char sendfile ();
8672int
8673main ()
8674{
8675return sendfile ();
8676 ;
8677 return 0;
8678}
8679_ACEOF
8680if ac_fn_c_try_link "$LINENO"; then :
8681 ac_cv_lib_sendfile_sendfile=yes
8682else
8683 ac_cv_lib_sendfile_sendfile=no
8684fi
8685rm -f core conftest.err conftest.$ac_objext \
8686 conftest$ac_exeext conftest.$ac_ext
8687LIBS=$ac_check_lib_save_LIBS
8688fi
8689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8690$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008691if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008692 cat >>confdefs.h <<_ACEOF
8693#define HAVE_LIBSENDFILE 1
8694_ACEOF
8695
8696 LIBS="-lsendfile $LIBS"
8697
8698fi
8699
Matthias Kloseb9621712010-04-24 17:59:49 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8701$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008702if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008704else
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008706LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710/* Override any GCC internal prototype to avoid an error.
8711 Use char because int might match the return type of a GCC
8712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713#ifdef __cplusplus
8714extern "C"
8715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008716char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008717int
8718main ()
8719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ;
8722 return 0;
8723}
8724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730rm -f core conftest.err conftest.$ac_objext \
8731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008732LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8735$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008736if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 cat >>confdefs.h <<_ACEOF
8738#define HAVE_LIBDL 1
8739_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008740
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008741 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008742
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008743fi
8744 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8746$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008747if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008749else
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008751LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755/* Override any GCC internal prototype to avoid an error.
8756 Use char because int might match the return type of a GCC
8757 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758#ifdef __cplusplus
8759extern "C"
8760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008761char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008762int
8763main ()
8764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ;
8767 return 0;
8768}
8769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008770if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775rm -f core conftest.err conftest.$ac_objext \
8776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008777LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8780$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008781if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 cat >>confdefs.h <<_ACEOF
8783#define HAVE_LIBDLD 1
8784_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008785
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008786 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008787
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008788fi
8789 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008790
Georg Brandlb1441c72009-01-03 22:33:39 +00008791# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008792if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8794$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008795if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008797else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008798 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802/* Override any GCC internal prototype to avoid an error.
8803 Use char because int might match the return type of a GCC
8804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008805#ifdef __cplusplus
8806extern "C"
8807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008808char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008809int
8810main ()
8811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008813 ;
8814 return 0;
8815}
8816_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817for ac_lib in '' pthread rt posix4; do
8818 if test -z "$ac_lib"; then
8819 ac_res="none required"
8820 else
8821 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008822 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827rm -f core conftest.err conftest.$ac_objext \
8828 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008829 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008830 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008832done
Victor Stinnere0be4232011-10-25 13:06:09 +02008833if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835else
8836 ac_cv_search_sem_init=no
8837fi
8838rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008839LIBS=$ac_func_search_save_LIBS
8840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8842$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008844if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008846
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008847fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008848 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008849 # posix4 on Solaris 2.6
8850 # pthread (first!) on Linux
8851fi
8852
Martin v. Löwis19d17342003-06-14 21:03:05 +00008853# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8855$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008856if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008858else
8859 ac_check_lib_save_LIBS=$LIBS
8860LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008862/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864/* Override any GCC internal prototype to avoid an error.
8865 Use char because int might match the return type of a GCC
8866 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008867#ifdef __cplusplus
8868extern "C"
8869#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008870char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008871int
8872main ()
8873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008874return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008875 ;
8876 return 0;
8877}
8878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008879if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008880 ac_cv_lib_intl_textdomain=yes
8881else
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008884rm -f core conftest.err conftest.$ac_objext \
8885 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008886LIBS=$ac_check_lib_save_LIBS
8887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8889$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008890if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008891
Matthias Kloseb9621712010-04-24 17:59:49 +00008892$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008893
Brett Cannonc6d936e2009-06-07 20:09:53 +00008894 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008895fi
8896
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008897
8898# checks for system dependent C++ extensions support
8899case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8901$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008903/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008904
Georg Brandl59e87bd2011-02-15 19:48:59 +00008905 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008906int
8907main ()
8908{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008909loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 ;
8911 return 0;
8912}
Matthias Kloseb159a552010-04-25 21:00:44 +00008913
Martin v. Löwis11437992002-04-12 09:54:03 +00008914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008915if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008916
Matthias Kloseb159a552010-04-25 21:00:44 +00008917
Matthias Kloseb9621712010-04-24 17:59:49 +00008918$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008919
Matthias Kloseb159a552010-04-25 21:00:44 +00008920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008921$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008922
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008923else
Matthias Kloseb159a552010-04-25 21:00:44 +00008924
8925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008926$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008927
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008929rm -f core conftest.err conftest.$ac_objext \
8930 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008931 *) ;;
8932esac
8933
Guido van Rossum70c7f481998-03-26 18:44:10 +00008934# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8936$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008937if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008939else
Martin v. Löwis11437992002-04-12 09:54:03 +00008940 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008941LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945/* Override any GCC internal prototype to avoid an error.
8946 Use char because int might match the return type of a GCC
8947 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008948#ifdef __cplusplus
8949extern "C"
8950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008951char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008952int
8953main ()
8954{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ;
8957 return 0;
8958}
8959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008960if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008962else
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008965rm -f core conftest.err conftest.$ac_objext \
8966 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008967LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8970$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008971if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008972 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008973fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008974 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8976$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008977if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008979else
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008981LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985/* Override any GCC internal prototype to avoid an error.
8986 Use char because int might match the return type of a GCC
8987 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008988#ifdef __cplusplus
8989extern "C"
8990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008991char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008992int
8993main ()
8994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008995return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 ;
8997 return 0;
8998}
8999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009000if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009002else
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009005rm -f core conftest.err conftest.$ac_objext \
9006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009007LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9010$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009011if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009012 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009013fi
9014 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009015
Matthias Kloseb9621712010-04-24 17:59:49 +00009016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9017$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009020if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9023$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009024LIBS="$withval $LIBS"
9025
9026else
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9028$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029fi
9030
Guido van Rossum7f43da71994-08-01 12:15:30 +00009031
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009032if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009033 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9034set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9036$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009037if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009039else
9040 case $PKG_CONFIG in
9041 [\\/]* | ?:[\\/]*)
9042 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9043 ;;
9044 *)
9045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9046for as_dir in $PATH
9047do
9048 IFS=$as_save_IFS
9049 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009052 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009054 break 2
9055 fi
9056done
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009058IFS=$as_save_IFS
9059
9060 ;;
9061esac
9062fi
9063PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9064if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9066$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009067else
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9069$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009070fi
9071
9072
9073fi
9074if test -z "$ac_cv_path_PKG_CONFIG"; then
9075 ac_pt_PKG_CONFIG=$PKG_CONFIG
9076 # Extract the first word of "pkg-config", so it can be a program name with args.
9077set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9079$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009080if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009082else
9083 case $ac_pt_PKG_CONFIG in
9084 [\\/]* | ?:[\\/]*)
9085 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9086 ;;
9087 *)
9088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9089for as_dir in $PATH
9090do
9091 IFS=$as_save_IFS
9092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009095 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009097 break 2
9098 fi
9099done
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009101IFS=$as_save_IFS
9102
9103 ;;
9104esac
9105fi
9106ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9107if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9109$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009110else
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9112$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009113fi
9114
9115 if test "x$ac_pt_PKG_CONFIG" = x; then
9116 PKG_CONFIG=""
9117 else
9118 case $cross_compiling:$ac_tool_warned in
9119yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009122ac_tool_warned=yes ;;
9123esac
9124 PKG_CONFIG=$ac_pt_PKG_CONFIG
9125 fi
9126else
9127 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9128fi
9129
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009130
9131# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9133$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009134
9135# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009136if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009137 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009138else
9139 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009140fi
9141
9142
Matthias Kloseb9621712010-04-24 17:59:49 +00009143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9144$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009145
9146# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9148$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009149
9150# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009151if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009152 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009153else
9154 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009155fi
9156
9157
9158if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009159 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9160else
9161 LIBFFI_INCLUDEDIR=""
9162fi
9163
9164
Matthias Kloseb9621712010-04-24 17:59:49 +00009165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9166$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009167
Stefan Krah60187b52012-03-23 19:06:27 +01009168# Check for use of the system libmpdec library
9169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9170$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9171
9172# Check whether --with-system_libmpdec was given.
9173if test "${with_system_libmpdec+set}" = set; then :
9174 withval=$with_system_libmpdec;
9175else
9176 with_system_libmpdec="no"
9177fi
9178
9179
9180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9181$as_echo "$with_system_libmpdec" >&6; }
9182
Benjamin Peterson076ed002010-10-31 17:11:02 +00009183# Check for support for loadable sqlite extensions
9184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9185$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9186# Check whether --enable-loadable-sqlite-extensions was given.
9187if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9188 enableval=$enable_loadable_sqlite_extensions;
9189else
9190 enable_loadable_sqlite_extensions="no"
9191fi
9192
9193
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9195$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9196
Matthias Klose55708cc2009-04-30 08:06:49 +00009197# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9199$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009200
9201# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009202if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009203 withval=$with_dbmliborder;
9204if test x$with_dbmliborder = xyes
9205then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009206as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009207else
9208 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9209 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9210 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009211 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009212 fi
9213 done
9214fi
9215fi
9216
Matthias Kloseb9621712010-04-24 17:59:49 +00009217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9218$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009219
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009220# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009221
9222
Matthias Kloseb9621712010-04-24 17:59:49 +00009223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9224$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009227if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228 withval=$with_signal_module;
9229fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009230
9231
9232if test -z "$with_signal_module"
9233then with_signal_module="yes"
9234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9236$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009237
9238if test "${with_signal_module}" = "yes"; then
9239 USE_SIGNAL_MODULE=""
9240 SIGNAL_OBJS=""
9241else
9242 USE_SIGNAL_MODULE="#"
9243 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9244fi
9245
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009246# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009247
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009248USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250
Martin v. Löwis11437992002-04-12 09:54:03 +00009251
9252# Templates for things AC_DEFINEd more than once.
9253# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009254
9255
Martin v. Löwis11437992002-04-12 09:54:03 +00009256
Matthias Kloseb9621712010-04-24 17:59:49 +00009257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9258$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009261if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262 withval=$with_threads;
9263fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009264
9265
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009266# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009267
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009269if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270 withval=$with_thread; with_threads=$with_thread
9271fi
9272
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009273
9274if test -z "$with_threads"
9275then with_threads="yes"
9276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9278$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009279
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009280
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009281if test "$with_threads" = "no"
9282then
9283 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009284elif test "$ac_cv_pthread_is_default" = yes
9285then
Matthias Kloseb9621712010-04-24 17:59:49 +00009286 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009287
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009288 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009289 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009290
9291 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009293elif test "$ac_cv_kpthread" = "yes"
9294then
9295 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009296 if test "$ac_cv_cxx_thread" = "yes"; then
9297 CXX="$CXX -Kpthread"
9298 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009300
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009301 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009302 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009303elif test "$ac_cv_kthread" = "yes"
9304then
9305 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009306 if test "$ac_cv_cxx_thread" = "yes"; then
9307 CXX="$CXX -Kthread"
9308 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009309 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009310
9311 posix_threads=yes
9312 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009313elif test "$ac_cv_pthread" = "yes"
9314then
9315 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009316 if test "$ac_cv_cxx_thread" = "yes"; then
9317 CXX="$CXX -pthread"
9318 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009320
9321 posix_threads=yes
9322 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009323else
9324 if test ! -z "$with_threads" -a -d "$with_threads"
9325 then LDFLAGS="$LDFLAGS -L$with_threads"
9326 fi
9327 if test ! -z "$withval" -a -d "$withval"
9328 then LDFLAGS="$LDFLAGS -L$withval"
9329 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009330
9331 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009332 # define _POSIX_THREADS in unistd.h. Some apparently don't
9333 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9335$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009338
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009339#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009340#ifdef _POSIX_THREADS
9341yes
9342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009343
9344_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009347 unistd_defines_pthreads=yes
9348else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009349 unistd_defines_pthreads=no
9350fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009351rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9354$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009357
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009358 # Just looking for pthread_create in libpthread is not enough:
9359 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9360 # So we really have to include pthread.h, and then link.
9361 _libs=$LIBS
9362 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9364$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009366/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009367
9368#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009369#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009370
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009371void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009372int
9373main ()
9374{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009375
9376pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 ;
9378 return 0;
9379}
9380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009381if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009382
Matthias Kloseb9621712010-04-24 17:59:49 +00009383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9384$as_echo "yes" >&6; }
9385 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009386
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009387 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009388 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009389else
Martin v. Löwis11437992002-04-12 09:54:03 +00009390
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009391 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009392 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009393if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009394 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009395
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009396 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009397 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009398else
Guido van Rossumad678af1998-10-02 14:42:15 +00009399
Matthias Kloseb9621712010-04-24 17:59:49 +00009400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9401$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009402if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009403 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009404else
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009406LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410/* Override any GCC internal prototype to avoid an error.
9411 Use char because int might match the return type of a GCC
9412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009413#ifdef __cplusplus
9414extern "C"
9415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009416char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009417int
9418main ()
9419{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 ;
9422 return 0;
9423}
9424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009427else
Matthias Kloseb9621712010-04-24 17:59:49 +00009428 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009430rm -f core conftest.err conftest.$ac_objext \
9431 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009432LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9435$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009436if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009437 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009438
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009439 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009440 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009441 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009442else
Greg Steinadf63d62000-07-05 10:38:09 +00009443
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9445$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009446if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009447 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009448else
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009450LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454/* Override any GCC internal prototype to avoid an error.
9455 Use char because int might match the return type of a GCC
9456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009457#ifdef __cplusplus
9458extern "C"
9459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009460char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009461int
9462main ()
9463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ;
9466 return 0;
9467}
9468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009471else
Matthias Kloseb9621712010-04-24 17:59:49 +00009472 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009474rm -f core conftest.err conftest.$ac_objext \
9475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9479$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009480if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009481 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009482
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009483 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009484 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009485 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009486else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009487
Matthias Kloseb9621712010-04-24 17:59:49 +00009488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9489$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009490if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009492else
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009494LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498/* Override any GCC internal prototype to avoid an error.
9499 Use char because int might match the return type of a GCC
9500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501#ifdef __cplusplus
9502extern "C"
9503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009504char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009505int
9506main ()
9507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ;
9510 return 0;
9511}
9512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009515else
Matthias Kloseb9621712010-04-24 17:59:49 +00009516 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518rm -f core conftest.err conftest.$ac_objext \
9519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009520LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9523$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009524if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009525 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009526
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009527 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009528 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009529 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009530else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009531
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9533$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009534if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009536else
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009538LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009542/* Override any GCC internal prototype to avoid an error.
9543 Use char because int might match the return type of a GCC
9544 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009545#ifdef __cplusplus
9546extern "C"
9547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009548char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009549int
9550main ()
9551{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009552return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 ;
9554 return 0;
9555}
9556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009557if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009559else
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009562rm -f core conftest.err conftest.$ac_objext \
9563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009564LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9567$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009568if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009569 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009570
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009571 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009572 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009573 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009574else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009575
Martin v. Löwis130fb172001-07-19 11:00:41 +00009576 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009577fi
9578
Guido van Rossum627b2d71993-12-24 10:39:16 +00009579
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009580fi
9581
Guido van Rossum0be3e491997-05-22 20:33:33 +00009582fi
9583
Guido van Rossum49545951997-12-02 19:28:29 +00009584fi
9585
Guido van Rossumb93a8621998-05-07 13:27:32 +00009586fi
9587
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009589rm -f core conftest.err conftest.$ac_objext \
9590 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009591
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9593$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009594if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009596else
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009598LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009602/* Override any GCC internal prototype to avoid an error.
9603 Use char because int might match the return type of a GCC
9604 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009605#ifdef __cplusplus
9606extern "C"
9607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009608char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009609int
9610main ()
9611{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ;
9614 return 0;
9615}
9616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009617if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009619else
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009622rm -f core conftest.err conftest.$ac_objext \
9623 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009624LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9627$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009628if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009630
Martin v. Löwis130fb172001-07-19 11:00:41 +00009631 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009632 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009633 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009634fi
9635
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009636
Neal Norwitza978ab02002-11-02 16:58:05 +00009637 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9639$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009640if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009642else
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009644LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648/* Override any GCC internal prototype to avoid an error.
9649 Use char because int might match the return type of a GCC
9650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651#ifdef __cplusplus
9652extern "C"
9653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009654char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009655int
9656main ()
9657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ;
9660 return 0;
9661}
9662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009665else
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009668rm -f core conftest.err conftest.$ac_objext \
9669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009670LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9673$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009674if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009676
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009677 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009678 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009679 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680fi
9681
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009682 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009683fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009684
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009685if test "$posix_threads" = "yes"; then
9686 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009687
Matthias Kloseb9621712010-04-24 17:59:49 +00009688$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009689
9690 fi
9691
9692 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9693 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009694 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009695$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009696
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009697 ;;
9698 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009699$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009700
9701 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009702 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009703$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009704
9705 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009706 esac
9707
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9709$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009710 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009712else
Matthias Kloseb9621712010-04-24 17:59:49 +00009713 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009714 ac_cv_pthread_system_supported=no
9715else
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009717/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009718
9719 #include <stdio.h>
9720 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009721 void *foo(void *parm) {
9722 return NULL;
9723 }
9724 main() {
9725 pthread_attr_t attr;
9726 pthread_t id;
9727 if (pthread_attr_init(&attr)) exit(-1);
9728 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9729 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9730 exit(0);
9731 }
9732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009733if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009734 ac_cv_pthread_system_supported=yes
9735else
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9739 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009740fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742
Guido van Rossum627b2d71993-12-24 10:39:16 +00009743fi
9744
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9746$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009747 if test "$ac_cv_pthread_system_supported" = "yes"; then
9748
Matthias Kloseb9621712010-04-24 17:59:49 +00009749$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009750
9751 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 for ac_func in pthread_sigmask
9753do :
9754 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009755if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009756 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009757#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009758_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009759 case $ac_sys_system in
9760 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009761
Matthias Kloseb9621712010-04-24 17:59:49 +00009762$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009763
9764 ;;
9765 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009766fi
9767done
9768
9769fi
9770
9771
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009772# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009773
Matthias Kloseb9621712010-04-24 17:59:49 +00009774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9775$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009777if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009779 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009782 ipv6=no
9783 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9785$as_echo "yes" >&6; }
9786 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009787
9788 ipv6=yes
9789 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009791else
Martin v. Löwis11437992002-04-12 09:54:03 +00009792
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009794/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009795 /* AF_INET6 available check */
9796#include <sys/types.h>
9797#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009798int
9799main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009800{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009801int domain = AF_INET6;
9802 ;
9803 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009804}
Martin v. Löwis11437992002-04-12 09:54:03 +00009805_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009806if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009807
Matthias Kloseb9621712010-04-24 17:59:49 +00009808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9809$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009810 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009812else
Matthias Kloseb159a552010-04-25 21:00:44 +00009813
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009816 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009818fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009821if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9823$as_echo_n "checking if RFC2553 API is available... " >&6; }
9824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009825/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009826
9827 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009828#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009829int
9830main ()
9831{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009832struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009833 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 ;
9835 return 0;
9836}
Matthias Kloseb159a552010-04-25 21:00:44 +00009837
Martin v. Löwis11437992002-04-12 09:54:03 +00009838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009839if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009840
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009842$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009843 ipv6=yes
9844
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009845else
Matthias Kloseb159a552010-04-25 21:00:44 +00009846
9847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009848$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009849 ipv6=no
9850
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009853fi
9854
9855if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009857
9858fi
9859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860fi
9861
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009862
9863ipv6type=unknown
9864ipv6lib=none
9865ipv6trylibc=no
9866
9867if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9869$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009870 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9871 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009872 case $i in
9873 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009875/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009876
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009877#include <netinet/in.h>
9878#ifdef IPV6_INRIA_VERSION
9879yes
9880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009881_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009884 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009885fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009886rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009887
9888 ;;
9889 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009891/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893#include <netinet/in.h>
9894#ifdef __KAME__
9895yes
9896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009897_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009900 ipv6type=$i;
9901 ipv6lib=inet6
9902 ipv6libdir=/usr/local/v6/lib
9903 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009904fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009905rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009906
9907 ;;
9908 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009910/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009911
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912#include <features.h>
9913#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9914yes
9915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009916_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009919 ipv6type=$i;
9920 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009921fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009922rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009923
9924 ;;
9925 linux-inet6)
9926 if test -d /usr/inet6; then
9927 ipv6type=$i
9928 ipv6lib=inet6
9929 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009930 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931 fi
9932 ;;
9933 solaris)
9934 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009935 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009936 ipv6type=$i
9937 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009938 fi
9939 fi
9940 ;;
9941 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009943/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009945#include <sys/param.h>
9946#ifdef _TOSHIBA_INET6
9947yes
9948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009951 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009952 ipv6type=$i;
9953 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009954 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009955fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009956rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009957
9958 ;;
9959 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009961/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009962
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009963#include </usr/local/v6/include/sys/v6config.h>
9964#ifdef __V6D__
9965yes
9966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009967_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009968if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009970 ipv6type=$i;
9971 ipv6lib=v6;
9972 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009973 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009974fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009975rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009976
9977 ;;
9978 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009980/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009981
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009982#include <sys/param.h>
9983#ifdef _ZETA_MINAMI_INET6
9984yes
9985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009986_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009989 ipv6type=$i;
9990 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009991 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009992fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009993rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009994
9995 ;;
9996 esac
9997 if test "$ipv6type" != "unknown"; then
9998 break
9999 fi
10000 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10002$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010003fi
10004
10005if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10006 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10007 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10008 echo "using lib$ipv6lib"
10009 else
10010 if test $ipv6trylibc = "yes"; then
10011 echo "using libc"
10012 else
10013 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10014 echo "You need to fetch lib$ipv6lib.a from appropriate"
10015 echo 'ipv6 kit and compile beforehand.'
10016 exit 1
10017 fi
10018 fi
10019fi
10020
Matthias Kloseb9621712010-04-24 17:59:49 +000010021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10022$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010024/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010025
10026 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010027int
10028main ()
10029{
10030FSIORefNum fRef = 0
10031 ;
10032 return 0;
10033}
Matthias Kloseb159a552010-04-25 21:00:44 +000010034
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010037
Matthias Kloseb159a552010-04-25 21:00:44 +000010038
Matthias Kloseb9621712010-04-24 17:59:49 +000010039$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010040
Matthias Kloseb9621712010-04-24 17:59:49 +000010041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10042$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010043
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010044else
Matthias Kloseb159a552010-04-25 21:00:44 +000010045
Matthias Kloseb9621712010-04-24 17:59:49 +000010046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10047$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010048
10049fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10051
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010052# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10054$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010057if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058 withval=$with_doc_strings;
10059fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010060
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010061
10062if test -z "$with_doc_strings"
10063then with_doc_strings="yes"
10064fi
10065if test "$with_doc_strings" != "no"
10066then
10067
Matthias Kloseb9621712010-04-24 17:59:49 +000010068$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010069
10070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10072$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010073
Antoine Pitrou042b1282010-08-13 21:15:58 +000010074# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10076$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010079if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010080 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010081if test "$withval" != no
10082then
10083
Matthias Kloseb9621712010-04-24 17:59:49 +000010084$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010085
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10087$as_echo "yes" >&6; }
10088else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010090fi
10091else
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10093$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094fi
10095
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010096
10097# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10099$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010102if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010103 withval=$with_pymalloc;
10104fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010105
Neil Schemenauera35c6882001-02-27 04:45:05 +000010106
Neil Schemenauer16c22972002-03-22 15:34:49 +000010107if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010108then
10109 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010110fi
10111if test "$with_pymalloc" != "no"
10112then
Martin v. Löwis11437992002-04-12 09:54:03 +000010113
Matthias Kloseb9621712010-04-24 17:59:49 +000010114$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010115
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010116 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10119$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010120
Benjamin Peterson05159c42009-12-03 03:01:27 +000010121# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10123$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010124
10125# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010126if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010127 withval=$with_valgrind;
10128else
10129 with_valgrind=no
10130fi
10131
Matthias Kloseb9621712010-04-24 17:59:49 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10133$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010134if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 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 +020010136if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010137
Matthias Kloseb9621712010-04-24 17:59:49 +000010138$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010139
10140else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010141 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010142
10143fi
10144
10145
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010146 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010147fi
10148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010149# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010150
Guido van Rossum98935bf2001-09-05 19:13:16 +000010151DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010152
Guido van Rossume97ee181999-12-20 21:27:22 +000010153# the dlopen() function means we might want to use dynload_shlib.o. some
10154# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010155for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010156do :
10157 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010158if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010160#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010161_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010162
Guido van Rossume97ee181999-12-20 21:27:22 +000010163fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010164done
Guido van Rossume97ee181999-12-20 21:27:22 +000010165
Michael W. Hudson54241132001-12-07 15:38:26 +000010166
Guido van Rossume97ee181999-12-20 21:27:22 +000010167# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10168# loading of modules.
10169
Matthias Kloseb9621712010-04-24 17:59:49 +000010170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10171$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010172if test -z "$DYNLOADFILE"
10173then
10174 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010175 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10176 if test "$ac_cv_func_dlopen" = yes
10177 then DYNLOADFILE="dynload_shlib.o"
10178 else DYNLOADFILE="dynload_aix.o"
10179 fi
10180 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010181 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010182 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10183 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010184 *)
10185 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10186 # out any dynamic loading
10187 if test "$ac_cv_func_dlopen" = yes
10188 then DYNLOADFILE="dynload_shlib.o"
10189 else DYNLOADFILE="dynload_stub.o"
10190 fi
10191 ;;
10192 esac
10193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10195$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010196if test "$DYNLOADFILE" != "dynload_stub.o"
10197then
Martin v. Löwis11437992002-04-12 09:54:03 +000010198
Matthias Kloseb9621712010-04-24 17:59:49 +000010199$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010200
10201fi
10202
Neil Schemenauer4e425612001-06-19 15:44:15 +000010203# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10204
Michael W. Hudson54241132001-12-07 15:38:26 +000010205
Matthias Kloseb9621712010-04-24 17:59:49 +000010206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10207$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010208if test -z "$MACHDEP_OBJS"
10209then
Jack Jansene578a632001-08-15 01:27:14 +000010210 MACHDEP_OBJS=$extra_machdep_objs
10211else
10212 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010213fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010214if test -z "$MACHDEP_OBJS"; then
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10216$as_echo "none" >&6; }
10217else
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10219$as_echo "$MACHDEP_OBJS" >&6; }
10220fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010221
Guido van Rossum627b2d71993-12-24 10:39:16 +000010222# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010223for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010224 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010225 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010226 futimens futimes gai_strerror \
10227 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010228 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010229 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010230 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10231 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010232 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010233 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010234 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010235 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010236 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010237 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010238 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10239 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010240 sigaction sigaltstack siginterrupt sigpending sigrelse \
10241 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010242 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010243 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10244 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010245do :
10246 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10247ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010248if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010250#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010251_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010252
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010253fi
10254done
10255
Michael W. Hudson54241132001-12-07 15:38:26 +000010256
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010257ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10258 #include <dirent.h>
10259"
10260if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10261
10262$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10263
10264fi
10265
10266
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010267# For some functions, having a definition is not sufficient, since
10268# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10270$as_echo_n "checking for chroot... " >&6; }
10271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010273#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010274int
10275main ()
10276{
10277void *x=chroot
10278 ;
10279 return 0;
10280}
10281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010283
Matthias Kloseb9621712010-04-24 17:59:49 +000010284$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010285
Matthias Kloseb159a552010-04-25 21:00:44 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010287$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010288else
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010291
10292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10295$as_echo_n "checking for link... " >&6; }
10296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010297/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010298#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299int
10300main ()
10301{
10302void *x=link
10303 ;
10304 return 0;
10305}
10306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010308
Matthias Kloseb9621712010-04-24 17:59:49 +000010309$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010310
Matthias Kloseb159a552010-04-25 21:00:44 +000010311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010312$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010313else
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010316
10317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10320$as_echo_n "checking for symlink... " >&6; }
10321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010323#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010324int
10325main ()
10326{
10327void *x=symlink
10328 ;
10329 return 0;
10330}
10331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010333
Matthias Kloseb9621712010-04-24 17:59:49 +000010334$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010335
Matthias Kloseb159a552010-04-25 21:00:44 +000010336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010337$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010338else
Matthias Kloseb9621712010-04-24 17:59:49 +000010339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010341
10342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10345$as_echo_n "checking for fchdir... " >&6; }
10346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010347/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010348#include <unistd.h>
10349int
10350main ()
10351{
10352void *x=fchdir
10353 ;
10354 return 0;
10355}
10356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010358
Matthias Kloseb9621712010-04-24 17:59:49 +000010359$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010360
Matthias Kloseb159a552010-04-25 21:00:44 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010362$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010363else
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010366
10367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10370$as_echo_n "checking for fsync... " >&6; }
10371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010372/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010373#include <unistd.h>
10374int
10375main ()
10376{
10377void *x=fsync
10378 ;
10379 return 0;
10380}
10381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010383
Matthias Kloseb9621712010-04-24 17:59:49 +000010384$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010385
Matthias Kloseb159a552010-04-25 21:00:44 +000010386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010387$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010388else
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010391
10392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10395$as_echo_n "checking for fdatasync... " >&6; }
10396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010397/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010398#include <unistd.h>
10399int
10400main ()
10401{
10402void *x=fdatasync
10403 ;
10404 return 0;
10405}
10406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010408
Matthias Kloseb9621712010-04-24 17:59:49 +000010409$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010410
Matthias Kloseb159a552010-04-25 21:00:44 +000010411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010412$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010413else
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10415$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010416
10417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10420$as_echo_n "checking for epoll... " >&6; }
10421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010422/* end confdefs.h. */
10423#include <sys/epoll.h>
10424int
10425main ()
10426{
10427void *x=epoll_create
10428 ;
10429 return 0;
10430}
10431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010433
Matthias Kloseb9621712010-04-24 17:59:49 +000010434$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010435
Matthias Kloseb159a552010-04-25 21:00:44 +000010436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010437$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010438else
Matthias Kloseb9621712010-04-24 17:59:49 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010441
10442fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10445$as_echo_n "checking for epoll_create1... " >&6; }
10446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10447/* end confdefs.h. */
10448#include <sys/epoll.h>
10449int
10450main ()
10451{
10452void *x=epoll_create1
10453 ;
10454 return 0;
10455}
10456_ACEOF
10457if ac_fn_c_try_compile "$LINENO"; then :
10458
10459$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10460
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10462$as_echo "yes" >&6; }
10463else
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10465$as_echo "no" >&6; }
10466
10467fi
10468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10470$as_echo_n "checking for kqueue... " >&6; }
10471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010472/* end confdefs.h. */
10473
10474#include <sys/types.h>
10475#include <sys/event.h>
10476
10477int
10478main ()
10479{
10480int x=kqueue()
10481 ;
10482 return 0;
10483}
10484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010485if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010486
Matthias Kloseb9621712010-04-24 17:59:49 +000010487$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010488
Matthias Kloseb159a552010-04-25 21:00:44 +000010489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010490$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010491else
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010494
10495fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010497# On some systems (eg. FreeBSD 5), we would find a definition of the
10498# functions ctermid_r, setgroups in the library, but no prototype
10499# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10500# address to avoid compiler warnings and potential miscompilations
10501# because of the missing prototypes.
10502
Matthias Kloseb9621712010-04-24 17:59:49 +000010503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10504$as_echo_n "checking for ctermid_r... " >&6; }
10505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010506/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010507
Martin v. Löwisd5843682002-11-21 20:41:28 +000010508#include <stdio.h>
10509
Martin v. Löwisd5843682002-11-21 20:41:28 +000010510int
10511main ()
10512{
10513void* p = ctermid_r
10514 ;
10515 return 0;
10516}
10517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010519
Matthias Kloseb9621712010-04-24 17:59:49 +000010520$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010521
Matthias Kloseb159a552010-04-25 21:00:44 +000010522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010523$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010524else
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10526$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010527
10528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10530
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10532$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010533if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010534 $as_echo_n "(cached) " >&6
10535else
10536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010537/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010538#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010539int
10540main ()
10541{
10542void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010543
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010544 ;
10545 return 0;
10546}
10547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010548if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010549 ac_cv_flock_decl=yes
10550else
10551 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010552
10553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010555
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010556fi
10557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10558$as_echo "$ac_cv_flock_decl" >&6; }
10559if test "x${ac_cv_flock_decl}" = xyes; then
10560 for ac_func in flock
10561do :
10562 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010563if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010564 cat >>confdefs.h <<_ACEOF
10565#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010566_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010567
Antoine Pitroua3000072010-09-07 14:52:42 +000010568else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010570$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010571if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010572 $as_echo_n "(cached) " >&6
10573else
10574 ac_check_lib_save_LIBS=$LIBS
10575LIBS="-lbsd $LIBS"
10576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10577/* end confdefs.h. */
10578
10579/* Override any GCC internal prototype to avoid an error.
10580 Use char because int might match the return type of a GCC
10581 builtin and then its argument prototype would still apply. */
10582#ifdef __cplusplus
10583extern "C"
10584#endif
10585char flock ();
10586int
10587main ()
10588{
10589return flock ();
10590 ;
10591 return 0;
10592}
10593_ACEOF
10594if ac_fn_c_try_link "$LINENO"; then :
10595 ac_cv_lib_bsd_flock=yes
10596else
10597 ac_cv_lib_bsd_flock=no
10598fi
10599rm -f core conftest.err conftest.$ac_objext \
10600 conftest$ac_exeext conftest.$ac_ext
10601LIBS=$ac_check_lib_save_LIBS
10602fi
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10604$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010605if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010606 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010607
10608
10609$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10610
10611
10612fi
10613
10614
10615fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010616done
10617
Antoine Pitroua3000072010-09-07 14:52:42 +000010618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619
Matthias Kloseb9621712010-04-24 17:59:49 +000010620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10621$as_echo_n "checking for getpagesize... " >&6; }
10622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010623/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010624
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010625#include <unistd.h>
10626
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010627int
10628main ()
10629{
10630void* p = getpagesize
10631 ;
10632 return 0;
10633}
10634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010636
Matthias Kloseb9621712010-04-24 17:59:49 +000010637$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010638
Matthias Kloseb159a552010-04-25 21:00:44 +000010639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010640$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010641else
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10643$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010644
10645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010647
Victor Stinner984890f2011-11-24 13:53:38 +010010648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10649$as_echo_n "checking for broken unsetenv... " >&6; }
10650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10651/* end confdefs.h. */
10652
10653#include <stdlib.h>
10654
10655int
10656main ()
10657{
10658int res = unsetenv("DUMMY")
10659 ;
10660 return 0;
10661}
10662_ACEOF
10663if ac_fn_c_try_compile "$LINENO"; then :
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10665$as_echo "no" >&6; }
10666else
10667
10668$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10669
10670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10671$as_echo "yes" >&6; }
10672
10673fi
10674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10675
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676for ac_prog in true
10677do
10678 # Extract the first word of "$ac_prog", so it can be a program name with args.
10679set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10681$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010682if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010683 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684else
10685 if test -n "$TRUE"; then
10686 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10687else
10688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10689for as_dir in $PATH
10690do
10691 IFS=$as_save_IFS
10692 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010695 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 $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 +000010697 break 2
10698 fi
10699done
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010702
10703fi
10704fi
10705TRUE=$ac_cv_prog_TRUE
10706if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10708$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010709else
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10711$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010712fi
10713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010715 test -n "$TRUE" && break
10716done
10717test -n "$TRUE" || TRUE="/bin/true"
10718
10719
Matthias Kloseb9621712010-04-24 17:59:49 +000010720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10721$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010722if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010724else
10725 ac_check_lib_save_LIBS=$LIBS
10726LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010728/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010730/* Override any GCC internal prototype to avoid an error.
10731 Use char because int might match the return type of a GCC
10732 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010733#ifdef __cplusplus
10734extern "C"
10735#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010736char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010737int
10738main ()
10739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010741 ;
10742 return 0;
10743}
10744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010746 ac_cv_lib_c_inet_aton=yes
10747else
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010750rm -f core conftest.err conftest.$ac_objext \
10751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010752LIBS=$ac_check_lib_save_LIBS
10753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10755$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010756if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010757 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010758else
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10760$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010761if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010763else
10764 ac_check_lib_save_LIBS=$LIBS
10765LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769/* Override any GCC internal prototype to avoid an error.
10770 Use char because int might match the return type of a GCC
10771 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010772#ifdef __cplusplus
10773extern "C"
10774#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010775char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010776int
10777main ()
10778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010780 ;
10781 return 0;
10782}
10783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010784if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010785 ac_cv_lib_resolv_inet_aton=yes
10786else
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010789rm -f core conftest.err conftest.$ac_objext \
10790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010791LIBS=$ac_check_lib_save_LIBS
10792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10794$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010795if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010796 cat >>confdefs.h <<_ACEOF
10797#define HAVE_LIBRESOLV 1
10798_ACEOF
10799
10800 LIBS="-lresolv $LIBS"
10801
10802fi
10803
10804
10805fi
10806
10807
Christian Heimesd0764e22007-12-04 15:00:33 +000010808# On Tru64, chflags seems to be present, but calling it will
10809# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10811$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010812if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010814else
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010816 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010817else
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010819/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010820
Christian Heimesd0764e22007-12-04 15:00:33 +000010821#include <sys/stat.h>
10822#include <unistd.h>
10823int main(int argc, char*argv[])
10824{
10825 if(chflags(argv[0], 0) != 0)
10826 return 1;
10827 return 0;
10828}
Ned Deily3eb67d52011-06-28 00:00:28 -070010829
Christian Heimesd0764e22007-12-04 15:00:33 +000010830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010831if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010832 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010833else
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010838fi
10839
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10843$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010844if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010846if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010847 ac_cv_have_chflags="yes"
10848else
10849 ac_cv_have_chflags="no"
10850fi
10851
10852fi
10853if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010854
Matthias Kloseb9621712010-04-24 17:59:49 +000010855$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010856
10857fi
10858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10860$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010861if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010863else
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010865 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010866else
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010868/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010869
Christian Heimesd0764e22007-12-04 15:00:33 +000010870#include <sys/stat.h>
10871#include <unistd.h>
10872int main(int argc, char*argv[])
10873{
10874 if(lchflags(argv[0], 0) != 0)
10875 return 1;
10876 return 0;
10877}
Ned Deily3eb67d52011-06-28 00:00:28 -070010878
Christian Heimesd0764e22007-12-04 15:00:33 +000010879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010880if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010881 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010882else
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010887fi
10888
10889
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10892$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010893if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010895if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010896 ac_cv_have_lchflags="yes"
10897else
10898 ac_cv_have_lchflags="no"
10899fi
10900
10901fi
10902if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010903
Matthias Kloseb9621712010-04-24 17:59:49 +000010904$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010905
10906fi
10907
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010908case $ac_sys_system/$ac_sys_release in
10909Darwin/*)
10910 _CUR_CFLAGS="${CFLAGS}"
10911 _CUR_LDFLAGS="${LDFLAGS}"
10912 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10913 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10914 ;;
10915esac
10916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10918$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010919if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010921else
10922 ac_check_lib_save_LIBS=$LIBS
10923LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010925/* end confdefs.h. */
10926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927/* Override any GCC internal prototype to avoid an error.
10928 Use char because int might match the return type of a GCC
10929 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010930#ifdef __cplusplus
10931extern "C"
10932#endif
10933char inflateCopy ();
10934int
10935main ()
10936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010938 ;
10939 return 0;
10940}
10941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010942if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010943 ac_cv_lib_z_inflateCopy=yes
10944else
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010947rm -f core conftest.err conftest.$ac_objext \
10948 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010949LIBS=$ac_check_lib_save_LIBS
10950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10952$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010953if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010954
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010956
10957fi
10958
10959
10960case $ac_sys_system/$ac_sys_release in
10961Darwin/*)
10962 CFLAGS="${_CUR_CFLAGS}"
10963 LDFLAGS="${_CUR_LDFLAGS}"
10964 ;;
10965esac
10966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10968$as_echo_n "checking for hstrerror... " >&6; }
10969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010970/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010971
Martin v. Löwise9416172003-05-03 10:12:45 +000010972#include <netdb.h>
10973
Martin v. Löwise9416172003-05-03 10:12:45 +000010974int
10975main ()
10976{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010977void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010978 ;
10979 return 0;
10980}
10981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010982if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010985
Matthias Kloseb159a552010-04-25 21:00:44 +000010986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10990$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010991
10992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010993rm -f core conftest.err conftest.$ac_objext \
10994 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995
Matthias Kloseb9621712010-04-24 17:59:49 +000010996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10997$as_echo_n "checking for inet_aton... " >&6; }
10998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011000
Martin v. Löwis86d66262006-02-17 08:40:11 +000011001#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011002#include <sys/socket.h>
11003#include <netinet/in.h>
11004#include <arpa/inet.h>
11005
Martin v. Löwise9416172003-05-03 10:12:45 +000011006int
11007main ()
11008{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011009void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011010 ;
11011 return 0;
11012}
11013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011015
Matthias Kloseb9621712010-04-24 17:59:49 +000011016$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011017
Matthias Kloseb159a552010-04-25 21:00:44 +000011018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011019$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011020else
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011023
11024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011025rm -f core conftest.err conftest.$ac_objext \
11026 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11029$as_echo_n "checking for inet_pton... " >&6; }
11030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011032
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011033#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011034#include <sys/socket.h>
11035#include <netinet/in.h>
11036#include <arpa/inet.h>
11037
Martin v. Löwise9416172003-05-03 10:12:45 +000011038int
11039main ()
11040{
11041void* p = inet_pton
11042 ;
11043 return 0;
11044}
11045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011049
Matthias Kloseb159a552010-04-25 21:00:44 +000011050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011052else
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011055
11056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011058
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011059# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11061$as_echo_n "checking for setgroups... " >&6; }
11062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011063/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011064
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011065#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011066#ifdef HAVE_GRP_H
11067#include <grp.h>
11068#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011069
Martin v. Löwisd5843682002-11-21 20:41:28 +000011070int
11071main ()
11072{
11073void* p = setgroups
11074 ;
11075 return 0;
11076}
11077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011078if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011079
Matthias Kloseb9621712010-04-24 17:59:49 +000011080$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011081
Matthias Kloseb159a552010-04-25 21:00:44 +000011082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011083$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011084else
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11086$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011087
11088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011090
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011091# check for openpty and forkpty
11092
11093for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011094do :
11095 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011096if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011098#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011099_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011100
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011101else
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11103$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011104if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011105 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011106else
Martin v. Löwis11437992002-04-12 09:54:03 +000011107 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011108LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011112/* Override any GCC internal prototype to avoid an error.
11113 Use char because int might match the return type of a GCC
11114 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011115#ifdef __cplusplus
11116extern "C"
11117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011118char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011119int
11120main ()
11121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ;
11124 return 0;
11125}
11126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011129else
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011132rm -f core conftest.err conftest.$ac_objext \
11133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011134LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11137$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011138if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011139 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011140 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011141else
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11143$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011144if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011146else
11147 ac_check_lib_save_LIBS=$LIBS
11148LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011150/* end confdefs.h. */
11151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011152/* Override any GCC internal prototype to avoid an error.
11153 Use char because int might match the return type of a GCC
11154 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011155#ifdef __cplusplus
11156extern "C"
11157#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011158char openpty ();
11159int
11160main ()
11161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011163 ;
11164 return 0;
11165}
11166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011168 ac_cv_lib_bsd_openpty=yes
11169else
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011172rm -f core conftest.err conftest.$ac_objext \
11173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011174LIBS=$ac_check_lib_save_LIBS
11175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11177$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011178if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011179 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011180 LIBS="$LIBS -lbsd"
11181fi
11182
11183
11184fi
11185
Fred Drake8cef4cf2000-06-28 16:40:38 +000011186
11187fi
11188done
11189
11190for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011191do :
11192 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011193if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011195#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011196_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011197
Fred Drake8cef4cf2000-06-28 16:40:38 +000011198else
Matthias Kloseb9621712010-04-24 17:59:49 +000011199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11200$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011201if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011202 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011203else
Martin v. Löwis11437992002-04-12 09:54:03 +000011204 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011205LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011209/* Override any GCC internal prototype to avoid an error.
11210 Use char because int might match the return type of a GCC
11211 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011212#ifdef __cplusplus
11213extern "C"
11214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011215char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011216int
11217main ()
11218{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011220 ;
11221 return 0;
11222}
11223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011224if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011226else
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011229rm -f core conftest.err conftest.$ac_objext \
11230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011231LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11234$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011235if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011236 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011237 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011238else
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11240$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011241if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011243else
11244 ac_check_lib_save_LIBS=$LIBS
11245LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011247/* end confdefs.h. */
11248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249/* Override any GCC internal prototype to avoid an error.
11250 Use char because int might match the return type of a GCC
11251 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011252#ifdef __cplusplus
11253extern "C"
11254#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011255char forkpty ();
11256int
11257main ()
11258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011260 ;
11261 return 0;
11262}
11263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011265 ac_cv_lib_bsd_forkpty=yes
11266else
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011269rm -f core conftest.err conftest.$ac_objext \
11270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011271LIBS=$ac_check_lib_save_LIBS
11272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11274$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011275if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011277 LIBS="$LIBS -lbsd"
11278fi
11279
11280
11281fi
11282
Fred Drake8cef4cf2000-06-28 16:40:38 +000011283
11284fi
11285done
11286
Jack Jansendd19cf82001-12-06 22:36:17 +000011287
Christian Heimesb186d002008-03-18 15:15:01 +000011288# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011289for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011290do :
11291 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011292if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011293 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011294#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011295_ACEOF
11296
11297fi
11298done
11299
11300
Michael W. Hudson54241132001-12-07 15:38:26 +000011301# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011302for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011303do :
11304 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11305ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011306if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011309_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011310
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011311fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011312done
11313
Michael W. Hudson54241132001-12-07 15:38:26 +000011314
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011315ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011316if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011317 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011318
Martin v. Löwis1142de32002-03-29 16:28:31 +000011319else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011321 *" dup2.$ac_objext "* ) ;;
11322 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011323 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011324esac
11325
Martin v. Löwis1142de32002-03-29 16:28:31 +000011326fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011327
11328ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011329if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011330 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11331
11332else
11333 case " $LIBOBJS " in
11334 *" getcwd.$ac_objext "* ) ;;
11335 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11336 ;;
11337esac
11338
11339fi
11340
11341ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011342if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011343 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11344
11345else
11346 case " $LIBOBJS " in
11347 *" strdup.$ac_objext "* ) ;;
11348 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11349 ;;
11350esac
11351
11352fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011353
11354
11355for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011356do :
11357 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011358if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011360#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011363/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011364#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011365int
11366main ()
11367{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 ;
11370 return 0;
11371}
11372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Matthias Kloseb9621712010-04-24 17:59:49 +000011375$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011376
Guido van Rossum627b2d71993-12-24 10:39:16 +000011377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011379
Guido van Rossum627b2d71993-12-24 10:39:16 +000011380fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011381done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011382
Jack Jansen150753c2003-03-29 22:07:47 +000011383for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011384do :
11385 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011386if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011387 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011388#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011391/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011392#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011393int
11394main ()
11395{
11396setpgrp(0,0);
11397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011404
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011407
11408fi
11409done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011410
Thomas Wouters3a584202000-08-05 23:28:51 +000011411for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011412do :
11413 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011414if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011416#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011419/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011420#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011421int
11422main ()
11423{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 ;
11426 return 0;
11427}
11428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429if ac_fn_c_try_compile "$LINENO"; then :
11430
Guido van Rossum627b2d71993-12-24 10:39:16 +000011431else
Skip Montanaro6dead952003-09-25 14:50:04 +000011432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011434
Martin v. Löwis11437992002-04-12 09:54:03 +000011435
Guido van Rossum627b2d71993-12-24 10:39:16 +000011436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011438
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011440done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011441
Michael W. Hudson54241132001-12-07 15:38:26 +000011442
Victor Stinnere0be4232011-10-25 13:06:09 +020011443for ac_func in clock_gettime
11444do :
11445 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11446if test "x$ac_cv_func_clock_gettime" = xyes; then :
11447 cat >>confdefs.h <<_ACEOF
11448#define HAVE_CLOCK_GETTIME 1
11449_ACEOF
11450
11451else
11452
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11454$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11455if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11456 $as_echo_n "(cached) " >&6
11457else
11458 ac_check_lib_save_LIBS=$LIBS
11459LIBS="-lrt $LIBS"
11460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11461/* end confdefs.h. */
11462
11463/* Override any GCC internal prototype to avoid an error.
11464 Use char because int might match the return type of a GCC
11465 builtin and then its argument prototype would still apply. */
11466#ifdef __cplusplus
11467extern "C"
11468#endif
11469char clock_gettime ();
11470int
11471main ()
11472{
11473return clock_gettime ();
11474 ;
11475 return 0;
11476}
11477_ACEOF
11478if ac_fn_c_try_link "$LINENO"; then :
11479 ac_cv_lib_rt_clock_gettime=yes
11480else
11481 ac_cv_lib_rt_clock_gettime=no
11482fi
11483rm -f core conftest.err conftest.$ac_objext \
11484 conftest$ac_exeext conftest.$ac_ext
11485LIBS=$ac_check_lib_save_LIBS
11486fi
11487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11488$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11489if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11490
11491 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11492
11493
11494$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11495
11496
11497fi
11498
11499
11500fi
11501done
11502
11503
11504for ac_func in clock_getres
11505do :
11506 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11507if test "x$ac_cv_func_clock_getres" = xyes; then :
11508 cat >>confdefs.h <<_ACEOF
11509#define HAVE_CLOCK_GETRES 1
11510_ACEOF
11511
11512else
11513
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11515$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11516if ${ac_cv_lib_rt_clock_getres+:} false; then :
11517 $as_echo_n "(cached) " >&6
11518else
11519 ac_check_lib_save_LIBS=$LIBS
11520LIBS="-lrt $LIBS"
11521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11522/* end confdefs.h. */
11523
11524/* Override any GCC internal prototype to avoid an error.
11525 Use char because int might match the return type of a GCC
11526 builtin and then its argument prototype would still apply. */
11527#ifdef __cplusplus
11528extern "C"
11529#endif
11530char clock_getres ();
11531int
11532main ()
11533{
11534return clock_getres ();
11535 ;
11536 return 0;
11537}
11538_ACEOF
11539if ac_fn_c_try_link "$LINENO"; then :
11540 ac_cv_lib_rt_clock_getres=yes
11541else
11542 ac_cv_lib_rt_clock_getres=no
11543fi
11544rm -f core conftest.err conftest.$ac_objext \
11545 conftest$ac_exeext conftest.$ac_ext
11546LIBS=$ac_check_lib_save_LIBS
11547fi
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11549$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11550if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11551
11552 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11553
11554
11555fi
11556
11557
11558fi
11559done
11560
11561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11563$as_echo_n "checking for major... " >&6; }
11564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011565/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011566
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011567#if defined(MAJOR_IN_MKDEV)
11568#include <sys/mkdev.h>
11569#elif defined(MAJOR_IN_SYSMACROS)
11570#include <sys/sysmacros.h>
11571#else
11572#include <sys/types.h>
11573#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011574
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011575int
11576main ()
11577{
11578
11579 makedev(major(0),minor(0));
11580
11581 ;
11582 return 0;
11583}
11584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011586
11587
Matthias Kloseb9621712010-04-24 17:59:49 +000011588$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011589
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11591$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011592
11593else
Skip Montanaro6dead952003-09-25 14:50:04 +000011594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11596$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011597
11598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011599rm -f core conftest.err conftest.$ac_objext \
11600 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011601
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011602# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011603# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11605$as_echo_n "checking for getaddrinfo... " >&6; }
11606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011607/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011608
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011609#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011610#include <sys/socket.h>
11611#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011612#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011613
Martin v. Löwis11437992002-04-12 09:54:03 +000011614int
11615main ()
11616{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011617getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011618 ;
11619 return 0;
11620}
11621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011623 have_getaddrinfo=yes
11624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011627rm -f core conftest.err conftest.$ac_objext \
11628 conftest$ac_exeext conftest.$ac_ext
11629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11630$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011631if test $have_getaddrinfo = yes
11632then
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11634$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011635 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011639
11640if test "${enable_ipv6+set}" = set; then
11641 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11642else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011643 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011644fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011645else
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011647/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011648
Stefan Krah19c21392012-11-22 23:47:32 +010011649#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011650#include <sys/types.h>
11651#include <netdb.h>
11652#include <string.h>
11653#include <sys/socket.h>
11654#include <netinet/in.h>
11655
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011656int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011657{
11658 int passive, gaierr, inet4 = 0, inet6 = 0;
11659 struct addrinfo hints, *ai, *aitop;
11660 char straddr[INET6_ADDRSTRLEN], strport[16];
11661
11662 for (passive = 0; passive <= 1; passive++) {
11663 memset(&hints, 0, sizeof(hints));
11664 hints.ai_family = AF_UNSPEC;
11665 hints.ai_flags = passive ? AI_PASSIVE : 0;
11666 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011667 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011668 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11669 (void)gai_strerror(gaierr);
11670 goto bad;
11671 }
11672 for (ai = aitop; ai; ai = ai->ai_next) {
11673 if (ai->ai_addr == NULL ||
11674 ai->ai_addrlen == 0 ||
11675 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11676 straddr, sizeof(straddr), strport, sizeof(strport),
11677 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11678 goto bad;
11679 }
11680 switch (ai->ai_family) {
11681 case AF_INET:
11682 if (strcmp(strport, "54321") != 0) {
11683 goto bad;
11684 }
11685 if (passive) {
11686 if (strcmp(straddr, "0.0.0.0") != 0) {
11687 goto bad;
11688 }
11689 } else {
11690 if (strcmp(straddr, "127.0.0.1") != 0) {
11691 goto bad;
11692 }
11693 }
11694 inet4++;
11695 break;
11696 case AF_INET6:
11697 if (strcmp(strport, "54321") != 0) {
11698 goto bad;
11699 }
11700 if (passive) {
11701 if (strcmp(straddr, "::") != 0) {
11702 goto bad;
11703 }
11704 } else {
11705 if (strcmp(straddr, "::1") != 0) {
11706 goto bad;
11707 }
11708 }
11709 inet6++;
11710 break;
11711 case AF_UNSPEC:
11712 goto bad;
11713 break;
11714 default:
11715 /* another family support? */
11716 break;
11717 }
11718 }
11719 }
11720
11721 if (!(inet4 == 0 || inet4 == 2))
11722 goto bad;
11723 if (!(inet6 == 0 || inet6 == 2))
11724 goto bad;
11725
11726 if (aitop)
11727 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011728 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011729
11730 bad:
11731 if (aitop)
11732 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011733 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011734}
11735
Martin v. Löwis11437992002-04-12 09:54:03 +000011736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011737if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011738 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011739else
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11743 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011746fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011747
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011749
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11751$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11752
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011753if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011754then
11755 if test $ipv6 = yes
11756 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011757 echo 'Fatal: You must get working getaddrinfo() function.'
11758 echo ' or you can specify "--disable-ipv6"'.
11759 exit 1
11760 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011761else
Martin v. Löwis11437992002-04-12 09:54:03 +000011762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011764
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011765fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011766
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011767for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011768do :
11769 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011770if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011772#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011773_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011774
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011775fi
11776done
11777
Michael W. Hudson54241132001-12-07 15:38:26 +000011778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11781$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011782if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011786/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011787#include <sys/types.h>
11788#include <sys/time.h>
11789#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
Martin v. Löwis11437992002-04-12 09:54:03 +000011791int
11792main ()
11793{
11794if ((struct tm *) 0)
11795return 0;
11796 ;
11797 return 0;
11798}
11799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11808$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011809if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011812
11813fi
11814
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11816$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011821/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011822#include <sys/types.h>
11823#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011824
Martin v. Löwis11437992002-04-12 09:54:03 +000011825int
11826main ()
11827{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011828struct tm tm;
11829 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011831 ;
11832 return 0;
11833}
11834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011835if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011836 ac_cv_struct_tm=time.h
11837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11843$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011844if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011845
Matthias Kloseb9621712010-04-24 17:59:49 +000011846$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011847
11848fi
11849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850ac_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 +000011851#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011852
Matthias Kloseb9621712010-04-24 17:59:49 +000011853"
Victor Stinnere0be4232011-10-25 13:06:09 +020011854if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011855
11856cat >>confdefs.h <<_ACEOF
11857#define HAVE_STRUCT_TM_TM_ZONE 1
11858_ACEOF
11859
11860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011861fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011862
Martin v. Löwis11437992002-04-12 09:54:03 +000011863if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011866
11867else
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11869"
Victor Stinnere0be4232011-10-25 13:06:09 +020011870if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011874fi
11875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011876cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011878_ACEOF
11879
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11881$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011882if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011884else
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011886/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011887#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888#if !HAVE_DECL_TZNAME
11889extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011891
Martin v. Löwis11437992002-04-12 09:54:03 +000011892int
11893main ()
11894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011895return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011896 ;
11897 return 0;
11898}
11899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011900if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011901 ac_cv_var_tzname=yes
11902else
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011905rm -f core conftest.err conftest.$ac_objext \
11906 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11909$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011910 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011911
Matthias Kloseb9621712010-04-24 17:59:49 +000011912$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011913
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011914 fi
11915fi
11916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917ac_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 +020011918if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011919
11920cat >>confdefs.h <<_ACEOF
11921#define HAVE_STRUCT_STAT_ST_RDEV 1
11922_ACEOF
11923
11924
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011925fi
11926
Matthias Kloseb9621712010-04-24 17:59:49 +000011927ac_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 +020011928if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011929
Martin v. Löwis11437992002-04-12 09:54:03 +000011930cat >>confdefs.h <<_ACEOF
11931#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11932_ACEOF
11933
11934
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011935fi
11936
Matthias Kloseb9621712010-04-24 17:59:49 +000011937ac_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 +020011938if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011939
11940cat >>confdefs.h <<_ACEOF
11941#define HAVE_STRUCT_STAT_ST_FLAGS 1
11942_ACEOF
11943
11944
11945fi
11946
Matthias Kloseb9621712010-04-24 17:59:49 +000011947ac_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 +020011948if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011949
11950cat >>confdefs.h <<_ACEOF
11951#define HAVE_STRUCT_STAT_ST_GEN 1
11952_ACEOF
11953
11954
11955fi
11956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957ac_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 +020011958if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011959
11960cat >>confdefs.h <<_ACEOF
11961#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11962_ACEOF
11963
11964
11965fi
11966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967ac_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 +020011968if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011969
Martin v. Löwis11437992002-04-12 09:54:03 +000011970cat >>confdefs.h <<_ACEOF
11971#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11972_ACEOF
11973
11974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011976
11977else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011979 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011980 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11981 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011982esac
11983
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011984fi
11985
Michael W. Hudson54241132001-12-07 15:38:26 +000011986
Martin v. Löwis11437992002-04-12 09:54:03 +000011987
Matthias Kloseb9621712010-04-24 17:59:49 +000011988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11989$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011990if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011992else
Matthias Kloseb159a552010-04-25 21:00:44 +000011993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011995/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011996#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011997int
11998main ()
11999{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012000return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 ;
12002 return 0;
12003}
12004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012005if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012006 ac_cv_header_time_altzone=yes
12007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012012fi
12013
Matthias Kloseb9621712010-04-24 17:59:49 +000012014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12015$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012019
12020fi
12021
Guido van Rossumda88dad1995-01-26 00:46:29 +000012022was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12024$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012026/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012027
12028#include <sys/types.h>
12029#include <sys/select.h>
12030#include <sys/time.h>
12031
Martin v. Löwis11437992002-04-12 09:54:03 +000012032int
12033main ()
12034{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012035;
Martin v. Löwis11437992002-04-12 09:54:03 +000012036 ;
12037 return 0;
12038}
12039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012040if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012041
12042
Matthias Kloseb9621712010-04-24 17:59:49 +000012043$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012044
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012045 was_it_defined=yes
12046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12050$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12053$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012054if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012058/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012059#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012060int
12061main ()
12062{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012063struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 ;
12065 return 0;
12066}
12067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012069 ac_cv_struct_addrinfo=yes
12070else
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12074fi
12075
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12077$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012078if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012081
12082fi
12083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12085$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012088else
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012090/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012091
12092# include <sys/types.h>
12093# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012094int
12095main ()
12096{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012097struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012098 ;
12099 return 0;
12100}
12101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012102if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012103 ac_cv_struct_sockaddr_storage=yes
12104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12108fi
12109
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12111$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012112if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012113
Matthias Kloseb9621712010-04-24 17:59:49 +000012114$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012115
12116fi
12117
Guido van Rossum627b2d71993-12-24 10:39:16 +000012118# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12121$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012122if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012124else
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012127$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012128int
12129main ()
12130{
12131static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012132test_array [0] = 0;
12133return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012134
12135 ;
12136 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012137}
Martin v. Löwis11437992002-04-12 09:54:03 +000012138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012139if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012140 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012141else
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12147$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012148if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012150
12151fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12154$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012155if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012159/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160
Martin v. Löwis11437992002-04-12 09:54:03 +000012161int
12162main ()
12163{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012164
Martin v. Löwis11437992002-04-12 09:54:03 +000012165#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012166 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012168 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170 char const *const *pcpcc;
12171 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 /* NEC SVR4.0.2 mips cc rejects this. */
12173 struct point {int x, y;};
12174 static struct point const zero = {0,0};
12175 /* AIX XL C 1.02.0.0 rejects this.
12176 It does not let you subtract one const X* pointer from another in
12177 an arm of an if-expression whose if-part is not a constant
12178 expression */
12179 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012180 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182 ++pcpcc;
12183 ppc = (char**) pcpcc;
12184 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012185 { /* SCO 3.2v4 cc rejects this sort of thing. */
12186 char tx;
12187 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012189
Martin v. Löwis11437992002-04-12 09:54:03 +000012190 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012191 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 }
12193 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12194 int x[] = {25, 17};
12195 const int *foo = &x[0];
12196 ++foo;
12197 }
12198 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12199 typedef const int *iptr;
12200 iptr p = 0;
12201 ++p;
12202 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012203 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012205 struct s { int j; const int *ap[3]; } bx;
12206 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 }
12208 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12209 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012213#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012214
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 ;
12216 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217}
Martin v. Löwis11437992002-04-12 09:54:03 +000012218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012219if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012220 ac_cv_c_const=yes
12221else
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12227$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012228if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012231
12232fi
12233
Michael W. Hudson54241132001-12-07 15:38:26 +000012234
Guido van Rossumda88dad1995-01-26 00:46:29 +000012235works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12237$as_echo_n "checking for working volatile... " >&6; }
12238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012239/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012240
Martin v. Löwis11437992002-04-12 09:54:03 +000012241int
12242main ()
12243{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012244volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012245 ;
12246 return 0;
12247}
12248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012249if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012250 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012251else
Skip Montanaro6dead952003-09-25 14:50:04 +000012252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012254
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012255
Guido van Rossum627b2d71993-12-24 10:39:16 +000012256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12259$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012260
Guido van Rossumda88dad1995-01-26 00:46:29 +000012261works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12263$as_echo_n "checking for working signed char... " >&6; }
12264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012265/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012266
Martin v. Löwis11437992002-04-12 09:54:03 +000012267int
12268main ()
12269{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012270signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012271 ;
12272 return 0;
12273}
12274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012275if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012276 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012277else
Skip Montanaro6dead952003-09-25 14:50:04 +000012278
Matthias Kloseb9621712010-04-24 17:59:49 +000012279$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012280
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012281
Guido van Rossum7f43da71994-08-01 12:15:30 +000012282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12285$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012286
Guido van Rossumda88dad1995-01-26 00:46:29 +000012287have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12289$as_echo_n "checking for prototypes... " >&6; }
12290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012291/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012292int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012293int
12294main ()
12295{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012296return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012297 ;
12298 return 0;
12299}
12300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012302
Matthias Kloseb9621712010-04-24 17:59:49 +000012303$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012304
Matthias Kloseb159a552010-04-25 21:00:44 +000012305 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12309$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012310
Guido van Rossumda88dad1995-01-26 00:46:29 +000012311works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12313$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012316
12317#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012318int foo(int x, ...) {
12319 va_list va;
12320 va_start(va, x);
12321 va_arg(va, int);
12322 va_arg(va, char *);
12323 va_arg(va, double);
12324 return 0;
12325}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012326
Martin v. Löwis11437992002-04-12 09:54:03 +000012327int
12328main ()
12329{
Guido van Rossum90eea071996-08-30 20:58:57 +000012330return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012331 ;
12332 return 0;
12333}
12334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
12337
Matthias Kloseb9621712010-04-24 17:59:49 +000012338$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012339
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012340 works=yes
12341
Guido van Rossum627b2d71993-12-24 10:39:16 +000012342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12345$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012346
Martin v. Löwisd6320502004-08-12 13:45:08 +000012347# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12349$as_echo_n "checking for socketpair... " >&6; }
12350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012351/* end confdefs.h. */
12352
12353#include <sys/types.h>
12354#include <sys/socket.h>
12355
12356int
12357main ()
12358{
12359void *x=socketpair
12360 ;
12361 return 0;
12362}
12363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012365
Matthias Kloseb9621712010-04-24 17:59:49 +000012366$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012367
Matthias Kloseb159a552010-04-25 21:00:44 +000012368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012369$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012370else
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12372$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012373
12374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012376
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012377# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12379$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012381/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012382#include <sys/types.h>
12383#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012384int
12385main ()
12386{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387struct sockaddr x;
12388x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 ;
12390 return 0;
12391}
12392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393if ac_fn_c_try_compile "$LINENO"; then :
12394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12395$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012396
Matthias Kloseb9621712010-04-24 17:59:49 +000012397$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012398
12399else
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12401$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012402
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012405
Guido van Rossumda88dad1995-01-26 00:46:29 +000012406va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12408$as_echo_n "checking whether va_list is an array... " >&6; }
12409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012410/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411
12412#ifdef HAVE_STDARG_PROTOTYPES
12413#include <stdarg.h>
12414#else
12415#include <varargs.h>
12416#endif
12417
Martin v. Löwis11437992002-04-12 09:54:03 +000012418int
12419main ()
12420{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012421va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 ;
12423 return 0;
12424}
12425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012426if ac_fn_c_try_compile "$LINENO"; then :
12427
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012428else
Skip Montanaro6dead952003-09-25 14:50:04 +000012429
Martin v. Löwis11437992002-04-12 09:54:03 +000012430
Matthias Kloseb9621712010-04-24 17:59:49 +000012431$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012432
Guido van Rossumda88dad1995-01-26 00:46:29 +000012433 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012434
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12438$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012439
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012440# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
12442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012444if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012445
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12449$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012450 OLD_CFLAGS=$CFLAGS
12451 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012453/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012454
12455# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457int
12458main ()
12459{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012460
12461 char *name;
12462 struct hostent *he, *res;
12463 char buffer[2048];
12464 int buflen = 2048;
12465 int h_errnop;
12466
12467 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
12469 ;
12470 return 0;
12471}
12472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012474
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012476
Martin v. Löwis11437992002-04-12 09:54:03 +000012477
Matthias Kloseb9621712010-04-24 17:59:49 +000012478$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012479
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12481$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012483else
Skip Montanaro6dead952003-09-25 14:50:04 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12486$as_echo "no" >&6; }
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12488$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012490/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012491
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012492# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012493
Martin v. Löwis11437992002-04-12 09:54:03 +000012494int
12495main ()
12496{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012497
12498 char *name;
12499 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012500 char buffer[2048];
12501 int buflen = 2048;
12502 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012503
Matthias Kloseb159a552010-04-25 21:00:44 +000012504 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
12506 ;
12507 return 0;
12508}
12509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012510if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012513
Martin v. Löwis11437992002-04-12 09:54:03 +000012514
Matthias Kloseb159a552010-04-25 21:00:44 +000012515$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012516
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12518$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012520else
Skip Montanaro6dead952003-09-25 14:50:04 +000012521
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12523$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12525$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12527/* end confdefs.h. */
12528
12529# include <netdb.h>
12530
12531int
12532main ()
12533{
12534
12535 char *name;
12536 struct hostent *he;
12537 struct hostent_data data;
12538
12539 (void) gethostbyname_r(name, he, &data);
12540
12541 ;
12542 return 0;
12543}
12544_ACEOF
12545if ac_fn_c_try_compile "$LINENO"; then :
12546
12547 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12548
12549
12550$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12551
12552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12553$as_echo "yes" >&6; }
12554
12555else
12556
12557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12558$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012559
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012562
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012568 CFLAGS=$OLD_CFLAGS
12569
12570else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 for ac_func in gethostbyname
12573do :
12574 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012575if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012576 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012577#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012578_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012579
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012580fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012581done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012582
Michael W. Hudson54241132001-12-07 15:38:26 +000012583
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012584fi
12585
Michael W. Hudson54241132001-12-07 15:38:26 +000012586
12587
12588
12589
12590
12591
Guido van Rossum627b2d71993-12-24 10:39:16 +000012592# checks for system services
12593# (none yet)
12594
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012595# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012596ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012597if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012598
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12601$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012602if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012604else
Martin v. Löwis11437992002-04-12 09:54:03 +000012605 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012606LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610/* Override any GCC internal prototype to avoid an error.
12611 Use char because int might match the return type of a GCC
12612 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012613#ifdef __cplusplus
12614extern "C"
12615#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012616char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012617int
12618main ()
12619{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 ;
12622 return 0;
12623}
12624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012625if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012627else
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012630rm -f core conftest.err conftest.$ac_objext \
12631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012632LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12635$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012636if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 cat >>confdefs.h <<_ACEOF
12638#define HAVE_LIBIEEE 1
12639_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012640
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012641 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012642
Guido van Rossum627b2d71993-12-24 10:39:16 +000012643fi
12644
Michael W. Hudson54241132001-12-07 15:38:26 +000012645
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012646fi
12647
Michael W. Hudson54241132001-12-07 15:38:26 +000012648
Guido van Rossum7f253911997-05-09 02:42:48 +000012649# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12651$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012654if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012656if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012657then
12658
Matthias Kloseb9621712010-04-24 17:59:49 +000012659$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12662$as_echo "yes" >&6; }
12663else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12664$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012665fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012666else
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12668$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669fi
12670
Guido van Rossum7f253911997-05-09 02:42:48 +000012671
Guido van Rossum7f43da71994-08-01 12:15:30 +000012672# check for --with-libm=...
12673
Guido van Rossum563e7081996-09-10 18:20:48 +000012674case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012675Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012676*) LIBM=-lm
12677esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12679$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012682if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012684if test "$withval" = no
12685then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12687$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012688elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012689then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12691$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012692else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012693fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012694else
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12696$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697fi
12698
Guido van Rossum7f43da71994-08-01 12:15:30 +000012699
12700# check for --with-libc=...
12701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12703$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012706if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012707 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012708if test "$withval" = no
12709then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12711$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012712elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012713then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12715$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012716else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012717fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012718else
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12720$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721fi
12722
Guido van Rossum7f43da71994-08-01 12:15:30 +000012723
Stefan Krah1919b7e2012-03-21 18:25:23 +010012724# **************************************
12725# * Check for gcc x64 inline assembler *
12726# **************************************
12727
12728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12729$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12731/* end confdefs.h. */
12732
12733int
12734main ()
12735{
12736
12737 __asm__ __volatile__ ("movq %rcx, %rax");
12738
12739 ;
12740 return 0;
12741}
12742_ACEOF
12743if ac_fn_c_try_compile "$LINENO"; then :
12744 have_gcc_asm_for_x64=yes
12745else
12746 have_gcc_asm_for_x64=no
12747fi
12748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12750$as_echo "$have_gcc_asm_for_x64" >&6; }
12751if test "$have_gcc_asm_for_x64" = yes
12752then
12753
12754$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12755
12756fi
12757
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012758# **************************************************
12759# * Check for various properties of floating point *
12760# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12763$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012764if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012766else
12767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012769 ac_cv_little_endian_double=no
12770else
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012772/* end confdefs.h. */
12773
12774#include <string.h>
12775int main() {
12776 double x = 9006104071832581.0;
12777 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12778 return 0;
12779 else
12780 return 1;
12781}
12782
12783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012784if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012785 ac_cv_little_endian_double=yes
12786else
Matthias Kloseb9621712010-04-24 17:59:49 +000012787 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012791fi
12792
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012793fi
12794
Matthias Kloseb9621712010-04-24 17:59:49 +000012795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12796$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012797if test "$ac_cv_little_endian_double" = yes
12798then
12799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012801
12802fi
12803
Matthias Kloseb9621712010-04-24 17:59:49 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12805$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012806if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012808else
12809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012811 ac_cv_big_endian_double=no
12812else
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012814/* end confdefs.h. */
12815
12816#include <string.h>
12817int main() {
12818 double x = 9006104071832581.0;
12819 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12820 return 0;
12821 else
12822 return 1;
12823}
12824
12825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012826if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012827 ac_cv_big_endian_double=yes
12828else
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012833fi
12834
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012835fi
12836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12838$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012839if test "$ac_cv_big_endian_double" = yes
12840then
12841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012843
12844fi
12845
12846# Some ARM platforms use a mixed-endian representation for doubles.
12847# While Python doesn't currently have full support for these platforms
12848# (see e.g., issue 1762561), we can at least make sure that float <-> string
12849# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12851$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012852if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012853 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012854else
12855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012857 ac_cv_mixed_endian_double=no
12858else
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012860/* end confdefs.h. */
12861
12862#include <string.h>
12863int main() {
12864 double x = 9006104071832581.0;
12865 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12866 return 0;
12867 else
12868 return 1;
12869}
12870
12871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012873 ac_cv_mixed_endian_double=yes
12874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012879fi
12880
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012881fi
12882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12884$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012885if test "$ac_cv_mixed_endian_double" = yes
12886then
12887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012889
12890fi
12891
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012892# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012893# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012894# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012895# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012896# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012897# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012898
12899# This inline assembler syntax may also work for suncc and icc,
12900# so we try it on all platforms.
12901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12903$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012905/* end confdefs.h. */
12906
12907int
12908main ()
12909{
12910
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012911 unsigned short cw;
12912 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12913 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012914
12915 ;
12916 return 0;
12917}
12918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012919if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012920 have_gcc_asm_for_x87=yes
12921else
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012923fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12926$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012927if test "$have_gcc_asm_for_x87" = yes
12928then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012929
Matthias Kloseb9621712010-04-24 17:59:49 +000012930$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012931
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012934# Detect whether system arithmetic is subject to x87-style double
12935# rounding issues. The result of this test has little meaning on non
12936# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12937# mode is round-to-nearest and double rounding issues are present, and
12938# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12940$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012941# $BASECFLAGS may affect the result
12942ac_save_cc="$CC"
12943CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012944if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012945 ac_cv_x87_double_rounding=no
12946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012948/* end confdefs.h. */
12949
12950#include <stdlib.h>
12951#include <math.h>
12952int main() {
12953 volatile double x, y, z;
12954 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12955 x = 0.99999999999999989; /* 1-2**-53 */
12956 y = 1./x;
12957 if (y != 1.)
12958 exit(0);
12959 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12960 x = 1e16;
12961 y = 2.99999;
12962 z = x + y;
12963 if (z != 1e16+4.)
12964 exit(0);
12965 /* both tests show evidence of double rounding */
12966 exit(1);
12967}
12968
12969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012970if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012971 ac_cv_x87_double_rounding=no
12972else
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12976 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012977fi
12978
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012979CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12981$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012982if test "$ac_cv_x87_double_rounding" = yes
12983then
12984
Matthias Kloseb9621712010-04-24 17:59:49 +000012985$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012986
12987fi
12988
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012989# ************************************
12990# * Check for mathematical functions *
12991# ************************************
12992
12993LIBS_SAVE=$LIBS
12994LIBS="$LIBS $LIBM"
12995
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012996for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12997do :
12998 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12999ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013000if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013001 cat >>confdefs.h <<_ACEOF
13002#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13003_ACEOF
13004
13005fi
13006done
13007
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013008for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013009do :
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
13020ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13021"
Victor Stinnere0be4232011-10-25 13:06:09 +020013022if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013023 ac_have_decl=1
13024else
13025 ac_have_decl=0
13026fi
13027
13028cat >>confdefs.h <<_ACEOF
13029#define HAVE_DECL_ISINF $ac_have_decl
13030_ACEOF
13031ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13032"
Victor Stinnere0be4232011-10-25 13:06:09 +020013033if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013034 ac_have_decl=1
13035else
13036 ac_have_decl=0
13037fi
13038
13039cat >>confdefs.h <<_ACEOF
13040#define HAVE_DECL_ISNAN $ac_have_decl
13041_ACEOF
13042ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13043"
Victor Stinnere0be4232011-10-25 13:06:09 +020013044if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013045 ac_have_decl=1
13046else
13047 ac_have_decl=0
13048fi
13049
13050cat >>confdefs.h <<_ACEOF
13051#define HAVE_DECL_ISFINITE $ac_have_decl
13052_ACEOF
13053
13054
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013055# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13056# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13058$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013059if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013061else
13062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013064 ac_cv_tanh_preserves_zero_sign=no
13065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013067/* end confdefs.h. */
13068
13069#include <math.h>
13070#include <stdlib.h>
13071int main() {
13072 /* return 0 if either negative zeros don't exist
13073 on this platform or if negative zeros exist
13074 and tanh(-0.) == -0. */
13075 if (atan2(0., -1.) == atan2(-0., -1.) ||
13076 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13077 else exit(1);
13078}
13079
13080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013081if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013082 ac_cv_tanh_preserves_zero_sign=yes
13083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013088fi
13089
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013090fi
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13093$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013094if test "$ac_cv_tanh_preserves_zero_sign" = yes
13095then
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013098
13099fi
13100
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013101if test "$ac_cv_func_log1p" = yes
13102then
13103 # On some versions of AIX, log1p(-0.) returns 0. instead of
13104 # -0. See issue #9920.
13105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13106$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013107 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013108 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013109else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013110
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013111 if test "$cross_compiling" = yes; then :
13112 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013113else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13115/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013116
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013117 #include <math.h>
13118 #include <stdlib.h>
13119 int main() {
13120 /* Fail if the signs of log1p(-0.) and -0. can be
13121 distinguished. */
13122 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13123 return 0;
13124 else
13125 return 1;
13126 }
13127
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013128_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013129if ac_fn_c_try_run "$LINENO"; then :
13130 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013131else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013132 ac_cv_log1p_drops_zero_sign=yes
13133fi
13134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13135 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013136fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013137
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013138fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013139
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13141$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13142fi
13143if test "$ac_cv_log1p_drops_zero_sign" = yes
13144then
13145
13146$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13147
13148fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013149
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013150LIBS=$LIBS_SAVE
13151
Mark Dickinsona614f042009-11-28 12:48:43 +000013152# For multiprocessing module, check that sem_open
13153# actually works. For FreeBSD versions <= 7.2,
13154# the kernel module that provides POSIX semaphores
13155# isn't loaded by default, so an attempt to call
13156# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13158$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013159if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013161else
Matthias Kloseb9621712010-04-24 17:59:49 +000013162 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013163 ac_cv_posix_semaphores_enabled=yes
13164else
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013166/* end confdefs.h. */
13167
13168#include <unistd.h>
13169#include <fcntl.h>
13170#include <stdio.h>
13171#include <semaphore.h>
13172#include <sys/stat.h>
13173
13174int main(void) {
13175 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13176 if (a == SEM_FAILED) {
13177 perror("sem_open");
13178 return 1;
13179 }
13180 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013181 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013182 return 0;
13183}
13184
13185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013186if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013187 ac_cv_posix_semaphores_enabled=yes
13188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13192 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013193fi
13194
13195
Mark Dickinsona614f042009-11-28 12:48:43 +000013196fi
13197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13199$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013200if test $ac_cv_posix_semaphores_enabled = no
13201then
13202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013204
13205fi
13206
Mark Dickinson10683072009-04-18 21:18:19 +000013207# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13209$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013210if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013212else
Matthias Kloseb9621712010-04-24 17:59:49 +000013213 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013214 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013215else
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013217/* end confdefs.h. */
13218
13219#include <unistd.h>
13220#include <fcntl.h>
13221#include <stdio.h>
13222#include <semaphore.h>
13223#include <sys/stat.h>
13224
13225int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013226 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013227 int count;
13228 int res;
13229 if(a==SEM_FAILED){
13230 perror("sem_open");
13231 return 1;
13232
13233 }
13234 res = sem_getvalue(a, &count);
13235 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013236 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013237 return res==-1 ? 1 : 0;
13238}
13239
Mark Dickinson10683072009-04-18 21:18:19 +000013240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013241if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013242 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013243else
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013248fi
13249
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013251fi
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13254$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013255if test $ac_cv_broken_sem_getvalue = yes
13256then
13257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013259
13260fi
13261
Mark Dickinsonbd792642009-03-18 20:06:12 +000013262# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13264$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013265# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013266if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013267 enableval=$enable_big_digits; case $enable_big_digits in
13268yes)
13269 enable_big_digits=30 ;;
13270no)
13271 enable_big_digits=15 ;;
1327215|30)
13273 ;;
13274*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013275 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 +000013276esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13278$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013279
13280cat >>confdefs.h <<_ACEOF
13281#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13282_ACEOF
13283
13284
13285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13287$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013288fi
13289
13290
Guido van Rossumef2255b2000-03-10 22:30:29 +000013291# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013292ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013293if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
13295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013297
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013298 wchar_h="yes"
13299
Guido van Rossumef2255b2000-03-10 22:30:29 +000013300else
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013302
13303fi
13304
Michael W. Hudson54241132001-12-07 15:38:26 +000013305
Martin v. Löwis11437992002-04-12 09:54:03 +000013306
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013307# determine wchar_t size
13308if test "$wchar_h" = yes
13309then
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13313# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13315$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013316if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13320"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013321
Martin v. Löwis11437992002-04-12 09:54:03 +000013322else
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 if test "$ac_cv_type_wchar_t" = yes; then
13324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013326as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013327See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328 else
13329 ac_cv_sizeof_wchar_t=0
13330 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013332
Martin v. Löwis11437992002-04-12 09:54:03 +000013333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13335$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336
13337
13338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013340#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013341_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013342
Michael W. Hudson54241132001-12-07 15:38:26 +000013343
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013344fi
13345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13347$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013348have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013350/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013351
13352#include <tcl.h>
13353#if TCL_UTF_MAX != 6
13354# error "NOT UCS4_TCL"
13355#endif
13356int
13357main ()
13358{
13359
13360 ;
13361 return 0;
13362}
13363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013365
13366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013368
13369 have_ucs4_tcl=yes
13370
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13374$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013375
Skip Montanaro6dead952003-09-25 14:50:04 +000013376# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013377if test "$wchar_h" = yes
13378then
13379 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13381$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013382 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013384else
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013387 ac_cv_wchar_t_signed=yes
13388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013390/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013391
13392 #include <wchar.h>
13393 int main()
13394 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013395 /* Success: exit code 0 */
13396 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013397 }
13398
13399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013400if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013401 ac_cv_wchar_t_signed=yes
13402else
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13406 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013407fi
13408
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013409fi
13410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13412$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413fi
13414
Georg Brandl52d168a2008-01-07 18:10:24 +000013415# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013416if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013417 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013418then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013419 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
Georg Brandl52d168a2008-01-07 18:10:24 +000013423else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013424 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013425fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13427$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013428
13429# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13431$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013432if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 ac_cv_c_bigendian=unknown
13436 # See if we're dealing with a universal compiler.
13437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13438/* end confdefs.h. */
13439#ifndef __APPLE_CC__
13440 not a universal capable compiler
13441 #endif
13442 typedef int dummy;
13443
Skip Montanaro6dead952003-09-25 14:50:04 +000013444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013445if ac_fn_c_try_compile "$LINENO"; then :
13446
13447 # Check for potential -arch flags. It is not universal unless
13448 # there are at least two -arch flags with different values.
13449 ac_arch=
13450 ac_prev=
13451 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13452 if test -n "$ac_prev"; then
13453 case $ac_word in
13454 i?86 | x86_64 | ppc | ppc64)
13455 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13456 ac_arch=$ac_word
13457 else
13458 ac_cv_c_bigendian=universal
13459 break
13460 fi
13461 ;;
13462 esac
13463 ac_prev=
13464 elif test "x$ac_word" = "x-arch"; then
13465 ac_prev=arch
13466 fi
13467 done
13468fi
13469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13470 if test $ac_cv_c_bigendian = unknown; then
13471 # See if sys/param.h defines the BYTE_ORDER macro.
13472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013473/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013474#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013476
Martin v. Löwis11437992002-04-12 09:54:03 +000013477int
13478main ()
13479{
Matthias Kloseb9621712010-04-24 17:59:49 +000013480#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13481 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13482 && LITTLE_ENDIAN)
13483 bogus endian macros
13484 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013485
13486 ;
13487 return 0;
13488}
13489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013490if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013491 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013493/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013494#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013496
Martin v. Löwis11437992002-04-12 09:54:03 +000013497int
13498main ()
13499{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013500#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 not big endian
13502 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013503
13504 ;
13505 return 0;
13506}
13507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013508if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013509 ac_cv_c_bigendian=yes
13510else
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013514fi
13515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13516 fi
13517 if test $ac_cv_c_bigendian = unknown; then
13518 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013520/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013521#include <limits.h>
13522
Martin v. Löwis11437992002-04-12 09:54:03 +000013523int
13524main ()
13525{
Matthias Kloseb9621712010-04-24 17:59:49 +000013526#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13527 bogus endian macros
13528 #endif
13529
Martin v. Löwis11437992002-04-12 09:54:03 +000013530 ;
13531 return 0;
13532}
13533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013534if ac_fn_c_try_compile "$LINENO"; then :
13535 # It does; now see whether it defined to _BIG_ENDIAN or not.
13536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13537/* end confdefs.h. */
13538#include <limits.h>
13539
13540int
13541main ()
13542{
13543#ifndef _BIG_ENDIAN
13544 not big endian
13545 #endif
13546
13547 ;
13548 return 0;
13549}
13550_ACEOF
13551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013553else
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13557fi
13558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13559 fi
13560 if test $ac_cv_c_bigendian = unknown; then
13561 # Compile a test program.
13562 if test "$cross_compiling" = yes; then :
13563 # Try to guess by grepping values from an object file.
13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13565/* end confdefs.h. */
13566short int ascii_mm[] =
13567 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13568 short int ascii_ii[] =
13569 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13570 int use_ascii (int i) {
13571 return ascii_mm[i] + ascii_ii[i];
13572 }
13573 short int ebcdic_ii[] =
13574 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13575 short int ebcdic_mm[] =
13576 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13577 int use_ebcdic (int i) {
13578 return ebcdic_mm[i] + ebcdic_ii[i];
13579 }
13580 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582int
13583main ()
13584{
13585return use_ascii (foo) == use_ebcdic (foo);
13586 ;
13587 return 0;
13588}
13589_ACEOF
13590if ac_fn_c_try_compile "$LINENO"; then :
13591 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13592 ac_cv_c_bigendian=yes
13593 fi
13594 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13595 if test "$ac_cv_c_bigendian" = unknown; then
13596 ac_cv_c_bigendian=no
13597 else
13598 # finding both strings is unlikely to happen, but who knows?
13599 ac_cv_c_bigendian=unknown
13600 fi
13601 fi
13602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013604else
Matthias Kloseb9621712010-04-24 17:59:49 +000013605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013606/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013608int
13609main ()
13610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 /* Are we little or big endian? From Harbison&Steele. */
13613 union
13614 {
13615 long int l;
13616 char c[sizeof (long int)];
13617 } u;
13618 u.l = 1;
13619 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013620
13621 ;
13622 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013623}
Martin v. Löwis11437992002-04-12 09:54:03 +000013624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013625if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013626 ac_cv_c_bigendian=no
13627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13637$as_echo "$ac_cv_c_bigendian" >&6; }
13638 case $ac_cv_c_bigendian in #(
13639 yes)
13640 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13641;; #(
13642 no)
13643 ;; #(
13644 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 ;; #(
13649 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013650 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013651 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013653
Michael W. Hudson54241132001-12-07 15:38:26 +000013654
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013655# ABI version string for Python extension modules. This appears between the
13656# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13657# from the following attributes which affect the ABI of this Python build (in
13658# this order):
13659#
13660# * The Python implementation (always 'cpython-' for us)
13661# * The major and minor version numbers
13662# * --with-pydebug (adds a 'd')
13663# * --with-pymalloc (adds a 'm')
13664# * --with-wide-unicode (adds a 'u')
13665#
13666# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013667# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13668# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013669
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13671$as_echo_n "checking ABIFLAGS... " >&6; }
13672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13673$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13675$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013676SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13678$as_echo "$SOABI" >&6; }
13679
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13681$as_echo_n "checking LDVERSION... " >&6; }
13682LDVERSION='$(VERSION)$(ABIFLAGS)'
13683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13684$as_echo "$LDVERSION" >&6; }
13685
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013686# SO is the extension of shared libraries `(including the dot!)
13687# -- usually .so, .sl on HP-UX, .dll on Cygwin
13688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13689$as_echo_n "checking SO... " >&6; }
13690if test -z "$SO"
13691then
13692 case $ac_sys_system in
13693 hp*|HP*)
13694 case `uname -m` in
13695 ia64) SO=.so;;
13696 *) SO=.sl;;
13697 esac
13698 ;;
13699 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013700 Linux*|GNU*)
13701 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013702 *) SO=.so;;
13703 esac
13704else
13705 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013706 echo
13707 echo '====================================================================='
13708 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013709 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013710 echo '+ Do you really mean to change the extension for shared libraries? +'
13711 echo '+ Continuing in 10 seconds to let you to ponder. +'
13712 echo '+ +'
13713 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013714 sleep 10
13715fi
13716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13717$as_echo "$SO" >&6; }
13718
Stefan Krah8c8adf62013-01-17 20:41:56 +010013719
13720cat >>confdefs.h <<_ACEOF
13721#define SHLIB_EXT "$SO"
13722_ACEOF
13723
13724
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013725# Check whether right shifting a negative integer extends the sign bit
13726# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13728$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013729if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013731else
Martin v. Löwis11437992002-04-12 09:54:03 +000013732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013734 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013735else
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013737/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013738
13739int main()
13740{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013741 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013742}
13743
Martin v. Löwis11437992002-04-12 09:54:03 +000013744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013746 ac_cv_rshift_extends_sign=yes
13747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013752fi
13753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754fi
13755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13757$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013758if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013759then
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013762
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013763fi
13764
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013765# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13767$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013768if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013770else
Martin v. Löwis11437992002-04-12 09:54:03 +000013771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013773/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013774#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013775int
13776main ()
13777{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013778
13779 FILE *f = fopen("/dev/null", "r");
13780 flockfile(f);
13781 getc_unlocked(f);
13782 funlockfile(f);
13783
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 ;
13785 return 0;
13786}
13787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013788if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013789 ac_cv_have_getc_unlocked=yes
13790else
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 ac_cv_have_getc_unlocked=no
13792fi
13793rm -f core conftest.err conftest.$ac_objext \
13794 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013796
Matthias Kloseb9621712010-04-24 17:59:49 +000013797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13798$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013799if test "$ac_cv_have_getc_unlocked" = yes
13800then
Martin v. Löwis11437992002-04-12 09:54:03 +000013801
Matthias Kloseb9621712010-04-24 17:59:49 +000013802$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013803
13804fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013805
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013806# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013807# save the value of LIBS so we don't actually link Python with readline
13808LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013809
Gregory P. Smith18820942008-09-07 06:24:49 +000013810# On some systems we need to link readline to a termcap compatible
13811# library. NOTE: Keep the precedence of listed libraries synchronised
13812# with setup.py.
13813py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13815$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013816for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013817 if test -z "$py_libtermcap"; then
13818 READLINE_LIBS="-lreadline"
13819 else
13820 READLINE_LIBS="-lreadline -l$py_libtermcap"
13821 fi
13822 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013824/* end confdefs.h. */
13825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826/* Override any GCC internal prototype to avoid an error.
13827 Use char because int might match the return type of a GCC
13828 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013829#ifdef __cplusplus
13830extern "C"
13831#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013832char readline ();
13833int
13834main ()
13835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013837 ;
13838 return 0;
13839}
13840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013841if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013842 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013844rm -f core conftest.err conftest.$ac_objext \
13845 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013846 if test $py_cv_lib_readline = yes; then
13847 break
13848 fi
13849done
13850# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13851#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013852if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13854$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013855else
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13857$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013860
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013861fi
13862
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013863# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13865$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013866if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013868else
13869 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013870LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013872/* end confdefs.h. */
13873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874/* Override any GCC internal prototype to avoid an error.
13875 Use char because int might match the return type of a GCC
13876 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013877#ifdef __cplusplus
13878extern "C"
13879#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013880char rl_callback_handler_install ();
13881int
13882main ()
13883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013885 ;
13886 return 0;
13887}
13888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013889if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013890 ac_cv_lib_readline_rl_callback_handler_install=yes
13891else
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013894rm -f core conftest.err conftest.$ac_objext \
13895 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013896LIBS=$ac_check_lib_save_LIBS
13897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13899$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013900if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013903
13904fi
13905
13906
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013907# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013909/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013910#include <readline/readline.h>
13911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013912if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013913 have_readline=yes
13914else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013915 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013916
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013917fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013918rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013919if test $have_readline = yes
13920then
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013922/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013923#include <readline/readline.h>
13924
13925_ACEOF
13926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013930
13931fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013932rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013935/* end confdefs.h. */
13936#include <readline/readline.h>
13937
13938_ACEOF
13939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013940 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013943
13944fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013945rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013946
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013947fi
13948
Martin v. Löwis0daad592001-09-30 21:09:59 +000013949# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13951$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013952if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013954else
Martin v. Löwis11437992002-04-12 09:54:03 +000013955 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013956LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960/* Override any GCC internal prototype to avoid an error.
13961 Use char because int might match the return type of a GCC
13962 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013963#ifdef __cplusplus
13964extern "C"
13965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013966char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013967int
13968main ()
13969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 ;
13972 return 0;
13973}
13974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013975if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013977else
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013980rm -f core conftest.err conftest.$ac_objext \
13981 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013982LIBS=$ac_check_lib_save_LIBS
13983fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13985$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013986if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013989
Martin v. Löwis0daad592001-09-30 21:09:59 +000013990fi
13991
Michael W. Hudson54241132001-12-07 15:38:26 +000013992
Thomas Wouters89d996e2007-09-08 17:39:28 +000013993# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13995$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013996if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013998else
13999 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014000LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014002/* end confdefs.h. */
14003
14004/* Override any GCC internal prototype to avoid an error.
14005 Use char because int might match the return type of a GCC
14006 builtin and then its argument prototype would still apply. */
14007#ifdef __cplusplus
14008extern "C"
14009#endif
14010char rl_completion_display_matches_hook ();
14011int
14012main ()
14013{
14014return rl_completion_display_matches_hook ();
14015 ;
14016 return 0;
14017}
14018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014019if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014020 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14021else
Matthias Kloseb9621712010-04-24 17:59:49 +000014022 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014024rm -f core conftest.err conftest.$ac_objext \
14025 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014026LIBS=$ac_check_lib_save_LIBS
14027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14029$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014030if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014031
Matthias Kloseb9621712010-04-24 17:59:49 +000014032$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014033
14034fi
14035
14036
Martin v. Löwis0daad592001-09-30 21:09:59 +000014037# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14039$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014040if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014042else
Martin v. Löwis11437992002-04-12 09:54:03 +000014043 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014044LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014048/* Override any GCC internal prototype to avoid an error.
14049 Use char because int might match the return type of a GCC
14050 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014051#ifdef __cplusplus
14052extern "C"
14053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014054char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014055int
14056main ()
14057{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014058return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 ;
14060 return 0;
14061}
14062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014063if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014065else
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014068rm -f core conftest.err conftest.$ac_objext \
14069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014070LIBS=$ac_check_lib_save_LIBS
14071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14073$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014074if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014075
Matthias Kloseb9621712010-04-24 17:59:49 +000014076$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014077
Guido van Rossum353ae582001-07-10 16:45:32 +000014078fi
14079
Jack Jansendd19cf82001-12-06 22:36:17 +000014080
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014081# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014083/* end confdefs.h. */
14084#include <readline/readline.h>
14085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014086if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014087 have_readline=yes
14088else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014089 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014090
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014091fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014092rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014093if test $have_readline = yes
14094then
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014096/* end confdefs.h. */
14097#include <readline/readline.h>
14098
14099_ACEOF
14100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014104
14105fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014106rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014107
14108fi
14109
Martin v. Löwis82bca632006-02-10 20:49:30 +000014110# End of readline checks: restore LIBS
14111LIBS=$LIBS_no_readline
14112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14114$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014115if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014117else
Martin v. Löwis11437992002-04-12 09:54:03 +000014118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014120 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014121else
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014123/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014124
14125int main()
14126{
14127 int val1 = nice(1);
14128 if (val1 != -1 && val1 == nice(2))
14129 exit(0);
14130 exit(1);
14131}
14132
Martin v. Löwis11437992002-04-12 09:54:03 +000014133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014134if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014135 ac_cv_broken_nice=yes
14136else
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014141fi
14142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143fi
14144
Matthias Kloseb9621712010-04-24 17:59:49 +000014145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14146$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014147if test "$ac_cv_broken_nice" = yes
14148then
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
Matthias Kloseb9621712010-04-24 17:59:49 +000014150$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014151
14152fi
14153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14155$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014156if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014158else
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014160 ac_cv_broken_poll=no
14161else
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014163/* end confdefs.h. */
14164
14165#include <poll.h>
14166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014167int main()
14168{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014169 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014170 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014171
14172 close (42);
14173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014174 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014175 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014176 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014177 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014179 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014180 return 1;
14181}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014182
14183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014184if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014185 ac_cv_broken_poll=yes
14186else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014193fi
14194
Matthias Kloseb9621712010-04-24 17:59:49 +000014195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14196$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014197if test "$ac_cv_broken_poll" = yes
14198then
14199
Matthias Kloseb9621712010-04-24 17:59:49 +000014200$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014201
14202fi
14203
Brett Cannon43802422005-02-10 20:48:03 +000014204# 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 +000014205# (which is not required by ISO C or UNIX spec) and/or if we support
14206# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014207ac_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 +000014208#include <$ac_cv_struct_tm>
14209
Matthias Kloseb9621712010-04-24 17:59:49 +000014210"
Victor Stinnere0be4232011-10-25 13:06:09 +020014211if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014212
14213cat >>confdefs.h <<_ACEOF
14214#define HAVE_STRUCT_TM_TM_ZONE 1
14215_ACEOF
14216
14217
14218fi
14219
14220if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14221
Matthias Kloseb9621712010-04-24 17:59:49 +000014222$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014223
14224else
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14226"
Victor Stinnere0be4232011-10-25 13:06:09 +020014227if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014228 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014229else
Matthias Kloseb9621712010-04-24 17:59:49 +000014230 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231fi
14232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014234#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235_ACEOF
14236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14238$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014239if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014243/* end confdefs.h. */
14244#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245#if !HAVE_DECL_TZNAME
14246extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014247#endif
14248
14249int
14250main ()
14251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014253 ;
14254 return 0;
14255}
14256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014257if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014258 ac_cv_var_tzname=yes
14259else
Matthias Kloseb9621712010-04-24 17:59:49 +000014260 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014262rm -f core conftest.err conftest.$ac_objext \
14263 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14266$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014267 if test $ac_cv_var_tzname = yes; then
14268
Matthias Kloseb9621712010-04-24 17:59:49 +000014269$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014270
14271 fi
14272fi
14273
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014274
Martin v. Löwis1d459062005-03-14 21:23:33 +000014275# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14277$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014278if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014279 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014280else
14281
Matthias Kloseb9621712010-04-24 17:59:49 +000014282if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014283 ac_cv_working_tzset=no
14284else
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014286/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014287
14288#include <stdlib.h>
14289#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014290#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014291
14292#if HAVE_TZNAME
14293extern char *tzname[];
14294#endif
14295
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014296int main()
14297{
Brett Cannon18367812003-09-19 00:59:16 +000014298 /* Note that we need to ensure that not only does tzset(3)
14299 do 'something' with localtime, but it works as documented
14300 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014301 This includes making sure that tzname is set properly if
14302 tm->tm_zone does not exist since it is the alternative way
14303 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014304
14305 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014306 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014307 */
14308
Martin v. Löwis1d459062005-03-14 21:23:33 +000014309 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014310 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14311
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014312 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014313 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014314 if (localtime(&groundhogday)->tm_hour != 0)
14315 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014316#if HAVE_TZNAME
14317 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14318 if (strcmp(tzname[0], "UTC") ||
14319 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14320 exit(1);
14321#endif
Brett Cannon18367812003-09-19 00:59:16 +000014322
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014323 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014324 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014325 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014326 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014327#if HAVE_TZNAME
14328 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14329 exit(1);
14330#endif
Brett Cannon18367812003-09-19 00:59:16 +000014331
14332 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14333 tzset();
14334 if (localtime(&groundhogday)->tm_hour != 11)
14335 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014336#if HAVE_TZNAME
14337 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14338 exit(1);
14339#endif
14340
14341#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014342 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14343 exit(1);
14344 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14345 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014346#endif
Brett Cannon18367812003-09-19 00:59:16 +000014347
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014348 exit(0);
14349}
14350
14351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014352if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014353 ac_cv_working_tzset=yes
14354else
Matthias Kloseb9621712010-04-24 17:59:49 +000014355 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14358 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014359fi
14360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361fi
14362
Matthias Kloseb9621712010-04-24 17:59:49 +000014363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14364$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014365if test "$ac_cv_working_tzset" = yes
14366then
14367
Matthias Kloseb9621712010-04-24 17:59:49 +000014368$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014369
14370fi
14371
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014372# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14374$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014375if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014377else
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014379/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014380#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014381int
14382main ()
14383{
14384
14385struct stat st;
14386st.st_mtim.tv_nsec = 1;
14387
14388 ;
14389 return 0;
14390}
14391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014393 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014394else
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14398fi
14399
Matthias Kloseb9621712010-04-24 17:59:49 +000014400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14401$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014402if test "$ac_cv_stat_tv_nsec" = yes
14403then
14404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014406
14407fi
14408
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014409# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14411$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014412if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014414else
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014416/* end confdefs.h. */
14417#include <sys/stat.h>
14418int
14419main ()
14420{
14421
14422struct stat st;
14423st.st_mtimespec.tv_nsec = 1;
14424
14425 ;
14426 return 0;
14427}
14428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014430 ac_cv_stat_tv_nsec2=yes
14431else
Matthias Kloseb9621712010-04-24 17:59:49 +000014432 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14435fi
14436
Matthias Kloseb9621712010-04-24 17:59:49 +000014437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14438$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014439if test "$ac_cv_stat_tv_nsec2" = yes
14440then
14441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014443
14444fi
14445
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014446ac_save_cppflags="$CPPFLAGS"
14447CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014448# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14450$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014451if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014453else
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014455/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014456#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014457int
14458main ()
14459{
Jack Jansen666b1e72001-10-31 12:11:48 +000014460
14461 int rtn;
14462 rtn = mvwdelch(0,0,0);
14463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464 ;
14465 return 0;
14466}
14467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014468if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014469 ac_cv_mvwdelch_is_expression=yes
14470else
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14474fi
14475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14477$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014478
14479if test "$ac_cv_mvwdelch_is_expression" = yes
14480then
Martin v. Löwis11437992002-04-12 09:54:03 +000014481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014483
14484fi
14485
Matthias Kloseb9621712010-04-24 17:59:49 +000014486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14487$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014488if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014490else
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014492/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014493#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014494int
14495main ()
14496{
Jack Jansen666b1e72001-10-31 12:11:48 +000014497
14498 WINDOW *w;
14499 w->_flags = 0;
14500
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 ;
14502 return 0;
14503}
14504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014505if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014506 ac_cv_window_has_flags=yes
14507else
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14511fi
14512
Matthias Kloseb9621712010-04-24 17:59:49 +000014513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14514$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014515
Jack Jansen666b1e72001-10-31 12:11:48 +000014516
14517if test "$ac_cv_window_has_flags" = yes
14518then
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
Matthias Kloseb9621712010-04-24 17:59:49 +000014520$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014521
14522fi
14523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14525$as_echo_n "checking for is_term_resized... " >&6; }
14526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014527/* end confdefs.h. */
14528#include <curses.h>
14529int
14530main ()
14531{
14532void *x=is_term_resized
14533 ;
14534 return 0;
14535}
14536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014537if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014538
Matthias Kloseb9621712010-04-24 17:59:49 +000014539$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014540
Matthias Kloseb159a552010-04-25 21:00:44 +000014541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014542$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014543else
Matthias Kloseb9621712010-04-24 17:59:49 +000014544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14545$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014546
14547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14551$as_echo_n "checking for resize_term... " >&6; }
14552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014553/* end confdefs.h. */
14554#include <curses.h>
14555int
14556main ()
14557{
14558void *x=resize_term
14559 ;
14560 return 0;
14561}
14562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014563if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014564
Matthias Kloseb9621712010-04-24 17:59:49 +000014565$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014566
Matthias Kloseb159a552010-04-25 21:00:44 +000014567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014568$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14571$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014572
14573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14575
Matthias Kloseb9621712010-04-24 17:59:49 +000014576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14577$as_echo_n "checking for resizeterm... " >&6; }
14578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014579/* end confdefs.h. */
14580#include <curses.h>
14581int
14582main ()
14583{
14584void *x=resizeterm
14585 ;
14586 return 0;
14587}
14588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014589if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014592
Matthias Kloseb159a552010-04-25 21:00:44 +000014593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014594$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014595else
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014598
14599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014601# last curses configure check
14602CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14605$as_echo "$as_me: checking for device files" >&6;}
14606
14607if test "x$cross_compiling" = xyes; then
14608 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14610$as_echo_n "checking for /dev/ptmx... " >&6; }
14611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14612$as_echo "not set" >&6; }
14613 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14614 fi
14615 if test "${ac_cv_file__dev_ptc+set}" != set; then
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14617$as_echo_n "checking for /dev/ptc... " >&6; }
14618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14619$as_echo "not set" >&6; }
14620 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14621 fi
14622fi
14623
Matthias Kloseb9621712010-04-24 17:59:49 +000014624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14625$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014626if ${ac_cv_file__dev_ptmx+:} false; then :
14627 $as_echo_n "(cached) " >&6
14628else
14629 test "$cross_compiling" = yes &&
14630 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14631if test -r "/dev/ptmx"; then
14632 ac_cv_file__dev_ptmx=yes
14633else
14634 ac_cv_file__dev_ptmx=no
14635fi
14636fi
14637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14638$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14639if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014640
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014641fi
14642
14643if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014644
Matthias Kloseb9621712010-04-24 17:59:49 +000014645$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014646
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14649$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014650if ${ac_cv_file__dev_ptc+:} false; then :
14651 $as_echo_n "(cached) " >&6
14652else
14653 test "$cross_compiling" = yes &&
14654 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14655if test -r "/dev/ptc"; then
14656 ac_cv_file__dev_ptc=yes
14657else
14658 ac_cv_file__dev_ptc=no
14659fi
14660fi
14661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14662$as_echo "$ac_cv_file__dev_ptc" >&6; }
14663if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014664
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014665fi
14666
14667if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014670
Neal Norwitz865400f2003-03-21 01:42:58 +000014671fi
14672
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014673if test "$have_long_long" = yes
14674then
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14676$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014677 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014678 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014679else
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014681 ac_cv_have_long_long_format="cross -- assuming no"
14682 if test x$GCC = xyes; then
14683 save_CFLAGS=$CFLAGS
14684 CFLAGS="$CFLAGS -Werror -Wformat"
14685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14686/* end confdefs.h. */
14687
14688 #include <stdio.h>
14689 #include <stddef.h>
14690
14691int
14692main ()
14693{
14694
14695 char *buffer;
14696 sprintf(buffer, "%lld", (long long)123);
14697 sprintf(buffer, "%lld", (long long)-123);
14698 sprintf(buffer, "%llu", (unsigned long long)123);
14699
14700 ;
14701 return 0;
14702}
14703_ACEOF
14704if ac_fn_c_try_compile "$LINENO"; then :
14705 ac_cv_have_long_long_format=yes
14706
14707fi
14708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14709 CFLAGS=$save_CFLAGS
14710 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014711else
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014713/* end confdefs.h. */
14714
14715 #include <stdio.h>
14716 #include <stddef.h>
14717 #include <string.h>
14718
14719 #ifdef HAVE_SYS_TYPES_H
14720 #include <sys/types.h>
14721 #endif
14722
14723 int main()
14724 {
14725 char buffer[256];
14726
14727 if (sprintf(buffer, "%lld", (long long)123) < 0)
14728 return 1;
14729 if (strcmp(buffer, "123"))
14730 return 1;
14731
14732 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14733 return 1;
14734 if (strcmp(buffer, "-123"))
14735 return 1;
14736
14737 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14738 return 1;
14739 if (strcmp(buffer, "123"))
14740 return 1;
14741
14742 return 0;
14743 }
14744
14745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014746if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014747 ac_cv_have_long_long_format=yes
14748else
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014753fi
14754
14755
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014756fi
14757
Matthias Kloseb9621712010-04-24 17:59:49 +000014758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14759$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014760fi
14761
Mark Dickinson89d7d412009-12-31 20:50:59 +000014762if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014763then
14764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014766
14767fi
14768
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014769if test $ac_sys_system = Darwin
14770then
14771 LIBS="$LIBS -framework CoreFoundation"
14772fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014773
Matthias Kloseb9621712010-04-24 17:59:49 +000014774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14775$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014776if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014778else
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014780 ac_cv_have_size_t_format="cross -- assuming yes"
14781
Thomas Wouters477c8d52006-05-27 19:21:47 +000014782else
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014784/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014785
Thomas Wouters477c8d52006-05-27 19:21:47 +000014786#include <stdio.h>
14787#include <stddef.h>
14788#include <string.h>
14789
Christian Heimes2c181612007-12-17 20:04:13 +000014790#ifdef HAVE_SYS_TYPES_H
14791#include <sys/types.h>
14792#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014793
14794#ifdef HAVE_SSIZE_T
14795typedef ssize_t Py_ssize_t;
14796#elif SIZEOF_VOID_P == SIZEOF_LONG
14797typedef long Py_ssize_t;
14798#else
14799typedef int Py_ssize_t;
14800#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014801
Christian Heimes2c181612007-12-17 20:04:13 +000014802int main()
14803{
14804 char buffer[256];
14805
Thomas Wouters477c8d52006-05-27 19:21:47 +000014806 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14807 return 1;
14808
Thomas Wouters89f507f2006-12-13 04:49:30 +000014809 if (strcmp(buffer, "123"))
14810 return 1;
14811
14812 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14813 return 1;
14814
14815 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014816 return 1;
14817
14818 return 0;
14819}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014820
Thomas Wouters477c8d52006-05-27 19:21:47 +000014821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014822if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014823 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014824else
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014829fi
14830
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14833$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014834if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014837
14838fi
14839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014841#ifdef HAVE_SYS_TYPES_H
14842#include <sys/types.h>
14843#endif
14844#ifdef HAVE_SYS_SOCKET_H
14845#include <sys/socket.h>
14846#endif
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848"
Victor Stinnere0be4232011-10-25 13:06:09 +020014849if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014850
Martin v. Löwis11437992002-04-12 09:54:03 +000014851else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014854
14855fi
14856
Michael W. Hudson54241132001-12-07 15:38:26 +000014857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14859$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014860if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014862else
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014864 ac_cv_broken_mbstowcs=no
14865else
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014867/* end confdefs.h. */
14868
Stefan Krah19c21392012-11-22 23:47:32 +010014869#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014870#include<stdlib.h>
14871int main() {
14872 size_t len = -1;
14873 const char *str = "text";
14874 len = mbstowcs(NULL, str, 0);
14875 return (len != 4);
14876}
14877
14878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014879if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014880 ac_cv_broken_mbstowcs=no
14881else
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014886fi
14887
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014888fi
14889
Matthias Kloseb9621712010-04-24 17:59:49 +000014890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14891$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014892if test "$ac_cv_broken_mbstowcs" = yes
14893then
14894
Matthias Kloseb9621712010-04-24 17:59:49 +000014895$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014896
14897fi
14898
Antoine Pitroub52ec782009-01-25 16:34:23 +000014899# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14901$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014902
14903# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014904if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014905 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014906if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014907then
14908
Matthias Kloseb9621712010-04-24 17:59:49 +000014909$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14912$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014913fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014914if test "$withval" = no
14915then
14916
14917$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14920$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014921fi
14922
Antoine Pitrou042b1282010-08-13 21:15:58 +000014923else
14924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14925$as_echo "no value specified" >&6; }
14926fi
14927
Antoine Pitroub52ec782009-01-25 16:34:23 +000014928
Matthias Kloseb17289e2012-03-15 19:51:34 +010014929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14930$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14931if ${ac_cv_computed_gotos+:} false; then :
14932 $as_echo_n "(cached) " >&6
14933else
14934 if test "$cross_compiling" = yes; then :
14935 if test "${with_computed_gotos+set}" = set; then
14936 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14937 else
14938 ac_cv_computed_gotos=no
14939 fi
14940else
14941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14942/* end confdefs.h. */
14943
14944int main(int argc, char **argv)
14945{
14946 static void *targets[1] = { &&LABEL1 };
14947 goto LABEL2;
14948LABEL1:
14949 return 0;
14950LABEL2:
14951 goto *targets[0];
14952 return 1;
14953}
14954
14955_ACEOF
14956if ac_fn_c_try_run "$LINENO"; then :
14957 ac_cv_computed_gotos=yes
14958else
14959 ac_cv_computed_gotos=no
14960fi
14961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14962 conftest.$ac_objext conftest.beam conftest.$ac_ext
14963fi
14964
14965fi
14966
14967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14968$as_echo "$ac_cv_computed_gotos" >&6; }
14969case "$ac_cv_computed_gotos" in yes*)
14970
14971$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14972
14973esac
14974
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014975case $ac_sys_system in
14976AIX*)
14977
14978$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14979 ;;
14980esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014981
Michael W. Hudson54241132001-12-07 15:38:26 +000014982
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014983
14984
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014985for h in `(cd $srcdir;echo Python/thread_*.h)`
14986do
14987 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14988done
14989
Michael W. Hudson54241132001-12-07 15:38:26 +000014990
Neal Norwitzd24499d2005-12-18 21:36:39 +000014991SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14993$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014994for dir in $SRCDIRS; do
14995 if test ! -d $dir; then
14996 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014997 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014998done
Matthias Kloseb9621712010-04-24 17:59:49 +000014999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15000$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015001
Stefan Krah1919b7e2012-03-21 18:25:23 +010015002# Availability of -O2:
15003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15004$as_echo_n "checking for -O2... " >&6; }
15005saved_cflags="$CFLAGS"
15006CFLAGS="-O2"
15007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15008/* end confdefs.h. */
15009
15010int
15011main ()
15012{
15013
15014
15015 ;
15016 return 0;
15017}
15018_ACEOF
15019if ac_fn_c_try_compile "$LINENO"; then :
15020 have_O2=yes
15021else
15022 have_O2=no
15023fi
15024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15026$as_echo "$have_O2" >&6; }
15027CFLAGS="$saved_cflags"
15028
15029# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15030# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15032$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15033saved_cflags="$CFLAGS"
15034CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15035if test "$have_O2" = no; then
15036 CFLAGS=""
15037fi
15038if test "$cross_compiling" = yes; then :
15039 have_glibc_memmove_bug=undefined
15040else
15041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15042/* end confdefs.h. */
15043
15044#include <stdio.h>
15045#include <stdlib.h>
15046#include <string.h>
15047void foo(void *p, void *q) { memmove(p, q, 19); }
15048int main() {
15049 char a[32] = "123456789000000000";
15050 foo(&a[9], a);
15051 if (strcmp(a, "123456789123456789000000000") != 0)
15052 return 1;
15053 foo(a, &a[9]);
15054 if (strcmp(a, "123456789000000000") != 0)
15055 return 1;
15056 return 0;
15057}
15058
15059_ACEOF
15060if ac_fn_c_try_run "$LINENO"; then :
15061 have_glibc_memmove_bug=no
15062else
15063 have_glibc_memmove_bug=yes
15064fi
15065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15066 conftest.$ac_objext conftest.beam conftest.$ac_ext
15067fi
15068
15069CFLAGS="$saved_cflags"
15070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15071$as_echo "$have_glibc_memmove_bug" >&6; }
15072if test "$have_glibc_memmove_bug" = yes; then
15073
15074$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15075
15076fi
15077
15078if test "$have_gcc_asm_for_x87" = yes; then
15079 # Some versions of gcc miscompile inline asm:
15080 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15081 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15082 case $CC in
15083 *gcc*)
15084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15085$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15086 saved_cflags="$CFLAGS"
15087 CFLAGS="-O2"
15088 if test "$cross_compiling" = yes; then :
15089 have_ipa_pure_const_bug=undefined
15090else
15091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15092/* end confdefs.h. */
15093
15094 __attribute__((noinline)) int
15095 foo(int *p) {
15096 int r;
15097 asm ( "movl \$6, (%1)\n\t"
15098 "xorl %0, %0\n\t"
15099 : "=r" (r) : "r" (p) : "memory"
15100 );
15101 return r;
15102 }
15103 int main() {
15104 int p = 8;
15105 if ((foo(&p) ? : p) != 6)
15106 return 1;
15107 return 0;
15108 }
15109
15110_ACEOF
15111if ac_fn_c_try_run "$LINENO"; then :
15112 have_ipa_pure_const_bug=no
15113else
15114 have_ipa_pure_const_bug=yes
15115fi
15116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15117 conftest.$ac_objext conftest.beam conftest.$ac_ext
15118fi
15119
15120 CFLAGS="$saved_cflags"
15121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15122$as_echo "$have_ipa_pure_const_bug" >&6; }
15123 if test "$have_ipa_pure_const_bug" = yes; then
15124
15125$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15126
15127 fi
15128 ;;
15129 esac
15130fi
15131
Guido van Rossum627b2d71993-12-24 10:39:16 +000015132# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015133ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015134
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015135ac_config_files="$ac_config_files Modules/ld_so_aix"
15136
Martin v. Löwis11437992002-04-12 09:54:03 +000015137cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015138# This file is a shell script that caches the results of configure
15139# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015140# scripts and configure runs, see configure's option --config-cache.
15141# It is not useful on other systems. If it contains results you don't
15142# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015143#
Martin v. Löwis11437992002-04-12 09:54:03 +000015144# config.status only pays attention to the cache file if you give it
15145# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146#
Skip Montanaro6dead952003-09-25 14:50:04 +000015147# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015148# loading this file, other *unset* `ac_cv_foo' will be assigned the
15149# following values.
15150
15151_ACEOF
15152
Guido van Rossumf78abae1997-01-21 22:02:36 +000015153# The following way of writing the cache mishandles newlines in values,
15154# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015156# Ultrix sh set writes to stderr and can't be redirected directly,
15157# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158(
15159 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15160 eval ac_val=\$$ac_var
15161 case $ac_val in #(
15162 *${as_nl}*)
15163 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15165$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166 esac
15167 case $ac_var in #(
15168 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15170 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171 esac ;;
15172 esac
15173 done
15174
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15177 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 # `set' does not quote correctly, so add quotes: double-quote
15179 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015181 "s/'/'\\\\''/g;
15182 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015183 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 *)
15185 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188 esac |
15189 sort
15190) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15196 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015197 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15198 :end' >>confcache
15199if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15200 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015201 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015202 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15203$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015204 if test ! -f "$cache_file" || test -h "$cache_file"; then
15205 cat confcache >"$cache_file"
15206 else
15207 case $cache_file in #(
15208 */* | ?:*)
15209 mv -f confcache "$cache_file"$$ &&
15210 mv -f "$cache_file"$$ "$cache_file" ;; #(
15211 *)
15212 mv -f confcache "$cache_file" ;;
15213 esac
15214 fi
15215 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015216 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15218$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015219 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015220fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015221rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015222
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015223test "x$prefix" = xNONE && prefix=$ac_default_prefix
15224# Let make expand exec_prefix.
15225test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015227DEFS=-DHAVE_CONFIG_H
15228
Skip Montanaro6dead952003-09-25 14:50:04 +000015229ac_libobjs=
15230ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015231U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015232for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15233 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015236 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15237 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15239 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015240done
15241LIBOBJS=$ac_libobjs
15242
15243LTLIBOBJS=$ac_ltlibobjs
15244
15245
Martin v. Löwis11437992002-04-12 09:54:03 +000015246
Matthias Kloseb9621712010-04-24 17:59:49 +000015247
Victor Stinnere0be4232011-10-25 13:06:09 +020015248: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015249ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015250ac_clean_files_save=$ac_clean_files
15251ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015252{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15253$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15254as_write_fail=0
15255cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015256#! $SHELL
15257# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015258# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015259# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015260# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015261
Martin v. Löwis11437992002-04-12 09:54:03 +000015262debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015263ac_cs_recheck=false
15264ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015265
Matthias Kloseb9621712010-04-24 17:59:49 +000015266SHELL=\${CONFIG_SHELL-$SHELL}
15267export SHELL
15268_ASEOF
15269cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15270## -------------------- ##
15271## M4sh Initialization. ##
15272## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274# Be more Bourne compatible
15275DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015276if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 emulate sh
15278 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015280 # is contrary to our usage. Disable this feature.
15281 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015283else
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 case `(set -o) 2>/dev/null` in #(
15285 *posix*) :
15286 set -o posix ;; #(
15287 *) :
15288 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015289esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015290fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015291
15292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293as_nl='
15294'
15295export as_nl
15296# Printing a long string crashes Solaris 7 /usr/bin/printf.
15297as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15298as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15299as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15300# Prefer a ksh shell builtin over an external printf program on Solaris,
15301# but without wasting forks for bash or zsh.
15302if test -z "$BASH_VERSION$ZSH_VERSION" \
15303 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15304 as_echo='print -r --'
15305 as_echo_n='print -rn --'
15306elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15307 as_echo='printf %s\n'
15308 as_echo_n='printf %s'
15309else
15310 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15311 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15312 as_echo_n='/usr/ucb/echo -n'
15313 else
15314 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15315 as_echo_n_body='eval
15316 arg=$1;
15317 case $arg in #(
15318 *"$as_nl"*)
15319 expr "X$arg" : "X\\(.*\\)$as_nl";
15320 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15321 esac;
15322 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15323 '
15324 export as_echo_n_body
15325 as_echo_n='sh -c $as_echo_n_body as_echo'
15326 fi
15327 export as_echo_body
15328 as_echo='sh -c $as_echo_body as_echo'
15329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015330
15331# The user is always right.
15332if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015333 PATH_SEPARATOR=:
15334 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15335 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15336 PATH_SEPARATOR=';'
15337 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340
15341# IFS
15342# We need space, tab and new line, in precisely that order. Quoting is
15343# there to prevent editors from complaining about space-tab.
15344# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15345# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346IFS=" "" $as_nl"
15347
15348# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015349as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015350case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351 *[\\/]* ) as_myself=$0 ;;
15352 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015353for as_dir in $PATH
15354do
15355 IFS=$as_save_IFS
15356 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15358 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361 ;;
15362esac
15363# We did not find ourselves, most probably we were run as `sh COMMAND'
15364# in which case we are not to be found in the path.
15365if test "x$as_myself" = x; then
15366 as_myself=$0
15367fi
15368if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015369 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15370 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371fi
15372
Matthias Kloseb9621712010-04-24 17:59:49 +000015373# Unset variables that we do not need and which cause bugs (e.g. in
15374# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15375# suppresses any "Segmentation fault" message there. '((' could
15376# trigger a bug in pdksh 5.2.14.
15377for as_var in BASH_ENV ENV MAIL MAILPATH
15378do eval test x\${$as_var+set} = xset \
15379 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380done
15381PS1='$ '
15382PS2='> '
15383PS4='+ '
15384
15385# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015386LC_ALL=C
15387export LC_ALL
15388LANGUAGE=C
15389export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390
Matthias Kloseb9621712010-04-24 17:59:49 +000015391# CDPATH.
15392(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15393
15394
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015395# as_fn_error STATUS ERROR [LINENO LOG_FD]
15396# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015397# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15398# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015399# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015400as_fn_error ()
15401{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015402 as_status=$1; test $as_status -eq 0 && as_status=1
15403 if test "$4"; then
15404 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15405 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015407 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 as_fn_exit $as_status
15409} # as_fn_error
15410
15411
15412# as_fn_set_status STATUS
15413# -----------------------
15414# Set $? to STATUS, without forking.
15415as_fn_set_status ()
15416{
15417 return $1
15418} # as_fn_set_status
15419
15420# as_fn_exit STATUS
15421# -----------------
15422# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15423as_fn_exit ()
15424{
15425 set +e
15426 as_fn_set_status $1
15427 exit $1
15428} # as_fn_exit
15429
15430# as_fn_unset VAR
15431# ---------------
15432# Portably unset VAR.
15433as_fn_unset ()
15434{
15435 { eval $1=; unset $1;}
15436}
15437as_unset=as_fn_unset
15438# as_fn_append VAR VALUE
15439# ----------------------
15440# Append the text in VALUE to the end of the definition contained in VAR. Take
15441# advantage of any shell optimizations that allow amortized linear growth over
15442# repeated appends, instead of the typical quadratic growth present in naive
15443# implementations.
15444if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15445 eval 'as_fn_append ()
15446 {
15447 eval $1+=\$2
15448 }'
15449else
15450 as_fn_append ()
15451 {
15452 eval $1=\$$1\$2
15453 }
15454fi # as_fn_append
15455
15456# as_fn_arith ARG...
15457# ------------------
15458# Perform arithmetic evaluation on the ARGs, and store the result in the
15459# global $as_val. Take advantage of shells that can avoid forks. The arguments
15460# must be portable across $(()) and expr.
15461if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15462 eval 'as_fn_arith ()
15463 {
15464 as_val=$(( $* ))
15465 }'
15466else
15467 as_fn_arith ()
15468 {
15469 as_val=`expr "$@" || test $? -eq 1`
15470 }
15471fi # as_fn_arith
15472
15473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474if expr a : '\(a\)' >/dev/null 2>&1 &&
15475 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15476 as_expr=expr
15477else
15478 as_expr=false
15479fi
15480
15481if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15482 as_basename=basename
15483else
15484 as_basename=false
15485fi
15486
Matthias Kloseb9621712010-04-24 17:59:49 +000015487if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15488 as_dirname=dirname
15489else
15490 as_dirname=false
15491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015493as_me=`$as_basename -- "$0" ||
15494$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15495 X"$0" : 'X\(//\)$' \| \
15496 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015497$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015498 sed '/^.*\/\([^/][^/]*\)\/*$/{
15499 s//\1/
15500 q
15501 }
15502 /^X\/\(\/\/\)$/{
15503 s//\1/
15504 q
15505 }
15506 /^X\/\(\/\).*/{
15507 s//\1/
15508 q
15509 }
15510 s/.*/./; q'`
15511
Matthias Kloseb9621712010-04-24 17:59:49 +000015512# Avoid depending upon Character Ranges.
15513as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15514as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15515as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15516as_cr_digits='0123456789'
15517as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015518
15519ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015520case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015523 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015524 xy) ECHO_C='\c';;
15525 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15526 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015527 esac;;
15528*)
15529 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015530esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015531
Martin v. Löwis11437992002-04-12 09:54:03 +000015532rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533if test -d conf$$.dir; then
15534 rm -f conf$$.dir/conf$$.file
15535else
15536 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015539if (echo >conf$$.file) 2>/dev/null; then
15540 if ln -s conf$$.file conf$$ 2>/dev/null; then
15541 as_ln_s='ln -s'
15542 # ... but there are two gotchas:
15543 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15544 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015545 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015547 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 elif ln conf$$.file conf$$ 2>/dev/null; then
15549 as_ln_s=ln
15550 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015551 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015553else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015554 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015556rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15557rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559
15560# as_fn_mkdir_p
15561# -------------
15562# Create "$as_dir" as a directory, including parents if necessary.
15563as_fn_mkdir_p ()
15564{
15565
15566 case $as_dir in #(
15567 -*) as_dir=./$as_dir;;
15568 esac
15569 test -d "$as_dir" || eval $as_mkdir_p || {
15570 as_dirs=
15571 while :; do
15572 case $as_dir in #(
15573 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15574 *) as_qdir=$as_dir;;
15575 esac
15576 as_dirs="'$as_qdir' $as_dirs"
15577 as_dir=`$as_dirname -- "$as_dir" ||
15578$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15579 X"$as_dir" : 'X\(//\)[^/]' \| \
15580 X"$as_dir" : 'X\(//\)$' \| \
15581 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15582$as_echo X"$as_dir" |
15583 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15584 s//\1/
15585 q
15586 }
15587 /^X\(\/\/\)[^/].*/{
15588 s//\1/
15589 q
15590 }
15591 /^X\(\/\/\)$/{
15592 s//\1/
15593 q
15594 }
15595 /^X\(\/\).*/{
15596 s//\1/
15597 q
15598 }
15599 s/.*/./; q'`
15600 test -d "$as_dir" && break
15601 done
15602 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015603 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015604
15605
15606} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015607if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015608 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015609else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015610 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015611 as_mkdir_p=false
15612fi
15613
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015614
15615# as_fn_executable_p FILE
15616# -----------------------
15617# Test if FILE is an executable regular file.
15618as_fn_executable_p ()
15619{
15620 test -f "$1" && test -x "$1"
15621} # as_fn_executable_p
15622as_test_x='test -x'
15623as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
15625# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015626as_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 +000015627
15628# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015629as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015630
15631
Martin v. Löwis11437992002-04-12 09:54:03 +000015632exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015633## ----------------------------------- ##
15634## Main body of $CONFIG_STATUS script. ##
15635## ----------------------------------- ##
15636_ASEOF
15637test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
Matthias Kloseb9621712010-04-24 17:59:49 +000015639cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15640# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015641# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642# values after options handling.
15643ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015644This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015645generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015646
15647 CONFIG_FILES = $CONFIG_FILES
15648 CONFIG_HEADERS = $CONFIG_HEADERS
15649 CONFIG_LINKS = $CONFIG_LINKS
15650 CONFIG_COMMANDS = $CONFIG_COMMANDS
15651 $ $0 $@
15652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015653on `(hostname || uname -n) 2>/dev/null | sed 1q`
15654"
15655
Martin v. Löwis11437992002-04-12 09:54:03 +000015656_ACEOF
15657
Matthias Kloseb9621712010-04-24 17:59:49 +000015658case $ac_config_files in *"
15659"*) set x $ac_config_files; shift; ac_config_files=$*;;
15660esac
15661
15662case $ac_config_headers in *"
15663"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15664esac
15665
15666
15667cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015668# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015669config_files="$ac_config_files"
15670config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015673
Matthias Kloseb9621712010-04-24 17:59:49 +000015674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015675ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015676\`$as_me' instantiates files and other configuration actions
15677from templates according to the current configuration. Unless the files
15678and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
15682 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015684 --config print configuration, then exit
15685 -q, --quiet, --silent
15686 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015687 -d, --debug don't remove temporary files
15688 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 --file=FILE[:TEMPLATE]
15690 instantiate the configuration file FILE
15691 --header=FILE[:TEMPLATE]
15692 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015693
15694Configuration files:
15695$config_files
15696
15697Configuration headers:
15698$config_headers
15699
Matthias Kloseb9621712010-04-24 17:59:49 +000015700Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015703cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15704ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015705ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015706python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015707configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015708 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015709
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015710Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015711This config.status script is free software; the Free Software Foundation
15712gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713
15714ac_pwd='$ac_pwd'
15715srcdir='$srcdir'
15716INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015717MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015718test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015719_ACEOF
15720
Matthias Kloseb9621712010-04-24 17:59:49 +000015721cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15722# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015723ac_need_defaults=:
15724while test $# != 0
15725do
15726 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015727 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15729 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015730 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015732 --*=)
15733 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15734 ac_optarg=
15735 ac_shift=:
15736 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015738 ac_option=$1
15739 ac_optarg=$2
15740 ac_shift=shift
15741 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015742 esac
15743
Skip Montanaro6dead952003-09-25 14:50:04 +000015744 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015746 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15747 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015749 $as_echo "$ac_cs_version"; exit ;;
15750 --config | --confi | --conf | --con | --co | --c )
15751 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 debug=: ;;
15754 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015755 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 case $ac_optarg in
15757 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015758 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015759 esac
15760 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 ac_need_defaults=false;;
15762 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015763 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 case $ac_optarg in
15765 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15766 esac
15767 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769 --he | --h)
15770 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015771 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015772Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015774 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015775 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15776 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15777 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015778
15779 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015780 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015781Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015782
Matthias Kloseb9621712010-04-24 17:59:49 +000015783 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015785
15786 esac
15787 shift
15788done
15789
Skip Montanaro6dead952003-09-25 14:50:04 +000015790ac_configure_extra_args=
15791
15792if $ac_cs_silent; then
15793 exec 6>/dev/null
15794 ac_configure_extra_args="$ac_configure_extra_args --silent"
15795fi
15796
15797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015798cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015799if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015800 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 shift
15802 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15803 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015804 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015806fi
15807
Martin v. Löwis11437992002-04-12 09:54:03 +000015808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015810exec 5>>config.log
15811{
15812 echo
15813 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15814## Running $as_me. ##
15815_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015816 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015817} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015820cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015821_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824
15825# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015826for ac_config_target in $ac_config_targets
15827do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015828 case $ac_config_target in
15829 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15830 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15831 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015832 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15833 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015834 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15835 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015836 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015837 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838
Victor Stinnere0be4232011-10-25 13:06:09 +020015839 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015840 esac
15841done
15842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015843
Martin v. Löwis11437992002-04-12 09:54:03 +000015844# If the user did not use the arguments to specify the items to instantiate,
15845# then the envvar interface is used. Set only those that are not.
15846# We use the long form for the default assignment because of an extremely
15847# bizarre bug on SunOS 4.1.3.
15848if $ac_need_defaults; then
15849 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15850 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15851fi
15852
Skip Montanaro6dead952003-09-25 14:50:04 +000015853# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015854# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015855# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856# Hook for its removal unless debugging.
15857# Note that there is a small window in which the directory will not be cleaned:
15858# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015859$debug ||
15860{
Victor Stinnere0be4232011-10-25 13:06:09 +020015861 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015863 : "${ac_tmp:=$tmp}"
15864 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015866 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015867}
Martin v. Löwis11437992002-04-12 09:54:03 +000015868# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015869
Martin v. Löwis11437992002-04-12 09:54:03 +000015870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015872 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015873} ||
15874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015875 tmp=./conf$$-$RANDOM
15876 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015877} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015878ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
Matthias Kloseb9621712010-04-24 17:59:49 +000015880# Set up the scripts for CONFIG_FILES section.
15881# No need to generate them if there are no CONFIG_FILES.
15882# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885
15886ac_cr=`echo X | tr X '\015'`
15887# On cygwin, bash can eat \r inside `` if the user requested igncr.
15888# But we know of no other shell where ac_cr would be empty at this
15889# point, so we can use a bashism as a fallback.
15890if test "x$ac_cr" = x; then
15891 eval ac_cr=\$\'\\r\'
15892fi
15893ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15894if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015895 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015896else
15897 ac_cs_awk_cr=$ac_cr
15898fi
15899
Victor Stinnere0be4232011-10-25 13:06:09 +020015900echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015901_ACEOF
15902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015903
Matthias Kloseb9621712010-04-24 17:59:49 +000015904{
15905 echo "cat >conf$$subs.awk <<_ACEOF" &&
15906 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15907 echo "_ACEOF"
15908} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015909 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15910ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911ac_delim='%!_!# '
15912for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015914 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15917 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015918 break
15919 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015920 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921 else
15922 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015924done
Matthias Kloseb9621712010-04-24 17:59:49 +000015925rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926
Matthias Kloseb9621712010-04-24 17:59:49 +000015927cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015928cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015930sed -n '
15931h
15932s/^/S["/; s/!.*/"]=/
15933p
15934g
15935s/^[^!]*!//
15936:repl
15937t repl
15938s/'"$ac_delim"'$//
15939t delim
15940:nl
15941h
15942s/\(.\{148\}\)..*/\1/
15943t more1
15944s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15945p
15946n
15947b repl
15948:more1
15949s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15950p
15951g
15952s/.\{148\}//
15953t nl
15954:delim
15955h
15956s/\(.\{148\}\)..*/\1/
15957t more2
15958s/["\\]/\\&/g; s/^/"/; s/$/"/
15959p
15960b
15961:more2
15962s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15963p
15964g
15965s/.\{148\}//
15966t delim
15967' <conf$$subs.awk | sed '
15968/^[^""]/{
15969 N
15970 s/\n//
15971}
15972' >>$CONFIG_STATUS || ac_write_fail=1
15973rm -f conf$$subs.awk
15974cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15975_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015976cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015977 for (key in S) S_is_set[key] = 1
15978 FS = ""
15979
15980}
15981{
15982 line = $ 0
15983 nfields = split(line, field, "@")
15984 substed = 0
15985 len = length(field[1])
15986 for (i = 2; i < nfields; i++) {
15987 key = field[i]
15988 keylen = length(key)
15989 if (S_is_set[key]) {
15990 value = S[key]
15991 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15992 len += length(value) + length(field[++i])
15993 substed = 1
15994 } else
15995 len += 1 + keylen
15996 }
15997
15998 print line
15999}
16000
16001_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016003cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16004if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16005 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16006else
16007 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016008fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016009 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016010_ACEOF
16011
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016012# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16013# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014# trailing colons and then remove the whole line if VPATH becomes empty
16015# (actually we leave an empty line to preserve line numbers).
16016if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016017 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16018h
16019s///
16020s/^/:/
16021s/[ ]*$/:/
16022s/:\$(srcdir):/:/g
16023s/:\${srcdir}:/:/g
16024s/:@srcdir@:/:/g
16025s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016027x
16028s/\(=[ ]*\).*/\1/
16029G
16030s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016031s/^[^=]*=[ ]*$//
16032}'
16033fi
16034
Matthias Kloseb9621712010-04-24 17:59:49 +000016035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016036fi # test -n "$CONFIG_FILES"
16037
Matthias Kloseb9621712010-04-24 17:59:49 +000016038# Set up the scripts for CONFIG_HEADERS section.
16039# No need to generate them if there are no CONFIG_HEADERS.
16040# This happens for instance with `./config.status Makefile'.
16041if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016042cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016043BEGIN {
16044_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045
Matthias Kloseb9621712010-04-24 17:59:49 +000016046# Transform confdefs.h into an awk script `defines.awk', embedded as
16047# here-document in config.status, that substitutes the proper values into
16048# config.h.in to produce config.h.
16049
16050# Create a delimiter string that does not exist in confdefs.h, to ease
16051# handling of long lines.
16052ac_delim='%!_!# '
16053for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016054 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16055 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016056 break
16057 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016058 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016059 else
16060 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16061 fi
16062done
16063
16064# For the awk script, D is an array of macro values keyed by name,
16065# likewise P contains macro parameters if any. Preserve backslash
16066# newline sequences.
16067
16068ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16069sed -n '
16070s/.\{148\}/&'"$ac_delim"'/g
16071t rset
16072:rset
16073s/^[ ]*#[ ]*define[ ][ ]*/ /
16074t def
16075d
16076:def
16077s/\\$//
16078t bsnl
16079s/["\\]/\\&/g
16080s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16081D["\1"]=" \3"/p
16082s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16083d
16084:bsnl
16085s/["\\]/\\&/g
16086s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16087D["\1"]=" \3\\\\\\n"\\/p
16088t cont
16089s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16090t cont
16091d
16092:cont
16093n
16094s/.\{148\}/&'"$ac_delim"'/g
16095t clear
16096:clear
16097s/\\$//
16098t bsnlc
16099s/["\\]/\\&/g; s/^/"/; s/$/"/p
16100d
16101:bsnlc
16102s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16103b cont
16104' <confdefs.h | sed '
16105s/'"$ac_delim"'/"\\\
16106"/g' >>$CONFIG_STATUS || ac_write_fail=1
16107
16108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16109 for (key in D) D_is_set[key] = 1
16110 FS = ""
16111}
16112/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16113 line = \$ 0
16114 split(line, arg, " ")
16115 if (arg[1] == "#") {
16116 defundef = arg[2]
16117 mac1 = arg[3]
16118 } else {
16119 defundef = substr(arg[1], 2)
16120 mac1 = arg[2]
16121 }
16122 split(mac1, mac2, "(") #)
16123 macro = mac2[1]
16124 prefix = substr(line, 1, index(line, defundef) - 1)
16125 if (D_is_set[macro]) {
16126 # Preserve the white space surrounding the "#".
16127 print prefix "define", macro P[macro] D[macro]
16128 next
16129 } else {
16130 # Replace #undef with comments. This is necessary, for example,
16131 # in the case of _POSIX_SOURCE, which is predefined and required
16132 # on some systems where configure will not decide to define it.
16133 if (defundef == "undef") {
16134 print "/*", prefix defundef, macro, "*/"
16135 next
16136 }
16137 }
16138}
16139{ print }
16140_ACAWK
16141_ACEOF
16142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016143 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016144fi # test -n "$CONFIG_HEADERS"
16145
16146
16147eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16148shift
16149for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150do
16151 case $ac_tag in
16152 :[FHLC]) ac_mode=$ac_tag; continue;;
16153 esac
16154 case $ac_mode$ac_tag in
16155 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016156 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157 :[FH]-) ac_tag=-:-;;
16158 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16159 esac
16160 ac_save_IFS=$IFS
16161 IFS=:
16162 set x $ac_tag
16163 IFS=$ac_save_IFS
16164 shift
16165 ac_file=$1
16166 shift
16167
16168 case $ac_mode in
16169 :L) ac_source=$1;;
16170 :[FH])
16171 ac_file_inputs=
16172 for ac_f
16173 do
16174 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016175 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016176 *) # Look for the file first in the build tree, then in the source tree
16177 # (if the path is not absolute). The absolute path cannot be DOS-style,
16178 # because $ac_f cannot contain `:'.
16179 test -f "$ac_f" ||
16180 case $ac_f in
16181 [\\/$]*) false;;
16182 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16183 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016184 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016186 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16187 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188 done
16189
16190 # Let's still pretend it is `configure' which instantiates (i.e., don't
16191 # use $as_me), people would be surprised to read:
16192 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016193 configure_input='Generated from '`
16194 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16195 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196 if test x"$ac_file" != x-; then
16197 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016198 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16199$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016201 # Neutralize special characters interpreted by sed in replacement strings.
16202 case $configure_input in #(
16203 *\&* | *\|* | *\\* )
16204 ac_sed_conf_input=`$as_echo "$configure_input" |
16205 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16206 *) ac_sed_conf_input=$configure_input;;
16207 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208
16209 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016210 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16211 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212 esac
16213 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016214 esac
16215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016217$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016218 X"$ac_file" : 'X\(//\)[^/]' \| \
16219 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016221$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16223 s//\1/
16224 q
16225 }
16226 /^X\(\/\/\)[^/].*/{
16227 s//\1/
16228 q
16229 }
16230 /^X\(\/\/\)$/{
16231 s//\1/
16232 q
16233 }
16234 /^X\(\/\).*/{
16235 s//\1/
16236 q
16237 }
16238 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016239 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 ac_builddir=.
16241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016242case "$ac_dir" in
16243.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16244*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016245 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248 case $ac_top_builddir_sub in
16249 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16250 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16251 esac ;;
16252esac
16253ac_abs_top_builddir=$ac_pwd
16254ac_abs_builddir=$ac_pwd$ac_dir_suffix
16255# for backward compatibility:
16256ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016257
16258case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016260 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261 ac_top_srcdir=$ac_top_builddir_sub
16262 ac_abs_top_srcdir=$ac_pwd ;;
16263 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016264 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265 ac_top_srcdir=$srcdir
16266 ac_abs_top_srcdir=$srcdir ;;
16267 *) # Relative name.
16268 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16269 ac_top_srcdir=$ac_top_build_prefix$srcdir
16270 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016271esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016273
Martin v. Löwis11437992002-04-12 09:54:03 +000016274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275 case $ac_mode in
16276 :F)
16277 #
16278 # CONFIG_FILE
16279 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016280
16281 case $INSTALL in
16282 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016285 ac_MKDIR_P=$MKDIR_P
16286 case $MKDIR_P in
16287 [\\/$]* | ?:[\\/]* ) ;;
16288 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16289 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016290_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291
Matthias Kloseb9621712010-04-24 17:59:49 +000016292cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293# If the template does not know about datarootdir, expand it.
16294# FIXME: This hack should be removed a few years after 2.60.
16295ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016296ac_sed_dataroot='
16297/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298 p
16299 q
16300}
16301/@datadir@/p
16302/@docdir@/p
16303/@infodir@/p
16304/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016305/@mandir@/p'
16306case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016307*datarootdir*) ac_datarootdir_seen=yes;;
16308*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016309 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16310$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016312cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313 ac_datarootdir_hack='
16314 s&@datadir@&$datadir&g
16315 s&@docdir@&$docdir&g
16316 s&@infodir@&$infodir&g
16317 s&@localedir@&$localedir&g
16318 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016319 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016320esac
16321_ACEOF
16322
16323# Neutralize VPATH when `$srcdir' = `.'.
16324# Shell code in configure.ac might set extrasub.
16325# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016326cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16327ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016328$extrasub
16329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016330cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016331:t
16332/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016333s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016334s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016335s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016336s&@srcdir@&$ac_srcdir&;t t
16337s&@abs_srcdir@&$ac_abs_srcdir&;t t
16338s&@top_srcdir@&$ac_top_srcdir&;t t
16339s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16340s&@builddir@&$ac_builddir&;t t
16341s&@abs_builddir@&$ac_abs_builddir&;t t
16342s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16343s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016344s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016346"
Victor Stinnere0be4232011-10-25 13:06:09 +020016347eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16348 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016350test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016351 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16352 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16353 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016354 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016355which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016356$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016357which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016358
Victor Stinnere0be4232011-10-25 13:06:09 +020016359 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016360 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016361 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16362 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016363 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016364 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016365 ;;
16366 :H)
16367 #
16368 # CONFIG_HEADER
16369 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016370 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 {
16372 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016373 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16374 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016375 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016376 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016377 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16378$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016379 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016380 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016381 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016382 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 fi
16384 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016386 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016387 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016389 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016391
16392 esac
16393
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016394
16395 case $ac_file$ac_mode in
16396 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16397
16398 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399done # for ac_tag
16400
Guido van Rossum627b2d71993-12-24 10:39:16 +000016401
Matthias Kloseb9621712010-04-24 17:59:49 +000016402as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016403_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016404ac_clean_files=$ac_clean_files_save
16405
Matthias Kloseb9621712010-04-24 17:59:49 +000016406test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016407 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016408
Martin v. Löwis11437992002-04-12 09:54:03 +000016409
16410# configure is writing to config.log, and then calls config.status.
16411# config.status does its own redirection, appending to config.log.
16412# Unfortunately, on DOS this fails, as config.log is still kept open
16413# by configure, so config.status won't be able to write to it; its
16414# output is simply discarded. So we exec the FD to /dev/null,
16415# effectively closing config.log, so it can be properly (re)opened and
16416# appended to by config.status. When coming back to configure, we
16417# need to make the FD available again.
16418if test "$no_create" != yes; then
16419 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016420 ac_config_status_args=
16421 test "$silent" = yes &&
16422 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016423 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016424 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016425 exec 5>>config.log
16426 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16427 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016428 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016429fi
16430if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16431 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16432$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016433fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016434
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016435
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016436echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016437if test ! -f Modules/Setup
16438then
16439 cp $srcdir/Modules/Setup.dist Modules/Setup
16440fi
16441
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016442echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016443if test ! -f Modules/Setup.local
16444then
16445 echo "# Edit this file for local setup changes" >Modules/Setup.local
16446fi
16447
16448echo "creating Makefile"
16449$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16450 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016451 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016452mv config.c Modules