blob: 9bffbf3f5f2d814e97191286b4df729c2880ec8b [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 Lagerwall646eb1e2012-10-29 17:35:57 +00003# Generated by GNU Autoconf 2.69 for python 3.3.
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 Brandl3ebb6b32011-02-20 10:37:07 +0000583PACKAGE_VERSION='3.3'
584PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700628EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000629SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000630LIBC
631LIBM
632HAVE_GETHOSTBYNAME
633HAVE_GETHOSTBYNAME_R
634HAVE_GETHOSTBYNAME_R_3_ARG
635HAVE_GETHOSTBYNAME_R_5_ARG
636HAVE_GETHOSTBYNAME_R_6_ARG
637LIBOBJS
638TRUE
639MACHDEP_OBJS
640DYNLOADFILE
641DLINCLDIR
642THREADOBJ
643LDLAST
644USE_THREAD_MODULE
645SIGNAL_OBJS
646USE_SIGNAL_MODULE
647LIBFFI_INCLUDEDIR
648PKG_CONFIG
649SHLIBS
650CFLAGSFORSHARED
651LINKFORSHARED
652CCSHARED
653BLDSHARED
654LDCXXSHARED
655LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700656SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000657LIBTOOL_CRUFT
658OTHER_LIBTOOL_OPT
659UNIVERSAL_ARCH_FLAGS
660BASECFLAGS
661OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000662ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000663LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100664MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000665INSTALL_DATA
666INSTALL_SCRIPT
667INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200668PYTHON
669ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200670ac_ct_READELF
671READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000672ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200673ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000674AR
675RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000676USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000677GNULD
678LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000679LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000680RUNSHARED
681INSTSONAME
682LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000683PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000684BLDLIBRARY
685DLLLIBRARY
686LDLIBRARY
687LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100688MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000689BUILDEXEEXT
690EGREP
691GREP
692CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200693NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200694ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000695MAINCC
696CXX
697OBJEXT
698EXEEXT
699ac_ct_CC
700CPPFLAGS
701LDFLAGS
702CFLAGS
703CC
704EXPORT_MACOSX_DEPLOYMENT_TARGET
705CONFIGURE_MACOSX_DEPLOYMENT_TARGET
706SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200707_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000708MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000709FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000710FRAMEWORKUNIXTOOLSPREFIX
711FRAMEWORKALTINSTALLLAST
712FRAMEWORKALTINSTALLFIRST
713FRAMEWORKINSTALLLAST
714FRAMEWORKINSTALLFIRST
715PYTHONFRAMEWORKINSTALLDIR
716PYTHONFRAMEWORKPREFIX
717PYTHONFRAMEWORKDIR
718PYTHONFRAMEWORKIDENTIFIER
719PYTHONFRAMEWORK
720LIPO_32BIT_FLAGS
721ARCH_RUN_32BIT
722UNIVERSALSDK
723CONFIG_ARGS
724SOVERSION
725VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200726PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100727host_os
728host_vendor
729host_cpu
730host
731build_os
732build_vendor
733build_cpu
734build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500735HAS_HG
736HGBRANCH
737HGTAG
738HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400739BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000740target_alias
741host_alias
742build_alias
743LIBS
744ECHO_T
745ECHO_N
746ECHO_C
747DEFS
748mandir
749localedir
750libdir
751psdir
752pdfdir
753dvidir
754htmldir
755infodir
756docdir
757oldincludedir
758includedir
759localstatedir
760sharedstatedir
761sysconfdir
762datadir
763datarootdir
764libexecdir
765sbindir
766bindir
767program_transform_name
768prefix
769exec_prefix
770PACKAGE_URL
771PACKAGE_BUGREPORT
772PACKAGE_STRING
773PACKAGE_VERSION
774PACKAGE_TARNAME
775PACKAGE_NAME
776PATH_SEPARATOR
777SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000778ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000779ac_user_opts='
780enable_option_checking
781enable_universalsdk
782with_universal_archs
783with_framework_name
784enable_framework
785with_gcc
786with_cxx_main
787with_suffix
788enable_shared
789enable_profiling
790with_pydebug
791with_libs
792with_system_expat
793with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100794with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000795enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000796with_dbmliborder
797with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000798with_threads
799with_thread
800enable_ipv6
801with_doc_strings
802with_tsc
803with_pymalloc
804with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_fpectl
806with_libm
807with_libc
808enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_computed_gotos
810'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811 ac_precious_vars='build_alias
812host_alias
813target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100814MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815CC
816CFLAGS
817LDFLAGS
818LIBS
819CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200820CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000824ac_init_help=
825ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000826ac_unrecognized_opts=
827ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828# The variables have the same names as the options, with
829# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000830cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833no_recursion=
834prefix=NONE
835program_prefix=NONE
836program_suffix=NONE
837program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842x_includes=NONE
843x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000844
845# Installation directory options.
846# These are left unexpanded so users can "make install exec_prefix=/foo"
847# and all the variables that are supposed to be based on exec_prefix
848# by default will actually change.
849# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851bindir='${exec_prefix}/bin'
852sbindir='${exec_prefix}/sbin'
853libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854datarootdir='${prefix}/share'
855datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856sysconfdir='${prefix}/etc'
857sharedstatedir='${prefix}/com'
858localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859includedir='${prefix}/include'
860oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
862infodir='${datarootdir}/info'
863htmldir='${docdir}'
864dvidir='${docdir}'
865pdfdir='${docdir}'
866psdir='${docdir}'
867libdir='${exec_prefix}/lib'
868localedir='${datarootdir}/locale'
869mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000874do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 # If the previous option needs an argument, assign it.
876 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 ac_prev=
879 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000880 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200883 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
884 *=) ac_optarg= ;;
885 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Accept the important Cygnus configure options, so we can diagnose typos.
889
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 case $ac_dashdash$ac_option in
891 --)
892 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894 -bindir | --bindir | --bindi | --bind | --bin | --bi)
895 ac_prev=bindir ;;
896 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898
899 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904 -cache-file | --cache-file | --cache-fil | --cache-fi \
905 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
906 ac_prev=cache_file ;;
907 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
908 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 cache_file=$ac_optarg ;;
910
911 --config-cache | -C)
912 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
920 | --dataroo | --dataro | --datar)
921 ac_prev=datarootdir ;;
922 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
923 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
924 datarootdir=$ac_optarg ;;
925
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000927 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200930 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000931 ac_useropt_orig=$ac_useropt
932 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
933 case $ac_user_opts in
934 *"
935"enable_$ac_useropt"
936"*) ;;
937 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
938 ac_unrecognized_sep=', ';;
939 esac
940 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941
942 -docdir | --docdir | --docdi | --doc | --do)
943 ac_prev=docdir ;;
944 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
945 docdir=$ac_optarg ;;
946
947 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
948 ac_prev=dvidir ;;
949 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
950 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000953 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000955 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200956 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt_orig=$ac_useropt
958 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959 case $ac_user_opts in
960 *"
961"enable_$ac_useropt"
962"*) ;;
963 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
964 ac_unrecognized_sep=', ';;
965 esac
966 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
969 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
970 | --exec | --exe | --ex)
971 ac_prev=exec_prefix ;;
972 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
973 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
974 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976
977 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000978 # Obsolete; use --with-gas.
979 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 -help | --help | --hel | --he | -h)
982 ac_init_help=long ;;
983 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
984 ac_init_help=recursive ;;
985 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
986 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
994 ac_prev=htmldir ;;
995 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
996 | --ht=*)
997 htmldir=$ac_optarg ;;
998
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 -includedir | --includedir | --includedi | --included | --include \
1000 | --includ | --inclu | --incl | --inc)
1001 ac_prev=includedir ;;
1002 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1003 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
1006 -infodir | --infodir | --infodi | --infod | --info | --inf)
1007 ac_prev=infodir ;;
1008 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010
1011 -libdir | --libdir | --libdi | --libd)
1012 ac_prev=libdir ;;
1013 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
1016 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1017 | --libexe | --libex | --libe)
1018 ac_prev=libexecdir ;;
1019 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1020 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001023 -localedir | --localedir | --localedi | --localed | --locale)
1024 ac_prev=localedir ;;
1025 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1026 localedir=$ac_optarg ;;
1027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 ac_prev=localstatedir ;;
1031 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1036 ac_prev=mandir ;;
1037 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041 # Obsolete; use --without-fp.
1042 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
1044 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 no_create=yes ;;
1047
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1049 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1050 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1053 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1054 | --oldin | --oldi | --old | --ol | --o)
1055 ac_prev=oldincludedir ;;
1056 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1057 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1058 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1062 ac_prev=prefix ;;
1063 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1067 | --program-pre | --program-pr | --program-p)
1068 ac_prev=program_prefix ;;
1069 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1070 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1074 | --program-suf | --program-su | --program-s)
1075 ac_prev=program_suffix ;;
1076 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1077 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -program-transform-name | --program-transform-name \
1081 | --program-transform-nam | --program-transform-na \
1082 | --program-transform-n | --program-transform- \
1083 | --program-transform | --program-transfor \
1084 | --program-transfo | --program-transf \
1085 | --program-trans | --program-tran \
1086 | --progr-tra | --program-tr | --program-t)
1087 ac_prev=program_transform_name ;;
1088 -program-transform-name=* | --program-transform-name=* \
1089 | --program-transform-nam=* | --program-transform-na=* \
1090 | --program-transform-n=* | --program-transform-=* \
1091 | --program-transform=* | --program-transfor=* \
1092 | --program-transfo=* | --program-transf=* \
1093 | --program-trans=* | --program-tran=* \
1094 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001097 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1098 ac_prev=pdfdir ;;
1099 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1100 pdfdir=$ac_optarg ;;
1101
1102 -psdir | --psdir | --psdi | --psd | --ps)
1103 ac_prev=psdir ;;
1104 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1105 psdir=$ac_optarg ;;
1106
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1108 | -silent | --silent | --silen | --sile | --sil)
1109 silent=yes ;;
1110
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1112 ac_prev=sbindir ;;
1113 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1114 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116
1117 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1118 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1119 | --sharedst | --shareds | --shared | --share | --shar \
1120 | --sha | --sh)
1121 ac_prev=sharedstatedir ;;
1122 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1123 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1124 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1125 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128 -site | --site | --sit)
1129 ac_prev=site ;;
1130 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1134 ac_prev=srcdir ;;
1135 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001138 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1139 | --syscon | --sysco | --sysc | --sys | --sy)
1140 ac_prev=sysconfdir ;;
1141 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1142 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
1150 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1151 verbose=yes ;;
1152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 -version | --version | --versio | --versi | --vers | -V)
1154 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001157 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001160 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 ac_useropt_orig=$ac_useropt
1162 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1163 case $ac_user_opts in
1164 *"
1165"with_$ac_useropt"
1166"*) ;;
1167 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1168 ac_unrecognized_sep=', ';;
1169 esac
1170 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171
1172 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt_orig=$ac_useropt
1178 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1179 case $ac_user_opts in
1180 *"
1181"with_$ac_useropt"
1182"*) ;;
1183 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1184 ac_unrecognized_sep=', ';;
1185 esac
1186 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 --x)
1189 # Obsolete; use --with-x.
1190 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1193 | --x-incl | --x-inc | --x-in | --x-i)
1194 ac_prev=x_includes ;;
1195 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1196 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1200 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1201 ac_prev=x_libraries ;;
1202 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1203 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001206 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1207Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 ;;
1209
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 *=*)
1211 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 case $ac_envvar in #(
1214 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001217 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 export $ac_envvar ;;
1219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001220 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001225 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226 ;;
1227
1228 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001229done
1230
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001233 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234fi
1235
Matthias Kloseb9621712010-04-24 17:59:49 +00001236if test -n "$ac_unrecognized_opts"; then
1237 case $enable_option_checking in
1238 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001239 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001240 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1241 esac
1242fi
1243
1244# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1246 datadir sysconfdir sharedstatedir localstatedir includedir \
1247 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1248 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001249do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 # Remove trailing slashes.
1252 case $ac_val in
1253 */ )
1254 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1255 eval $ac_var=\$ac_val;;
1256 esac
1257 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 [\\/$]* | ?:[\\/]* ) continue;;
1260 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001263done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264
Martin v. Löwis11437992002-04-12 09:54:03 +00001265# There might be people who depend on the old broken behavior: `$host'
1266# used to hold the argument of --host etc.
1267# FIXME: To remove some day.
1268build=$build_alias
1269host=$host_alias
1270target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272# FIXME: To remove some day.
1273if test "x$host_alias" != x; then
1274 if test "x$build_alias" = x; then
1275 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 elif test "x$build_alias" != "x$host_alias"; then
1277 cross_compiling=yes
1278 fi
1279fi
1280
1281ac_tool_prefix=
1282test -n "$host_alias" && ac_tool_prefix=$host_alias-
1283
1284test "$silent" = yes && exec 6>/dev/null
1285
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287ac_pwd=`pwd` && test -n "$ac_pwd" &&
1288ac_ls_di=`ls -di .` &&
1289ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293
1294
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295# Find the source files, if location was not specified.
1296if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001297 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 ac_confdir=`$as_dirname -- "$as_myself" ||
1300$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1301 X"$as_myself" : 'X\(//\)[^/]' \| \
1302 X"$as_myself" : 'X\(//\)$' \| \
1303 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1304$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1306 s//\1/
1307 q
1308 }
1309 /^X\(\/\/\)[^/].*/{
1310 s//\1/
1311 q
1312 }
1313 /^X\(\/\/\)$/{
1314 s//\1/
1315 q
1316 }
1317 /^X\(\/\).*/{
1318 s//\1/
1319 q
1320 }
1321 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001322 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324 srcdir=..
1325 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001326else
1327 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329if test ! -r "$srcdir/$ac_unique_file"; then
1330 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1334ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 pwd)`
1337# When building in place, set srcdir=.
1338if test "$ac_abs_confdir" = "$ac_pwd"; then
1339 srcdir=.
1340fi
1341# Remove unnecessary trailing slashes from srcdir.
1342# Double slashes in file names in object file debugging info
1343# mess up M-x gdb in Emacs.
1344case $srcdir in
1345*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1346esac
1347for ac_var in $ac_precious_vars; do
1348 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1349 eval ac_env_${ac_var}_value=\$${ac_var}
1350 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1351 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1352done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001353
Martin v. Löwis11437992002-04-12 09:54:03 +00001354#
1355# Report the --help message.
1356#
1357if test "$ac_init_help" = "long"; then
1358 # Omit some internal or obsolete options to make the list less imposing.
1359 # This message is too long to be a string in the A/UX 3.1 sh.
1360 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001361\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001362
1363Usage: $0 [OPTION]... [VAR=VALUE]...
1364
1365To assign environment variables (e.g., CC, CFLAGS...), specify them as
1366VAR=VALUE. See below for descriptions of some of the useful variables.
1367
1368Defaults for the options are specified in brackets.
1369
1370Configuration:
1371 -h, --help display this help and exit
1372 --help=short display options specific to this package
1373 --help=recursive display the short help of all the included packages
1374 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 --cache-file=FILE cache test results in FILE [disabled]
1377 -C, --config-cache alias for \`--cache-file=config.cache'
1378 -n, --no-create do not create output files
1379 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1380
Martin v. Löwis11437992002-04-12 09:54:03 +00001381Installation directories:
1382 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001383 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387By default, \`make install' will install all the files in
1388\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1389an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1390for instance \`--prefix=\$HOME'.
1391
1392For better control, use the options below.
1393
1394Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 --bindir=DIR user executables [EPREFIX/bin]
1396 --sbindir=DIR system admin executables [EPREFIX/sbin]
1397 --libexecdir=DIR program executables [EPREFIX/libexec]
1398 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1399 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1400 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1401 --libdir=DIR object code libraries [EPREFIX/lib]
1402 --includedir=DIR C header files [PREFIX/include]
1403 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1404 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1405 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1406 --infodir=DIR info documentation [DATAROOTDIR/info]
1407 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1408 --mandir=DIR man documentation [DATAROOTDIR/man]
1409 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1410 --htmldir=DIR html documentation [DOCDIR]
1411 --dvidir=DIR dvi documentation [DOCDIR]
1412 --pdfdir=DIR pdf documentation [DOCDIR]
1413 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001414_ACEOF
1415
1416 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001417
1418System types:
1419 --build=BUILD configure for building on BUILD [guessed]
1420 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421_ACEOF
1422fi
1423
1424if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001425 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001426 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001427 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 cat <<\_ACEOF
1429
1430Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1433 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001434 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001435 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --enable-framework[=INSTALLDIR]
1437 Build (MacOSX|Darwin) framework
1438 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001439 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001440 --enable-loadable-sqlite-extensions
1441 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --enable-ipv6 Enable ipv6 (with ipv4) support
1443 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001444 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447Optional Packages:
1448 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1449 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001450 --with-universal-archs=ARCH
1451 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001452 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001453 --with-framework-name=FRAMEWORK
1454 specify an alternate name of the framework built
1455 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001457 --with-cxx-main=<compiler>
1458 compile main() and link python executable with C++
1459 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with-suffix=.exe set executable suffix
1461 --with-pydebug build with Py_DEBUG defined
1462 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001463 --with-system-expat build pyexpat module using an installed expat
1464 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001465 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001466 --with-system-libmpdec build _decimal module using an installed libmpdec
1467 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001468 --with-dbmliborder=db1:db2:...
1469 order to check db backends for dbm. Valid value is a
1470 colon separated string with the backend names
1471 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --with(out)-threads[=DIRECTORY]
1474 disable/enable thread support
1475 --with(out)-thread[=DIRECTORY]
1476 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001478 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001480 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with-fpectl enable SIGFPE catching
1482 --with-libm=STRING math library
1483 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001484 --with(out)-computed-gotos
1485 Use computed gotos in evaluation loop (enabled by
1486 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001489 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 CC C compiler command
1491 CFLAGS C compiler flags
1492 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1493 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 CPP C preprocessor
1498
1499Use these variables to override the choices made by `configure' or to help
1500it to find libraries and programs with nonstandard names/locations.
1501
Georg Brandle2e15612009-05-20 18:25:10 +00001502Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001503_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001505fi
1506
1507if test "$ac_init_help" = "recursive"; then
1508 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001510 test -d "$ac_dir" ||
1511 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1512 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 ac_builddir=.
1514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515case "$ac_dir" in
1516.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1517*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001518 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001520 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 case $ac_top_builddir_sub in
1522 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1523 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1524 esac ;;
1525esac
1526ac_abs_top_builddir=$ac_pwd
1527ac_abs_builddir=$ac_pwd$ac_dir_suffix
1528# for backward compatibility:
1529ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001530
1531case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001532 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 ac_top_srcdir=$ac_top_builddir_sub
1535 ac_abs_top_srcdir=$ac_pwd ;;
1536 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001537 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 ac_top_srcdir=$srcdir
1539 ac_abs_top_srcdir=$srcdir ;;
1540 *) # Relative name.
1541 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1542 ac_top_srcdir=$ac_top_build_prefix$srcdir
1543 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001544esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 cd "$ac_dir" || { ac_status=$?; continue; }
1548 # Check for guested configure.
1549 if test -f "$ac_srcdir/configure.gnu"; then
1550 echo &&
1551 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1552 elif test -f "$ac_srcdir/configure"; then
1553 echo &&
1554 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 fi || ac_status=$?
1558 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 done
1560fi
1561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001563if $ac_init_version; then
1564 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001565python configure 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001566generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001568Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001569This configure script is free software; the Free Software Foundation
1570gives unlimited permission to copy, distribute and modify it.
1571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001574
1575## ------------------------ ##
1576## Autoconf initialization. ##
1577## ------------------------ ##
1578
1579# ac_fn_c_try_compile LINENO
1580# --------------------------
1581# Try to compile conftest.$ac_ext, and return whether this succeeded.
1582ac_fn_c_try_compile ()
1583{
1584 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1585 rm -f conftest.$ac_objext
1586 if { { ac_try="$ac_compile"
1587case "(($ac_try" in
1588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1589 *) ac_try_echo=$ac_try;;
1590esac
1591eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1592$as_echo "$ac_try_echo"; } >&5
1593 (eval "$ac_compile") 2>conftest.err
1594 ac_status=$?
1595 if test -s conftest.err; then
1596 grep -v '^ *+' conftest.err >conftest.er1
1597 cat conftest.er1 >&5
1598 mv -f conftest.er1 conftest.err
1599 fi
1600 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1601 test $ac_status = 0; } && {
1602 test -z "$ac_c_werror_flag" ||
1603 test ! -s conftest.err
1604 } && test -s conftest.$ac_objext; then :
1605 ac_retval=0
1606else
1607 $as_echo "$as_me: failed program was:" >&5
1608sed 's/^/| /' conftest.$ac_ext >&5
1609
1610 ac_retval=1
1611fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001612 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001613 as_fn_set_status $ac_retval
1614
1615} # ac_fn_c_try_compile
1616
Matthias Kloseb9621712010-04-24 17:59:49 +00001617# ac_fn_c_try_link LINENO
1618# -----------------------
1619# Try to link conftest.$ac_ext, and return whether this succeeded.
1620ac_fn_c_try_link ()
1621{
1622 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1623 rm -f conftest.$ac_objext conftest$ac_exeext
1624 if { { ac_try="$ac_link"
1625case "(($ac_try" in
1626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1627 *) ac_try_echo=$ac_try;;
1628esac
1629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1630$as_echo "$ac_try_echo"; } >&5
1631 (eval "$ac_link") 2>conftest.err
1632 ac_status=$?
1633 if test -s conftest.err; then
1634 grep -v '^ *+' conftest.err >conftest.er1
1635 cat conftest.er1 >&5
1636 mv -f conftest.er1 conftest.err
1637 fi
1638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1639 test $ac_status = 0; } && {
1640 test -z "$ac_c_werror_flag" ||
1641 test ! -s conftest.err
1642 } && test -s conftest$ac_exeext && {
1643 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001644 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001645 }; then :
1646 ac_retval=0
1647else
1648 $as_echo "$as_me: failed program was:" >&5
1649sed 's/^/| /' conftest.$ac_ext >&5
1650
1651 ac_retval=1
1652fi
1653 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1654 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1655 # interfere with the next link command; also delete a directory that is
1656 # left behind by Apple's compiler. We do this before executing the actions.
1657 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001658 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001659 as_fn_set_status $ac_retval
1660
1661} # ac_fn_c_try_link
1662
Matthias Kloseb9621712010-04-24 17:59:49 +00001663# ac_fn_c_try_cpp LINENO
1664# ----------------------
1665# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1666ac_fn_c_try_cpp ()
1667{
1668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1669 if { { ac_try="$ac_cpp conftest.$ac_ext"
1670case "(($ac_try" in
1671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1672 *) ac_try_echo=$ac_try;;
1673esac
1674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1675$as_echo "$ac_try_echo"; } >&5
1676 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1677 ac_status=$?
1678 if test -s conftest.err; then
1679 grep -v '^ *+' conftest.err >conftest.er1
1680 cat conftest.er1 >&5
1681 mv -f conftest.er1 conftest.err
1682 fi
1683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001684 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001685 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1686 test ! -s conftest.err
1687 }; then :
1688 ac_retval=0
1689else
1690 $as_echo "$as_me: failed program was:" >&5
1691sed 's/^/| /' conftest.$ac_ext >&5
1692
1693 ac_retval=1
1694fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001695 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001696 as_fn_set_status $ac_retval
1697
1698} # ac_fn_c_try_cpp
1699
1700# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1701# -------------------------------------------------------
1702# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1703# the include files in INCLUDES and setting the cache variable VAR
1704# accordingly.
1705ac_fn_c_check_header_mongrel ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001708 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1710$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001711if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001712 $as_echo_n "(cached) " >&6
1713fi
1714eval ac_res=\$$3
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1716$as_echo "$ac_res" >&6; }
1717else
1718 # Is the header compilable?
1719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1720$as_echo_n "checking $2 usability... " >&6; }
1721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1722/* end confdefs.h. */
1723$4
1724#include <$2>
1725_ACEOF
1726if ac_fn_c_try_compile "$LINENO"; then :
1727 ac_header_compiler=yes
1728else
1729 ac_header_compiler=no
1730fi
1731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1733$as_echo "$ac_header_compiler" >&6; }
1734
1735# Is the header present?
1736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1737$as_echo_n "checking $2 presence... " >&6; }
1738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1739/* end confdefs.h. */
1740#include <$2>
1741_ACEOF
1742if ac_fn_c_try_cpp "$LINENO"; then :
1743 ac_header_preproc=yes
1744else
1745 ac_header_preproc=no
1746fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001747rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1749$as_echo "$ac_header_preproc" >&6; }
1750
1751# So? What about this header?
1752case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1753 yes:no: )
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1755$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1757$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1758 ;;
1759 no:yes:* )
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1761$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1763$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1765$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1767$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1769$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001770( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001771## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001772## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 ) | sed "s/^/$as_me: WARNING: /" >&2
1774 ;;
1775esac
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1777$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001778if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 $as_echo_n "(cached) " >&6
1780else
1781 eval "$3=\$ac_header_compiler"
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001787 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001788
1789} # ac_fn_c_check_header_mongrel
1790
1791# ac_fn_c_try_run LINENO
1792# ----------------------
1793# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1794# that executables *can* be run.
1795ac_fn_c_try_run ()
1796{
1797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1798 if { { ac_try="$ac_link"
1799case "(($ac_try" in
1800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1801 *) ac_try_echo=$ac_try;;
1802esac
1803eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1804$as_echo "$ac_try_echo"; } >&5
1805 (eval "$ac_link") 2>&5
1806 ac_status=$?
1807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1808 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1809 { { case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_try") 2>&5
1816 ac_status=$?
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; }; }; then :
1819 ac_retval=0
1820else
1821 $as_echo "$as_me: program exited with status $ac_status" >&5
1822 $as_echo "$as_me: failed program was:" >&5
1823sed 's/^/| /' conftest.$ac_ext >&5
1824
1825 ac_retval=$ac_status
1826fi
1827 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001828 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001829 as_fn_set_status $ac_retval
1830
1831} # ac_fn_c_try_run
1832
1833# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1834# -------------------------------------------------------
1835# Tests whether HEADER exists and can be compiled using the include files in
1836# INCLUDES, setting the cache variable VAR accordingly.
1837ac_fn_c_check_header_compile ()
1838{
1839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001842if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 $as_echo_n "(cached) " >&6
1844else
1845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846/* end confdefs.h. */
1847$4
1848#include <$2>
1849_ACEOF
1850if ac_fn_c_try_compile "$LINENO"; then :
1851 eval "$3=yes"
1852else
1853 eval "$3=no"
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857eval ac_res=\$$3
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001861
1862} # ac_fn_c_check_header_compile
1863
Matthias Kloseb9621712010-04-24 17:59:49 +00001864# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1865# -------------------------------------------
1866# Tests whether TYPE exists after having included INCLUDES, setting cache
1867# variable VAR accordingly.
1868ac_fn_c_check_type ()
1869{
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1872$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001873if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001874 $as_echo_n "(cached) " >&6
1875else
1876 eval "$3=no"
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$4
1880int
1881main ()
1882{
1883if (sizeof ($2))
1884 return 0;
1885 ;
1886 return 0;
1887}
1888_ACEOF
1889if ac_fn_c_try_compile "$LINENO"; then :
1890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h. */
1892$4
1893int
1894main ()
1895{
1896if (sizeof (($2)))
1897 return 0;
1898 ;
1899 return 0;
1900}
1901_ACEOF
1902if ac_fn_c_try_compile "$LINENO"; then :
1903
1904else
1905 eval "$3=yes"
1906fi
1907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1908fi
1909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1910fi
1911eval ac_res=\$$3
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1913$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001914 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001915
1916} # ac_fn_c_check_type
1917
1918# ac_fn_c_find_uintX_t LINENO BITS VAR
1919# ------------------------------------
1920# Finds an unsigned integer type with width BITS, setting cache variable VAR
1921# accordingly.
1922ac_fn_c_find_uintX_t ()
1923{
1924 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1926$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001927if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001928 $as_echo_n "(cached) " >&6
1929else
1930 eval "$3=no"
1931 # Order is important - never check a type that is potentially smaller
1932 # than half of the expected target width.
1933 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1934 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$ac_includes_default
1938int
1939main ()
1940{
1941static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001942test_array [0] = 0;
1943return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001944
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950 case $ac_type in #(
1951 uint$2_t) :
1952 eval "$3=yes" ;; #(
1953 *) :
1954 eval "$3=\$ac_type" ;;
1955esac
1956fi
1957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001958 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001959
1960else
1961 break
1962fi
1963 done
1964fi
1965eval ac_res=\$$3
1966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1967$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001969
1970} # ac_fn_c_find_uintX_t
1971
1972# ac_fn_c_find_intX_t LINENO BITS VAR
1973# -----------------------------------
1974# Finds a signed integer type with width BITS, setting cache variable VAR
1975# accordingly.
1976ac_fn_c_find_intX_t ()
1977{
1978 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1980$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001981if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001982 $as_echo_n "(cached) " >&6
1983else
1984 eval "$3=no"
1985 # Order is important - never check a type that is potentially smaller
1986 # than half of the expected target width.
1987 for ac_type in int$2_t 'int' 'long int' \
1988 'long long int' 'short int' 'signed char'; do
1989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990/* end confdefs.h. */
1991$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001992 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001993int
1994main ()
1995{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001996static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001997test_array [0] = 0;
1998return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002008 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002009int
2010main ()
2011{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002012static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002013 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002014test_array [0] = 0;
2015return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022
2023else
2024 case $ac_type in #(
2025 int$2_t) :
2026 eval "$3=yes" ;; #(
2027 *) :
2028 eval "$3=\$ac_type" ;;
2029esac
2030fi
2031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002034 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002035
2036else
2037 break
2038fi
2039 done
2040fi
2041eval ac_res=\$$3
2042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2043$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002044 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046} # ac_fn_c_find_intX_t
2047
2048# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2049# --------------------------------------------
2050# Tries to find the compile-time value of EXPR in a program that includes
2051# INCLUDES, setting VAR accordingly. Returns whether the value could be
2052# computed
2053ac_fn_c_compute_int ()
2054{
2055 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2056 if test "$cross_compiling" = yes; then
2057 # Depending upon the size, compute the lo and hi bounds.
2058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=0 ac_mid=0
2074 while :; do
2075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078int
2079main ()
2080{
2081static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002082test_array [0] = 0;
2083return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002084
2085 ;
2086 return 0;
2087}
2088_ACEOF
2089if ac_fn_c_try_compile "$LINENO"; then :
2090 ac_hi=$ac_mid; break
2091else
2092 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2093 if test $ac_lo -le $ac_mid; then
2094 ac_lo= ac_hi=
2095 break
2096 fi
2097 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100 done
2101else
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002109test_array [0] = 0;
2110return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=-1 ac_mid=-1
2118 while :; do
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122int
2123main ()
2124{
2125static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002126test_array [0] = 0;
2127return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_lo=$ac_mid; break
2135else
2136 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2137 if test $ac_mid -le $ac_hi; then
2138 ac_lo= ac_hi=
2139 break
2140 fi
2141 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2142fi
2143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144 done
2145else
2146 ac_lo= ac_hi=
2147fi
2148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151# Binary search between lo and hi bounds.
2152while test "x$ac_lo" != "x$ac_hi"; do
2153 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h. */
2156$4
2157int
2158main ()
2159{
2160static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002161test_array [0] = 0;
2162return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002163
2164 ;
2165 return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_compile "$LINENO"; then :
2169 ac_hi=$ac_mid
2170else
2171 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174done
2175case $ac_lo in #((
2176?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2177'') ac_retval=1 ;;
2178esac
2179 else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182$4
2183static long int longval () { return $2; }
2184static unsigned long int ulongval () { return $2; }
2185#include <stdio.h>
2186#include <stdlib.h>
2187int
2188main ()
2189{
2190
2191 FILE *f = fopen ("conftest.val", "w");
2192 if (! f)
2193 return 1;
2194 if (($2) < 0)
2195 {
2196 long int i = longval ();
2197 if (i != ($2))
2198 return 1;
2199 fprintf (f, "%ld", i);
2200 }
2201 else
2202 {
2203 unsigned long int i = ulongval ();
2204 if (i != ($2))
2205 return 1;
2206 fprintf (f, "%lu", i);
2207 }
2208 /* Do not output a trailing newline, as this causes \r\n confusion
2209 on some platforms. */
2210 return ferror (f) || fclose (f) != 0;
2211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_run "$LINENO"; then :
2217 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2218else
2219 ac_retval=1
2220fi
2221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2222 conftest.$ac_objext conftest.beam conftest.$ac_ext
2223rm -f conftest.val
2224
2225 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002226 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002227 as_fn_set_status $ac_retval
2228
2229} # ac_fn_c_compute_int
2230
2231# ac_fn_c_check_func LINENO FUNC VAR
2232# ----------------------------------
2233# Tests whether FUNC exists, setting the cache variable VAR accordingly
2234ac_fn_c_check_func ()
2235{
2236 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2238$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002239if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002240 $as_echo_n "(cached) " >&6
2241else
2242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243/* end confdefs.h. */
2244/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2245 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2246#define $2 innocuous_$2
2247
2248/* System header to define __stub macros and hopefully few prototypes,
2249 which can conflict with char $2 (); below.
2250 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2251 <limits.h> exists even on freestanding compilers. */
2252
2253#ifdef __STDC__
2254# include <limits.h>
2255#else
2256# include <assert.h>
2257#endif
2258
2259#undef $2
2260
2261/* Override any GCC internal prototype to avoid an error.
2262 Use char because int might match the return type of a GCC
2263 builtin and then its argument prototype would still apply. */
2264#ifdef __cplusplus
2265extern "C"
2266#endif
2267char $2 ();
2268/* The GNU C library defines this for functions which it implements
2269 to always fail with ENOSYS. Some functions are actually named
2270 something starting with __ and the normal name is an alias. */
2271#if defined __stub_$2 || defined __stub___$2
2272choke me
2273#endif
2274
2275int
2276main ()
2277{
2278return $2 ();
2279 ;
2280 return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_link "$LINENO"; then :
2284 eval "$3=yes"
2285else
2286 eval "$3=no"
2287fi
2288rm -f core conftest.err conftest.$ac_objext \
2289 conftest$ac_exeext conftest.$ac_ext
2290fi
2291eval ac_res=\$$3
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2293$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002294 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002295
2296} # ac_fn_c_check_func
2297
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002298# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2299# ---------------------------------------------
2300# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2301# accordingly.
2302ac_fn_c_check_decl ()
2303{
2304 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2305 as_decl_name=`echo $2|sed 's/ *(.*//'`
2306 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2308$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2309if eval \${$3+:} false; then :
2310 $as_echo_n "(cached) " >&6
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$4
2315int
2316main ()
2317{
2318#ifndef $as_decl_name
2319#ifdef __cplusplus
2320 (void) $as_decl_use;
2321#else
2322 (void) $as_decl_name;
2323#endif
2324#endif
2325
2326 ;
2327 return 0;
2328}
2329_ACEOF
2330if ac_fn_c_try_compile "$LINENO"; then :
2331 eval "$3=yes"
2332else
2333 eval "$3=no"
2334fi
2335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2336fi
2337eval ac_res=\$$3
2338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2339$as_echo "$ac_res" >&6; }
2340 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2341
2342} # ac_fn_c_check_decl
2343
Matthias Kloseb9621712010-04-24 17:59:49 +00002344# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2345# ----------------------------------------------------
2346# Tries to find if the field MEMBER exists in type AGGR, after including
2347# INCLUDES, setting cache variable VAR accordingly.
2348ac_fn_c_check_member ()
2349{
2350 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2352$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002353if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002354 $as_echo_n "(cached) " >&6
2355else
2356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357/* end confdefs.h. */
2358$5
2359int
2360main ()
2361{
2362static $2 ac_aggr;
2363if (ac_aggr.$3)
2364return 0;
2365 ;
2366 return 0;
2367}
2368_ACEOF
2369if ac_fn_c_try_compile "$LINENO"; then :
2370 eval "$4=yes"
2371else
2372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h. */
2374$5
2375int
2376main ()
2377{
2378static $2 ac_aggr;
2379if (sizeof ac_aggr.$3)
2380return 0;
2381 ;
2382 return 0;
2383}
2384_ACEOF
2385if ac_fn_c_try_compile "$LINENO"; then :
2386 eval "$4=yes"
2387else
2388 eval "$4=no"
2389fi
2390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394eval ac_res=\$$4
2395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2396$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002397 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002398
2399} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002401This file contains any messages produced by compilers while
2402running configure, to aid debugging if configure makes a mistake.
2403
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002404It was created by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002405generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002406
2407 $ $0 $@
2408
2409_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002411{
2412cat <<_ASUNAME
2413## --------- ##
2414## Platform. ##
2415## --------- ##
2416
2417hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2418uname -m = `(uname -m) 2>/dev/null || echo unknown`
2419uname -r = `(uname -r) 2>/dev/null || echo unknown`
2420uname -s = `(uname -s) 2>/dev/null || echo unknown`
2421uname -v = `(uname -v) 2>/dev/null || echo unknown`
2422
2423/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2424/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2425
2426/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2427/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2428/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002430/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2431/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2432/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2433
2434_ASUNAME
2435
2436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2437for as_dir in $PATH
2438do
2439 IFS=$as_save_IFS
2440 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002441 $as_echo "PATH: $as_dir"
2442 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445} >&5
2446
2447cat >&5 <<_ACEOF
2448
2449
2450## ----------- ##
2451## Core tests. ##
2452## ----------- ##
2453
2454_ACEOF
2455
2456
2457# Keep a trace of the command line.
2458# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002459# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002460# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002461# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002462ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002463ac_configure_args0=
2464ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002465ac_must_keep_next=false
2466for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002467do
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 for ac_arg
2469 do
2470 case $ac_arg in
2471 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2472 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2473 | -silent | --silent | --silen | --sile | --sil)
2474 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 esac
2478 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002483 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002484 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002485 case $ac_arg in
2486 *=* | --config-cache | -C | -disable-* | --disable-* \
2487 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2488 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2489 | -with-* | --with-* | -without-* | --without-* | --x)
2490 case "$ac_configure_args0 " in
2491 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2492 esac
2493 ;;
2494 -* ) ac_must_keep_next=true ;;
2495 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 ;;
2499 esac
2500 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002501done
Matthias Kloseb9621712010-04-24 17:59:49 +00002502{ ac_configure_args0=; unset ac_configure_args0;}
2503{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002504
2505# When interrupted or exit'd, cleanup temporary files, and complete
2506# config.log. We remove comments because anyway the quotes in there
2507# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508# WARNING: Use '\'' to represent an apostrophe within the trap.
2509# 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 +00002510trap 'exit_status=$?
2511 # Save into config.log some information that might help in debugging.
2512 {
2513 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002514
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002516## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 echo
2519 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520(
2521 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2522 eval ac_val=\$$ac_var
2523 case $ac_val in #(
2524 *${as_nl}*)
2525 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2527$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac
2529 case $ac_var in #(
2530 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2532 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 esac ;;
2534 esac
2535 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2538 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 "s/'\''/'\''\\\\'\'''\''/g;
2541 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2542 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002543 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002545 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 esac |
2547 sort
2548)
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002550
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002551 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002552## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002553## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 echo
2555 for ac_var in $ac_subst_vars
2556 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 eval ac_val=\$$ac_var
2558 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002559 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002562 done | sort
2563 echo
2564
2565 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002566 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002569 echo
2570 for ac_var in $ac_subst_files
2571 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 eval ac_val=\$$ac_var
2573 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 done | sort
2578 echo
2579 fi
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002582 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002583## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002584## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002585 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 echo
2588 fi
2589 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 $as_echo "$as_me: caught signal $ac_signal"
2591 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 rm -f core *.core core.conftest.* &&
2594 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002597for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002599done
2600ac_signal=0
2601
2602# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002604
Matthias Kloseb9621712010-04-24 17:59:49 +00002605$as_echo "/* confdefs.h */" > confdefs.h
2606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607# Predefined preprocessor variables.
2608
2609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_NAME "$PACKAGE_NAME"
2611_ACEOF
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613cat >>confdefs.h <<_ACEOF
2614#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2615_ACEOF
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_VERSION "$PACKAGE_VERSION"
2619_ACEOF
2620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_STRING "$PACKAGE_STRING"
2623_ACEOF
2624
Martin v. Löwis11437992002-04-12 09:54:03 +00002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2627_ACEOF
2628
Matthias Kloseb9621712010-04-24 17:59:49 +00002629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_URL "$PACKAGE_URL"
2631_ACEOF
2632
Martin v. Löwis11437992002-04-12 09:54:03 +00002633
2634# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002635# Prefer an explicitly selected file to automatically selected ones.
2636ac_site_file1=NONE
2637ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002639 # We do not want a PATH search for config.site.
2640 case $CONFIG_SITE in #((
2641 -*) ac_site_file1=./$CONFIG_SITE;;
2642 */*) ac_site_file1=$CONFIG_SITE;;
2643 *) ac_site_file1=./$CONFIG_SITE;;
2644 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 ac_site_file1=$prefix/share/config.site
2647 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648else
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 ac_site_file1=$ac_default_prefix/share/config.site
2650 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002652for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653do
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 test "x$ac_site_file" = xNONE && continue
2655 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2657$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002659 . "$ac_site_file" \
2660 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2662as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002663See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002664 fi
2665done
2666
2667if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 # Some versions of bash will fail to source /dev/null (special files
2669 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2670 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2672$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2675 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 esac
2677 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678else
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2680$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 >$cache_file
2682fi
2683
2684# Check that the precious variables saved in the cache have kept the same
2685# value.
2686ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2689 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2691 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 case $ac_old_set,$ac_new_set in
2693 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2695$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 +00002696 ac_cache_corrupted=: ;;
2697 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002698 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2699$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 ac_cache_corrupted=: ;;
2701 ,);;
2702 *)
2703 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002704 # differences in whitespace do not lead to failure.
2705 ac_old_val_w=`echo x $ac_old_val`
2706 ac_new_val_w=`echo x $ac_new_val`
2707 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2709$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2710 ac_cache_corrupted=:
2711 else
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2713$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2714 eval $ac_var=\$ac_old_val
2715 fi
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2717$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2719$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 fi;;
2721 esac
2722 # Pass precious variables to config.status.
2723 if test "$ac_new_set" = set; then
2724 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002725 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002726 *) ac_arg=$ac_var=$ac_new_val ;;
2727 esac
2728 case " $ac_configure_args " in
2729 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002730 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 esac
2732 fi
2733done
2734if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2738$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002739 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002741## -------------------- ##
2742## Main body of script. ##
2743## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002744
Guido van Rossum7f43da71994-08-01 12:15:30 +00002745ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002746ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002747ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2748ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2749ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750
Guido van Rossum627b2d71993-12-24 10:39:16 +00002751
Michael W. Hudson54241132001-12-07 15:38:26 +00002752
Trent Nelson4d4ec652012-10-16 08:51:24 -04002753
Trent Nelson5595ab52012-10-17 04:47:31 -04002754if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002755 # If we're building out-of-tree, we need to make sure the following
2756 # resources get picked up before their $srcdir counterparts.
2757 # Objects/ -> typeslots.inc
2758 # Include/ -> Python-ast.h, graminit.h
2759 # Python/ -> importlib.h
2760 # (A side effect of this is that these resources will automatically be
2761 # regenerated when building out-of-tree, regardless of whether or not
2762 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2763 # off.)
2764 BASECPPFLAGS="-IObjects -IInclude -IPython"
2765else
2766 BASECPPFLAGS=""
2767fi
2768
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769
2770
2771
2772
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002773if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774then
2775# Extract the first word of "hg", so it can be a program name with args.
2776set dummy hg; ac_word=$2
2777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2778$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002779if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002780 $as_echo_n "(cached) " >&6
2781else
2782 if test -n "$HAS_HG"; then
2783 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2784else
2785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2786for as_dir in $PATH
2787do
2788 IFS=$as_save_IFS
2789 test -z "$as_dir" && as_dir=.
2790 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002792 ac_cv_prog_HAS_HG="found"
2793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2794 break 2
2795 fi
2796done
2797 done
2798IFS=$as_save_IFS
2799
2800 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2801fi
2802fi
2803HAS_HG=$ac_cv_prog_HAS_HG
2804if test -n "$HAS_HG"; then
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2806$as_echo "$HAS_HG" >&6; }
2807else
2808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2809$as_echo "no" >&6; }
2810fi
2811
2812
2813else
2814HAS_HG=no-repository
2815fi
2816if test $HAS_HG = found
2817then
2818 HGVERSION="hg id -i \$(srcdir)"
2819 HGTAG="hg id -t \$(srcdir)"
2820 HGBRANCH="hg id -b \$(srcdir)"
2821else
2822 HGVERSION=""
2823 HGTAG=""
2824 HGBRANCH=""
2825fi
2826
2827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002829
2830
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002831ac_aux_dir=
2832for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2833 if 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/install.sh"; then
2838 ac_aux_dir=$ac_dir
2839 ac_install_sh="$ac_aux_dir/install.sh -c"
2840 break
2841 elif test -f "$ac_dir/shtool"; then
2842 ac_aux_dir=$ac_dir
2843 ac_install_sh="$ac_aux_dir/shtool install -c"
2844 break
2845 fi
2846done
2847if test -z "$ac_aux_dir"; then
2848 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2849fi
2850
2851# These three variables are undocumented and unsupported,
2852# and are intended to be withdrawn in a future Autoconf release.
2853# They can cause serious problems if a builder's source tree is in a directory
2854# whose full name contains unusual characters.
2855ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2856ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2857ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2858
2859
2860# Make sure we can run config.sub.
2861$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2862 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2863
2864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2865$as_echo_n "checking build system type... " >&6; }
2866if ${ac_cv_build+:} false; then :
2867 $as_echo_n "(cached) " >&6
2868else
2869 ac_build_alias=$build_alias
2870test "x$ac_build_alias" = x &&
2871 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2872test "x$ac_build_alias" = x &&
2873 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2874ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2875 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2876
2877fi
2878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2879$as_echo "$ac_cv_build" >&6; }
2880case $ac_cv_build in
2881*-*-*) ;;
2882*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2883esac
2884build=$ac_cv_build
2885ac_save_IFS=$IFS; IFS='-'
2886set x $ac_cv_build
2887shift
2888build_cpu=$1
2889build_vendor=$2
2890shift; shift
2891# Remember, the first character of IFS is used to create $*,
2892# except with old shells:
2893build_os=$*
2894IFS=$ac_save_IFS
2895case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2896
2897
2898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2899$as_echo_n "checking host system type... " >&6; }
2900if ${ac_cv_host+:} false; then :
2901 $as_echo_n "(cached) " >&6
2902else
2903 if test "x$host_alias" = x; then
2904 ac_cv_host=$ac_cv_build
2905else
2906 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2907 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2908fi
2909
2910fi
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2912$as_echo "$ac_cv_host" >&6; }
2913case $ac_cv_host in
2914*-*-*) ;;
2915*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2916esac
2917host=$ac_cv_host
2918ac_save_IFS=$IFS; IFS='-'
2919set x $ac_cv_host
2920shift
2921host_cpu=$1
2922host_vendor=$2
2923shift; shift
2924# Remember, the first character of IFS is used to create $*,
2925# except with old shells:
2926host_os=$*
2927IFS=$ac_save_IFS
2928case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2929
2930
2931
doko@python.orga10e4a92013-01-25 18:45:12 +01002932
2933
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002934if test "$cross_compiling" = yes; then
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2936$as_echo_n "checking for python interpreter for cross build... " >&6; }
2937 if test -z "$PYTHON_FOR_BUILD"; then
2938 for interp in python$PACKAGE_VERSION python3 python; do
2939 which $interp >/dev/null 2>&1 || continue
2940 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2941 break
2942 fi
2943 interp=
2944 done
2945 if test x$interp = x; then
2946 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2947 fi
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2949$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002950 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002952elif test "$cross_compiling" = maybe; then
2953 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002954else
2955 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2956fi
2957
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959
Benjamin Petersond23f8222009-04-05 19:13:16 +00002960if test "$prefix" != "/"; then
2961 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2962fi
2963
2964
Martin v. Löwis11437992002-04-12 09:54:03 +00002965
2966
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002967# We don't use PACKAGE_ variables, and they cause conflicts
2968# with other autoconf-based packages that include Python.h
2969grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2970rm confdefs.h
2971mv confdefs.h.new confdefs.h
2972
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002973
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002974VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002975
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002976# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002977
2978SOVERSION=1.0
2979
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980# The later defininition of _XOPEN_SOURCE disables certain features
2981# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002984
2985
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002991
2992
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2994# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2995# them.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002998
2999
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3001# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3002
Matthias Kloseb9621712010-04-24 17:59:49 +00003003$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003004
3005
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003006# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3007# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3008# them.
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003011
3012
3013
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003014define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003015
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003016# Arguments passed to configure.
3017
3018CONFIG_ARGS="$ac_configure_args"
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3021$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003022# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003023if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003024 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003025 case $enableval in
3026 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003027 # Locate the best usable SDK, see Mac/README.txt for more
3028 # information
3029 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3030 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003032 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3033 if test ! -d "${enableval}"
3034 then
3035 enableval=/
3036 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038 ;;
3039 esac
3040 case $enableval in
3041 no)
3042 UNIVERSALSDK=
3043 enable_universalsdk=
3044 ;;
3045 *)
3046 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 if test ! -d "${UNIVERSALSDK}"
3048 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003049 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051 ;;
3052 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003053
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055else
3056
3057 UNIVERSALSDK=
3058 enable_universalsdk=
3059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062if test -n "${UNIVERSALSDK}"
3063then
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3065$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066else
Matthias Kloseb9621712010-04-24 17:59:49 +00003067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3068$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003072
3073
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074# For backward compatibility reasons we prefer to select '32-bit' if available,
3075# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003077if test "`uname -s`" = "Darwin"
3078then
3079 if test -n "${UNIVERSALSDK}"
3080 then
3081 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3082 then
3083 UNIVERSAL_ARCHS="intel"
3084 fi
3085 fi
3086fi
3087
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3090$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091
3092# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003093if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3096$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003097 UNIVERSAL_ARCHS="$withval"
3098
3099else
3100
Ned Deilycbfb9a52012-06-23 16:02:19 -07003101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3102$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003103
3104fi
3105
3106
3107
3108
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003109
3110# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003112 withval=$with_framework_name;
3113 PYTHONFRAMEWORK=${withval}
3114 PYTHONFRAMEWORKDIR=${withval}.framework
3115 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3116
3117else
3118
3119 PYTHONFRAMEWORK=Python
3120 PYTHONFRAMEWORKDIR=Python.framework
3121 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3122
3123fi
3124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003126if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003128 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003129 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003130 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 esac
3132 case $enableval in
3133 no)
3134 PYTHONFRAMEWORK=
3135 PYTHONFRAMEWORKDIR=no-framework
3136 PYTHONFRAMEWORKPREFIX=
3137 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138 FRAMEWORKINSTALLFIRST=
3139 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 FRAMEWORKALTINSTALLFIRST=
3141 FRAMEWORKALTINSTALLLAST=
3142 if test "x${prefix}" = "xNONE"; then
3143 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3144 else
3145 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3146 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003147 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003148 ;;
3149 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003151 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003152 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003153 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003154 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3155 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003157
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003158 if test "x${prefix}" = "xNONE" ; then
3159 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003161 else
3162 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3163 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003164
3165 case "${enableval}" in
3166 /System*)
3167 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3168 if test "${prefix}" = "NONE" ; then
3169 # See below
3170 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3171 fi
3172 ;;
3173
3174 /Library*)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177
3178 */Library/Frameworks)
3179 MDIR="`dirname "${enableval}"`"
3180 MDIR="`dirname "${MDIR}"`"
3181 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3182
3183 if test "${prefix}" = "NONE"; then
3184 # User hasn't specified the
3185 # --prefix option, but wants to install
3186 # the framework in a non-default location,
3187 # ensure that the compatibility links get
3188 # installed relative to that prefix as well
3189 # instead of in /usr/local.
3190 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3191 fi
3192 ;;
3193
3194 *)
3195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3196 ;;
3197 esac
3198
Jack Jansen127e56e2001-09-11 14:41:54 +00003199 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003201 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003207 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3208
3209 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3210
Jack Jansene578a632001-08-15 01:27:14 +00003211 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Guido van Rossum563e7081996-09-10 18:20:48 +00003213else
Martin v. Löwis11437992002-04-12 09:54:03 +00003214
Jack Jansene578a632001-08-15 01:27:14 +00003215 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003216 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003217 PYTHONFRAMEWORKPREFIX=
3218 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219 FRAMEWORKINSTALLFIRST=
3220 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003221 FRAMEWORKALTINSTALLFIRST=
3222 FRAMEWORKALTINSTALLLAST=
3223 if test "x${prefix}" = "xNONE" ; then
3224 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3225 else
3226 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3227 fi
Jack Jansene578a632001-08-15 01:27:14 +00003228 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231fi
3232
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
3234
Michael W. Hudson54241132001-12-07 15:38:26 +00003235
3236
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240
3241
3242
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003243
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003244
Jack Jansene578a632001-08-15 01:27:14 +00003245##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003246## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003247## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003248##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249# Set name for machine-dependent library files
3250
Matthias Kloseb9621712010-04-24 17:59:49 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3252$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253if test -z "$MACHDEP"
3254then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 # avoid using uname for cross builds
3256 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003257 # ac_sys_system and ac_sys_release are used for setting
3258 # a lot of different things including 'define_xopen_source'
3259 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 case "$host" in
3261 *-*-linux*)
3262 ac_sys_system=Linux
3263 ;;
3264 *-*-cygwin*)
3265 ac_sys_system=Cygwin
3266 ;;
3267 *)
3268 # for now, limit cross builds to known configurations
3269 MACHDEP="unknown"
3270 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3271 esac
3272 ac_sys_release=
3273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003275 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003276 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003278 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003279 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003280 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 fi
3282 ac_md_system=`echo $ac_sys_system |
3283 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3284 ac_md_release=`echo $ac_sys_release |
3285 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3286 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003287
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003288 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003289 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003290 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003291 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003292 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003293 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003294 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295fi
Guido van Rossum91922671997-10-09 20:24:13 +00003296
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003297
3298if test "$cross_compiling" = yes; then
3299 case "$host" in
3300 *-*-linux*)
3301 case "$host_cpu" in
3302 arm*)
3303 _host_cpu=arm
3304 ;;
3305 *)
3306 _host_cpu=$host_cpu
3307 esac
3308 ;;
3309 *-*-cygwin*)
3310 _host_cpu=
3311 ;;
3312 *)
3313 # for now, limit cross builds to known configurations
3314 MACHDEP="unknown"
3315 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3316 esac
3317 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3318fi
3319
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003320# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3321# disable features if it is defined, without any means to access these
3322# features as extensions. For these systems, we skip the definition of
3323# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3324# some feature, make sure there is no alternative way to access this
3325# feature. Also, when using wildcards, make sure you have verified the
3326# need for not defining _XOPEN_SOURCE on all systems matching the
3327# wildcard, and that the wildcard does not include future systems
3328# (which may remove their limitations).
3329case $ac_sys_system/$ac_sys_release in
3330 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3331 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003332 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003333 # In addition, Stefan Krah confirms that issue #1244610 exists through
3334 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003335 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003336 define_xopen_source=no
3337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003342
3343 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003344 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3346 # also defined. This can be overridden by defining _BSD_SOURCE
3347 # As this has a different meaning on Linux, only define it on OpenBSD
3348
Matthias Kloseb9621712010-04-24 17:59:49 +00003349$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003350
3351 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003352 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3353 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3354 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003355 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 +00003356 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003357 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3358 # request to enable features supported by the standard as a request
3359 # to disable features not supported by the standard. The best way
3360 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3361 # entirely and define __EXTENSIONS__ instead.
3362 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003363 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3365 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003366 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003367 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 define_xopen_source=no;;
3369 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003370 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003373 # On FreeBSD 4, the math functions C89 does not cover are never defined
3374 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3375 FreeBSD/4.*)
3376 define_xopen_source=no;;
3377 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3378 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3379 # identifies itself as Darwin/7.*
3380 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3381 # disables platform specific features beyond repair.
3382 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3383 # has no effect, don't bother defining them
3384 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003385 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003386 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3389 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3390 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003391 AIX/4)
3392 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003393 AIX/5)
3394 if test `uname -r` -eq 1; then
3395 define_xopen_source=no
3396 fi
3397 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003398 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3399 # defining NI_NUMERICHOST.
3400 QNX/6.3.2)
3401 define_xopen_source=no
3402 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003403
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003404esac
3405
3406if test $define_xopen_source = yes
3407then
Victor Stinner14d098d2011-09-07 22:29:43 +02003408 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Victor Stinner14d098d2011-09-07 22:29:43 +02003410$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003411
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
3413 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3414 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3415 # several APIs are not declared. Since this is also needed in some
3416 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
Matthias Kloseb9621712010-04-24 17:59:49 +00003418$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
3420
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003421
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003422$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003423
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003424fi
3425
Guido van Rossum91922671997-10-09 20:24:13 +00003426#
3427# SGI compilers allow the specification of the both the ABI and the
3428# ISA on the command line. Depending on the values of these switches,
3429# different and often incompatable code will be generated.
3430#
3431# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3432# thus supply support for various ABI/ISA combinations. The MACHDEP
3433# variable is also adjusted.
3434#
3435
3436if test ! -z "$SGI_ABI"
3437then
3438 CC="cc $SGI_ABI"
3439 LDFLAGS="$SGI_ABI $LDFLAGS"
3440 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3443$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3446# it may influence the way we can build extensions, so distutils
3447# needs to check it
3448
Thomas Wouters477c8d52006-05-27 19:21:47 +00003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003451EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003452
Guido van Rossum627b2d71993-12-24 10:39:16 +00003453# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003454
3455# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3456# for debug/optimization stuff. BASECFLAGS is for flags that are required
3457# just to get things to compile and link. Users are free to override OPT
3458# when running configure or make. The build should not break if they do.
3459# BASECFLAGS should generally not be messed with, however.
3460
3461# XXX shouldn't some/most/all of this code be merged with the stuff later
3462# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3464$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003467if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003469 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003470 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003471 without_gcc=yes;;
3472 yes) CC=gcc
3473 without_gcc=no;;
3474 *) CC=$withval
3475 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003477else
Martin v. Löwis11437992002-04-12 09:54:03 +00003478
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003479 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003480 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003481 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003482 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003483 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484fi
3485
Matthias Kloseb9621712010-04-24 17:59:49 +00003486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3487$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003488
Guido van Rossum8b131c51995-03-09 14:10:13 +00003489# If the user switches compilers, we can't believe the cache
3490if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3491then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003492 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003493(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003494fi
3495
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003496# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3497# when the compiler supports them, but we don't always want -O2, and
3498# we set -g later.
3499if test -z "$CFLAGS"; then
3500 CFLAGS=
3501fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003502
3503if test "$ac_sys_system" = "Darwin"
3504then
3505 # Compiler selection on MacOSX is more complicated than
3506 # AC_PROG_CC can handle, see Mac/README.txt for more
3507 # information
3508 if test -z "${CC}"
3509 then
3510 found_gcc=
3511 found_clang=
3512 as_save_IFS=$IFS; IFS=:
3513 for as_dir in $PATH
3514 do
3515 IFS=$as_save_IFS
3516 if test -x $as_dir/gcc; then
3517 if test -z "${found_gcc}"; then
3518 found_gcc=$as_dir/gcc
3519 fi
3520 fi
3521 if test -x $as_dir/clang; then
3522 if test -z "${found_clang}"; then
3523 found_clang=$as_dir/clang
3524 fi
3525 fi
3526 done
3527 IFS=$as_save_IFS
3528
3529 if test -n "$found_gcc" -a -n "$found_clang"
3530 then
3531 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3532 then
3533 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3534$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3535 CC="$found_clang"
3536 CXX="$found_clang++"
3537 fi
3538
3539
3540 elif test -z "$found_gcc" -a -n "$found_clang"
3541 then
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3543$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3544 CC="$found_clang"
3545 CXX="$found_clang++"
3546
3547 elif test -z "$found_gcc" -a -z "$found_clang"
3548 then
3549 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3550 if test -n "${found_clang}"
3551 then
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3553$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3554 CC="${found_clang}"
3555 CXX="`/usr/bin/xcrun -find clang++`"
3556
3557 # else: use default behaviour
3558 fi
3559 fi
3560 fi
3561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003562ac_ext=c
3563ac_cpp='$CPP $CPPFLAGS'
3564ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3565ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3566ac_compiler_gnu=$ac_cv_c_compiler_gnu
3567if test -n "$ac_tool_prefix"; then
3568 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3569set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3571$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003572if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003573 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003574else
3575 if test -n "$CC"; then
3576 ac_cv_prog_CC="$CC" # Let the user override the test.
3577else
Martin v. Löwis11437992002-04-12 09:54:03 +00003578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3579for as_dir in $PATH
3580do
3581 IFS=$as_save_IFS
3582 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 $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 +00003587 break 2
3588 fi
3589done
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003592
Jack Jansendd19cf82001-12-06 22:36:17 +00003593fi
3594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003595CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003596if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3598$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003599else
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3601$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003602fi
3603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605fi
3606if test -z "$ac_cv_prog_CC"; then
3607 ac_ct_CC=$CC
3608 # Extract the first word of "gcc", so it can be a program name with args.
3609set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3611$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003612if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003614else
3615 if test -n "$ac_ct_CC"; then
3616 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3617else
3618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619for as_dir in $PATH
3620do
3621 IFS=$as_save_IFS
3622 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 $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 +00003627 break 2
3628 fi
3629done
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003632
3633fi
3634fi
3635ac_ct_CC=$ac_cv_prog_ac_ct_CC
3636if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3638$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3641$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003642fi
3643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644 if test "x$ac_ct_CC" = x; then
3645 CC=""
3646 else
3647 case $cross_compiling:$ac_tool_warned in
3648yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003649{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3650$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651ac_tool_warned=yes ;;
3652esac
3653 CC=$ac_ct_CC
3654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003657fi
3658
Jack Jansendd19cf82001-12-06 22:36:17 +00003659if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 if test -n "$ac_tool_prefix"; then
3661 # 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 +00003662set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003665if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003667else
3668 if test -n "$CC"; then
3669 ac_cv_prog_CC="$CC" # Let the user override the test.
3670else
Martin v. Löwis11437992002-04-12 09:54:03 +00003671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672for as_dir in $PATH
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 $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 +00003680 break 2
3681 fi
3682done
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003685
3686fi
3687fi
3688CC=$ac_cv_prog_CC
3689if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3691$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003692else
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3694$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003695fi
3696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003699fi
3700if test -z "$CC"; then
3701 # Extract the first word of "cc", so it can be a program name with args.
3702set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3704$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003705if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003707else
3708 if test -n "$CC"; then
3709 ac_cv_prog_CC="$CC" # Let the user override the test.
3710else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003711 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3720 ac_prog_rejected=yes
3721 continue
3722 fi
3723 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 $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 +00003725 break 2
3726 fi
3727done
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003730
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731if test $ac_prog_rejected = yes; then
3732 # We found a bogon in the path, so make sure we never use it.
3733 set dummy $ac_cv_prog_CC
3734 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736 # We chose a different compiler from the bogus one.
3737 # However, it has the same basename, so the bogon will be chosen
3738 # first if we set CC to just the basename; use the full file name.
3739 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003740 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741 fi
3742fi
3743fi
3744fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003745CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749else
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752fi
3753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755fi
3756if test -z "$CC"; then
3757 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 do
3760 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3761set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003764if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003766else
3767 if test -n "$CC"; then
3768 ac_cv_prog_CC="$CC" # Let the user override the test.
3769else
Martin v. Löwis11437992002-04-12 09:54:03 +00003770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3771for as_dir in $PATH
3772do
3773 IFS=$as_save_IFS
3774 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 $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 +00003779 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003781done
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003783IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003784
3785fi
3786fi
3787CC=$ac_cv_prog_CC
3788if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3790$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003791else
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3793$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003794fi
3795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 test -n "$CC" && break
3798 done
3799fi
3800if test -z "$CC"; then
3801 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003803do
3804 # Extract the first word of "$ac_prog", so it can be a program name with args.
3805set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3807$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003808if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003810else
3811 if test -n "$ac_ct_CC"; then
3812 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3813else
3814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3815for as_dir in $PATH
3816do
3817 IFS=$as_save_IFS
3818 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $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 +00003823 break 2
3824 fi
3825done
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829fi
3830fi
3831ac_ct_CC=$ac_cv_prog_ac_ct_CC
3832if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3834$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835else
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3837$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 test -n "$ac_ct_CC" && break
3842done
Michael W. Hudson54241132001-12-07 15:38:26 +00003843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 if test "x$ac_ct_CC" = x; then
3845 CC=""
3846 else
3847 case $cross_compiling:$ac_tool_warned in
3848yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851ac_tool_warned=yes ;;
3852esac
3853 CC=$ac_ct_CC
3854 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003855fi
3856
3857fi
3858
3859
Matthias Kloseb9621712010-04-24 17:59:49 +00003860test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003862as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003863See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003864
3865# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003866$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3867set X $ac_compile
3868ac_compiler=$2
3869for ac_option in --version -v -V -qversion; do
3870 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871case "(($ac_try" in
3872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3873 *) ac_try_echo=$ac_try;;
3874esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3876$as_echo "$ac_try_echo"; } >&5
3877 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 if test -s conftest.err; then
3880 sed '10a\
3881... rest of stderr output deleted ...
3882 10q' conftest.err >conftest.er1
3883 cat conftest.er1 >&5
3884 fi
3885 rm -f conftest.er1 conftest.err
3886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3887 test $ac_status = 0; }
3888done
Martin v. Löwis11437992002-04-12 09:54:03 +00003889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003891/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893int
3894main ()
3895{
3896
3897 ;
3898 return 0;
3899}
3900_ACEOF
3901ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003902ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003903# Try to create an executable without -o first, disregard a.out.
3904# It will help us diagnose broken compilers, and finding out an intuition
3905# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3907$as_echo_n "checking whether the C compiler works... " >&6; }
3908ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3909
3910# The possible output files:
3911ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913ac_rmfiles=
3914for ac_file in $ac_files
3915do
3916 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3919 esac
3920done
3921rm -f $ac_rmfiles
3922
Matthias Kloseb9621712010-04-24 17:59:49 +00003923if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924case "(($ac_try" in
3925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3926 *) ac_try_echo=$ac_try;;
3927esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003928eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3929$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003931 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3933 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3935# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3936# in a Makefile. We should not override ac_cv_exeext if it was cached,
3937# so that the user can short-circuit this test for compilers unknown to
3938# Autoconf.
3939for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003940do
3941 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003944 ;;
3945 [ab].out )
3946 # We found the default executable, but exeext='' is most
3947 # certainly right.
3948 break;;
3949 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 then :; else
3952 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3953 fi
3954 # We set ac_cv_exeext here because the later test for it is not
3955 # safe: cross compilers may not add the suffix if given an `-o'
3956 # argument, so we may need to know it at that point already.
3957 # Even if this section looks crufty: it has the advantage of
3958 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959 break;;
3960 * )
3961 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 esac
3963done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964test "$ac_cv_exeext" = no && ac_cv_exeext=
3965
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003966else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 ac_file=''
3968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003969if test -z "$ac_file"; then :
3970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3971$as_echo "no" >&6; }
3972$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003973sed 's/^/| /' conftest.$ac_ext >&5
3974
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003977as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003978See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003979else
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3981$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3984$as_echo_n "checking for C compiler default output file name... " >&6; }
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3986$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003990ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3992$as_echo_n "checking for suffix of executables... " >&6; }
3993if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994case "(($ac_try" in
3995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3996 *) ac_try_echo=$ac_try;;
3997esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3999$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4003 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4005# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4006# work properly (i.e., refer to `conftest.exe'), while it won't with
4007# `rm'.
4008for ac_file in conftest.exe conftest conftest.*; do
4009 test -f "$ac_file" || continue
4010 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4013 break;;
4014 * ) break;;
4015 esac
4016done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017else
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004020as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004021See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004023rm -f conftest conftest$ac_cv_exeext
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4025$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026
4027rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004028EXEEXT=$ac_cv_exeext
4029ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4031/* end confdefs.h. */
4032#include <stdio.h>
4033int
4034main ()
4035{
4036FILE *f = fopen ("conftest.out", "w");
4037 return ferror (f) || fclose (f) != 0;
4038
4039 ;
4040 return 0;
4041}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004043ac_clean_files="$ac_clean_files conftest.out"
4044# Check that the compiler produces executables we can run. If not, either
4045# the compiler is broken, or we cross compile.
4046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4047$as_echo_n "checking whether we are cross compiling... " >&6; }
4048if test "$cross_compiling" != yes; then
4049 { { ac_try="$ac_link"
4050case "(($ac_try" in
4051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4052 *) ac_try_echo=$ac_try;;
4053esac
4054eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4055$as_echo "$ac_try_echo"; } >&5
4056 (eval "$ac_link") 2>&5
4057 ac_status=$?
4058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4059 test $ac_status = 0; }
4060 if { ac_try='./conftest$ac_cv_exeext'
4061 { { case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
4065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066$as_echo "$ac_try_echo"; } >&5
4067 (eval "$ac_try") 2>&5
4068 ac_status=$?
4069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }; }; then
4071 cross_compiling=no
4072 else
4073 if test "$cross_compiling" = maybe; then
4074 cross_compiling=yes
4075 else
4076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004078as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004079If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004080See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 fi
4082 fi
4083fi
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4085$as_echo "$cross_compiling" >&6; }
4086
4087rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4088ac_clean_files=$ac_clean_files_save
4089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4090$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004091if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo_n "(cached) " >&6
4093else
4094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004095/* end confdefs.h. */
4096
4097int
4098main ()
4099{
4100
4101 ;
4102 return 0;
4103}
4104_ACEOF
4105rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004106if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107case "(($ac_try" in
4108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109 *) ac_try_echo=$ac_try;;
4110esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4112$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4116 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117 for ac_file in conftest.o conftest.obj conftest.*; do
4118 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4122 break;;
4123 esac
4124done
4125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004127sed 's/^/| /' conftest.$ac_ext >&5
4128
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004131as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004132See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4137$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004138OBJEXT=$ac_cv_objext
4139ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4141$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004142if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004144else
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004147
Martin v. Löwis11437992002-04-12 09:54:03 +00004148int
4149main ()
4150{
4151#ifndef __GNUC__
4152 choke me
4153#endif
4154
4155 ;
4156 return 0;
4157}
4158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004159if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 ac_compiler_gnu=yes
4161else
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004165ac_cv_c_compiler_gnu=$ac_compiler_gnu
4166
4167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4169$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4170if test $ac_compiler_gnu = yes; then
4171 GCC=yes
4172else
4173 GCC=
4174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004175ac_test_CFLAGS=${CFLAGS+set}
4176ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4178$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004179if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004181else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182 ac_save_c_werror_flag=$ac_c_werror_flag
4183 ac_c_werror_flag=yes
4184 ac_cv_prog_cc_g=no
4185 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004198 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 CFLAGS=""
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213
Matthias Kloseb9621712010-04-24 17:59:49 +00004214else
4215 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004216 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218/* end confdefs.h. */
4219
4220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004228if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4236 ac_c_werror_flag=$ac_save_c_werror_flag
4237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4239$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004240if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004241 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004242elif test $ac_cv_prog_cc_g = yes; then
4243 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004244 CFLAGS="-g -O2"
4245 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004246 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247 fi
4248else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249 if test "$GCC" = yes; then
4250 CFLAGS="-O2"
4251 else
4252 CFLAGS=
4253 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4256$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004257if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004259else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004261ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004263/* end confdefs.h. */
4264#include <stdarg.h>
4265#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004266struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004267/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4268struct buf { int x; };
4269FILE * (*rcsopen) (struct buf *, struct stat *, int);
4270static char *e (p, i)
4271 char **p;
4272 int i;
4273{
4274 return p[i];
4275}
4276static char *f (char * (*g) (char **, int), char **p, ...)
4277{
4278 char *s;
4279 va_list v;
4280 va_start (v,p);
4281 s = g (p, va_arg (v,int));
4282 va_end (v);
4283 return s;
4284}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004285
4286/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4287 function prototypes and stuff, but not '\xHH' hex character constants.
4288 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004290 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4291 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004293int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4296 inside strings and character constants. */
4297#define FOO(x) 'x'
4298int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4299
Skip Montanaro6dead952003-09-25 14:50:04 +00004300int test (int i, double x);
4301struct s1 {int (*f) (int a);};
4302struct s2 {int (*f) (double a);};
4303int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4304int argc;
4305char **argv;
4306int
4307main ()
4308{
4309return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4310 ;
4311 return 0;
4312}
4313_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4315 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004316do
4317 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321rm -f core conftest.err conftest.$ac_objext
4322 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004323done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004325CC=$ac_save_CC
4326
4327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328# AC_CACHE_VAL
4329case "x$ac_cv_prog_cc_c89" in
4330 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4332$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4335$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004336 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4339$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004340esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004341if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004342
Matthias Kloseb9621712010-04-24 17:59:49 +00004343fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004344
Martin v. Löwis11437992002-04-12 09:54:03 +00004345ac_ext=c
4346ac_cpp='$CPP $CPPFLAGS'
4347ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4348ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4349ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004351
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004352
4353
Matthias Kloseb9621712010-04-24 17:59:49 +00004354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4355$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004358if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004360
4361 case $withval in
4362 no) with_cxx_main=no
4363 MAINCC='$(CC)';;
4364 yes) with_cxx_main=yes
4365 MAINCC='$(CXX)';;
4366 *) with_cxx_main=yes
4367 MAINCC=$withval
4368 if test -z "$CXX"
4369 then
4370 CXX=$withval
4371 fi;;
4372 esac
4373else
4374
4375 with_cxx_main=no
4376 MAINCC='$(CC)'
4377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378fi
4379
Matthias Kloseb9621712010-04-24 17:59:49 +00004380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4381$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004382
4383preset_cxx="$CXX"
4384if test -z "$CXX"
4385then
4386 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004387 gcc) if test -n "$ac_tool_prefix"; then
4388 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4389set dummy ${ac_tool_prefix}g++; ac_word=$2
4390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4391$as_echo_n "checking for $ac_word... " >&6; }
4392if ${ac_cv_path_CXX+:} false; then :
4393 $as_echo_n "(cached) " >&6
4394else
4395 case $CXX in
4396 [\\/]* | ?:[\\/]*)
4397 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4398 ;;
4399 *)
4400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in notfound
4402do
4403 IFS=$as_save_IFS
4404 test -z "$as_dir" && as_dir=.
4405 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004406 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004407 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4408 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4409 break 2
4410 fi
4411done
4412 done
4413IFS=$as_save_IFS
4414
4415 ;;
4416esac
4417fi
4418CXX=$ac_cv_path_CXX
4419if test -n "$CXX"; then
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4421$as_echo "$CXX" >&6; }
4422else
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424$as_echo "no" >&6; }
4425fi
4426
4427
4428fi
4429if test -z "$ac_cv_path_CXX"; then
4430 ac_pt_CXX=$CXX
4431 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004432set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4434$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004435if ${ac_cv_path_ac_pt_CXX+:} false; then :
4436 $as_echo_n "(cached) " >&6
4437else
4438 case $ac_pt_CXX in
4439 [\\/]* | ?:[\\/]*)
4440 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4441 ;;
4442 *)
4443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4444for as_dir in notfound
4445do
4446 IFS=$as_save_IFS
4447 test -z "$as_dir" && as_dir=.
4448 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004449 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004450 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4452 break 2
4453 fi
4454done
4455 done
4456IFS=$as_save_IFS
4457
4458 ;;
4459esac
4460fi
4461ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4462if test -n "$ac_pt_CXX"; then
4463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4464$as_echo "$ac_pt_CXX" >&6; }
4465else
4466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4467$as_echo "no" >&6; }
4468fi
4469
4470 if test "x$ac_pt_CXX" = x; then
4471 CXX="g++"
4472 else
4473 case $cross_compiling:$ac_tool_warned in
4474yes:)
4475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4477ac_tool_warned=yes ;;
4478esac
4479 CXX=$ac_pt_CXX
4480 fi
4481else
4482 CXX="$ac_cv_path_CXX"
4483fi
4484 ;;
4485 cc) if test -n "$ac_tool_prefix"; then
4486 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4487set dummy ${ac_tool_prefix}c++; ac_word=$2
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004490if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004491 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004492else
4493 case $CXX in
4494 [\\/]* | ?:[\\/]*)
4495 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4496 ;;
4497 *)
4498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in notfound
4500do
4501 IFS=$as_save_IFS
4502 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004503 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004505 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004507 break 2
4508 fi
4509done
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004511IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004512
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004513 ;;
4514esac
4515fi
4516CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004517if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4519$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004520else
Matthias Kloseb9621712010-04-24 17:59:49 +00004521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004524
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004525
4526fi
4527if test -z "$ac_cv_path_CXX"; then
4528 ac_pt_CXX=$CXX
4529 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004530set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4532$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004533if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004534 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004535else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004536 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004537 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004538 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 +00004539 ;;
4540 *)
4541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4542for as_dir in notfound
4543do
4544 IFS=$as_save_IFS
4545 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004546 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004548 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550 break 2
4551 fi
4552done
Matthias Kloseb9621712010-04-24 17:59:49 +00004553 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004554IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004555
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004556 ;;
4557esac
4558fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004559ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4560if test -n "$ac_pt_CXX"; then
4561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4562$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004563else
Matthias Kloseb9621712010-04-24 17:59:49 +00004564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4565$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004567
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004568 if test "x$ac_pt_CXX" = x; then
4569 CXX="c++"
4570 else
4571 case $cross_compiling:$ac_tool_warned in
4572yes:)
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4575ac_tool_warned=yes ;;
4576esac
4577 CXX=$ac_pt_CXX
4578 fi
4579else
4580 CXX="$ac_cv_path_CXX"
4581fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004582 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004583 clang|*/clang) if test -n "$ac_tool_prefix"; then
4584 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4585set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4587$as_echo_n "checking for $ac_word... " >&6; }
4588if ${ac_cv_path_CXX+:} false; then :
4589 $as_echo_n "(cached) " >&6
4590else
4591 case $CXX in
4592 [\\/]* | ?:[\\/]*)
4593 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4594 ;;
4595 *)
4596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597for as_dir in notfound
4598do
4599 IFS=$as_save_IFS
4600 test -z "$as_dir" && as_dir=.
4601 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004603 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4605 break 2
4606 fi
4607done
4608 done
4609IFS=$as_save_IFS
4610
Ned Deilycbfb9a52012-06-23 16:02:19 -07004611 ;;
4612esac
4613fi
4614CXX=$ac_cv_path_CXX
4615if test -n "$CXX"; then
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4617$as_echo "$CXX" >&6; }
4618else
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620$as_echo "no" >&6; }
4621fi
4622
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004623
4624fi
4625if test -z "$ac_cv_path_CXX"; then
4626 ac_pt_CXX=$CXX
4627 # Extract the first word of "clang++", so it can be a program name with args.
4628set dummy clang++; ac_word=$2
4629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4630$as_echo_n "checking for $ac_word... " >&6; }
4631if ${ac_cv_path_ac_pt_CXX+:} false; then :
4632 $as_echo_n "(cached) " >&6
4633else
4634 case $ac_pt_CXX in
4635 [\\/]* | ?:[\\/]*)
4636 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4637 ;;
4638 *)
4639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4640for as_dir in notfound
4641do
4642 IFS=$as_save_IFS
4643 test -z "$as_dir" && as_dir=.
4644 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004646 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4648 break 2
4649 fi
4650done
4651 done
4652IFS=$as_save_IFS
4653
4654 ;;
4655esac
4656fi
4657ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4658if test -n "$ac_pt_CXX"; then
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4660$as_echo "$ac_pt_CXX" >&6; }
4661else
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4663$as_echo "no" >&6; }
4664fi
4665
4666 if test "x$ac_pt_CXX" = x; then
4667 CXX="clang++"
4668 else
4669 case $cross_compiling:$ac_tool_warned in
4670yes:)
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4672$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4673ac_tool_warned=yes ;;
4674esac
4675 CXX=$ac_pt_CXX
4676 fi
4677else
4678 CXX="$ac_cv_path_CXX"
4679fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004680 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004681 esac
4682 if test "$CXX" = "notfound"
4683 then
4684 CXX=""
4685 fi
4686fi
4687if test -z "$CXX"
4688then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004689 if test -n "$ac_tool_prefix"; then
4690 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4691 do
4692 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004696if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004697 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004698else
4699 if test -n "$CXX"; then
4700 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4701else
4702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4703for as_dir in $PATH
4704do
4705 IFS=$as_save_IFS
4706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004709 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004711 break 2
4712 fi
4713done
Matthias Kloseb9621712010-04-24 17:59:49 +00004714 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004715IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004716
4717fi
4718fi
4719CXX=$ac_cv_prog_CXX
4720if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4722$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004723else
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4725$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726fi
4727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004728
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004729 test -n "$CXX" && break
4730 done
4731fi
4732if test -z "$CXX"; then
4733 ac_ct_CXX=$CXX
4734 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4735do
4736 # Extract the first word of "$ac_prog", so it can be a program name with args.
4737set dummy $ac_prog; ac_word=$2
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4739$as_echo_n "checking for $ac_word... " >&6; }
4740if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4741 $as_echo_n "(cached) " >&6
4742else
4743 if test -n "$ac_ct_CXX"; then
4744 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4745else
4746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747for as_dir in $PATH
4748do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753 ac_cv_prog_ac_ct_CXX="$ac_prog"
4754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755 break 2
4756 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004757done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758 done
4759IFS=$as_save_IFS
4760
4761fi
4762fi
4763ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4764if test -n "$ac_ct_CXX"; then
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4766$as_echo "$ac_ct_CXX" >&6; }
4767else
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769$as_echo "no" >&6; }
4770fi
4771
4772
4773 test -n "$ac_ct_CXX" && break
4774done
4775
4776 if test "x$ac_ct_CXX" = x; then
4777 CXX="notfound"
4778 else
4779 case $cross_compiling:$ac_tool_warned in
4780yes:)
4781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4783ac_tool_warned=yes ;;
4784esac
4785 CXX=$ac_ct_CXX
4786 fi
4787fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788
4789 if test "$CXX" = "notfound"
4790 then
4791 CXX=""
4792 fi
4793fi
4794if test "$preset_cxx" != "$CXX"
4795then
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797
4798 By default, distutils will build C++ extension modules with \"$CXX\".
4799 If this is not intended, then set CXX on the configure command line.
4800 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004801$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802
4803 By default, distutils will build C++ extension modules with \"$CXX\".
4804 If this is not intended, then set CXX on the configure command line.
4805 " >&2;}
4806fi
4807
4808
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4810$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4811save_LDFLAGS="$LDFLAGS"
4812LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004813
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4815/* end confdefs.h. */
4816
4817int
4818main ()
4819{
4820
4821 ;
4822 return 0;
4823}
4824_ACEOF
4825if ac_fn_c_try_link "$LINENO"; then :
4826 NO_AS_NEEDED="-Wl,--no-as-needed"
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4828$as_echo "yes" >&6; }
4829else
4830 NO_AS_NEEDED=""
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
4833fi
4834rm -f core conftest.err conftest.$ac_objext \
4835 conftest$ac_exeext conftest.$ac_ext
4836LDFLAGS="$save_LDFLAGS"
4837
4838
4839
4840# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004841ac_ext=c
4842ac_cpp='$CPP $CPPFLAGS'
4843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4845ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4847$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004848# On Suns, sometimes $CPP names a directory.
4849if test -n "$CPP" && test -d "$CPP"; then
4850 CPP=
4851fi
4852if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004853 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004855else
Martin v. Löwis11437992002-04-12 09:54:03 +00004856 # Double quotes because CPP needs to be expanded
4857 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4858 do
4859 ac_preproc_ok=false
4860for ac_c_preproc_warn_flag in '' yes
4861do
4862 # Use a header file that comes with gcc, so configuring glibc
4863 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004864 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4865 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004866 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004867 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004869/* end confdefs.h. */
4870#ifdef __STDC__
4871# include <limits.h>
4872#else
4873# include <assert.h>
4874#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004875 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004877if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004878
Matthias Kloseb9621712010-04-24 17:59:49 +00004879else
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 # Broken: fails on valid input.
4881continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004882fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004883rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004885 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004886 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004889#include <ac_nonexistent.h>
4890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004891if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 # Broken: success on invalid input.
4893continue
4894else
Martin v. Löwis11437992002-04-12 09:54:03 +00004895 # Passes both tests.
4896ac_preproc_ok=:
4897break
4898fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004899rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004900
4901done
4902# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004903rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004904if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 break
4906fi
4907
4908 done
4909 ac_cv_prog_CPP=$CPP
4910
4911fi
4912 CPP=$ac_cv_prog_CPP
4913else
4914 ac_cv_prog_CPP=$CPP
4915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4917$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004918ac_preproc_ok=false
4919for ac_c_preproc_warn_flag in '' yes
4920do
4921 # Use a header file that comes with gcc, so configuring glibc
4922 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004923 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4924 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004925 # On the NeXT, cc -E runs the code through the compiler's parser,
4926 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004928/* end confdefs.h. */
4929#ifdef __STDC__
4930# include <limits.h>
4931#else
4932# include <assert.h>
4933#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004934 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004936if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004937
Matthias Kloseb9621712010-04-24 17:59:49 +00004938else
Martin v. Löwis11437992002-04-12 09:54:03 +00004939 # Broken: fails on valid input.
4940continue
4941fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004942rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004944 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004945 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004948#include <ac_nonexistent.h>
4949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004950if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004951 # Broken: success on invalid input.
4952continue
4953else
Martin v. Löwis11437992002-04-12 09:54:03 +00004954 # Passes both tests.
4955ac_preproc_ok=:
4956break
4957fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004958rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004959
4960done
4961# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004962rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004963if $ac_preproc_ok; then :
4964
Martin v. Löwis11437992002-04-12 09:54:03 +00004965else
Matthias Kloseb9621712010-04-24 17:59:49 +00004966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004968as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004969See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004970fi
4971
4972ac_ext=c
4973ac_cpp='$CPP $CPPFLAGS'
4974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4976ac_compiler_gnu=$ac_cv_c_compiler_gnu
4977
4978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4980$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004981if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004982 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004983else
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004986 # Loop through the user's path and test for each of PROGNAME-LIST
4987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004988for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4989do
4990 IFS=$as_save_IFS
4991 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 for ac_prog in grep ggrep; do
4993 for ac_exec_ext in '' $ac_executable_extensions; do
4994 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004995 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004996# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004997 # Check for GNU $ac_path_GREP
4998case `"$ac_path_GREP" --version 2>&1` in
4999*GNU*)
5000 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5001*)
5002 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005003 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005004 while :
5005 do
5006 cat "conftest.in" "conftest.in" >"conftest.tmp"
5007 mv "conftest.tmp" "conftest.in"
5008 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005009 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005010 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5011 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005013 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5014 # Best one so far, save it but keep looking for a better one
5015 ac_cv_path_GREP="$ac_path_GREP"
5016 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005017 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005018 # 10*(2^10) chars as input seems more than enough
5019 test $ac_count -gt 10 && break
5020 done
5021 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5022esac
5023
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 $ac_path_GREP_found && break 3
5025 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005030 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 +00005031 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005032else
5033 ac_cv_path_GREP=$GREP
5034fi
5035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5038$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005039 GREP="$ac_cv_path_GREP"
5040
5041
Matthias Kloseb9621712010-04-24 17:59:49 +00005042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5043$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005044if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046else
5047 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5048 then ac_cv_path_EGREP="$GREP -E"
5049 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 # Loop through the user's path and test for each of PROGNAME-LIST
5053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_prog in egrep; do
5059 for ac_exec_ext in '' $ac_executable_extensions; do
5060 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005061 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005062# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005063 # Check for GNU $ac_path_EGREP
5064case `"$ac_path_EGREP" --version 2>&1` in
5065*GNU*)
5066 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5067*)
5068 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005070 while :
5071 do
5072 cat "conftest.in" "conftest.in" >"conftest.tmp"
5073 mv "conftest.tmp" "conftest.in"
5074 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005076 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5077 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005079 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5080 # Best one so far, save it but keep looking for a better one
5081 ac_cv_path_EGREP="$ac_path_EGREP"
5082 ac_path_EGREP_max=$ac_count
5083 fi
5084 # 10*(2^10) chars as input seems more than enough
5085 test $ac_count -gt 10 && break
5086 done
5087 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5088esac
5089
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 $ac_path_EGREP_found && break 3
5091 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005096 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 +00005097 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098else
5099 ac_cv_path_EGREP=$EGREP
5100fi
5101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102 fi
5103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5105$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005107
5108
Matthias Kloseb9621712010-04-24 17:59:49 +00005109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5110$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005111if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 $as_echo_n "(cached) " >&6
5113else
5114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005115/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005116#include <stdlib.h>
5117#include <stdarg.h>
5118#include <string.h>
5119#include <float.h>
5120
5121int
5122main ()
5123{
5124
5125 ;
5126 return 0;
5127}
5128_ACEOF
5129if ac_fn_c_try_compile "$LINENO"; then :
5130 ac_cv_header_stdc=yes
5131else
5132 ac_cv_header_stdc=no
5133fi
5134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5135
5136if test $ac_cv_header_stdc = yes; then
5137 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5139/* end confdefs.h. */
5140#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005141
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005142_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005146else
Matthias Kloseb9621712010-04-24 17:59:49 +00005147 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005148fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005149rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150
Matthias Kloseb9621712010-04-24 17:59:49 +00005151fi
5152
5153if test $ac_cv_header_stdc = yes; then
5154 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5156/* end confdefs.h. */
5157#include <stdlib.h>
5158
5159_ACEOF
5160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5161 $EGREP "free" >/dev/null 2>&1; then :
5162
5163else
5164 ac_cv_header_stdc=no
5165fi
5166rm -f conftest*
5167
5168fi
5169
5170if test $ac_cv_header_stdc = yes; then
5171 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5172 if test "$cross_compiling" = yes; then :
5173 :
5174else
5175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5176/* end confdefs.h. */
5177#include <ctype.h>
5178#include <stdlib.h>
5179#if ((' ' & 0x0FF) == 0x020)
5180# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5181# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5182#else
5183# define ISLOWER(c) \
5184 (('a' <= (c) && (c) <= 'i') \
5185 || ('j' <= (c) && (c) <= 'r') \
5186 || ('s' <= (c) && (c) <= 'z'))
5187# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5188#endif
5189
5190#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5191int
5192main ()
5193{
5194 int i;
5195 for (i = 0; i < 256; i++)
5196 if (XOR (islower (i), ISLOWER (i))
5197 || toupper (i) != TOUPPER (i))
5198 return 2;
5199 return 0;
5200}
5201_ACEOF
5202if ac_fn_c_try_run "$LINENO"; then :
5203
5204else
5205 ac_cv_header_stdc=no
5206fi
5207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5208 conftest.$ac_objext conftest.beam conftest.$ac_ext
5209fi
5210
5211fi
5212fi
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5214$as_echo "$ac_cv_header_stdc" >&6; }
5215if test $ac_cv_header_stdc = yes; then
5216
5217$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5218
5219fi
5220
5221# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5222for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5223 inttypes.h stdint.h unistd.h
5224do :
5225 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5226ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5227"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005228if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005229 cat >>confdefs.h <<_ACEOF
5230#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5231_ACEOF
5232
5233fi
5234
5235done
5236
5237
5238
5239 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 +02005240if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005241 MINIX=yes
5242else
5243 MINIX=
5244fi
5245
5246
5247 if test "$MINIX" = yes; then
5248
5249$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5250
5251
5252$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5253
5254
5255$as_echo "#define _MINIX 1" >>confdefs.h
5256
5257 fi
5258
5259
5260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5261$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005262if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005263 $as_echo_n "(cached) " >&6
5264else
5265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5266/* end confdefs.h. */
5267
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005268# define __EXTENSIONS__ 1
5269 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005270int
5271main ()
5272{
5273
5274 ;
5275 return 0;
5276}
5277_ACEOF
5278if ac_fn_c_try_compile "$LINENO"; then :
5279 ac_cv_safe_to_define___extensions__=yes
5280else
5281 ac_cv_safe_to_define___extensions__=no
5282fi
5283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5284fi
5285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5286$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5287 test $ac_cv_safe_to_define___extensions__ = yes &&
5288 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5289
5290 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5291
5292 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5293
5294 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5295
5296 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5297
5298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005300# Check for unsupported systems
5301case $ac_sys_system/$ac_sys_release in
5302atheos*|Linux*/1*)
5303 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5304 echo See README for details.
5305 exit 1;;
5306esac
5307
5308
Matthias Kloseb9621712010-04-24 17:59:49 +00005309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5310$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311
5312# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005313if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314 withval=$with_suffix;
5315 case $withval in
5316 no) EXEEXT=;;
5317 yes) EXEEXT=.exe;;
5318 *) EXEEXT=$withval;;
5319 esac
5320fi
5321
Matthias Kloseb9621712010-04-24 17:59:49 +00005322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5323$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324
5325# Test whether we're running on a non-case-sensitive system, in which
5326# case we give a warning if no ext is given
5327
Matthias Kloseb9621712010-04-24 17:59:49 +00005328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5329$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005330if test ! -d CaseSensitiveTestDir; then
5331mkdir CaseSensitiveTestDir
5332fi
5333
5334if test -d casesensitivetestdir
5335then
Matthias Kloseb9621712010-04-24 17:59:49 +00005336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5337$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338 BUILDEXEEXT=.exe
5339else
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5341$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342 BUILDEXEEXT=$EXEEXT
5343fi
5344rmdir CaseSensitiveTestDir
5345
5346case $MACHDEP in
5347bsdos*)
5348 case $CC in
5349 gcc) CC="$CC -D_HAVE_BSDI";;
5350 esac;;
5351esac
5352
5353case $ac_sys_system in
5354hp*|HP*)
5355 case $CC in
5356 cc|*/cc) CC="$CC -Ae";;
5357 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358esac
5359
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005360MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5361
5362
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364
Matthias Kloseb9621712010-04-24 17:59:49 +00005365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5366$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005367if test -z "$LIBRARY"
5368then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005369 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5372$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373
5374# LDLIBRARY is the name of the library to link against (as opposed to the
5375# name of the library into which to insert object files). BLDLIBRARY is also
5376# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5377# is blank as the main program is not linked directly against LDLIBRARY.
5378# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5379# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5380# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5381# DLLLIBRARY is the shared (i.e., DLL) library.
5382#
5383# RUNSHARED is used to run shared python without installed libraries
5384#
5385# INSTSONAME is the name of the shared library that will be use to install
5386# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005387#
5388# LDVERSION is the shared library version number, normally the Python version
5389# with the ABI build flags appended.
5390
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391
5392
5393
5394
5395
5396
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005397
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398LDLIBRARY="$LIBRARY"
5399BLDLIBRARY='$(LDLIBRARY)'
5400INSTSONAME='$(LDLIBRARY)'
5401DLLLIBRARY=''
5402LDLIBRARYDIR=''
5403RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005404LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405
5406# LINKCC is the command that links the python executable -- default is $(CC).
5407# If CXX is set, and if it is needed to link a main function that was
5408# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5409# python might then depend on the C++ runtime
5410# This is altered for AIX in order to build the export list before
5411# linking.
5412
Matthias Kloseb9621712010-04-24 17:59:49 +00005413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5414$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415if test -z "$LINKCC"
5416then
5417 LINKCC='$(PURIFY) $(MAINCC)'
5418 case $ac_sys_system in
5419 AIX*)
5420 exp_extra="\"\""
5421 if test $ac_sys_release -ge 5 -o \
5422 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5423 exp_extra="."
5424 fi
5425 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426 QNX*)
5427 # qcc must be used because the other compilers do not
5428 # support -N.
5429 LINKCC=qcc;;
5430 esac
5431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5433$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434
5435# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5436# make sure we default having it set to "no": this is used by
5437# distutils.unixccompiler to know if it should add --enable-new-dtags
5438# to linker command lines, and failing to detect GNU ld simply results
5439# in the same bahaviour as before.
5440
Matthias Kloseb9621712010-04-24 17:59:49 +00005441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5442$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443ac_prog=ld
5444if test "$GCC" = yes; then
5445 ac_prog=`$CC -print-prog-name=ld`
5446fi
5447case `"$ac_prog" -V 2>&1 < /dev/null` in
5448 *GNU*)
5449 GNULD=yes;;
5450 *)
5451 GNULD=no;;
5452esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5454$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5457$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005458if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005459 $as_echo_n "(cached) " >&6
5460else
5461 ac_cv_c_inline=no
5462for ac_kw in inline __inline__ __inline; do
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#ifndef __cplusplus
5466typedef int foo_t;
5467static $ac_kw foo_t static_foo () {return 0; }
5468$ac_kw foo_t foo () {return 0; }
5469#endif
5470
5471_ACEOF
5472if ac_fn_c_try_compile "$LINENO"; then :
5473 ac_cv_c_inline=$ac_kw
5474fi
5475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476 test "$ac_cv_c_inline" != no && break
5477done
5478
5479fi
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5481$as_echo "$ac_cv_c_inline" >&6; }
5482
5483case $ac_cv_c_inline in
5484 inline | yes) ;;
5485 *)
5486 case $ac_cv_c_inline in
5487 no) ac_val=;;
5488 *) ac_val=$ac_cv_c_inline;;
5489 esac
5490 cat >>confdefs.h <<_ACEOF
5491#ifndef __cplusplus
5492#define inline $ac_val
5493#endif
5494_ACEOF
5495 ;;
5496esac
5497
5498if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005499
5500$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005501
5502
5503fi
5504
5505
Matthias Kloseb9621712010-04-24 17:59:49 +00005506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5507$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005509if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 enableval=$enable_shared;
5511fi
5512
5513
5514if test -z "$enable_shared"
5515then
5516 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005517 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518 enable_shared="yes";;
5519 *)
5520 enable_shared="no";;
5521 esac
5522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5524$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525
Matthias Kloseb9621712010-04-24 17:59:49 +00005526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5527$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005529if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005530 enableval=$enable_profiling;
5531fi
5532
5533if test "x$enable_profiling" = xyes; then
5534 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005535 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537/* end confdefs.h. */
5538int main() { return 0; }
5539_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005540if ac_fn_c_try_link "$LINENO"; then :
5541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005542else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005543 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005545rm -f core conftest.err conftest.$ac_objext \
5546 conftest$ac_exeext conftest.$ac_ext
5547 CC="$ac_save_cc"
5548else
5549 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5552$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553
doko@ubuntu.comba015832012-06-30 16:52:05 +02005554if test "x$enable_profiling" = xyes; then
5555 BASECFLAGS="-pg $BASECFLAGS"
5556 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005557fi
5558
Matthias Kloseb9621712010-04-24 17:59:49 +00005559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5560$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561
5562# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5563# library that we build, but we do not want to link against it (we
5564# will find it with a -framework option). For this reason there is an
5565# extra variable BLDLIBRARY against which Python and the extension
5566# modules are linked, BLDLIBRARY. This is normally the same as
5567# LDLIBRARY, but empty for MacOSX framework builds.
5568if test "$enable_framework"
5569then
5570 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5571 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5572 BLDLIBRARY=''
5573else
5574 BLDLIBRARY='$(LDLIBRARY)'
5575fi
5576
5577# Other platforms follow
5578if test $enable_shared = "yes"; then
5579
Matthias Kloseb9621712010-04-24 17:59:49 +00005580$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581
5582 case $ac_sys_system in
5583 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005584 LDLIBRARY='libpython$(LDVERSION).dll.a'
5585 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586 ;;
5587 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005588 LDLIBRARY='libpython$(LDVERSION).so'
5589 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5591 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005592 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005593 then
5594 PY3LIBRARY=libpython3.so
5595 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005597 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005598 LDLIBRARY='libpython$(LDVERSION).so'
5599 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5601 case $ac_sys_system in
5602 FreeBSD*)
5603 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5604 ;;
5605 esac
5606 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005607 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005608 then
5609 PY3LIBRARY=libpython3.so
5610 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 ;;
5612 hp*|HP*)
5613 case `uname -m` in
5614 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005615 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 ;;
5617 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005618 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 ;;
5620 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005621 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5623 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005625 LDLIBRARY='libpython$(LDVERSION).dylib'
5626 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5628 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005629 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005631 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5632 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633
5634 esac
5635else # shared is disabled
5636 case $ac_sys_system in
5637 CYGWIN*)
5638 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005639 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640 ;;
5641 esac
5642fi
5643
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005644if test "$cross_compiling" = yes; then
5645 RUNSHARED=
5646fi
5647
Matthias Kloseb9621712010-04-24 17:59:49 +00005648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5649$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650
5651if test -n "$ac_tool_prefix"; then
5652 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5653set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5655$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005656if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658else
5659 if test -n "$RANLIB"; then
5660 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5661else
5662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5663for as_dir in $PATH
5664do
5665 IFS=$as_save_IFS
5666 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005668 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005670 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 break 2
5672 fi
5673done
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675IFS=$as_save_IFS
5676
5677fi
5678fi
5679RANLIB=$ac_cv_prog_RANLIB
5680if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5682$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683else
Matthias Kloseb9621712010-04-24 17:59:49 +00005684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686fi
5687
5688
5689fi
5690if test -z "$ac_cv_prog_RANLIB"; then
5691 ac_ct_RANLIB=$RANLIB
5692 # Extract the first word of "ranlib", so it can be a program name with args.
5693set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005696if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698else
5699 if test -n "$ac_ct_RANLIB"; then
5700 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5701else
5702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705 IFS=$as_save_IFS
5706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711 break 2
5712 fi
5713done
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715IFS=$as_save_IFS
5716
5717fi
5718fi
5719ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5720if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5722$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5725$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726fi
5727
5728 if test "x$ac_ct_RANLIB" = x; then
5729 RANLIB=":"
5730 else
5731 case $cross_compiling:$ac_tool_warned in
5732yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5734$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735ac_tool_warned=yes ;;
5736esac
5737 RANLIB=$ac_ct_RANLIB
5738 fi
5739else
5740 RANLIB="$ac_cv_prog_RANLIB"
5741fi
5742
5743
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005744if test -n "$ac_tool_prefix"; then
5745 for ac_prog in ar aal
5746 do
5747 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5748set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5750$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005751if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005752 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753else
5754 if test -n "$AR"; then
5755 ac_cv_prog_AR="$AR" # Let the user override the test.
5756else
5757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5758for as_dir in $PATH
5759do
5760 IFS=$as_save_IFS
5761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005764 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 break 2
5767 fi
5768done
Matthias Kloseb9621712010-04-24 17:59:49 +00005769 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770IFS=$as_save_IFS
5771
5772fi
5773fi
5774AR=$ac_cv_prog_AR
5775if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5777$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778else
Matthias Kloseb9621712010-04-24 17:59:49 +00005779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5780$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781fi
5782
5783
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005784 test -n "$AR" && break
5785 done
5786fi
5787if test -z "$AR"; then
5788 ac_ct_AR=$AR
5789 for ac_prog in ar aal
5790do
5791 # Extract the first word of "$ac_prog", so it can be a program name with args.
5792set dummy $ac_prog; ac_word=$2
5793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5794$as_echo_n "checking for $ac_word... " >&6; }
5795if ${ac_cv_prog_ac_ct_AR+:} false; then :
5796 $as_echo_n "(cached) " >&6
5797else
5798 if test -n "$ac_ct_AR"; then
5799 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5800else
5801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5802for as_dir in $PATH
5803do
5804 IFS=$as_save_IFS
5805 test -z "$as_dir" && as_dir=.
5806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005808 ac_cv_prog_ac_ct_AR="$ac_prog"
5809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5810 break 2
5811 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005813 done
5814IFS=$as_save_IFS
5815
5816fi
5817fi
5818ac_ct_AR=$ac_cv_prog_ac_ct_AR
5819if test -n "$ac_ct_AR"; then
5820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5821$as_echo "$ac_ct_AR" >&6; }
5822else
5823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5824$as_echo "no" >&6; }
5825fi
5826
5827
5828 test -n "$ac_ct_AR" && break
5829done
5830
5831 if test "x$ac_ct_AR" = x; then
5832 AR="ar"
5833 else
5834 case $cross_compiling:$ac_tool_warned in
5835yes:)
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5838ac_tool_warned=yes ;;
5839esac
5840 AR=$ac_ct_AR
5841 fi
5842fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843
5844
5845# tweak ARFLAGS only if the user didn't set it on the command line
5846
5847if test -z "$ARFLAGS"
5848then
5849 ARFLAGS="rc"
5850fi
5851
doko@ubuntu.com58844492012-06-30 18:25:32 +02005852if test -n "$ac_tool_prefix"; then
5853 for ac_prog in readelf
5854 do
5855 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5856set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5858$as_echo_n "checking for $ac_word... " >&6; }
5859if ${ac_cv_prog_READELF+:} false; then :
5860 $as_echo_n "(cached) " >&6
5861else
5862 if test -n "$READELF"; then
5863 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5864else
5865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866for as_dir in $PATH
5867do
5868 IFS=$as_save_IFS
5869 test -z "$as_dir" && as_dir=.
5870 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005872 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5873 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874 break 2
5875 fi
5876done
5877 done
5878IFS=$as_save_IFS
5879
5880fi
5881fi
5882READELF=$ac_cv_prog_READELF
5883if test -n "$READELF"; then
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5885$as_echo "$READELF" >&6; }
5886else
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5888$as_echo "no" >&6; }
5889fi
5890
5891
5892 test -n "$READELF" && break
5893 done
5894fi
5895if test -z "$READELF"; then
5896 ac_ct_READELF=$READELF
5897 for ac_prog in readelf
5898do
5899 # Extract the first word of "$ac_prog", so it can be a program name with args.
5900set dummy $ac_prog; ac_word=$2
5901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5902$as_echo_n "checking for $ac_word... " >&6; }
5903if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5904 $as_echo_n "(cached) " >&6
5905else
5906 if test -n "$ac_ct_READELF"; then
5907 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5908else
5909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5910for as_dir in $PATH
5911do
5912 IFS=$as_save_IFS
5913 test -z "$as_dir" && as_dir=.
5914 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005916 ac_cv_prog_ac_ct_READELF="$ac_prog"
5917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5918 break 2
5919 fi
5920done
5921 done
5922IFS=$as_save_IFS
5923
5924fi
5925fi
5926ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5927if test -n "$ac_ct_READELF"; then
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5929$as_echo "$ac_ct_READELF" >&6; }
5930else
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936 test -n "$ac_ct_READELF" && break
5937done
5938
5939 if test "x$ac_ct_READELF" = x; then
5940 READELF=":"
5941 else
5942 case $cross_compiling:$ac_tool_warned in
5943yes:)
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5945$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5946ac_tool_warned=yes ;;
5947esac
5948 READELF=$ac_ct_READELF
5949 fi
5950fi
5951
5952if test "$cross_compiling" = yes; then
5953 case "$READELF" in
5954 readelf|:)
5955 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5956 ;;
5957 esac
5958fi
5959
5960
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961
Matthias Klosec4c48422012-10-21 23:05:35 +02005962for ac_prog in python$PACKAGE_VERSION python3 python
5963do
5964 # Extract the first word of "$ac_prog", so it can be a program name with args.
5965set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5967$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005968if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005969 $as_echo_n "(cached) " >&6
5970else
Matthias Klosec4c48422012-10-21 23:05:35 +02005971 if test -n "$PYTHON"; then
5972 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005973else
5974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5975for as_dir in $PATH
5976do
5977 IFS=$as_save_IFS
5978 test -z "$as_dir" && as_dir=.
5979 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005981 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5983 break 2
5984 fi
5985done
5986 done
5987IFS=$as_save_IFS
5988
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005989fi
5990fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005991PYTHON=$ac_cv_prog_PYTHON
5992if test -n "$PYTHON"; then
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5994$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005995else
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5997$as_echo "no" >&6; }
5998fi
5999
6000
Matthias Klosec4c48422012-10-21 23:05:35 +02006001 test -n "$PYTHON" && break
6002done
6003test -n "$PYTHON" || PYTHON="not-found"
6004
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006005if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006006 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6007else
6008 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009fi
6010
6011
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012case $MACHDEP in
6013bsdos*|hp*|HP*)
6014 # install -d does not work on BSDI or HP-UX
6015 if test -z "$INSTALL"
6016 then
6017 INSTALL="${srcdir}/install-sh -c"
6018 fi
6019esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020# Find a good install program. We prefer a C program (faster),
6021# so one script is as good as another. But avoid the broken or
6022# incompatible versions:
6023# SysV /etc/install, /usr/sbin/install
6024# SunOS /usr/etc/install
6025# IRIX /sbin/install
6026# AIX /bin/install
6027# AmigaOS /C/install, which installs bootblocks on floppy discs
6028# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6029# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6030# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6031# OS/2's system install, which has a completely different semantic
6032# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006033# Reject install programs that cannot install multiple files.
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6035$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006037if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039else
6040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043 IFS=$as_save_IFS
6044 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 # Account for people who put trailing slashes in PATH elements.
6046case $as_dir/ in #((
6047 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 /usr/ucb/* ) ;;
6051 *)
6052 # OSF1 and SCO ODT 3.0 have their own names for install.
6053 # Don't use installbsd from OSF since it installs stuff as root
6054 # by default.
6055 for ac_prog in ginstall scoinst install; do
6056 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006057 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058 if test $ac_prog = install &&
6059 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6060 # AIX install. It has an incompatible calling convention.
6061 :
6062 elif test $ac_prog = install &&
6063 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6064 # program-specific install script used by HP pwplus--don't use.
6065 :
6066 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 rm -rf conftest.one conftest.two conftest.dir
6068 echo one > conftest.one
6069 echo two > conftest.two
6070 mkdir conftest.dir
6071 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6072 test -s conftest.one && test -s conftest.two &&
6073 test -s conftest.dir/conftest.one &&
6074 test -s conftest.dir/conftest.two
6075 then
6076 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6077 break 3
6078 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079 fi
6080 fi
6081 done
6082 done
6083 ;;
6084esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006085
6086 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087IFS=$as_save_IFS
6088
Matthias Kloseb9621712010-04-24 17:59:49 +00006089rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090
6091fi
6092 if test "${ac_cv_path_install+set}" = set; then
6093 INSTALL=$ac_cv_path_install
6094 else
6095 # As a last resort, use the slow shell script. Don't cache a
6096 # value for INSTALL within a source directory, because that will
6097 # break other packages using the cache if that directory is
6098 # removed, or if the value is a relative name.
6099 INSTALL=$ac_install_sh
6100 fi
6101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6103$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104
6105# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6106# It thinks the first close brace ends the variable substitution.
6107test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6108
6109test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6110
6111test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6112
Matthias Klose93a0ef12012-03-15 18:08:34 +01006113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6114$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6115if test -z "$MKDIR_P"; then
6116 if ${ac_cv_path_mkdir+:} false; then :
6117 $as_echo_n "(cached) " >&6
6118else
6119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6121do
6122 IFS=$as_save_IFS
6123 test -z "$as_dir" && as_dir=.
6124 for ac_prog in mkdir gmkdir; do
6125 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006126 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006127 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6128 'mkdir (GNU coreutils) '* | \
6129 'mkdir (coreutils) '* | \
6130 'mkdir (fileutils) '4.1*)
6131 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6132 break 3;;
6133 esac
6134 done
6135 done
6136 done
6137IFS=$as_save_IFS
6138
6139fi
6140
6141 test -d ./--version && rmdir ./--version
6142 if test "${ac_cv_path_mkdir+set}" = set; then
6143 MKDIR_P="$ac_cv_path_mkdir -p"
6144 else
6145 # As a last resort, use the slow shell script. Don't cache a
6146 # value for MKDIR_P within a source directory, because that will
6147 # break other packages using the cache if that directory is
6148 # removed, or if the value is a relative name.
6149 MKDIR_P="$ac_install_sh -d"
6150 fi
6151fi
6152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6153$as_echo "$MKDIR_P" >&6; }
6154
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155
6156# Not every filesystem supports hard links
6157
6158if test -z "$LN" ; then
6159 case $ac_sys_system in
6160 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161 *) LN=ln;;
6162 esac
6163fi
6164
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006165# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006166
6167ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006168
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6171$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172
6173# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006174if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175 withval=$with_pydebug;
6176if test "$withval" != no
6177then
6178
Matthias Kloseb9621712010-04-24 17:59:49 +00006179$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180
Matthias Kloseb9621712010-04-24 17:59:49 +00006181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6182$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006184 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006185else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6186$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187fi
6188else
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191fi
6192
6193
6194# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6195# merged with this chunk of code?
6196
6197# Optimizer/debugger flags
6198# ------------------------
6199# (The following bit of code is complicated enough - please keep things
6200# indented properly. Just pretend you're editing Python code. ;-)
6201
6202# There are two parallel sets of case statements below, one that checks to
6203# see if OPT was set and one that does BASECFLAGS setting based upon
6204# compiler and platform. BASECFLAGS tweaks need to be made even if the
6205# user set OPT.
6206
6207# tweak OPT based on compiler and platform, only if the user didn't set
6208# it on the command line
6209
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006210if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211then
6212 case $GCC in
6213 yes)
6214 if test "$CC" != 'g++' ; then
6215 STRICT_PROTO="-Wstrict-prototypes"
6216 fi
6217 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6218 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6219 WRAP="-fwrapv"
6220 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006221
6222 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006223 case $CC in
6224 *clang*) WRAP="-fwrapv"
6225 ;;
6226 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006227
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 case $ac_cv_prog_cc_g in
6229 yes)
6230 if test "$Py_DEBUG" = 'true' ; then
6231 # Optimization messes up debuggers, so turn it off for
6232 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006233 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234 else
6235 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6236 fi
6237 ;;
6238 *)
6239 OPT="-O3 -Wall $STRICT_PROTO"
6240 ;;
6241 esac
6242 case $ac_sys_system in
6243 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6244 ;;
6245 esac
6246 ;;
6247
6248 *)
6249 OPT="-O"
6250 ;;
6251 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006252fi
6253
6254
6255
6256# The -arch flags for universal builds on OSX
6257UNIVERSAL_ARCH_FLAGS=
6258
6259
6260# tweak BASECFLAGS based on compiler and platform
6261case $GCC in
6262yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006263 # Python doesn't violate C99 aliasing rules, but older versions of
6264 # GCC produce warnings for legal Python code. Enable
6265 # -fno-strict-aliasing on versions of GCC that support but produce
6266 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6268$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269 ac_save_cc="$CC"
6270 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006271 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006272 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006273 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006274else
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006277
Matthias Kloseb159a552010-04-25 21:00:44 +00006278
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006279int
6280main ()
6281{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006282
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006283 ;
6284 return 0;
6285}
Matthias Kloseb159a552010-04-25 21:00:44 +00006286
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006288if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006289
6290 CC="$ac_save_cc -fstrict-aliasing"
6291 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006293/* end confdefs.h. */
6294
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006295 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006296int
6297main ()
6298{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006299double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006300 ;
6301 return 0;
6302}
Matthias Kloseb159a552010-04-25 21:00:44 +00006303
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006305if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006306
6307 ac_cv_no_strict_aliasing=no
6308
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309else
Matthias Kloseb159a552010-04-25 21:00:44 +00006310
6311 ac_cv_no_strict_aliasing=yes
6312
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006313fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006315
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006316else
Matthias Kloseb159a552010-04-25 21:00:44 +00006317
6318 ac_cv_no_strict_aliasing=no
6319
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006322fi
6323
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006324 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6327$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006328 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 then
6330 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6331 fi
6332
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6334$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6335 ac_save_cc="$CC"
6336 CC="$CC -Wunused-result -Werror"
6337 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006338 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006339 $as_echo_n "(cached) " >&6
6340else
6341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6342/* end confdefs.h. */
6343
6344
6345int
6346main ()
6347{
6348
6349 ;
6350 return 0;
6351}
6352
6353_ACEOF
6354if ac_fn_c_try_compile "$LINENO"; then :
6355
6356 ac_cv_disable_unused_result_warning=yes
6357
6358else
6359
6360 ac_cv_disable_unused_result_warning=no
6361
6362fi
6363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6364fi
6365
6366 CFLAGS="$save_CFLAGS"
6367 CC="$ac_save_cc"
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6369$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6370
6371 if test $ac_cv_disable_unused_result_warning = yes
6372 then
6373 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6374 fi
6375
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6377 # support. Without this, treatment of subnormals doesn't follow
6378 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006379 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380 alpha*)
6381 BASECFLAGS="$BASECFLAGS -mieee"
6382 ;;
6383 esac
6384
6385 case $ac_sys_system in
6386 SCO_SV*)
6387 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6388 ;;
6389 # is there any other compiler on Darwin besides gcc?
6390 Darwin*)
6391 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6392 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006393 if test "${CC}" = gcc
6394 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6396$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006397 case "${UNIVERSALSDK}" in
6398 */MacOSX10.4u.sdk)
6399 # Build using 10.4 SDK, force usage of gcc when the
6400 # compiler is gcc, otherwise the user will get very
6401 # confusing error messages when building on OSX 10.6
6402 CC=gcc-4.0
6403 CPP=cpp-4.0
6404 ;;
6405 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6407$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006408 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409
6410
6411 if test "${enable_universalsdk}"; then
6412 UNIVERSAL_ARCH_FLAGS=""
6413 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6414 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6415 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006416 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6418 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006419 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006420 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421
6422 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6423 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006424 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006425 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006427 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6428 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006429 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006430 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006431
6432 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6433 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006434 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006435 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006436
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006438 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 +00006439
6440 fi
6441
6442
Ronald Oussoren666028b2010-04-18 19:07:43 +00006443 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6444 if test "${UNIVERSALSDK}" != "/"
6445 then
6446 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6447 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006448 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006449 fi
6450 fi
6451
6452 # Calculate the right deployment target for this build.
6453 #
6454 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006455 if test ${cur_target} '>' 10.2 && \
6456 test ${cur_target} '<' 10.6
6457 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006459 if test ${enable_universalsdk}; then
6460 if test "${UNIVERSAL_ARCHS}" = "all"; then
6461 # Ensure that the default platform for a
6462 # 4-way universal build is OSX 10.5,
6463 # that's the first OS release where
6464 # 4-way builds make sense.
6465 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006466
6467 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6468 cur_target='10.5'
6469
6470 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6471 cur_target='10.5'
6472
6473 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6474 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006475 fi
6476 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006477 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006478 # On Intel macs default to a deployment
6479 # target of 10.4, that's the first OSX
6480 # release with Intel support.
6481 cur_target="10.4"
6482 fi
6483 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006484 fi
6485 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6486
6487 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6488 # environment with a value that is the same as what we'll use
6489 # in the Makefile to ensure that we'll get the same compiler
6490 # environment during configure and build time.
6491 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6492 export MACOSX_DEPLOYMENT_TARGET
6493 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6494
6495 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006496 esac
6497 ;;
6498
6499*)
6500 case $ac_sys_system in
6501 OpenUNIX*|UnixWare*)
6502 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6503 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 SCO_SV*)
6505 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6506 ;;
6507 esac
6508 ;;
6509esac
6510
6511if test "$Py_DEBUG" = 'true'; then
6512 :
6513else
6514 OPT="-DNDEBUG $OPT"
6515fi
6516
6517if test "$ac_arch_flags"
6518then
6519 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6520fi
6521
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006522# Check whether GCC supports PyArg_ParseTuple format
6523if test "$GCC" = "yes"
6524then
Matthias Kloseb9621712010-04-24 17:59:49 +00006525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6526$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006527 save_CFLAGS=$CFLAGS
Benjamin Petersonfeb51492013-05-11 13:00:05 -05006528 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Kloseb9621712010-04-24 17:59:49 +00006529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530/* end confdefs.h. */
6531
6532 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006533int
6534main ()
6535{
6536
6537 ;
6538 return 0;
6539}
Matthias Kloseb159a552010-04-25 21:00:44 +00006540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006542if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543
Matthias Kloseb159a552010-04-25 21:00:44 +00006544
Matthias Kloseb9621712010-04-24 17:59:49 +00006545$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006546
Matthias Kloseb159a552010-04-25 21:00:44 +00006547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006548$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006550else
Matthias Kloseb159a552010-04-25 21:00:44 +00006551
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006553$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006554
6555fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6557 CFLAGS=$save_CFLAGS
6558fi
6559
6560# On some compilers, pthreads are available without further options
6561# (e.g. MacOS X). On some of these systems, the compiler will not
6562# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6563# So we have to see first whether pthreads are available without
6564# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6566$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006567if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006568 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006569else
Matthias Kloseb9621712010-04-24 17:59:49 +00006570 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006571 ac_cv_pthread_is_default=no
6572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006574/* end confdefs.h. */
6575
Stefan Krah7dba5942012-11-22 22:49:11 +01006576#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577#include <pthread.h>
6578
6579void* routine(void* p){return NULL;}
6580
6581int main(){
6582 pthread_t p;
6583 if(pthread_create(&p,NULL,routine,NULL)!=0)
6584 return 1;
6585 (void)pthread_detach(p);
6586 return 0;
6587}
6588
6589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006590if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006591
6592 ac_cv_pthread_is_default=yes
6593 ac_cv_kthread=no
6594 ac_cv_pthread=no
6595
6596else
Matthias Kloseb9621712010-04-24 17:59:49 +00006597 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6600 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601fi
6602
6603
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006604fi
6605
Matthias Kloseb9621712010-04-24 17:59:49 +00006606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6607$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006608
6609
6610if test $ac_cv_pthread_is_default = yes
6611then
6612 ac_cv_kpthread=no
6613else
6614# -Kpthread, if available, provides the right #defines
6615# and linker options to make pthread_create available
6616# Some compilers won't report that they do not support -Kpthread,
6617# so we need to run a program to see whether it really made the
6618# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6620$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006621if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006622 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623else
6624 ac_save_cc="$CC"
6625CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006626if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006627 ac_cv_kpthread=no
6628else
Matthias Kloseb9621712010-04-24 17:59:49 +00006629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006630/* end confdefs.h. */
6631
Stefan Krah7dba5942012-11-22 22:49:11 +01006632#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006633#include <pthread.h>
6634
6635void* routine(void* p){return NULL;}
6636
6637int main(){
6638 pthread_t p;
6639 if(pthread_create(&p,NULL,routine,NULL)!=0)
6640 return 1;
6641 (void)pthread_detach(p);
6642 return 0;
6643}
6644
6645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006646if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647 ac_cv_kpthread=yes
6648else
Matthias Kloseb9621712010-04-24 17:59:49 +00006649 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6652 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653fi
6654
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006655CC="$ac_save_cc"
6656fi
6657
Matthias Kloseb9621712010-04-24 17:59:49 +00006658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6659$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006660fi
6661
6662if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6663then
6664# -Kthread, if available, provides the right #defines
6665# and linker options to make pthread_create available
6666# Some compilers won't report that they do not support -Kthread,
6667# so we need to run a program to see whether it really made the
6668# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6670$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006671if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006672 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006673else
6674 ac_save_cc="$CC"
6675CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006676if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677 ac_cv_kthread=no
6678else
Matthias Kloseb9621712010-04-24 17:59:49 +00006679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680/* end confdefs.h. */
6681
Stefan Krah7dba5942012-11-22 22:49:11 +01006682#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683#include <pthread.h>
6684
6685void* routine(void* p){return NULL;}
6686
6687int main(){
6688 pthread_t p;
6689 if(pthread_create(&p,NULL,routine,NULL)!=0)
6690 return 1;
6691 (void)pthread_detach(p);
6692 return 0;
6693}
6694
6695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006696if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006697 ac_cv_kthread=yes
6698else
Matthias Kloseb9621712010-04-24 17:59:49 +00006699 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6702 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703fi
6704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705CC="$ac_save_cc"
6706fi
6707
Matthias Kloseb9621712010-04-24 17:59:49 +00006708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6709$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710fi
6711
6712if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6713then
6714# -pthread, if available, provides the right #defines
6715# and linker options to make pthread_create available
6716# Some compilers won't report that they do not support -pthread,
6717# so we need to run a program to see whether it really made the
6718# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6720$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006721if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006722 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006723else
6724 ac_save_cc="$CC"
6725CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006726if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727 ac_cv_pthread=no
6728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730/* end confdefs.h. */
6731
Stefan Krah7dba5942012-11-22 22:49:11 +01006732#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733#include <pthread.h>
6734
6735void* routine(void* p){return NULL;}
6736
6737int main(){
6738 pthread_t p;
6739 if(pthread_create(&p,NULL,routine,NULL)!=0)
6740 return 1;
6741 (void)pthread_detach(p);
6742 return 0;
6743}
6744
6745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006746if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747 ac_cv_pthread=yes
6748else
Matthias Kloseb9621712010-04-24 17:59:49 +00006749 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753fi
6754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755CC="$ac_save_cc"
6756fi
6757
Matthias Kloseb9621712010-04-24 17:59:49 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6759$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760fi
6761
6762# If we have set a CC compiler flag for thread support then
6763# check if it works for CXX, too.
6764ac_cv_cxx_thread=no
6765if test ! -z "$CXX"
6766then
Matthias Kloseb9621712010-04-24 17:59:49 +00006767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6768$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769ac_save_cxx="$CXX"
6770
6771if test "$ac_cv_kpthread" = "yes"
6772then
6773 CXX="$CXX -Kpthread"
6774 ac_cv_cxx_thread=yes
6775elif test "$ac_cv_kthread" = "yes"
6776then
6777 CXX="$CXX -Kthread"
6778 ac_cv_cxx_thread=yes
6779elif test "$ac_cv_pthread" = "yes"
6780then
6781 CXX="$CXX -pthread"
6782 ac_cv_cxx_thread=yes
6783fi
6784
6785if test $ac_cv_cxx_thread = yes
6786then
6787 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6788 $CXX -c conftest.$ac_ext 2>&5
6789 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6790 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6791 then
6792 ac_cv_cxx_thread=yes
6793 else
6794 ac_cv_cxx_thread=no
6795 fi
6796 rm -fr conftest*
6797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6799$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800fi
6801CXX="$ac_save_cxx"
6802
6803
6804# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6806$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006807if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006808 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006809else
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006811/* end confdefs.h. */
6812#include <stdlib.h>
6813#include <stdarg.h>
6814#include <string.h>
6815#include <float.h>
6816
6817int
6818main ()
6819{
6820
6821 ;
6822 return 0;
6823}
6824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006825if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826 ac_cv_header_stdc=yes
6827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6831
6832if test $ac_cv_header_stdc = yes; then
6833 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835/* end confdefs.h. */
6836#include <string.h>
6837
6838_ACEOF
6839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006840 $EGREP "memchr" >/dev/null 2>&1; then :
6841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842else
6843 ac_cv_header_stdc=no
6844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006845rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846
6847fi
6848
6849if test $ac_cv_header_stdc = yes; then
6850 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852/* end confdefs.h. */
6853#include <stdlib.h>
6854
6855_ACEOF
6856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 $EGREP "free" >/dev/null 2>&1; then :
6858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859else
6860 ac_cv_header_stdc=no
6861fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006862rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863
6864fi
6865
6866if test $ac_cv_header_stdc = yes; then
6867 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869 :
6870else
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872/* end confdefs.h. */
6873#include <ctype.h>
6874#include <stdlib.h>
6875#if ((' ' & 0x0FF) == 0x020)
6876# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6877# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6878#else
6879# define ISLOWER(c) \
6880 (('a' <= (c) && (c) <= 'i') \
6881 || ('j' <= (c) && (c) <= 'r') \
6882 || ('s' <= (c) && (c) <= 'z'))
6883# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6884#endif
6885
6886#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6887int
6888main ()
6889{
6890 int i;
6891 for (i = 0; i < 256; i++)
6892 if (XOR (islower (i), ISLOWER (i))
6893 || toupper (i) != TOUPPER (i))
6894 return 2;
6895 return 0;
6896}
6897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006898if ac_fn_c_try_run "$LINENO"; then :
6899
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905fi
6906
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907fi
6908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6910$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911if test $ac_cv_header_stdc = yes; then
6912
Matthias Kloseb9621712010-04-24 17:59:49 +00006913$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914
6915fi
6916
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006917ac_save_cppflags="$CPPFLAGS"
6918CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006919for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006920fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006921ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006922sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006923unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006924poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006925sys/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 +01006926sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006927sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006928sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006929sys/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 -07006930libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesf0400ba2013-06-18 13:22:17 +02006931bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006932do :
6933 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6934ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006935if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006937#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006938_ACEOF
6939
6940fi
6941
Guido van Rossum627b2d71993-12-24 10:39:16 +00006942done
6943
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006944CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006945ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006946for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6949$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006950if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006952else
Matthias Kloseb9621712010-04-24 17:59:49 +00006953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006954/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006955#include <sys/types.h>
6956#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958int
6959main ()
6960{
6961if ((DIR *) 0)
6962return 0;
6963 ;
6964 return 0;
6965}
6966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006968 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006969else
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974eval ac_res=\$$as_ac_Header
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6976$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006977if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006978 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006979#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006980_ACEOF
6981
6982ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006983fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006984
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985done
6986# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6987if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6989$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006990if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006992else
Martin v. Löwis11437992002-04-12 09:54:03 +00006993 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006997/* Override any GCC internal prototype to avoid an error.
6998 Use char because int might match the return type of a GCC
6999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007000#ifdef __cplusplus
7001extern "C"
7002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007003char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007004int
7005main ()
7006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007008 ;
7009 return 0;
7010}
7011_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012for ac_lib in '' dir; do
7013 if test -z "$ac_lib"; then
7014 ac_res="none required"
7015 else
7016 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007017 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007022rm -f core conftest.err conftest.$ac_objext \
7023 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007024 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027done
Victor Stinnere0be4232011-10-25 13:06:09 +02007028if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007030else
7031 ac_cv_search_opendir=no
7032fi
7033rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007034LIBS=$ac_func_search_save_LIBS
7035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7037$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007038ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007039if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007043
Michael W. Hudson54241132001-12-07 15:38:26 +00007044else
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7046$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007047if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007049else
7050 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007054/* Override any GCC internal prototype to avoid an error.
7055 Use char because int might match the return type of a GCC
7056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007057#ifdef __cplusplus
7058extern "C"
7059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007060char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007061int
7062main ()
7063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007065 ;
7066 return 0;
7067}
7068_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069for ac_lib in '' x; do
7070 if test -z "$ac_lib"; then
7071 ac_res="none required"
7072 else
7073 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007074 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007079rm -f core conftest.err conftest.$ac_objext \
7080 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007081 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007084done
Victor Stinnere0be4232011-10-25 13:06:09 +02007085if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007087else
7088 ac_cv_search_opendir=no
7089fi
7090rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007091LIBS=$ac_func_search_save_LIBS
7092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7094$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007096if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007099fi
7100
7101fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007102
Matthias Kloseb9621712010-04-24 17:59:49 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7104$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007105if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007106 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007107else
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007109/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007110#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007111int
7112main ()
7113{
7114return makedev(0, 0);
7115 ;
7116 return 0;
7117}
7118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007120 ac_cv_header_sys_types_h_makedev=yes
7121else
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007124rm -f core conftest.err conftest.$ac_objext \
7125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007126
7127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7129$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007130
7131if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007132ac_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 +02007133if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007134
Matthias Kloseb9621712010-04-24 17:59:49 +00007135$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007136
7137fi
7138
7139
7140
7141 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007142 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 +02007143if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007144
Matthias Kloseb9621712010-04-24 17:59:49 +00007145$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007146
7147fi
7148
7149
7150 fi
7151fi
7152
Michael W. Hudson54241132001-12-07 15:38:26 +00007153
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007154# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7155for ac_header in net/if.h
7156do :
7157 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7158#ifdef STDC_HEADERS
7159# include <stdlib.h>
7160# include <stddef.h>
7161#else
7162# ifdef HAVE_STDLIB_H
7163# include <stdlib.h>
7164# endif
7165#endif
7166#ifdef HAVE_SYS_SOCKET_H
7167# include <sys/socket.h>
7168#endif
7169
7170"
Victor Stinnere0be4232011-10-25 13:06:09 +02007171if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007172 cat >>confdefs.h <<_ACEOF
7173#define HAVE_NET_IF_H 1
7174_ACEOF
7175
7176fi
7177
7178done
7179
7180
7181
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007182# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007183for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007184do :
7185 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007186#ifdef HAVE_CURSES_H
7187#include <curses.h>
7188#endif
7189
Matthias Kloseb9621712010-04-24 17:59:49 +00007190"
Victor Stinnere0be4232011-10-25 13:06:09 +02007191if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007192 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007193#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007194_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007195
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007196fi
7197
7198done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007199
7200
Martin v. Löwis11017b12006-01-14 18:12:57 +00007201# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007202for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007203do :
7204 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 +00007205#ifdef HAVE_ASM_TYPES_H
7206#include <asm/types.h>
7207#endif
7208#ifdef HAVE_SYS_SOCKET_H
7209#include <sys/socket.h>
7210#endif
7211
Matthias Kloseb9621712010-04-24 17:59:49 +00007212"
Victor Stinnere0be4232011-10-25 13:06:09 +02007213if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007214 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007215#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007216_ACEOF
7217
7218fi
7219
7220done
7221
7222
Charles-François Natali47413c12011-10-06 19:47:44 +02007223# On Linux, can.h and can/raw.h require sys/socket.h
7224for ac_header in linux/can.h linux/can/raw.h
7225do :
7226 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7227ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7228#ifdef HAVE_SYS_SOCKET_H
7229#include <sys/socket.h>
7230#endif
7231
7232"
7233if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7234 cat >>confdefs.h <<_ACEOF
7235#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7236_ACEOF
7237
7238fi
7239
7240done
7241
7242
Guido van Rossum627b2d71993-12-24 10:39:16 +00007243# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007244was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7246$as_echo_n "checking for clock_t in time.h... " >&6; }
7247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007248/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007249#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007250
7251_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007254 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007255else
Martin v. Löwis11437992002-04-12 09:54:03 +00007256
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007259
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007260
Guido van Rossum627b2d71993-12-24 10:39:16 +00007261fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007262rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007263
Matthias Kloseb9621712010-04-24 17:59:49 +00007264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7265$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007266
Matthias Kloseb9621712010-04-24 17:59:49 +00007267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7268$as_echo_n "checking for makedev... " >&6; }
7269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007270/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007271
Jesus Cea740f53a2010-04-28 11:35:30 +00007272#if defined(MAJOR_IN_MKDEV)
7273#include <sys/mkdev.h>
7274#elif defined(MAJOR_IN_SYSMACROS)
7275#include <sys/sysmacros.h>
7276#else
7277#include <sys/types.h>
7278#endif
7279
Neal Norwitz11690112002-07-30 01:08:28 +00007280int
7281main ()
7282{
Jesus Cea740f53a2010-04-28 11:35:30 +00007283
7284 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007285 ;
7286 return 0;
7287}
Matthias Kloseb159a552010-04-25 21:00:44 +00007288
Neal Norwitz11690112002-07-30 01:08:28 +00007289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007290if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007291 ac_cv_has_makedev=yes
7292else
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007295rm -f core conftest.err conftest.$ac_objext \
7296 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7298$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007299if test "$ac_cv_has_makedev" = "yes"; then
7300
Matthias Kloseb9621712010-04-24 17:59:49 +00007301$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007302
7303fi
7304
Martin v. Löwis399a6892002-10-04 10:22:02 +00007305# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7306# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7307# defined, but the compiler does not support pragma redefine_extname,
7308# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7309# structures (such as rlimit64) without declaring them. As a
7310# work-around, disable LFS on such configurations
7311
7312use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7314$as_echo_n "checking Solaris LFS bug... " >&6; }
7315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007316/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007317
7318#define _LARGEFILE_SOURCE 1
7319#define _FILE_OFFSET_BITS 64
7320#include <sys/resource.h>
7321
Martin v. Löwis399a6892002-10-04 10:22:02 +00007322int
7323main ()
7324{
7325struct rlimit foo;
7326 ;
7327 return 0;
7328}
7329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007331 sol_lfs_bug=no
7332else
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7337$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007338if test "$sol_lfs_bug" = "yes"; then
7339 use_lfs=no
7340fi
7341
7342if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007343# Two defines needed to enable largefile support on various platforms
7344# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007345case $ac_sys_system/$ac_sys_release in
7346AIX*)
7347
7348$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7349
7350 ;;
7351esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007352
Matthias Kloseb9621712010-04-24 17:59:49 +00007353$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
7355
Matthias Kloseb9621712010-04-24 17:59:49 +00007356$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007357
Martin v. Löwis399a6892002-10-04 10:22:02 +00007358fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007359
Guido van Rossum84e7b241996-08-19 21:59:00 +00007360# Add some code to confdefs.h so that the test for off_t works on SCO
7361cat >> confdefs.h <<\EOF
7362#if defined(SCO_DS)
7363#undef _OFF_T
7364#endif
7365EOF
7366
Guido van Rossumef2255b2000-03-10 22:30:29 +00007367# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007368ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007369if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007371else
Martin v. Löwis11437992002-04-12 09:54:03 +00007372
7373cat >>confdefs.h <<_ACEOF
7374#define mode_t int
7375_ACEOF
7376
7377fi
7378
Matthias Kloseb9621712010-04-24 17:59:49 +00007379ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007380if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007381
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007382else
Martin v. Löwis11437992002-04-12 09:54:03 +00007383
7384cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007385#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007386_ACEOF
7387
7388fi
7389
Matthias Kloseb9621712010-04-24 17:59:49 +00007390ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007391if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007392
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007393else
Martin v. Löwis11437992002-04-12 09:54:03 +00007394
7395cat >>confdefs.h <<_ACEOF
7396#define pid_t int
7397_ACEOF
7398
7399fi
7400
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007401
Martin v. Löwis11437992002-04-12 09:54:03 +00007402cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007403#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007404_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007405
Matthias Kloseb9621712010-04-24 17:59:49 +00007406ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007407if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007409else
Martin v. Löwis11437992002-04-12 09:54:03 +00007410
7411cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007412#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007413_ACEOF
7414
7415fi
7416
Matthias Kloseb9621712010-04-24 17:59:49 +00007417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7418$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007419if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007420 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007421else
Matthias Kloseb9621712010-04-24 17:59:49 +00007422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007423/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007424#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007425
7426_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007429 ac_cv_type_uid_t=yes
7430else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007431 ac_cv_type_uid_t=no
7432fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007433rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7437$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007438if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007439
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
7442
Matthias Kloseb9621712010-04-24 17:59:49 +00007443$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007444
7445fi
7446
Mark Dickinsonce31f662012-12-02 13:20:22 +00007447
7448# There are two separate checks for each of the exact-width integer types we
7449# need. First we check whether the type is available using the usual
7450# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7451# and <stdint.h> where available). We then also use the special type checks of
7452# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7453# directly, #define's uint32_t to be a suitable type.
7454
7455ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7456if test "x$ac_cv_type_uint32_t" = xyes; then :
7457
7458$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7459
7460fi
7461
Matthias Kloseb9621712010-04-24 17:59:49 +00007462ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7463case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007464 no|yes) ;; #(
7465 *)
7466
Matthias Kloseb9621712010-04-24 17:59:49 +00007467$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007468
7469
7470cat >>confdefs.h <<_ACEOF
7471#define uint32_t $ac_cv_c_uint32_t
7472_ACEOF
7473;;
7474 esac
7475
Mark Dickinsonce31f662012-12-02 13:20:22 +00007476
7477ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7478if test "x$ac_cv_type_uint64_t" = xyes; then :
7479
7480$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7481
7482fi
7483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7485case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007486 no|yes) ;; #(
7487 *)
7488
Matthias Kloseb9621712010-04-24 17:59:49 +00007489$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007490
7491
7492cat >>confdefs.h <<_ACEOF
7493#define uint64_t $ac_cv_c_uint64_t
7494_ACEOF
7495;;
7496 esac
7497
Mark Dickinsonce31f662012-12-02 13:20:22 +00007498
7499ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7500if test "x$ac_cv_type_int32_t" = xyes; then :
7501
7502$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7503
7504fi
7505
Matthias Kloseb9621712010-04-24 17:59:49 +00007506ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7507case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007508 no|yes) ;; #(
7509 *)
7510
7511cat >>confdefs.h <<_ACEOF
7512#define int32_t $ac_cv_c_int32_t
7513_ACEOF
7514;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007515esac
7516
Mark Dickinsonce31f662012-12-02 13:20:22 +00007517
7518ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7519if test "x$ac_cv_type_int64_t" = xyes; then :
7520
7521$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7522
7523fi
7524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7526case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007527 no|yes) ;; #(
7528 *)
7529
7530cat >>confdefs.h <<_ACEOF
7531#define int64_t $ac_cv_c_int64_t
7532_ACEOF
7533;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007534esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007535
Mark Dickinsonce31f662012-12-02 13:20:22 +00007536
Matthias Kloseb9621712010-04-24 17:59:49 +00007537ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007538if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007539
Matthias Kloseb9621712010-04-24 17:59:49 +00007540$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007541
7542fi
7543
Stefan Krah1919b7e2012-03-21 18:25:23 +01007544ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7545if test "x$ac_cv_type___uint128_t" = xyes; then :
7546
7547$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7548
7549fi
7550
Jack Jansendd19cf82001-12-06 22:36:17 +00007551
Michael W. Hudson54241132001-12-07 15:38:26 +00007552# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007553# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007554# The cast to long int works around a bug in the HP C Compiler
7555# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7556# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7557# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7559$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007560if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007561 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007562else
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 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 +00007564
Martin v. Löwis11437992002-04-12 09:54:03 +00007565else
Matthias Kloseb9621712010-04-24 17:59:49 +00007566 if test "$ac_cv_type_int" = yes; then
7567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007569as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007570See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007571 else
7572 ac_cv_sizeof_int=0
7573 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007575
Martin v. Löwis11437992002-04-12 09:54:03 +00007576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7578$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007579
7580
7581
Martin v. Löwis11437992002-04-12 09:54:03 +00007582cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007583#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007584_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007585
7586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007587# The cast to long int works around a bug in the HP C Compiler
7588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7590# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7592$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007593if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 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 +00007597
Martin v. Löwis11437992002-04-12 09:54:03 +00007598else
Matthias Kloseb9621712010-04-24 17:59:49 +00007599 if test "$ac_cv_type_long" = yes; then
7600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007602as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007603See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604 else
7605 ac_cv_sizeof_long=0
7606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007608
Martin v. Löwis11437992002-04-12 09:54:03 +00007609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7611$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612
7613
7614
Martin v. Löwis11437992002-04-12 09:54:03 +00007615cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007616#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007617_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007618
7619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620# The cast to long int works around a bug in the HP C Compiler
7621# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7622# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7623# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7625$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007626if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007628else
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 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 +00007630
Martin v. Löwis11437992002-04-12 09:54:03 +00007631else
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 if test "$ac_cv_type_void_p" = yes; then
7633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7634$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007635as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007636See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637 else
7638 ac_cv_sizeof_void_p=0
7639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007641
Martin v. Löwis11437992002-04-12 09:54:03 +00007642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7644$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645
7646
7647
Martin v. Löwis11437992002-04-12 09:54:03 +00007648cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007649#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007650_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007651
7652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653# The cast to long int works around a bug in the HP C Compiler
7654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7658$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007659if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 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 +00007663
Martin v. Löwis11437992002-04-12 09:54:03 +00007664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 if test "$ac_cv_type_short" = yes; then
7666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007668as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007669See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 else
7671 ac_cv_sizeof_short=0
7672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007674
Martin v. Löwis11437992002-04-12 09:54:03 +00007675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7677$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678
7679
7680
Martin v. Löwis11437992002-04-12 09:54:03 +00007681cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007682#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007683_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007684
7685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686# The cast to long int works around a bug in the HP C Compiler
7687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7691$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007692if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 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 +00007696
Martin v. Löwis11437992002-04-12 09:54:03 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 if test "$ac_cv_type_float" = yes; then
7699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007701as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007702See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 else
7704 ac_cv_sizeof_float=0
7705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007707
Martin v. Löwis11437992002-04-12 09:54:03 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7710$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711
7712
7713
Martin v. Löwis11437992002-04-12 09:54:03 +00007714cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007715#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007716_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007717
7718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719# The cast to long int works around a bug in the HP C Compiler
7720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7724$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007725if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 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 +00007729
Martin v. Löwis11437992002-04-12 09:54:03 +00007730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 if test "$ac_cv_type_double" = yes; then
7732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007734as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007735See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736 else
7737 ac_cv_sizeof_double=0
7738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740
Martin v. Löwis11437992002-04-12 09:54:03 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7743$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744
7745
7746
Martin v. Löwis11437992002-04-12 09:54:03 +00007747cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007748#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007749_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007750
7751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752# The cast to long int works around a bug in the HP C Compiler
7753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7755# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7757$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007758if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 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 +00007762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 if test "$ac_cv_type_fpos_t" = yes; then
7765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007767as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007768See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769 else
7770 ac_cv_sizeof_fpos_t=0
7771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007773
Martin v. Löwis11437992002-04-12 09:54:03 +00007774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7776$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777
7778
7779
Martin v. Löwis11437992002-04-12 09:54:03 +00007780cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007781#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007782_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007783
Michael W. Hudson54241132001-12-07 15:38:26 +00007784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785# The cast to long int works around a bug in the HP C Compiler
7786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7788# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7790$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007791if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007793else
Matthias Kloseb9621712010-04-24 17:59:49 +00007794 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 +00007795
Martin v. Löwis18e16552006-02-15 17:27:45 +00007796else
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 if test "$ac_cv_type_size_t" = yes; then
7798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007800as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007801See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 else
7803 ac_cv_sizeof_size_t=0
7804 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806
Martin v. Löwis18e16552006-02-15 17:27:45 +00007807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7809$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810
7811
7812
Martin v. Löwis18e16552006-02-15 17:27:45 +00007813cat >>confdefs.h <<_ACEOF
7814#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7815_ACEOF
7816
7817
Christian Heimes400adb02008-02-01 08:12:03 +00007818# The cast to long int works around a bug in the HP C Compiler
7819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7821# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7823$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007824if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007826else
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 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 +00007828
Christian Heimes400adb02008-02-01 08:12:03 +00007829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 if test "$ac_cv_type_pid_t" = yes; then
7831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007833as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007834See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007835 else
7836 ac_cv_sizeof_pid_t=0
7837 fi
7838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007839
Christian Heimes400adb02008-02-01 08:12:03 +00007840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7842$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007843
7844
7845
7846cat >>confdefs.h <<_ACEOF
7847#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7848_ACEOF
7849
7850
Michael W. Hudson54241132001-12-07 15:38:26 +00007851
Matthias Kloseb9621712010-04-24 17:59:49 +00007852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7853$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007854have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007856/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007857
Martin v. Löwis11437992002-04-12 09:54:03 +00007858int
7859main ()
7860{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007861long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 ;
7863 return 0;
7864}
7865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007867
7868
Matthias Kloseb9621712010-04-24 17:59:49 +00007869$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007871 have_long_long=yes
7872
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7876$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007877if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878# The cast to long int works around a bug in the HP C Compiler
7879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7881# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7883$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007884if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007886else
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 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 +00007888
Martin v. Löwis11437992002-04-12 09:54:03 +00007889else
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 if test "$ac_cv_type_long_long" = yes; then
7891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007893as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007894See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895 else
7896 ac_cv_sizeof_long_long=0
7897 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007899
Martin v. Löwis11437992002-04-12 09:54:03 +00007900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7902$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903
7904
7905
Martin v. Löwis11437992002-04-12 09:54:03 +00007906cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007907#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007908_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007909
Michael W. Hudson54241132001-12-07 15:38:26 +00007910
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007911fi
7912
Matthias Kloseb9621712010-04-24 17:59:49 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7914$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007915have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007917/* end confdefs.h. */
7918
7919int
7920main ()
7921{
7922long double x; x = (long double)0;
7923 ;
7924 return 0;
7925}
7926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007927if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007928
7929
Matthias Kloseb9621712010-04-24 17:59:49 +00007930$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007931
7932 have_long_double=yes
7933
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007934fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7937$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007938if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007939# The cast to long int works around a bug in the HP C Compiler
7940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7942# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7944$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007945if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007946 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007947else
Matthias Kloseb9621712010-04-24 17:59:49 +00007948 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 +00007949
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007950else
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 if test "$ac_cv_type_long_double" = yes; then
7952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007954as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007955See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007956 else
7957 ac_cv_sizeof_long_double=0
7958 fi
7959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7963$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007964
7965
7966
7967cat >>confdefs.h <<_ACEOF
7968#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7969_ACEOF
7970
7971
7972fi
7973
7974
Matthias Kloseb9621712010-04-24 17:59:49 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7976$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007977have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007979/* end confdefs.h. */
7980
7981int
7982main ()
7983{
7984_Bool x; x = (_Bool)0;
7985 ;
7986 return 0;
7987}
7988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007989if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007990
7991
Matthias Kloseb9621712010-04-24 17:59:49 +00007992$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007993
7994 have_c99_bool=yes
7995
Thomas Woutersb2137042007-02-01 18:02:27 +00007996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7999$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008000if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001# The cast to long int works around a bug in the HP C Compiler
8002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8004# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8006$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008007if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008009else
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 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 +00008011
Thomas Woutersb2137042007-02-01 18:02:27 +00008012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 if test "$ac_cv_type__Bool" = yes; then
8014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008016as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008017See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018 else
8019 ac_cv_sizeof__Bool=0
8020 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008022
Thomas Woutersb2137042007-02-01 18:02:27 +00008023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8025$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026
8027
8028
Thomas Woutersb2137042007-02-01 18:02:27 +00008029cat >>confdefs.h <<_ACEOF
8030#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8031_ACEOF
8032
8033
8034fi
8035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008037 #include <stdint.h>
8038 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008039 #ifdef HAVE_INTTYPES_H
8040 #include <inttypes.h>
8041 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008042"
Victor Stinnere0be4232011-10-25 13:06:09 +02008043if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008044
8045cat >>confdefs.h <<_ACEOF
8046#define HAVE_UINTPTR_T 1
8047_ACEOF
8048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049# The cast to long int works around a bug in the HP C Compiler
8050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8052# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8054$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008055if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008057else
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 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 +00008059
Martin v. Löwis11437992002-04-12 09:54:03 +00008060else
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 if test "$ac_cv_type_uintptr_t" = yes; then
8062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008064as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008065See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066 else
8067 ac_cv_sizeof_uintptr_t=0
8068 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070
Martin v. Löwis11437992002-04-12 09:54:03 +00008071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8073$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074
8075
8076
Martin v. Löwis11437992002-04-12 09:54:03 +00008077cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008078#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008079_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008080
Michael W. Hudson54241132001-12-07 15:38:26 +00008081
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008082fi
8083
Thomas Wouters89f507f2006-12-13 04:49:30 +00008084
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008085# The cast to long int works around a bug in the HP C Compiler
8086# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8087# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8088# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8090$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008091if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008092 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008093else
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008095#ifdef HAVE_SYS_TYPES_H
8096#include <sys/types.h>
8097#endif
8098
Matthias Kloseb9621712010-04-24 17:59:49 +00008099"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008101else
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 if test "$ac_cv_type_off_t" = yes; then
8103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008105as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008106See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008107 else
8108 ac_cv_sizeof_off_t=0
8109 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008111
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8114$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008116
8117
Martin v. Löwis11437992002-04-12 09:54:03 +00008118cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008119#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008120_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008121
Michael W. Hudson54241132001-12-07 15:38:26 +00008122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008123
Matthias Kloseb9621712010-04-24 17:59:49 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8125$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008126if test "$have_long_long" = yes
8127then
8128if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008129 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008130
Matthias Kloseb9621712010-04-24 17:59:49 +00008131$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008132
Matthias Kloseb9621712010-04-24 17:59:49 +00008133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8134$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008135else
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8137$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008138fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008139else
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8141$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008142fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008143
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008144# The cast to long int works around a bug in the HP C Compiler
8145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8147# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8149$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008150if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008151 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008152else
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008154#ifdef HAVE_SYS_TYPES_H
8155#include <sys/types.h>
8156#endif
8157#ifdef HAVE_TIME_H
8158#include <time.h>
8159#endif
8160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 if test "$ac_cv_type_time_t" = yes; then
8165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008167as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008168See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169 else
8170 ac_cv_sizeof_time_t=0
8171 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008173
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8176$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008178
8179
Martin v. Löwis11437992002-04-12 09:54:03 +00008180cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008181#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008182_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008183
Michael W. Hudson54241132001-12-07 15:38:26 +00008184
8185
Trent Mick635f6fb2000-08-23 21:33:05 +00008186# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008187ac_save_cc="$CC"
8188if test "$ac_cv_kpthread" = "yes"
8189then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008190elif test "$ac_cv_kthread" = "yes"
8191then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008192elif test "$ac_cv_pthread" = "yes"
8193then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008194fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008195
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8197$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008198have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008200/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008201
8202 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008203int
8204main ()
8205{
Guido van Rossum12580492000-09-24 16:47:19 +00008206pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008207 ;
8208 return 0;
8209}
Matthias Kloseb159a552010-04-25 21:00:44 +00008210
Martin v. Löwis11437992002-04-12 09:54:03 +00008211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008212if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008213 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8217$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008218if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008220# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8221# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8222# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8224$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008225if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008226 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008227else
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008229#ifdef HAVE_PTHREAD_H
8230#include <pthread.h>
8231#endif
8232
Matthias Kloseb9621712010-04-24 17:59:49 +00008233"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008235else
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 if test "$ac_cv_type_pthread_t" = yes; then
8237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008239as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008240See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008241 else
8242 ac_cv_sizeof_pthread_t=0
8243 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008245
Trent Mick635f6fb2000-08-23 21:33:05 +00008246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8248$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008250
8251
Martin v. Löwis11437992002-04-12 09:54:03 +00008252cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008253#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008254_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008256
Trent Mick635f6fb2000-08-23 21:33:05 +00008257fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008258CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008259
Michael W. Hudson54241132001-12-07 15:38:26 +00008260
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008261case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008262 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008263 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8264 ;;
8265 Darwin/*)
8266 OTHER_LIBTOOL_OPT=""
8267 ;;
8268esac
8269
8270
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008271ARCH_RUN_32BIT=""
8272
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008273case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008274 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008275 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8276 if test "${enable_universalsdk}"; then
8277 :
8278 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008279 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008280 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008281 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008283 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008284 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008285 if test ${gcc_version} '<' 4.0
8286 then
8287 LIBTOOL_CRUFT="-lcc_dynamic"
8288 else
8289 LIBTOOL_CRUFT=""
8290 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008292 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008293else
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008295/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008296
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008297 #include <unistd.h>
8298 int main(int argc, char*argv[])
8299 {
8300 if (sizeof(long) == 4) {
8301 return 0;
8302 } else {
8303 return 1;
8304 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008305 }
8306
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008308if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008309 ac_osx_32bit=yes
8310else
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8314 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008315fi
8316
8317
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008318 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008319 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008320 i386)
8321 MACOSX_DEFAULT_ARCH="i386"
8322 ;;
8323 ppc)
8324 MACOSX_DEFAULT_ARCH="ppc"
8325 ;;
8326 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008327 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008328 ;;
8329 esac
8330 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008331 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008332 i386)
8333 MACOSX_DEFAULT_ARCH="x86_64"
8334 ;;
8335 ppc)
8336 MACOSX_DEFAULT_ARCH="ppc64"
8337 ;;
8338 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008339 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008340 ;;
8341 esac
8342
8343 #ARCH_RUN_32BIT="true"
8344 fi
8345
8346 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008347 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008348 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008349esac
8350
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8352$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008353if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008354then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008355 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008357 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8362$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008363 if test $enable_shared = "yes"
8364 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008365 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 +00008366 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008367else
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8369$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008370fi
8371
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8373$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008374case $ac_sys_system/$ac_sys_release in
8375 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8380$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008381 ;;
8382 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008385 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008386esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008387
Guido van Rossum0a516c91994-09-12 10:58:40 +00008388# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008389
Michael W. Hudson54241132001-12-07 15:38:26 +00008390
8391
8392
8393
Benjamin Peterson99f03762010-04-11 22:15:28 +00008394
Thomas Wouters477c8d52006-05-27 19:21:47 +00008395
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008396# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8397# -- usually .so, .sl on HP-UX, .dll on Cygwin
8398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8399$as_echo_n "checking the extension of shared libraries... " >&6; }
8400if test -z "$SHLIB_SUFFIX"; then
8401 case $ac_sys_system in
8402 hp*|HP*)
8403 case `uname -m` in
8404 ia64) SHLIB_SUFFIX=.so;;
8405 *) SHLIB_SUFFIX=.sl;;
8406 esac
8407 ;;
8408 CYGWIN*) SHLIB_SUFFIX=.dll;;
8409 *) SHLIB_SUFFIX=.so;;
8410 esac
8411fi
8412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8413$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008414
Guido van Rossum0a516c91994-09-12 10:58:40 +00008415# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008416# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008417# (Shared libraries in this instance are shared modules to be loaded into
8418# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8420$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008421if test -z "$LDSHARED"
8422then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008423 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008424 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008425 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008426 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008427 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008428 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008429 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008431 if test "$GCC" = "yes" ; then
8432 LDSHARED='$(CC) -shared'
8433 LDCXXSHARED='$(CXX) -shared'
8434 else
8435 LDSHARED='$(CC) -G'
8436 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008437 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008438 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008439 if test "$GCC" = "yes" ; then
8440 LDSHARED='$(CC) -shared'
8441 LDCXXSHARED='$(CXX) -shared'
8442 else
8443 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008444 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008445 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008446 LDSHARED='$(CC) -bundle'
8447 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008448 if test "$enable_framework" ; then
8449 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008450 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8451 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008452 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008453 else
8454 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008455 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008456 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008457 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008458 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008459 LDSHARED='$(CC) -bundle'
8460 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008461 if test "$enable_framework" ; then
8462 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008463 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8464 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008465 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008466 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008467 # No framework, use the Python app as bundle-loader
8468 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008469 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008470 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008471 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008472 Darwin/*)
8473 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8474 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008475
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008476 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008477 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008478 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008479 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008480 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008481 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8482 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008483 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008484 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008485 LDSHARED='$(CC) -bundle'
8486 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008487 if test "$enable_framework" ; then
8488 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008489 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8490 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008491 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008492 else
8493 # No framework, use the Python app as bundle-loader
8494 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8495 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008496 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008497 fi
8498 fi
8499 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008500 Linux*|GNU*|QNX*)
8501 LDSHARED='$(CC) -shared'
8502 LDCXXSHARED='$(CXX) -shared';;
8503 BSD/OS*/4*)
8504 LDSHARED="gcc -shared"
8505 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008506 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008507 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008508 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008509 LDSHARED='$(CC) -shared'
8510 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008511 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008512 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008513 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008514 OpenBSD*)
8515 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8516 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008517 LDSHARED='$(CC) -shared $(CCSHARED)'
8518 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008519 else
8520 case `uname -r` in
8521 [01].* | 2.[0-7] | 2.[0-7].*)
8522 LDSHARED="ld -Bshareable ${LDFLAGS}"
8523 ;;
8524 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008525 LDSHARED='$(CC) -shared $(CCSHARED)'
8526 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008527 ;;
8528 esac
8529 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008530 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008531 LDSHARED='$(CC) -shared'
8532 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008533 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008534 if test "$GCC" = "yes" ; then
8535 LDSHARED='$(CC) -shared'
8536 LDCXXSHARED='$(CXX) -shared'
8537 else
8538 LDSHARED='$(CC) -G'
8539 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008540 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008541 SCO_SV*)
8542 LDSHARED='$(CC) -Wl,-G,-Bexport'
8543 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8544 CYGWIN*)
8545 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8546 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008547 *) LDSHARED="ld";;
8548 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8551$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008552LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008553BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008554# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008555# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8557$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008558if test -z "$CCSHARED"
8559then
Guido van Rossum07397971997-04-29 21:49:50 +00008560 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008561 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008562 then CCSHARED="-fPIC";
8563 elif test `uname -p` = sparc;
8564 then CCSHARED="-xcode=pic32";
8565 else CCSHARED="-Kpic";
8566 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008567 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008568 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008569 else CCSHARED="+z";
8570 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008571 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008572 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008573 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008574 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008575 if test "$GCC" = "yes"
8576 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008577 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008578 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008579 SCO_SV*)
8580 if test "$GCC" = "yes"
8581 then CCSHARED="-fPIC"
8582 else CCSHARED="-Kpic -belf"
8583 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008584 IRIX*/6*) case $CC in
8585 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008586 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008587 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008588 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8591$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008592# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008593# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8595$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008596if test -z "$LINKFORSHARED"
8597then
Guido van Rossum07397971997-04-29 21:49:50 +00008598 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008599 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008600 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008601 LINKFORSHARED="-Wl,-E -Wl,+s";;
8602# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008603 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008604 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008605 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008607 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008608 if test "$enable_framework"
8609 then
Jack Jansenda49e192005-01-07 13:08:22 +00008610 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008611 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008612 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008613 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008614 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008615 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008616 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008617 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8618 then
8619 LINKFORSHARED="-Wl,--export-dynamic"
8620 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008621 SunOS/5*) case $CC in
8622 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008623 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008624 then
8625 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008626 fi;;
8627 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008628 CYGWIN*)
8629 if test $enable_shared = "no"
8630 then
8631 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8632 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008633 QNX*)
8634 # -Wl,-E causes the symbols to be added to the dynamic
8635 # symbol table so that they can be found when a module
8636 # is loaded. -N 2048K causes the stack size to be set
8637 # to 2048 kilobytes so that the stack doesn't overflow
8638 # when running test_compile.py.
8639 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008640 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8643$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008644
Michael W. Hudson54241132001-12-07 15:38:26 +00008645
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008646
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8648$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008649if test ! "$LIBRARY" = "$LDLIBRARY"
8650then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008651 case $ac_sys_system in
8652 CYGWIN*)
8653 # Cygwin needs CCSHARED when building extension DLLs
8654 # but not when building the interpreter DLL.
8655 CFLAGSFORSHARED='';;
8656 *)
8657 CFLAGSFORSHARED='$(CCSHARED)'
8658 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8661$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008662
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008663# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8664# library (with --enable-shared).
8665# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008666# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8667# if it is not required, since it creates a dependency of the shared library
8668# to LIBS. This, in turn, means that applications linking the shared libpython
8669# don't need to link LIBS explicitly. The default should be only changed
8670# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008671
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8673$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008674case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008675 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008676 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008677esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8679$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008680
8681
Guido van Rossum627b2d71993-12-24 10:39:16 +00008682# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8684$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008685if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008686 $as_echo_n "(cached) " >&6
8687else
8688 ac_check_lib_save_LIBS=$LIBS
8689LIBS="-lsendfile $LIBS"
8690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8691/* end confdefs.h. */
8692
8693/* Override any GCC internal prototype to avoid an error.
8694 Use char because int might match the return type of a GCC
8695 builtin and then its argument prototype would still apply. */
8696#ifdef __cplusplus
8697extern "C"
8698#endif
8699char sendfile ();
8700int
8701main ()
8702{
8703return sendfile ();
8704 ;
8705 return 0;
8706}
8707_ACEOF
8708if ac_fn_c_try_link "$LINENO"; then :
8709 ac_cv_lib_sendfile_sendfile=yes
8710else
8711 ac_cv_lib_sendfile_sendfile=no
8712fi
8713rm -f core conftest.err conftest.$ac_objext \
8714 conftest$ac_exeext conftest.$ac_ext
8715LIBS=$ac_check_lib_save_LIBS
8716fi
8717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8718$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008719if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008720 cat >>confdefs.h <<_ACEOF
8721#define HAVE_LIBSENDFILE 1
8722_ACEOF
8723
8724 LIBS="-lsendfile $LIBS"
8725
8726fi
8727
Matthias Kloseb9621712010-04-24 17:59:49 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8729$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008730if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008732else
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008734LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738/* Override any GCC internal prototype to avoid an error.
8739 Use char because int might match the return type of a GCC
8740 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008741#ifdef __cplusplus
8742extern "C"
8743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008744char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008745int
8746main ()
8747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 ;
8750 return 0;
8751}
8752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008755else
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758rm -f core conftest.err conftest.$ac_objext \
8759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008760LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8763$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008764if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 cat >>confdefs.h <<_ACEOF
8766#define HAVE_LIBDL 1
8767_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008769 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008770
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008771fi
8772 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8774$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008775if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008777else
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008779LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783/* Override any GCC internal prototype to avoid an error.
8784 Use char because int might match the return type of a GCC
8785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008786#ifdef __cplusplus
8787extern "C"
8788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008789char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008790int
8791main ()
8792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ;
8795 return 0;
8796}
8797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008799 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008800else
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008803rm -f core conftest.err conftest.$ac_objext \
8804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008805LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8808$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008809if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 cat >>confdefs.h <<_ACEOF
8811#define HAVE_LIBDLD 1
8812_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008814 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008816fi
8817 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008818
Georg Brandlb1441c72009-01-03 22:33:39 +00008819# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008820if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8822$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008823if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008825else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008826 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008830/* Override any GCC internal prototype to avoid an error.
8831 Use char because int might match the return type of a GCC
8832 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008833#ifdef __cplusplus
8834extern "C"
8835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008836char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008837int
8838main ()
8839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 ;
8842 return 0;
8843}
8844_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845for ac_lib in '' pthread rt posix4; do
8846 if test -z "$ac_lib"; then
8847 ac_res="none required"
8848 else
8849 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008850 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855rm -f core conftest.err conftest.$ac_objext \
8856 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008857 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860done
Victor Stinnere0be4232011-10-25 13:06:09 +02008861if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008863else
8864 ac_cv_search_sem_init=no
8865fi
8866rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008867LIBS=$ac_func_search_save_LIBS
8868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8870$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008874
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008875fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008876 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008877 # posix4 on Solaris 2.6
8878 # pthread (first!) on Linux
8879fi
8880
Martin v. Löwis19d17342003-06-14 21:03:05 +00008881# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8883$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008884if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008886else
8887 ac_check_lib_save_LIBS=$LIBS
8888LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892/* Override any GCC internal prototype to avoid an error.
8893 Use char because int might match the return type of a GCC
8894 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008895#ifdef __cplusplus
8896extern "C"
8897#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008898char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008899int
8900main ()
8901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008903 ;
8904 return 0;
8905}
8906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008908 ac_cv_lib_intl_textdomain=yes
8909else
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008912rm -f core conftest.err conftest.$ac_objext \
8913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008914LIBS=$ac_check_lib_save_LIBS
8915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8917$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008918if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008919
Matthias Kloseb9621712010-04-24 17:59:49 +00008920$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008921
Brett Cannonc6d936e2009-06-07 20:09:53 +00008922 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008923fi
8924
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008925
8926# checks for system dependent C++ extensions support
8927case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8929$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008932
Georg Brandl59e87bd2011-02-15 19:48:59 +00008933 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008934int
8935main ()
8936{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008937loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ;
8939 return 0;
8940}
Matthias Kloseb159a552010-04-25 21:00:44 +00008941
Martin v. Löwis11437992002-04-12 09:54:03 +00008942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008943if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008944
Matthias Kloseb159a552010-04-25 21:00:44 +00008945
Matthias Kloseb9621712010-04-24 17:59:49 +00008946$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008947
Matthias Kloseb159a552010-04-25 21:00:44 +00008948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008949$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008950
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008951else
Matthias Kloseb159a552010-04-25 21:00:44 +00008952
8953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008954$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008955
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008957rm -f core conftest.err conftest.$ac_objext \
8958 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008959 *) ;;
8960esac
8961
Guido van Rossum70c7f481998-03-26 18:44:10 +00008962# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8964$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008965if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008967else
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008969LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973/* Override any GCC internal prototype to avoid an error.
8974 Use char because int might match the return type of a GCC
8975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008976#ifdef __cplusplus
8977extern "C"
8978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008979char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008980int
8981main ()
8982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ;
8985 return 0;
8986}
8987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008990else
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993rm -f core conftest.err conftest.$ac_objext \
8994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008995LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8998$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008999if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009000 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009001fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009002 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9004$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009005if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009007else
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009009LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013/* Override any GCC internal prototype to avoid an error.
9014 Use char because int might match the return type of a GCC
9015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009016#ifdef __cplusplus
9017extern "C"
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009020int
9021main ()
9022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 ;
9025 return 0;
9026}
9027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009030else
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009033rm -f core conftest.err conftest.$ac_objext \
9034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009035LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9038$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009039if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009040 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009041fi
9042 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9045$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009048if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9051$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009052LIBS="$withval $LIBS"
9053
9054else
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9056$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057fi
9058
Guido van Rossum7f43da71994-08-01 12:15:30 +00009059
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009060if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009061 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9062set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9064$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009065if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009067else
9068 case $PKG_CONFIG in
9069 [\\/]* | ?:[\\/]*)
9070 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9071 ;;
9072 *)
9073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9074for as_dir in $PATH
9075do
9076 IFS=$as_save_IFS
9077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009080 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009082 break 2
9083 fi
9084done
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009086IFS=$as_save_IFS
9087
9088 ;;
9089esac
9090fi
9091PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9092if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9094$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009095else
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009098fi
9099
9100
9101fi
9102if test -z "$ac_cv_path_PKG_CONFIG"; then
9103 ac_pt_PKG_CONFIG=$PKG_CONFIG
9104 # Extract the first word of "pkg-config", so it can be a program name with args.
9105set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9107$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009108if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009110else
9111 case $ac_pt_PKG_CONFIG in
9112 [\\/]* | ?:[\\/]*)
9113 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9114 ;;
9115 *)
9116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9117for as_dir in $PATH
9118do
9119 IFS=$as_save_IFS
9120 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009122 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009123 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009125 break 2
9126 fi
9127done
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009129IFS=$as_save_IFS
9130
9131 ;;
9132esac
9133fi
9134ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9135if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9137$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009138else
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9140$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009141fi
9142
9143 if test "x$ac_pt_PKG_CONFIG" = x; then
9144 PKG_CONFIG=""
9145 else
9146 case $cross_compiling:$ac_tool_warned in
9147yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009150ac_tool_warned=yes ;;
9151esac
9152 PKG_CONFIG=$ac_pt_PKG_CONFIG
9153 fi
9154else
9155 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9156fi
9157
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009158
9159# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9161$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009162
9163# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009164if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009165 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009166else
9167 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009168fi
9169
9170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9172$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009173
9174# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9176$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009177
9178# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009179if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009180 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009181else
9182 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009183fi
9184
9185
9186if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009187 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9188else
9189 LIBFFI_INCLUDEDIR=""
9190fi
9191
9192
Matthias Kloseb9621712010-04-24 17:59:49 +00009193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9194$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009195
Stefan Krah60187b52012-03-23 19:06:27 +01009196# Check for use of the system libmpdec library
9197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9198$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9199
9200# Check whether --with-system_libmpdec was given.
9201if test "${with_system_libmpdec+set}" = set; then :
9202 withval=$with_system_libmpdec;
9203else
9204 with_system_libmpdec="no"
9205fi
9206
9207
9208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9209$as_echo "$with_system_libmpdec" >&6; }
9210
Benjamin Peterson076ed002010-10-31 17:11:02 +00009211# Check for support for loadable sqlite extensions
9212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9213$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9214# Check whether --enable-loadable-sqlite-extensions was given.
9215if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9216 enableval=$enable_loadable_sqlite_extensions;
9217else
9218 enable_loadable_sqlite_extensions="no"
9219fi
9220
9221
9222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9223$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9224
Matthias Klose55708cc2009-04-30 08:06:49 +00009225# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9227$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009228
9229# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009230if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009231 withval=$with_dbmliborder;
9232if test x$with_dbmliborder = xyes
9233then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009234as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009235else
9236 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9237 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9238 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009239 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009240 fi
9241 done
9242fi
9243fi
9244
Matthias Kloseb9621712010-04-24 17:59:49 +00009245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9246$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009247
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009248# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009249
9250
Matthias Kloseb9621712010-04-24 17:59:49 +00009251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9252$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009255if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256 withval=$with_signal_module;
9257fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009258
9259
9260if test -z "$with_signal_module"
9261then with_signal_module="yes"
9262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9264$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009265
9266if test "${with_signal_module}" = "yes"; then
9267 USE_SIGNAL_MODULE=""
9268 SIGNAL_OBJS=""
9269else
9270 USE_SIGNAL_MODULE="#"
9271 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9272fi
9273
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009274# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009275
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009276USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009278
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
9280# Templates for things AC_DEFINEd more than once.
9281# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009282
9283
Martin v. Löwis11437992002-04-12 09:54:03 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9286$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009287
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009289if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290 withval=$with_threads;
9291fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009292
9293
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009294# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009297if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298 withval=$with_thread; with_threads=$with_thread
9299fi
9300
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009301
9302if test -z "$with_threads"
9303then with_threads="yes"
9304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9306$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009307
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009308
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009309if test "$with_threads" = "no"
9310then
9311 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009312elif test "$ac_cv_pthread_is_default" = yes
9313then
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009315
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009316 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009317 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009318
9319 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009321elif test "$ac_cv_kpthread" = "yes"
9322then
9323 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009324 if test "$ac_cv_cxx_thread" = "yes"; then
9325 CXX="$CXX -Kpthread"
9326 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009328
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009329 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009330 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009331elif test "$ac_cv_kthread" = "yes"
9332then
9333 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009334 if test "$ac_cv_cxx_thread" = "yes"; then
9335 CXX="$CXX -Kthread"
9336 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009338
9339 posix_threads=yes
9340 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009341elif test "$ac_cv_pthread" = "yes"
9342then
9343 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009344 if test "$ac_cv_cxx_thread" = "yes"; then
9345 CXX="$CXX -pthread"
9346 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009348
9349 posix_threads=yes
9350 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009351else
9352 if test ! -z "$with_threads" -a -d "$with_threads"
9353 then LDFLAGS="$LDFLAGS -L$with_threads"
9354 fi
9355 if test ! -z "$withval" -a -d "$withval"
9356 then LDFLAGS="$LDFLAGS -L$withval"
9357 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009358
9359 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009360 # define _POSIX_THREADS in unistd.h. Some apparently don't
9361 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9363$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009365/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009366
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009367#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009368#ifdef _POSIX_THREADS
9369yes
9370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009371
9372_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009374 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009375 unistd_defines_pthreads=yes
9376else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009377 unistd_defines_pthreads=no
9378fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009379rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009380
Matthias Kloseb9621712010-04-24 17:59:49 +00009381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9382$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009383
Matthias Kloseb9621712010-04-24 17:59:49 +00009384 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009385
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009386 # Just looking for pthread_create in libpthread is not enough:
9387 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9388 # So we really have to include pthread.h, and then link.
9389 _libs=$LIBS
9390 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9392$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009394/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009395
9396#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009397#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009398
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009399void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009400int
9401main ()
9402{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009403
9404pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ;
9406 return 0;
9407}
9408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009410
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9412$as_echo "yes" >&6; }
9413 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009414
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009415 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009416 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009417else
Martin v. Löwis11437992002-04-12 09:54:03 +00009418
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009419 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009420 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009421if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009422 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009423
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009424 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009425 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009426else
Guido van Rossumad678af1998-10-02 14:42:15 +00009427
Matthias Kloseb9621712010-04-24 17:59:49 +00009428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9429$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009430if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009431 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432else
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009434LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438/* Override any GCC internal prototype to avoid an error.
9439 Use char because int might match the return type of a GCC
9440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009441#ifdef __cplusplus
9442extern "C"
9443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009444char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009445int
9446main ()
9447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ;
9450 return 0;
9451}
9452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009455else
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009458rm -f core conftest.err conftest.$ac_objext \
9459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009460LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9463$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009464if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009465 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009466
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009467 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009468 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009469 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009470else
Greg Steinadf63d62000-07-05 10:38:09 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9473$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009474if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009475 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009476else
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009478LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482/* Override any GCC internal prototype to avoid an error.
9483 Use char because int might match the return type of a GCC
9484 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485#ifdef __cplusplus
9486extern "C"
9487#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009488char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009489int
9490main ()
9491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ;
9494 return 0;
9495}
9496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009497if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009499else
Matthias Kloseb9621712010-04-24 17:59:49 +00009500 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009502rm -f core conftest.err conftest.$ac_objext \
9503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009504LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9507$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009508if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009509 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009510
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009511 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009512 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009513 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009514else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9517$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009518if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009520else
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009522LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526/* Override any GCC internal prototype to avoid an error.
9527 Use char because int might match the return type of a GCC
9528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529#ifdef __cplusplus
9530extern "C"
9531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009532char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009533int
9534main ()
9535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ;
9538 return 0;
9539}
9540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9551$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009552if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009553 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009554
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009555 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009556 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009557 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009558else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009559
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9561$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009562if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009564else
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009566LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570/* Override any GCC internal prototype to avoid an error.
9571 Use char because int might match the return type of a GCC
9572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009573#ifdef __cplusplus
9574extern "C"
9575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009576char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009577int
9578main ()
9579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009581 ;
9582 return 0;
9583}
9584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009587else
Matthias Kloseb9621712010-04-24 17:59:49 +00009588 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009590rm -f core conftest.err conftest.$ac_objext \
9591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009592LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9595$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009596if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009598
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009599 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009600 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009601 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009602else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009603
Martin v. Löwis130fb172001-07-19 11:00:41 +00009604 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009605fi
9606
Guido van Rossum627b2d71993-12-24 10:39:16 +00009607
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009608fi
9609
Guido van Rossum0be3e491997-05-22 20:33:33 +00009610fi
9611
Guido van Rossum49545951997-12-02 19:28:29 +00009612fi
9613
Guido van Rossumb93a8621998-05-07 13:27:32 +00009614fi
9615
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009617rm -f core conftest.err conftest.$ac_objext \
9618 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009619
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9621$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009622if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009624else
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009626LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630/* Override any GCC internal prototype to avoid an error.
9631 Use char because int might match the return type of a GCC
9632 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009633#ifdef __cplusplus
9634extern "C"
9635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009636char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009637int
9638main ()
9639{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009640return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009641 ;
9642 return 0;
9643}
9644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009645if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009647else
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009650rm -f core conftest.err conftest.$ac_objext \
9651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009652LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9655$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009656if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009658
Martin v. Löwis130fb172001-07-19 11:00:41 +00009659 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009660 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009661 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009662fi
9663
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009664
Neal Norwitza978ab02002-11-02 16:58:05 +00009665 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9667$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009668if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009670else
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009672LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676/* Override any GCC internal prototype to avoid an error.
9677 Use char because int might match the return type of a GCC
9678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679#ifdef __cplusplus
9680extern "C"
9681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009682char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009683int
9684main ()
9685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ;
9688 return 0;
9689}
9690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009693else
Matthias Kloseb9621712010-04-24 17:59:49 +00009694 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009696rm -f core conftest.err conftest.$ac_objext \
9697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009698LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9701$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009702if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009704
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009705 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009706 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009707 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009708fi
9709
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009710 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009711fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009712
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009713if test "$posix_threads" = "yes"; then
9714 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009715
Matthias Kloseb9621712010-04-24 17:59:49 +00009716$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009717
9718 fi
9719
9720 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9721 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009722 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009723$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009724
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009725 ;;
9726 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009727$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009728
9729 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009730 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009731$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009732
9733 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009734 esac
9735
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9737$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009738 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009739 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009740else
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009742 ac_cv_pthread_system_supported=no
9743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009745/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009746
9747 #include <stdio.h>
9748 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009749 void *foo(void *parm) {
9750 return NULL;
9751 }
9752 main() {
9753 pthread_attr_t attr;
9754 pthread_t id;
9755 if (pthread_attr_init(&attr)) exit(-1);
9756 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9757 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9758 exit(0);
9759 }
9760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009761if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009762 ac_cv_pthread_system_supported=yes
9763else
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009768fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770
Guido van Rossum627b2d71993-12-24 10:39:16 +00009771fi
9772
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9774$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009775 if test "$ac_cv_pthread_system_supported" = "yes"; then
9776
Matthias Kloseb9621712010-04-24 17:59:49 +00009777$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009778
9779 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 for ac_func in pthread_sigmask
9781do :
9782 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009783if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009784 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009785#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009786_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009787 case $ac_sys_system in
9788 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009789
Matthias Kloseb9621712010-04-24 17:59:49 +00009790$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009791
9792 ;;
9793 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009794fi
9795done
9796
Christian Heimesf77b4b22013-08-21 13:26:05 +02009797 for ac_func in pthread_atfork
9798do :
9799 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9800if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9801 cat >>confdefs.h <<_ACEOF
9802#define HAVE_PTHREAD_ATFORK 1
9803_ACEOF
9804
9805fi
9806done
9807
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009808fi
9809
9810
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009811# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009812
Matthias Kloseb9621712010-04-24 17:59:49 +00009813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9814$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009816if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009817 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009818 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821 ipv6=no
9822 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9824$as_echo "yes" >&6; }
9825 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009826
9827 ipv6=yes
9828 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009830else
Martin v. Löwis11437992002-04-12 09:54:03 +00009831
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009834 /* AF_INET6 available check */
9835#include <sys/types.h>
9836#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009837int
9838main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009839{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009840int domain = AF_INET6;
9841 ;
9842 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009843}
Martin v. Löwis11437992002-04-12 09:54:03 +00009844_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009845if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009846
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9848$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009849 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009851else
Matthias Kloseb159a552010-04-25 21:00:44 +00009852
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9854$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009855 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009856
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009857fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009860if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9862$as_echo_n "checking if RFC2553 API is available... " >&6; }
9863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009864/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009865
9866 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009867#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009868int
9869main ()
9870{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009871struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009872 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ;
9874 return 0;
9875}
Matthias Kloseb159a552010-04-25 21:00:44 +00009876
Martin v. Löwis11437992002-04-12 09:54:03 +00009877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009878if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009879
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009881$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009882 ipv6=yes
9883
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009884else
Matthias Kloseb159a552010-04-25 21:00:44 +00009885
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009887$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009888 ipv6=no
9889
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009892fi
9893
9894if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009896
9897fi
9898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009899fi
9900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009901
9902ipv6type=unknown
9903ipv6lib=none
9904ipv6trylibc=no
9905
9906if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9908$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009909 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9910 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911 case $i in
9912 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009914/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009915
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916#include <netinet/in.h>
9917#ifdef IPV6_INRIA_VERSION
9918yes
9919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009920_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009923 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009924fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009925rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009926
9927 ;;
9928 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009930/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009931
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009932#include <netinet/in.h>
9933#ifdef __KAME__
9934yes
9935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009936_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009939 ipv6type=$i;
9940 ipv6lib=inet6
9941 ipv6libdir=/usr/local/v6/lib
9942 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009943fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009944rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009945
9946 ;;
9947 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009949/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951#include <features.h>
9952#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9953yes
9954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009955_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009958 ipv6type=$i;
9959 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009960fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009961rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009962
9963 ;;
9964 linux-inet6)
9965 if test -d /usr/inet6; then
9966 ipv6type=$i
9967 ipv6lib=inet6
9968 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009969 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009970 fi
9971 ;;
9972 solaris)
9973 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009974 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009975 ipv6type=$i
9976 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009977 fi
9978 fi
9979 ;;
9980 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009982/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009984#include <sys/param.h>
9985#ifdef _TOSHIBA_INET6
9986yes
9987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009988_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009991 ipv6type=$i;
9992 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009993 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009994fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009995rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009996
9997 ;;
9998 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010000/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010001
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010002#include </usr/local/v6/include/sys/v6config.h>
10003#ifdef __V6D__
10004yes
10005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010006_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010008 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010009 ipv6type=$i;
10010 ipv6lib=v6;
10011 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010012 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010013fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010014rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010015
10016 ;;
10017 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010019/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010020
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010021#include <sys/param.h>
10022#ifdef _ZETA_MINAMI_INET6
10023yes
10024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010025_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010028 ipv6type=$i;
10029 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010030 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010031fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010032rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010033
10034 ;;
10035 esac
10036 if test "$ipv6type" != "unknown"; then
10037 break
10038 fi
10039 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10041$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010042fi
10043
10044if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10045 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10046 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10047 echo "using lib$ipv6lib"
10048 else
10049 if test $ipv6trylibc = "yes"; then
10050 echo "using libc"
10051 else
10052 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10053 echo "You need to fetch lib$ipv6lib.a from appropriate"
10054 echo 'ipv6 kit and compile beforehand.'
10055 exit 1
10056 fi
10057 fi
10058fi
10059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10061$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010063/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010064
10065 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010066int
10067main ()
10068{
10069FSIORefNum fRef = 0
10070 ;
10071 return 0;
10072}
Matthias Kloseb159a552010-04-25 21:00:44 +000010073
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010075if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010076
Matthias Kloseb159a552010-04-25 21:00:44 +000010077
Matthias Kloseb9621712010-04-24 17:59:49 +000010078$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010079
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10081$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010082
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010083else
Matthias Kloseb159a552010-04-25 21:00:44 +000010084
Matthias Kloseb9621712010-04-24 17:59:49 +000010085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10086$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010087
10088fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10090
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010091# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10093$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010096if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097 withval=$with_doc_strings;
10098fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010099
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010100
10101if test -z "$with_doc_strings"
10102then with_doc_strings="yes"
10103fi
10104if test "$with_doc_strings" != "no"
10105then
10106
Matthias Kloseb9621712010-04-24 17:59:49 +000010107$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010108
10109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10111$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010112
Antoine Pitrou042b1282010-08-13 21:15:58 +000010113# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10115$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010118if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010120if test "$withval" != no
10121then
10122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010124
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10126$as_echo "yes" >&6; }
10127else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10128$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010129fi
10130else
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133fi
10134
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010135
10136# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10138$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010141if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142 withval=$with_pymalloc;
10143fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010144
Neil Schemenauera35c6882001-02-27 04:45:05 +000010145
Neil Schemenauer16c22972002-03-22 15:34:49 +000010146if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010147then
10148 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010149fi
10150if test "$with_pymalloc" != "no"
10151then
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
Matthias Kloseb9621712010-04-24 17:59:49 +000010153$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010154
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010155 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10158$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010159
Benjamin Peterson05159c42009-12-03 03:01:27 +000010160# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10162$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010163
10164# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010165if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010166 withval=$with_valgrind;
10167else
10168 with_valgrind=no
10169fi
10170
Matthias Kloseb9621712010-04-24 17:59:49 +000010171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10172$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010173if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 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 +020010175if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010176
Matthias Kloseb9621712010-04-24 17:59:49 +000010177$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010178
10179else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010180 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010181
10182fi
10183
10184
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010185 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010186fi
10187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010188# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010189
Guido van Rossum98935bf2001-09-05 19:13:16 +000010190DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010191
Guido van Rossume97ee181999-12-20 21:27:22 +000010192# the dlopen() function means we might want to use dynload_shlib.o. some
10193# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010194for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010195do :
10196 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010197if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010199#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010200_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010201
Guido van Rossume97ee181999-12-20 21:27:22 +000010202fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010203done
Guido van Rossume97ee181999-12-20 21:27:22 +000010204
Michael W. Hudson54241132001-12-07 15:38:26 +000010205
Guido van Rossume97ee181999-12-20 21:27:22 +000010206# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10207# loading of modules.
10208
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10210$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010211if test -z "$DYNLOADFILE"
10212then
10213 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010214 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10215 if test "$ac_cv_func_dlopen" = yes
10216 then DYNLOADFILE="dynload_shlib.o"
10217 else DYNLOADFILE="dynload_aix.o"
10218 fi
10219 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010220 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010221 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10222 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010223 *)
10224 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10225 # out any dynamic loading
10226 if test "$ac_cv_func_dlopen" = yes
10227 then DYNLOADFILE="dynload_shlib.o"
10228 else DYNLOADFILE="dynload_stub.o"
10229 fi
10230 ;;
10231 esac
10232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10234$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010235if test "$DYNLOADFILE" != "dynload_stub.o"
10236then
Martin v. Löwis11437992002-04-12 09:54:03 +000010237
Matthias Kloseb9621712010-04-24 17:59:49 +000010238$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010239
10240fi
10241
Neil Schemenauer4e425612001-06-19 15:44:15 +000010242# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10243
Michael W. Hudson54241132001-12-07 15:38:26 +000010244
Matthias Kloseb9621712010-04-24 17:59:49 +000010245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10246$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010247if test -z "$MACHDEP_OBJS"
10248then
Jack Jansene578a632001-08-15 01:27:14 +000010249 MACHDEP_OBJS=$extra_machdep_objs
10250else
10251 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010252fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010253if test -z "$MACHDEP_OBJS"; then
10254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10255$as_echo "none" >&6; }
10256else
10257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10258$as_echo "$MACHDEP_OBJS" >&6; }
10259fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010260
Guido van Rossum627b2d71993-12-24 10:39:16 +000010261# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010262for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010263 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010264 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010265 futimens futimes gai_strerror \
10266 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010267 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010268 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010269 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10270 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010271 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010272 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010273 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010274 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010275 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010276 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010277 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10278 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010279 sigaction sigaltstack siginterrupt sigpending sigrelse \
10280 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010281 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010282 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10283 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010284do :
10285 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10286ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010287if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010289#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010290_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010291
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010292fi
10293done
10294
Michael W. Hudson54241132001-12-07 15:38:26 +000010295
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010296ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10297 #include <dirent.h>
10298"
10299if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10300
10301$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10302
10303fi
10304
10305
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010306# For some functions, having a definition is not sufficient, since
10307# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10309$as_echo_n "checking for chroot... " >&6; }
10310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010311/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010312#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010313int
10314main ()
10315{
10316void *x=chroot
10317 ;
10318 return 0;
10319}
10320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010324
Matthias Kloseb159a552010-04-25 21:00:44 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010330
10331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10334$as_echo_n "checking for link... " >&6; }
10335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010337#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010338int
10339main ()
10340{
10341void *x=link
10342 ;
10343 return 0;
10344}
10345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010349
Matthias Kloseb159a552010-04-25 21:00:44 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010351$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010352else
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010355
10356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10359$as_echo_n "checking for symlink... " >&6; }
10360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010362#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010363int
10364main ()
10365{
10366void *x=symlink
10367 ;
10368 return 0;
10369}
10370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010374
Matthias Kloseb159a552010-04-25 21:00:44 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010376$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010377else
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10379$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010380
10381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10384$as_echo_n "checking for fchdir... " >&6; }
10385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010386/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010387#include <unistd.h>
10388int
10389main ()
10390{
10391void *x=fchdir
10392 ;
10393 return 0;
10394}
10395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010397
Matthias Kloseb9621712010-04-24 17:59:49 +000010398$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010399
Matthias Kloseb159a552010-04-25 21:00:44 +000010400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010401$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010402else
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010405
10406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10409$as_echo_n "checking for fsync... " >&6; }
10410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010411/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010412#include <unistd.h>
10413int
10414main ()
10415{
10416void *x=fsync
10417 ;
10418 return 0;
10419}
10420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010422
Matthias Kloseb9621712010-04-24 17:59:49 +000010423$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010424
Matthias Kloseb159a552010-04-25 21:00:44 +000010425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010426$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010427else
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10429$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010430
10431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10434$as_echo_n "checking for fdatasync... " >&6; }
10435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010436/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010437#include <unistd.h>
10438int
10439main ()
10440{
10441void *x=fdatasync
10442 ;
10443 return 0;
10444}
10445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010447
Matthias Kloseb9621712010-04-24 17:59:49 +000010448$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010449
Matthias Kloseb159a552010-04-25 21:00:44 +000010450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010451$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010452else
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10454$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010455
10456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10459$as_echo_n "checking for epoll... " >&6; }
10460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010461/* end confdefs.h. */
10462#include <sys/epoll.h>
10463int
10464main ()
10465{
10466void *x=epoll_create
10467 ;
10468 return 0;
10469}
10470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010471if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010472
Matthias Kloseb9621712010-04-24 17:59:49 +000010473$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010474
Matthias Kloseb159a552010-04-25 21:00:44 +000010475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010476$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010477else
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10479$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010480
10481fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10484$as_echo_n "checking for epoll_create1... " >&6; }
10485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10486/* end confdefs.h. */
10487#include <sys/epoll.h>
10488int
10489main ()
10490{
10491void *x=epoll_create1
10492 ;
10493 return 0;
10494}
10495_ACEOF
10496if ac_fn_c_try_compile "$LINENO"; then :
10497
10498$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10499
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10501$as_echo "yes" >&6; }
10502else
10503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505
10506fi
10507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10509$as_echo_n "checking for kqueue... " >&6; }
10510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010511/* end confdefs.h. */
10512
10513#include <sys/types.h>
10514#include <sys/event.h>
10515
10516int
10517main ()
10518{
10519int x=kqueue()
10520 ;
10521 return 0;
10522}
10523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010524if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010525
Matthias Kloseb9621712010-04-24 17:59:49 +000010526$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010527
Matthias Kloseb159a552010-04-25 21:00:44 +000010528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010529$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010530else
Matthias Kloseb9621712010-04-24 17:59:49 +000010531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10532$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010533
10534fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010536# On some systems (eg. FreeBSD 5), we would find a definition of the
10537# functions ctermid_r, setgroups in the library, but no prototype
10538# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10539# address to avoid compiler warnings and potential miscompilations
10540# because of the missing prototypes.
10541
Matthias Kloseb9621712010-04-24 17:59:49 +000010542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10543$as_echo_n "checking for ctermid_r... " >&6; }
10544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010545/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010546
Martin v. Löwisd5843682002-11-21 20:41:28 +000010547#include <stdio.h>
10548
Martin v. Löwisd5843682002-11-21 20:41:28 +000010549int
10550main ()
10551{
10552void* p = ctermid_r
10553 ;
10554 return 0;
10555}
10556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010558
Matthias Kloseb9621712010-04-24 17:59:49 +000010559$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010560
Matthias Kloseb159a552010-04-25 21:00:44 +000010561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010562$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010563else
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10565$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010566
10567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10569
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10571$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010572if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010573 $as_echo_n "(cached) " >&6
10574else
10575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010576/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010577#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010578int
10579main ()
10580{
10581void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010582
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010583 ;
10584 return 0;
10585}
10586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010587if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010588 ac_cv_flock_decl=yes
10589else
10590 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010591
10592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010594
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010595fi
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10597$as_echo "$ac_cv_flock_decl" >&6; }
10598if test "x${ac_cv_flock_decl}" = xyes; then
10599 for ac_func in flock
10600do :
10601 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010602if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010603 cat >>confdefs.h <<_ACEOF
10604#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010605_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010606
Antoine Pitroua3000072010-09-07 14:52:42 +000010607else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010609$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010610if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010611 $as_echo_n "(cached) " >&6
10612else
10613 ac_check_lib_save_LIBS=$LIBS
10614LIBS="-lbsd $LIBS"
10615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10616/* end confdefs.h. */
10617
10618/* Override any GCC internal prototype to avoid an error.
10619 Use char because int might match the return type of a GCC
10620 builtin and then its argument prototype would still apply. */
10621#ifdef __cplusplus
10622extern "C"
10623#endif
10624char flock ();
10625int
10626main ()
10627{
10628return flock ();
10629 ;
10630 return 0;
10631}
10632_ACEOF
10633if ac_fn_c_try_link "$LINENO"; then :
10634 ac_cv_lib_bsd_flock=yes
10635else
10636 ac_cv_lib_bsd_flock=no
10637fi
10638rm -f core conftest.err conftest.$ac_objext \
10639 conftest$ac_exeext conftest.$ac_ext
10640LIBS=$ac_check_lib_save_LIBS
10641fi
10642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10643$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010644if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010645 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010646
10647
10648$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10649
10650
10651fi
10652
10653
10654fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010655done
10656
Antoine Pitroua3000072010-09-07 14:52:42 +000010657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10660$as_echo_n "checking for getpagesize... " >&6; }
10661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010662/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010663
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010664#include <unistd.h>
10665
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010666int
10667main ()
10668{
10669void* p = getpagesize
10670 ;
10671 return 0;
10672}
10673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010677
Matthias Kloseb159a552010-04-25 21:00:44 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010679$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010680else
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10682$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010683
10684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010686
Victor Stinner984890f2011-11-24 13:53:38 +010010687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10688$as_echo_n "checking for broken unsetenv... " >&6; }
10689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10690/* end confdefs.h. */
10691
10692#include <stdlib.h>
10693
10694int
10695main ()
10696{
10697int res = unsetenv("DUMMY")
10698 ;
10699 return 0;
10700}
10701_ACEOF
10702if ac_fn_c_try_compile "$LINENO"; then :
10703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
10705else
10706
10707$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10708
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10710$as_echo "yes" >&6; }
10711
10712fi
10713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10714
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010715for ac_prog in true
10716do
10717 # Extract the first word of "$ac_prog", so it can be a program name with args.
10718set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10720$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010721if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010723else
10724 if test -n "$TRUE"; then
10725 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10726else
10727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10728for as_dir in $PATH
10729do
10730 IFS=$as_save_IFS
10731 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010734 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 $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 +000010736 break 2
10737 fi
10738done
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010741
10742fi
10743fi
10744TRUE=$ac_cv_prog_TRUE
10745if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10747$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010748else
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10750$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010751fi
10752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010754 test -n "$TRUE" && break
10755done
10756test -n "$TRUE" || TRUE="/bin/true"
10757
10758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10760$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010761if ${ac_cv_lib_c_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="-lc $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_c_inet_aton=yes
10786else
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 ac_cv_lib_c_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_c_inet_aton" >&5
10794$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010795if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010796 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010797else
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10799$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010800if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010802else
10803 ac_check_lib_save_LIBS=$LIBS
10804LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010806/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010808/* Override any GCC internal prototype to avoid an error.
10809 Use char because int might match the return type of a GCC
10810 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010811#ifdef __cplusplus
10812extern "C"
10813#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010814char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010815int
10816main ()
10817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010819 ;
10820 return 0;
10821}
10822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010823if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010824 ac_cv_lib_resolv_inet_aton=yes
10825else
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010828rm -f core conftest.err conftest.$ac_objext \
10829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010830LIBS=$ac_check_lib_save_LIBS
10831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10833$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010834if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010835 cat >>confdefs.h <<_ACEOF
10836#define HAVE_LIBRESOLV 1
10837_ACEOF
10838
10839 LIBS="-lresolv $LIBS"
10840
10841fi
10842
10843
10844fi
10845
10846
Christian Heimesd0764e22007-12-04 15:00:33 +000010847# On Tru64, chflags seems to be present, but calling it will
10848# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10850$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010851if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010853else
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010855 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010856else
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010858/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010859
Christian Heimesd0764e22007-12-04 15:00:33 +000010860#include <sys/stat.h>
10861#include <unistd.h>
10862int main(int argc, char*argv[])
10863{
10864 if(chflags(argv[0], 0) != 0)
10865 return 1;
10866 return 0;
10867}
Ned Deily3eb67d52011-06-28 00:00:28 -070010868
Christian Heimesd0764e22007-12-04 15:00:33 +000010869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010870if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010871 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010872else
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10876 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010877fi
10878
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010879
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10882$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010883if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010885if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010886 ac_cv_have_chflags="yes"
10887else
10888 ac_cv_have_chflags="no"
10889fi
10890
10891fi
10892if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010893
Matthias Kloseb9621712010-04-24 17:59:49 +000010894$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010895
10896fi
10897
Matthias Kloseb9621712010-04-24 17:59:49 +000010898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10899$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010900if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010901 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010902else
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010904 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010905else
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010907/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010908
Christian Heimesd0764e22007-12-04 15:00:33 +000010909#include <sys/stat.h>
10910#include <unistd.h>
10911int main(int argc, char*argv[])
10912{
10913 if(lchflags(argv[0], 0) != 0)
10914 return 1;
10915 return 0;
10916}
Ned Deily3eb67d52011-06-28 00:00:28 -070010917
Christian Heimesd0764e22007-12-04 15:00:33 +000010918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010919if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010920 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010921else
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010926fi
10927
10928
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10931$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010932if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010934if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010935 ac_cv_have_lchflags="yes"
10936else
10937 ac_cv_have_lchflags="no"
10938fi
10939
10940fi
10941if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010944
10945fi
10946
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010947case $ac_sys_system/$ac_sys_release in
10948Darwin/*)
10949 _CUR_CFLAGS="${CFLAGS}"
10950 _CUR_LDFLAGS="${LDFLAGS}"
10951 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10952 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10953 ;;
10954esac
10955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10957$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010958if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010960else
10961 ac_check_lib_save_LIBS=$LIBS
10962LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010964/* end confdefs.h. */
10965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966/* Override any GCC internal prototype to avoid an error.
10967 Use char because int might match the return type of a GCC
10968 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010969#ifdef __cplusplus
10970extern "C"
10971#endif
10972char inflateCopy ();
10973int
10974main ()
10975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010976return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010977 ;
10978 return 0;
10979}
10980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010981if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010982 ac_cv_lib_z_inflateCopy=yes
10983else
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010986rm -f core conftest.err conftest.$ac_objext \
10987 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010988LIBS=$ac_check_lib_save_LIBS
10989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10991$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010992if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010995
10996fi
10997
10998
10999case $ac_sys_system/$ac_sys_release in
11000Darwin/*)
11001 CFLAGS="${_CUR_CFLAGS}"
11002 LDFLAGS="${_CUR_LDFLAGS}"
11003 ;;
11004esac
11005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11007$as_echo_n "checking for hstrerror... " >&6; }
11008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011009/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011010
Martin v. Löwise9416172003-05-03 10:12:45 +000011011#include <netdb.h>
11012
Martin v. Löwise9416172003-05-03 10:12:45 +000011013int
11014main ()
11015{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011016void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011017 ;
11018 return 0;
11019}
11020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011021if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011024
Matthias Kloseb159a552010-04-25 21:00:44 +000011025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011027else
Matthias Kloseb9621712010-04-24 17:59:49 +000011028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11029$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011030
11031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011032rm -f core conftest.err conftest.$ac_objext \
11033 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11036$as_echo_n "checking for inet_aton... " >&6; }
11037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011038/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011039
Martin v. Löwis86d66262006-02-17 08:40:11 +000011040#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011041#include <sys/socket.h>
11042#include <netinet/in.h>
11043#include <arpa/inet.h>
11044
Martin v. Löwise9416172003-05-03 10:12:45 +000011045int
11046main ()
11047{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011048void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011049 ;
11050 return 0;
11051}
11052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011054
Matthias Kloseb9621712010-04-24 17:59:49 +000011055$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011056
Matthias Kloseb159a552010-04-25 21:00:44 +000011057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011058$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011059else
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11061$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011062
11063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011064rm -f core conftest.err conftest.$ac_objext \
11065 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11068$as_echo_n "checking for inet_pton... " >&6; }
11069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011070/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011071
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011072#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011073#include <sys/socket.h>
11074#include <netinet/in.h>
11075#include <arpa/inet.h>
11076
Martin v. Löwise9416172003-05-03 10:12:45 +000011077int
11078main ()
11079{
11080void* p = inet_pton
11081 ;
11082 return 0;
11083}
11084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011085if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011086
Matthias Kloseb9621712010-04-24 17:59:49 +000011087$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011088
Matthias Kloseb159a552010-04-25 21:00:44 +000011089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011090$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011091else
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11093$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011094
11095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011097
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011098# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11100$as_echo_n "checking for setgroups... " >&6; }
11101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011103
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011104#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011105#ifdef HAVE_GRP_H
11106#include <grp.h>
11107#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011108
Martin v. Löwisd5843682002-11-21 20:41:28 +000011109int
11110main ()
11111{
11112void* p = setgroups
11113 ;
11114 return 0;
11115}
11116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011117if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011118
Matthias Kloseb9621712010-04-24 17:59:49 +000011119$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011120
Matthias Kloseb159a552010-04-25 21:00:44 +000011121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011122$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011123else
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11125$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011126
11127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011129
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011130# check for openpty and forkpty
11131
11132for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011133do :
11134 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011135if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011137#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011138_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011139
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011140else
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11142$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011143if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011145else
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011147LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011151/* Override any GCC internal prototype to avoid an error.
11152 Use char because int might match the return type of a GCC
11153 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011154#ifdef __cplusplus
11155extern "C"
11156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011157char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011158int
11159main ()
11160{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011161return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 ;
11163 return 0;
11164}
11165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011166if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011168else
Matthias Kloseb9621712010-04-24 17:59:49 +000011169 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011171rm -f core conftest.err conftest.$ac_objext \
11172 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011173LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11176$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011177if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011179 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011180else
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11182$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011183if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011185else
11186 ac_check_lib_save_LIBS=$LIBS
11187LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011189/* end confdefs.h. */
11190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191/* Override any GCC internal prototype to avoid an error.
11192 Use char because int might match the return type of a GCC
11193 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011194#ifdef __cplusplus
11195extern "C"
11196#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011197char openpty ();
11198int
11199main ()
11200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011202 ;
11203 return 0;
11204}
11205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011206if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011207 ac_cv_lib_bsd_openpty=yes
11208else
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011211rm -f core conftest.err conftest.$ac_objext \
11212 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011213LIBS=$ac_check_lib_save_LIBS
11214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11216$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011217if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011218 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011219 LIBS="$LIBS -lbsd"
11220fi
11221
11222
11223fi
11224
Fred Drake8cef4cf2000-06-28 16:40:38 +000011225
11226fi
11227done
11228
11229for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011230do :
11231 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011232if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011234#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011235_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011236
Fred Drake8cef4cf2000-06-28 16:40:38 +000011237else
Matthias Kloseb9621712010-04-24 17:59:49 +000011238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11239$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011240if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011242else
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011244LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248/* Override any GCC internal prototype to avoid an error.
11249 Use char because int might match the return type of a GCC
11250 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011251#ifdef __cplusplus
11252extern "C"
11253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011254char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011255int
11256main ()
11257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 ;
11260 return 0;
11261}
11262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011263if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011265else
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011268rm -f core conftest.err conftest.$ac_objext \
11269 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011270LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11273$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011274if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011275 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011276 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011277else
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11279$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011280if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011282else
11283 ac_check_lib_save_LIBS=$LIBS
11284LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011286/* end confdefs.h. */
11287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011288/* Override any GCC internal prototype to avoid an error.
11289 Use char because int might match the return type of a GCC
11290 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011291#ifdef __cplusplus
11292extern "C"
11293#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011294char forkpty ();
11295int
11296main ()
11297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011304 ac_cv_lib_bsd_forkpty=yes
11305else
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011308rm -f core conftest.err conftest.$ac_objext \
11309 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011310LIBS=$ac_check_lib_save_LIBS
11311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11313$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011314if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011316 LIBS="$LIBS -lbsd"
11317fi
11318
11319
11320fi
11321
Fred Drake8cef4cf2000-06-28 16:40:38 +000011322
11323fi
11324done
11325
Jack Jansendd19cf82001-12-06 22:36:17 +000011326
Christian Heimesb186d002008-03-18 15:15:01 +000011327# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011328for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011329do :
11330 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011331if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011332 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011334_ACEOF
11335
11336fi
11337done
11338
11339
Michael W. Hudson54241132001-12-07 15:38:26 +000011340# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011341for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011342do :
11343 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11344ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011345if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011347#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011348_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011349
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011350fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011351done
11352
Michael W. Hudson54241132001-12-07 15:38:26 +000011353
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011354ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011355if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011356 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011357
Martin v. Löwis1142de32002-03-29 16:28:31 +000011358else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011359 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011360 *" dup2.$ac_objext "* ) ;;
11361 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011362 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011363esac
11364
Martin v. Löwis1142de32002-03-29 16:28:31 +000011365fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011366
11367ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011368if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011369 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11370
11371else
11372 case " $LIBOBJS " in
11373 *" getcwd.$ac_objext "* ) ;;
11374 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11375 ;;
11376esac
11377
11378fi
11379
11380ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011381if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011382 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11383
11384else
11385 case " $LIBOBJS " in
11386 *" strdup.$ac_objext "* ) ;;
11387 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11388 ;;
11389esac
11390
11391fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011392
11393
11394for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011395do :
11396 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011397if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011399#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011402/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011403#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011404int
11405main ()
11406{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011407getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 ;
11409 return 0;
11410}
11411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011415
Guido van Rossum627b2d71993-12-24 10:39:16 +000011416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011418
Guido van Rossum627b2d71993-12-24 10:39:16 +000011419fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011420done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011421
Jack Jansen150753c2003-03-29 22:07:47 +000011422for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011423do :
11424 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011425if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011426 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011427#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011430/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011431#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011432int
11433main ()
11434{
11435setpgrp(0,0);
11436 ;
11437 return 0;
11438}
11439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011440if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011441
Matthias Kloseb9621712010-04-24 17:59:49 +000011442$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011443
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011446
11447fi
11448done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011449
Thomas Wouters3a584202000-08-05 23:28:51 +000011450for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011451do :
11452 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011453if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011455#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011458/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011460int
11461main ()
11462{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011463gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 ;
11465 return 0;
11466}
11467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011468if ac_fn_c_try_compile "$LINENO"; then :
11469
Guido van Rossum627b2d71993-12-24 10:39:16 +000011470else
Skip Montanaro6dead952003-09-25 14:50:04 +000011471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011473
Martin v. Löwis11437992002-04-12 09:54:03 +000011474
Guido van Rossum627b2d71993-12-24 10:39:16 +000011475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011477
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011478fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011479done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011480
Michael W. Hudson54241132001-12-07 15:38:26 +000011481
Victor Stinnere0be4232011-10-25 13:06:09 +020011482for ac_func in clock_gettime
11483do :
11484 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11485if test "x$ac_cv_func_clock_gettime" = xyes; then :
11486 cat >>confdefs.h <<_ACEOF
11487#define HAVE_CLOCK_GETTIME 1
11488_ACEOF
11489
11490else
11491
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11493$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11494if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11495 $as_echo_n "(cached) " >&6
11496else
11497 ac_check_lib_save_LIBS=$LIBS
11498LIBS="-lrt $LIBS"
11499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11500/* end confdefs.h. */
11501
11502/* Override any GCC internal prototype to avoid an error.
11503 Use char because int might match the return type of a GCC
11504 builtin and then its argument prototype would still apply. */
11505#ifdef __cplusplus
11506extern "C"
11507#endif
11508char clock_gettime ();
11509int
11510main ()
11511{
11512return clock_gettime ();
11513 ;
11514 return 0;
11515}
11516_ACEOF
11517if ac_fn_c_try_link "$LINENO"; then :
11518 ac_cv_lib_rt_clock_gettime=yes
11519else
11520 ac_cv_lib_rt_clock_gettime=no
11521fi
11522rm -f core conftest.err conftest.$ac_objext \
11523 conftest$ac_exeext conftest.$ac_ext
11524LIBS=$ac_check_lib_save_LIBS
11525fi
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11527$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11528if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11529
11530 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11531
11532
11533$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11534
11535
11536fi
11537
11538
11539fi
11540done
11541
11542
11543for ac_func in clock_getres
11544do :
11545 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11546if test "x$ac_cv_func_clock_getres" = xyes; then :
11547 cat >>confdefs.h <<_ACEOF
11548#define HAVE_CLOCK_GETRES 1
11549_ACEOF
11550
11551else
11552
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11554$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11555if ${ac_cv_lib_rt_clock_getres+:} false; then :
11556 $as_echo_n "(cached) " >&6
11557else
11558 ac_check_lib_save_LIBS=$LIBS
11559LIBS="-lrt $LIBS"
11560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11561/* end confdefs.h. */
11562
11563/* Override any GCC internal prototype to avoid an error.
11564 Use char because int might match the return type of a GCC
11565 builtin and then its argument prototype would still apply. */
11566#ifdef __cplusplus
11567extern "C"
11568#endif
11569char clock_getres ();
11570int
11571main ()
11572{
11573return clock_getres ();
11574 ;
11575 return 0;
11576}
11577_ACEOF
11578if ac_fn_c_try_link "$LINENO"; then :
11579 ac_cv_lib_rt_clock_getres=yes
11580else
11581 ac_cv_lib_rt_clock_getres=no
11582fi
11583rm -f core conftest.err conftest.$ac_objext \
11584 conftest$ac_exeext conftest.$ac_ext
11585LIBS=$ac_check_lib_save_LIBS
11586fi
11587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11588$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11589if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11590
11591 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11592
11593
11594fi
11595
11596
11597fi
11598done
11599
11600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11602$as_echo_n "checking for major... " >&6; }
11603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011604/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011605
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011606#if defined(MAJOR_IN_MKDEV)
11607#include <sys/mkdev.h>
11608#elif defined(MAJOR_IN_SYSMACROS)
11609#include <sys/sysmacros.h>
11610#else
11611#include <sys/types.h>
11612#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011613
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011614int
11615main ()
11616{
11617
11618 makedev(major(0),minor(0));
11619
11620 ;
11621 return 0;
11622}
11623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011625
11626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11630$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011631
11632else
Skip Montanaro6dead952003-09-25 14:50:04 +000011633
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11635$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011636
11637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011638rm -f core conftest.err conftest.$ac_objext \
11639 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011640
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011641# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011642# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11644$as_echo_n "checking for getaddrinfo... " >&6; }
11645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011647
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011648#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011649#include <sys/socket.h>
11650#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011651#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011652
Martin v. Löwis11437992002-04-12 09:54:03 +000011653int
11654main ()
11655{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011656getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 ;
11658 return 0;
11659}
11660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011661if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011662 have_getaddrinfo=yes
11663else
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011666rm -f core conftest.err conftest.$ac_objext \
11667 conftest$ac_exeext conftest.$ac_ext
11668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11669$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011670if test $have_getaddrinfo = yes
11671then
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11673$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011674 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011676else
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011678
11679if test "${enable_ipv6+set}" = set; then
11680 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11681else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011682 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011683fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011684else
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011686/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011687
Stefan Krah19c21392012-11-22 23:47:32 +010011688#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011689#include <sys/types.h>
11690#include <netdb.h>
11691#include <string.h>
11692#include <sys/socket.h>
11693#include <netinet/in.h>
11694
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011695int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011696{
11697 int passive, gaierr, inet4 = 0, inet6 = 0;
11698 struct addrinfo hints, *ai, *aitop;
11699 char straddr[INET6_ADDRSTRLEN], strport[16];
11700
11701 for (passive = 0; passive <= 1; passive++) {
11702 memset(&hints, 0, sizeof(hints));
11703 hints.ai_family = AF_UNSPEC;
11704 hints.ai_flags = passive ? AI_PASSIVE : 0;
11705 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011706 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011707 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11708 (void)gai_strerror(gaierr);
11709 goto bad;
11710 }
11711 for (ai = aitop; ai; ai = ai->ai_next) {
11712 if (ai->ai_addr == NULL ||
11713 ai->ai_addrlen == 0 ||
11714 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11715 straddr, sizeof(straddr), strport, sizeof(strport),
11716 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11717 goto bad;
11718 }
11719 switch (ai->ai_family) {
11720 case AF_INET:
11721 if (strcmp(strport, "54321") != 0) {
11722 goto bad;
11723 }
11724 if (passive) {
11725 if (strcmp(straddr, "0.0.0.0") != 0) {
11726 goto bad;
11727 }
11728 } else {
11729 if (strcmp(straddr, "127.0.0.1") != 0) {
11730 goto bad;
11731 }
11732 }
11733 inet4++;
11734 break;
11735 case AF_INET6:
11736 if (strcmp(strport, "54321") != 0) {
11737 goto bad;
11738 }
11739 if (passive) {
11740 if (strcmp(straddr, "::") != 0) {
11741 goto bad;
11742 }
11743 } else {
11744 if (strcmp(straddr, "::1") != 0) {
11745 goto bad;
11746 }
11747 }
11748 inet6++;
11749 break;
11750 case AF_UNSPEC:
11751 goto bad;
11752 break;
11753 default:
11754 /* another family support? */
11755 break;
11756 }
11757 }
11758 }
11759
11760 if (!(inet4 == 0 || inet4 == 2))
11761 goto bad;
11762 if (!(inet6 == 0 || inet6 == 2))
11763 goto bad;
11764
11765 if (aitop)
11766 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011767 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011768
11769 bad:
11770 if (aitop)
11771 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011772 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011773}
11774
Martin v. Löwis11437992002-04-12 09:54:03 +000011775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011776if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011777 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011778else
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011784
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011785fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011786
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011788
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11790$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11791
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011792if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011793then
11794 if test $ipv6 = yes
11795 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011796 echo 'Fatal: You must get working getaddrinfo() function.'
11797 echo ' or you can specify "--disable-ipv6"'.
11798 exit 1
11799 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011800else
Martin v. Löwis11437992002-04-12 09:54:03 +000011801
Matthias Kloseb9621712010-04-24 17:59:49 +000011802$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011803
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011804fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011805
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011806for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011807do :
11808 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011809if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011811#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011812_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011813
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011814fi
11815done
11816
Michael W. Hudson54241132001-12-07 15:38:26 +000011817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011818# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11820$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011821if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011825/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011826#include <sys/types.h>
11827#include <sys/time.h>
11828#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011829
Martin v. Löwis11437992002-04-12 09:54:03 +000011830int
11831main ()
11832{
11833if ((struct tm *) 0)
11834return 0;
11835 ;
11836 return 0;
11837}
11838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011839if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011840 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011841else
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11847$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011848if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011851
11852fi
11853
Matthias Kloseb9621712010-04-24 17:59:49 +000011854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11855$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011856if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011858else
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011860/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011861#include <sys/types.h>
11862#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011863
Martin v. Löwis11437992002-04-12 09:54:03 +000011864int
11865main ()
11866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011867struct tm tm;
11868 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011870 ;
11871 return 0;
11872}
11873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011874if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011875 ac_cv_struct_tm=time.h
11876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11882$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011883if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011886
11887fi
11888
Matthias Kloseb9621712010-04-24 17:59:49 +000011889ac_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 +000011890#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892"
Victor Stinnere0be4232011-10-25 13:06:09 +020011893if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011894
11895cat >>confdefs.h <<_ACEOF
11896#define HAVE_STRUCT_TM_TM_ZONE 1
11897_ACEOF
11898
11899
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011900fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011901
Martin v. Löwis11437992002-04-12 09:54:03 +000011902if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11903
Matthias Kloseb9621712010-04-24 17:59:49 +000011904$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011905
11906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11908"
Victor Stinnere0be4232011-10-25 13:06:09 +020011909if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011911else
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011913fi
11914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011916#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011917_ACEOF
11918
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11920$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011921if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011923else
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011925/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011926#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927#if !HAVE_DECL_TZNAME
11928extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011930
Martin v. Löwis11437992002-04-12 09:54:03 +000011931int
11932main ()
11933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011934return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 ;
11936 return 0;
11937}
11938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011939if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011940 ac_cv_var_tzname=yes
11941else
Matthias Kloseb9621712010-04-24 17:59:49 +000011942 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011944rm -f core conftest.err conftest.$ac_objext \
11945 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11948$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011949 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011952
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011953 fi
11954fi
11955
Matthias Kloseb9621712010-04-24 17:59:49 +000011956ac_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 +020011957if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011958
11959cat >>confdefs.h <<_ACEOF
11960#define HAVE_STRUCT_STAT_ST_RDEV 1
11961_ACEOF
11962
11963
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011964fi
11965
Matthias Kloseb9621712010-04-24 17:59:49 +000011966ac_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 +020011967if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011968
Martin v. Löwis11437992002-04-12 09:54:03 +000011969cat >>confdefs.h <<_ACEOF
11970#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11971_ACEOF
11972
11973
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011974fi
11975
Matthias Kloseb9621712010-04-24 17:59:49 +000011976ac_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 +020011977if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011978
11979cat >>confdefs.h <<_ACEOF
11980#define HAVE_STRUCT_STAT_ST_FLAGS 1
11981_ACEOF
11982
11983
11984fi
11985
Matthias Kloseb9621712010-04-24 17:59:49 +000011986ac_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 +020011987if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011988
11989cat >>confdefs.h <<_ACEOF
11990#define HAVE_STRUCT_STAT_ST_GEN 1
11991_ACEOF
11992
11993
11994fi
11995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996ac_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 +020011997if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011998
11999cat >>confdefs.h <<_ACEOF
12000#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12001_ACEOF
12002
12003
12004fi
12005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006ac_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 +020012007if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012008
Martin v. Löwis11437992002-04-12 09:54:03 +000012009cat >>confdefs.h <<_ACEOF
12010#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12011_ACEOF
12012
12013
Matthias Kloseb9621712010-04-24 17:59:49 +000012014$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012015
12016else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012017 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012018 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012019 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12020 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012021esac
12022
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012023fi
12024
Michael W. Hudson54241132001-12-07 15:38:26 +000012025
Martin v. Löwis11437992002-04-12 09:54:03 +000012026
Matthias Kloseb9621712010-04-24 17:59:49 +000012027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12028$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012029if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012031else
Matthias Kloseb159a552010-04-25 21:00:44 +000012032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012034/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012035#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012036int
12037main ()
12038{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 ;
12041 return 0;
12042}
12043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012045 ac_cv_header_time_altzone=yes
12046else
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051fi
12052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12054$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012055if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012058
12059fi
12060
Guido van Rossumda88dad1995-01-26 00:46:29 +000012061was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12063$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012065/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012066
12067#include <sys/types.h>
12068#include <sys/select.h>
12069#include <sys/time.h>
12070
Martin v. Löwis11437992002-04-12 09:54:03 +000012071int
12072main ()
12073{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012074;
Martin v. Löwis11437992002-04-12 09:54:03 +000012075 ;
12076 return 0;
12077}
12078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012079if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012080
12081
Matthias Kloseb9621712010-04-24 17:59:49 +000012082$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012083
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012084 was_it_defined=yes
12085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12089$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012090
Matthias Kloseb9621712010-04-24 17:59:49 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12092$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012093if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012097/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012098#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012099int
12100main ()
12101{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012102struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 ;
12104 return 0;
12105}
12106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012108 ac_cv_struct_addrinfo=yes
12109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12113fi
12114
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12116$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012117if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012118
Matthias Kloseb9621712010-04-24 17:59:49 +000012119$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012120
12121fi
12122
Matthias Kloseb9621712010-04-24 17:59:49 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12124$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012125if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012129/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012130
12131# include <sys/types.h>
12132# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012133int
12134main ()
12135{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012136struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 ;
12138 return 0;
12139}
12140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012141if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012142 ac_cv_struct_sockaddr_storage=yes
12143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12147fi
12148
Matthias Kloseb9621712010-04-24 17:59:49 +000012149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12150$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012151if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012154
12155fi
12156
Guido van Rossum627b2d71993-12-24 10:39:16 +000012157# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012158
Matthias Kloseb9621712010-04-24 17:59:49 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12160$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012161if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012163else
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012166$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012167int
12168main ()
12169{
12170static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012171test_array [0] = 0;
12172return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012173
12174 ;
12175 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012176}
Martin v. Löwis11437992002-04-12 09:54:03 +000012177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012178if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012179 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12186$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012187if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012189
12190fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012191
Matthias Kloseb9621712010-04-24 17:59:49 +000012192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12193$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012194if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012196else
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012198/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012199
Martin v. Löwis11437992002-04-12 09:54:03 +000012200int
12201main ()
12202{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012203
Martin v. Löwis11437992002-04-12 09:54:03 +000012204#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012205 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012207 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209 char const *const *pcpcc;
12210 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 /* NEC SVR4.0.2 mips cc rejects this. */
12212 struct point {int x, y;};
12213 static struct point const zero = {0,0};
12214 /* AIX XL C 1.02.0.0 rejects this.
12215 It does not let you subtract one const X* pointer from another in
12216 an arm of an if-expression whose if-part is not a constant
12217 expression */
12218 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012219 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221 ++pcpcc;
12222 ppc = (char**) pcpcc;
12223 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012224 { /* SCO 3.2v4 cc rejects this sort of thing. */
12225 char tx;
12226 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012228
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 }
12232 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12233 int x[] = {25, 17};
12234 const int *foo = &x[0];
12235 ++foo;
12236 }
12237 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12238 typedef const int *iptr;
12239 iptr p = 0;
12240 ++p;
12241 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012242 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012244 struct s { int j; const int *ap[3]; } bx;
12245 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012246 }
12247 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12248 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012252#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012253
Martin v. Löwis11437992002-04-12 09:54:03 +000012254 ;
12255 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012256}
Martin v. Löwis11437992002-04-12 09:54:03 +000012257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012258if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012259 ac_cv_c_const=yes
12260else
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12266$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012267if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012270
12271fi
12272
Michael W. Hudson54241132001-12-07 15:38:26 +000012273
Guido van Rossumda88dad1995-01-26 00:46:29 +000012274works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12276$as_echo_n "checking for working volatile... " >&6; }
12277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012278/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012279
Martin v. Löwis11437992002-04-12 09:54:03 +000012280int
12281main ()
12282{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012283volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012284 ;
12285 return 0;
12286}
12287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012288if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012289 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012290else
Skip Montanaro6dead952003-09-25 14:50:04 +000012291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012293
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012294
Guido van Rossum627b2d71993-12-24 10:39:16 +000012295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12298$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012299
Guido van Rossumda88dad1995-01-26 00:46:29 +000012300works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12302$as_echo_n "checking for working signed char... " >&6; }
12303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012304/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012305
Martin v. Löwis11437992002-04-12 09:54:03 +000012306int
12307main ()
12308{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012310 ;
12311 return 0;
12312}
12313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012314if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012315 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012316else
Skip Montanaro6dead952003-09-25 14:50:04 +000012317
Matthias Kloseb9621712010-04-24 17:59:49 +000012318$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012319
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012320
Guido van Rossum7f43da71994-08-01 12:15:30 +000012321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12324$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012325
Guido van Rossumda88dad1995-01-26 00:46:29 +000012326have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12328$as_echo_n "checking for prototypes... " >&6; }
12329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012330/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012331int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012332int
12333main ()
12334{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012335return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 ;
12337 return 0;
12338}
12339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012341
Matthias Kloseb9621712010-04-24 17:59:49 +000012342$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
Matthias Kloseb159a552010-04-25 21:00:44 +000012344 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12348$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012349
Guido van Rossumda88dad1995-01-26 00:46:29 +000012350works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12352$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012354/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012355
12356#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012357int foo(int x, ...) {
12358 va_list va;
12359 va_start(va, x);
12360 va_arg(va, int);
12361 va_arg(va, char *);
12362 va_arg(va, double);
12363 return 0;
12364}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012365
Martin v. Löwis11437992002-04-12 09:54:03 +000012366int
12367main ()
12368{
Guido van Rossum90eea071996-08-30 20:58:57 +000012369return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 ;
12371 return 0;
12372}
12373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012375
12376
Matthias Kloseb9621712010-04-24 17:59:49 +000012377$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012378
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012379 works=yes
12380
Guido van Rossum627b2d71993-12-24 10:39:16 +000012381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12384$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385
Martin v. Löwisd6320502004-08-12 13:45:08 +000012386# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12388$as_echo_n "checking for socketpair... " >&6; }
12389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012390/* end confdefs.h. */
12391
12392#include <sys/types.h>
12393#include <sys/socket.h>
12394
12395int
12396main ()
12397{
12398void *x=socketpair
12399 ;
12400 return 0;
12401}
12402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012406
Matthias Kloseb159a552010-04-25 21:00:44 +000012407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012408$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012409else
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12411$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012412
12413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012415
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012416# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12418$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012420/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012421#include <sys/types.h>
12422#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012423int
12424main ()
12425{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012426struct sockaddr x;
12427x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 ;
12429 return 0;
12430}
12431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if ac_fn_c_try_compile "$LINENO"; then :
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12434$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012437
12438else
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12440$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012441
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012444
Guido van Rossumda88dad1995-01-26 00:46:29 +000012445va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12447$as_echo_n "checking whether va_list is an array... " >&6; }
12448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012449/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012450
12451#ifdef HAVE_STDARG_PROTOTYPES
12452#include <stdarg.h>
12453#else
12454#include <varargs.h>
12455#endif
12456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457int
12458main ()
12459{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012461 ;
12462 return 0;
12463}
12464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012465if ac_fn_c_try_compile "$LINENO"; then :
12466
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467else
Skip Montanaro6dead952003-09-25 14:50:04 +000012468
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
Matthias Kloseb9621712010-04-24 17:59:49 +000012470$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012471
Guido van Rossumda88dad1995-01-26 00:46:29 +000012472 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012473
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12477$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012478
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012479# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
12481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012483if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12488$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012489 OLD_CFLAGS=$CFLAGS
12490 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012492/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012493
12494# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Martin v. Löwis11437992002-04-12 09:54:03 +000012496int
12497main ()
12498{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012499
12500 char *name;
12501 struct hostent *he, *res;
12502 char buffer[2048];
12503 int buflen = 2048;
12504 int h_errnop;
12505
12506 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012507
12508 ;
12509 return 0;
12510}
12511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012513
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012515
Martin v. Löwis11437992002-04-12 09:54:03 +000012516
Matthias Kloseb9621712010-04-24 17:59:49 +000012517$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012518
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12520$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012522else
Skip Montanaro6dead952003-09-25 14:50:04 +000012523
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12525$as_echo "no" >&6; }
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12527$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012529/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012531# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012532
Martin v. Löwis11437992002-04-12 09:54:03 +000012533int
12534main ()
12535{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012536
12537 char *name;
12538 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012539 char buffer[2048];
12540 int buflen = 2048;
12541 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012542
Matthias Kloseb159a552010-04-25 21:00:44 +000012543 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012544
12545 ;
12546 return 0;
12547}
12548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012550
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012552
Martin v. Löwis11437992002-04-12 09:54:03 +000012553
Matthias Kloseb159a552010-04-25 21:00:44 +000012554$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012555
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12557$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012558
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012559else
Skip Montanaro6dead952003-09-25 14:50:04 +000012560
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12562$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12564$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12566/* end confdefs.h. */
12567
12568# include <netdb.h>
12569
12570int
12571main ()
12572{
12573
12574 char *name;
12575 struct hostent *he;
12576 struct hostent_data data;
12577
12578 (void) gethostbyname_r(name, he, &data);
12579
12580 ;
12581 return 0;
12582}
12583_ACEOF
12584if ac_fn_c_try_compile "$LINENO"; then :
12585
12586 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12587
12588
12589$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12590
12591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12592$as_echo "yes" >&6; }
12593
12594else
12595
12596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12597$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012601
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012604
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012607 CFLAGS=$OLD_CFLAGS
12608
12609else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 for ac_func in gethostbyname
12612do :
12613 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012614if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012616#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012617_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012618
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012619fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012620done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012621
Michael W. Hudson54241132001-12-07 15:38:26 +000012622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012623fi
12624
Michael W. Hudson54241132001-12-07 15:38:26 +000012625
12626
12627
12628
12629
12630
Guido van Rossum627b2d71993-12-24 10:39:16 +000012631# checks for system services
12632# (none yet)
12633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012635ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012636if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012637
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012638else
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12640$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012641if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012642 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012643else
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012645LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649/* Override any GCC internal prototype to avoid an error.
12650 Use char because int might match the return type of a GCC
12651 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012652#ifdef __cplusplus
12653extern "C"
12654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012655char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012656int
12657main ()
12658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 ;
12661 return 0;
12662}
12663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012666else
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012669rm -f core conftest.err conftest.$ac_objext \
12670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012671LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12674$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012675if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 cat >>confdefs.h <<_ACEOF
12677#define HAVE_LIBIEEE 1
12678_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012680 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012681
Guido van Rossum627b2d71993-12-24 10:39:16 +000012682fi
12683
Michael W. Hudson54241132001-12-07 15:38:26 +000012684
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012685fi
12686
Michael W. Hudson54241132001-12-07 15:38:26 +000012687
Guido van Rossum7f253911997-05-09 02:42:48 +000012688# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12690$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012693if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012695if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012696then
12697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12701$as_echo "yes" >&6; }
12702else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12703$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012704fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012705else
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12707$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708fi
12709
Guido van Rossum7f253911997-05-09 02:42:48 +000012710
Guido van Rossum7f43da71994-08-01 12:15:30 +000012711# check for --with-libm=...
12712
Guido van Rossum563e7081996-09-10 18:20:48 +000012713case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012714Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012715*) LIBM=-lm
12716esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12718$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012721if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012723if test "$withval" = no
12724then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12726$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012727elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012728then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12730$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012731else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012732fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12735$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736fi
12737
Guido van Rossum7f43da71994-08-01 12:15:30 +000012738
12739# check for --with-libc=...
12740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12742$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012745if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012746 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012747if test "$withval" = no
12748then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12750$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012751elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012752then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12754$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012755else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012756fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012757else
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12759$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012760fi
12761
Guido van Rossum7f43da71994-08-01 12:15:30 +000012762
Stefan Krah1919b7e2012-03-21 18:25:23 +010012763# **************************************
12764# * Check for gcc x64 inline assembler *
12765# **************************************
12766
12767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12768$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12770/* end confdefs.h. */
12771
12772int
12773main ()
12774{
12775
12776 __asm__ __volatile__ ("movq %rcx, %rax");
12777
12778 ;
12779 return 0;
12780}
12781_ACEOF
12782if ac_fn_c_try_compile "$LINENO"; then :
12783 have_gcc_asm_for_x64=yes
12784else
12785 have_gcc_asm_for_x64=no
12786fi
12787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12789$as_echo "$have_gcc_asm_for_x64" >&6; }
12790if test "$have_gcc_asm_for_x64" = yes
12791then
12792
12793$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12794
12795fi
12796
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012797# **************************************************
12798# * Check for various properties of floating point *
12799# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12802$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012803if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012805else
12806
Matthias Kloseb9621712010-04-24 17:59:49 +000012807if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012808 ac_cv_little_endian_double=no
12809else
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012811/* end confdefs.h. */
12812
12813#include <string.h>
12814int main() {
12815 double x = 9006104071832581.0;
12816 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12817 return 0;
12818 else
12819 return 1;
12820}
12821
12822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012823if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012824 ac_cv_little_endian_double=yes
12825else
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012830fi
12831
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012832fi
12833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12835$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012836if test "$ac_cv_little_endian_double" = yes
12837then
12838
Matthias Kloseb9621712010-04-24 17:59:49 +000012839$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012840
12841fi
12842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12844$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012845if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012847else
12848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012850 ac_cv_big_endian_double=no
12851else
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012853/* end confdefs.h. */
12854
12855#include <string.h>
12856int main() {
12857 double x = 9006104071832581.0;
12858 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12859 return 0;
12860 else
12861 return 1;
12862}
12863
12864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012865if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012866 ac_cv_big_endian_double=yes
12867else
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12871 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012872fi
12873
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012874fi
12875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12877$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012878if test "$ac_cv_big_endian_double" = yes
12879then
12880
Matthias Kloseb9621712010-04-24 17:59:49 +000012881$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012882
12883fi
12884
12885# Some ARM platforms use a mixed-endian representation for doubles.
12886# While Python doesn't currently have full support for these platforms
12887# (see e.g., issue 1762561), we can at least make sure that float <-> string
12888# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12890$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012891if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012893else
12894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012896 ac_cv_mixed_endian_double=no
12897else
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012899/* end confdefs.h. */
12900
12901#include <string.h>
12902int main() {
12903 double x = 9006104071832581.0;
12904 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12905 return 0;
12906 else
12907 return 1;
12908}
12909
12910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012911if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012912 ac_cv_mixed_endian_double=yes
12913else
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12917 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012918fi
12919
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012920fi
12921
Matthias Kloseb9621712010-04-24 17:59:49 +000012922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12923$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012924if test "$ac_cv_mixed_endian_double" = yes
12925then
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012928
12929fi
12930
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012931# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012932# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012933# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012934# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012935# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012936# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012937
12938# This inline assembler syntax may also work for suncc and icc,
12939# so we try it on all platforms.
12940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12942$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012944/* end confdefs.h. */
12945
12946int
12947main ()
12948{
12949
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012950 unsigned short cw;
12951 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12952 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012953
12954 ;
12955 return 0;
12956}
12957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012959 have_gcc_asm_for_x87=yes
12960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012962fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12965$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012966if test "$have_gcc_asm_for_x87" = yes
12967then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012970
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012972
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012973# Detect whether system arithmetic is subject to x87-style double
12974# rounding issues. The result of this test has little meaning on non
12975# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12976# mode is round-to-nearest and double rounding issues are present, and
12977# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12979$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012980# $BASECFLAGS may affect the result
12981ac_save_cc="$CC"
12982CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012983if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012984 ac_cv_x87_double_rounding=no
12985else
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012987/* end confdefs.h. */
12988
12989#include <stdlib.h>
12990#include <math.h>
12991int main() {
12992 volatile double x, y, z;
12993 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12994 x = 0.99999999999999989; /* 1-2**-53 */
12995 y = 1./x;
12996 if (y != 1.)
12997 exit(0);
12998 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12999 x = 1e16;
13000 y = 2.99999;
13001 z = x + y;
13002 if (z != 1e16+4.)
13003 exit(0);
13004 /* both tests show evidence of double rounding */
13005 exit(1);
13006}
13007
13008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013009if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013010 ac_cv_x87_double_rounding=no
13011else
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13015 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013016fi
13017
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013018CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13020$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013021if test "$ac_cv_x87_double_rounding" = yes
13022then
13023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013025
13026fi
13027
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013028# ************************************
13029# * Check for mathematical functions *
13030# ************************************
13031
13032LIBS_SAVE=$LIBS
13033LIBS="$LIBS $LIBM"
13034
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013035for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13036do :
13037 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13038ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013039if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013040 cat >>confdefs.h <<_ACEOF
13041#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13042_ACEOF
13043
13044fi
13045done
13046
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013047for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013048do :
13049 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13050ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013051if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013052 cat >>confdefs.h <<_ACEOF
13053#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13054_ACEOF
13055
13056fi
13057done
13058
13059ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13060"
Victor Stinnere0be4232011-10-25 13:06:09 +020013061if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013062 ac_have_decl=1
13063else
13064 ac_have_decl=0
13065fi
13066
13067cat >>confdefs.h <<_ACEOF
13068#define HAVE_DECL_ISINF $ac_have_decl
13069_ACEOF
13070ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13071"
Victor Stinnere0be4232011-10-25 13:06:09 +020013072if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013073 ac_have_decl=1
13074else
13075 ac_have_decl=0
13076fi
13077
13078cat >>confdefs.h <<_ACEOF
13079#define HAVE_DECL_ISNAN $ac_have_decl
13080_ACEOF
13081ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13082"
Victor Stinnere0be4232011-10-25 13:06:09 +020013083if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013084 ac_have_decl=1
13085else
13086 ac_have_decl=0
13087fi
13088
13089cat >>confdefs.h <<_ACEOF
13090#define HAVE_DECL_ISFINITE $ac_have_decl
13091_ACEOF
13092
13093
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013094# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13095# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13097$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013098if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013100else
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013103 ac_cv_tanh_preserves_zero_sign=no
13104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013106/* end confdefs.h. */
13107
13108#include <math.h>
13109#include <stdlib.h>
13110int main() {
13111 /* return 0 if either negative zeros don't exist
13112 on this platform or if negative zeros exist
13113 and tanh(-0.) == -0. */
13114 if (atan2(0., -1.) == atan2(-0., -1.) ||
13115 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13116 else exit(1);
13117}
13118
13119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013120if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013121 ac_cv_tanh_preserves_zero_sign=yes
13122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13126 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013127fi
13128
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013129fi
13130
Matthias Kloseb9621712010-04-24 17:59:49 +000013131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13132$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013133if test "$ac_cv_tanh_preserves_zero_sign" = yes
13134then
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013137
13138fi
13139
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013140if test "$ac_cv_func_log1p" = yes
13141then
13142 # On some versions of AIX, log1p(-0.) returns 0. instead of
13143 # -0. See issue #9920.
13144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13145$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013146 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013147 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013148else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013149
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013150 if test "$cross_compiling" = yes; then :
13151 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013152else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13154/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013155
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013156 #include <math.h>
13157 #include <stdlib.h>
13158 int main() {
13159 /* Fail if the signs of log1p(-0.) and -0. can be
13160 distinguished. */
13161 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13162 return 0;
13163 else
13164 return 1;
13165 }
13166
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013167_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013168if ac_fn_c_try_run "$LINENO"; then :
13169 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013170else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013171 ac_cv_log1p_drops_zero_sign=yes
13172fi
13173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013175fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013176
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013177fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013178
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13180$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13181fi
13182if test "$ac_cv_log1p_drops_zero_sign" = yes
13183then
13184
13185$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13186
13187fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013188
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013189LIBS=$LIBS_SAVE
13190
Mark Dickinsona614f042009-11-28 12:48:43 +000013191# For multiprocessing module, check that sem_open
13192# actually works. For FreeBSD versions <= 7.2,
13193# the kernel module that provides POSIX semaphores
13194# isn't loaded by default, so an attempt to call
13195# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13197$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013198if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013200else
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013202 ac_cv_posix_semaphores_enabled=yes
13203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013205/* end confdefs.h. */
13206
13207#include <unistd.h>
13208#include <fcntl.h>
13209#include <stdio.h>
13210#include <semaphore.h>
13211#include <sys/stat.h>
13212
13213int main(void) {
13214 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13215 if (a == SEM_FAILED) {
13216 perror("sem_open");
13217 return 1;
13218 }
13219 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013220 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013221 return 0;
13222}
13223
13224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013226 ac_cv_posix_semaphores_enabled=yes
13227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13231 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013232fi
13233
13234
Mark Dickinsona614f042009-11-28 12:48:43 +000013235fi
13236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13238$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013239if test $ac_cv_posix_semaphores_enabled = no
13240then
13241
Matthias Kloseb9621712010-04-24 17:59:49 +000013242$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013243
13244fi
13245
Mark Dickinson10683072009-04-18 21:18:19 +000013246# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13248$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013249if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013253 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013254else
Matthias Kloseb9621712010-04-24 17:59:49 +000013255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013256/* end confdefs.h. */
13257
13258#include <unistd.h>
13259#include <fcntl.h>
13260#include <stdio.h>
13261#include <semaphore.h>
13262#include <sys/stat.h>
13263
13264int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013265 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013266 int count;
13267 int res;
13268 if(a==SEM_FAILED){
13269 perror("sem_open");
13270 return 1;
13271
13272 }
13273 res = sem_getvalue(a, &count);
13274 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013275 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013276 return res==-1 ? 1 : 0;
13277}
13278
Mark Dickinson10683072009-04-18 21:18:19 +000013279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013281 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013282else
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13286 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013287fi
13288
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013289
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013290fi
13291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13293$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013294if test $ac_cv_broken_sem_getvalue = yes
13295then
13296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013298
13299fi
13300
Mark Dickinsonbd792642009-03-18 20:06:12 +000013301# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13303$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013304# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013305if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013306 enableval=$enable_big_digits; case $enable_big_digits in
13307yes)
13308 enable_big_digits=30 ;;
13309no)
13310 enable_big_digits=15 ;;
1331115|30)
13312 ;;
13313*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013314 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 +000013315esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13317$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013318
13319cat >>confdefs.h <<_ACEOF
13320#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13321_ACEOF
13322
13323
13324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13326$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013327fi
13328
13329
Guido van Rossumef2255b2000-03-10 22:30:29 +000013330# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013331ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013332if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
13334
Matthias Kloseb9621712010-04-24 17:59:49 +000013335$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013336
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013337 wchar_h="yes"
13338
Guido van Rossumef2255b2000-03-10 22:30:29 +000013339else
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013341
13342fi
13343
Michael W. Hudson54241132001-12-07 15:38:26 +000013344
Martin v. Löwis11437992002-04-12 09:54:03 +000013345
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013346# determine wchar_t size
13347if test "$wchar_h" = yes
13348then
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13351# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13352# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13354$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013355if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013357else
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13359"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Martin v. Löwis11437992002-04-12 09:54:03 +000013361else
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 if test "$ac_cv_type_wchar_t" = yes; then
13363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013365as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013366See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367 else
13368 ac_cv_sizeof_wchar_t=0
13369 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13374$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375
13376
13377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013379#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013380_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013381
Michael W. Hudson54241132001-12-07 15:38:26 +000013382
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013383fi
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13386$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013387have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013389/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013390
13391#include <tcl.h>
13392#if TCL_UTF_MAX != 6
13393# error "NOT UCS4_TCL"
13394#endif
13395int
13396main ()
13397{
13398
13399 ;
13400 return 0;
13401}
13402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013404
13405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013407
13408 have_ucs4_tcl=yes
13409
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13413$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013414
Skip Montanaro6dead952003-09-25 14:50:04 +000013415# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013416if test "$wchar_h" = yes
13417then
13418 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13420$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013421 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013423else
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013426 ac_cv_wchar_t_signed=yes
13427else
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013430
13431 #include <wchar.h>
13432 int main()
13433 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013434 /* Success: exit code 0 */
13435 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013436 }
13437
13438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013439if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013440 ac_cv_wchar_t_signed=yes
13441else
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013446fi
13447
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013448fi
13449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13451$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452fi
13453
Georg Brandl52d168a2008-01-07 18:10:24 +000013454# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013455if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013456 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013457then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013458 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013461
Georg Brandl52d168a2008-01-07 18:10:24 +000013462else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013463 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013464fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13466$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013467
13468# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13470$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013471if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013472 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013473else
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 ac_cv_c_bigendian=unknown
13475 # See if we're dealing with a universal compiler.
13476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13477/* end confdefs.h. */
13478#ifndef __APPLE_CC__
13479 not a universal capable compiler
13480 #endif
13481 typedef int dummy;
13482
Skip Montanaro6dead952003-09-25 14:50:04 +000013483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013484if ac_fn_c_try_compile "$LINENO"; then :
13485
13486 # Check for potential -arch flags. It is not universal unless
13487 # there are at least two -arch flags with different values.
13488 ac_arch=
13489 ac_prev=
13490 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13491 if test -n "$ac_prev"; then
13492 case $ac_word in
13493 i?86 | x86_64 | ppc | ppc64)
13494 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13495 ac_arch=$ac_word
13496 else
13497 ac_cv_c_bigendian=universal
13498 break
13499 fi
13500 ;;
13501 esac
13502 ac_prev=
13503 elif test "x$ac_word" = "x-arch"; then
13504 ac_prev=arch
13505 fi
13506 done
13507fi
13508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13509 if test $ac_cv_c_bigendian = unknown; then
13510 # See if sys/param.h defines the BYTE_ORDER macro.
13511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013512/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013513#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013514 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013515
Martin v. Löwis11437992002-04-12 09:54:03 +000013516int
13517main ()
13518{
Matthias Kloseb9621712010-04-24 17:59:49 +000013519#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13520 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13521 && LITTLE_ENDIAN)
13522 bogus endian macros
13523 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013524
13525 ;
13526 return 0;
13527}
13528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013529if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013530 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013532/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013533#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013535
Martin v. Löwis11437992002-04-12 09:54:03 +000013536int
13537main ()
13538{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013539#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 not big endian
13541 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013542
13543 ;
13544 return 0;
13545}
13546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013547if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013548 ac_cv_c_bigendian=yes
13549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013553fi
13554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13555 fi
13556 if test $ac_cv_c_bigendian = unknown; then
13557 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013559/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013560#include <limits.h>
13561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562int
13563main ()
13564{
Matthias Kloseb9621712010-04-24 17:59:49 +000013565#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13566 bogus endian macros
13567 #endif
13568
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 ;
13570 return 0;
13571}
13572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013573if ac_fn_c_try_compile "$LINENO"; then :
13574 # It does; now see whether it defined to _BIG_ENDIAN or not.
13575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13576/* end confdefs.h. */
13577#include <limits.h>
13578
13579int
13580main ()
13581{
13582#ifndef _BIG_ENDIAN
13583 not big endian
13584 #endif
13585
13586 ;
13587 return 0;
13588}
13589_ACEOF
13590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013591 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013592else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13596fi
13597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13598 fi
13599 if test $ac_cv_c_bigendian = unknown; then
13600 # Compile a test program.
13601 if test "$cross_compiling" = yes; then :
13602 # Try to guess by grepping values from an object file.
13603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13604/* end confdefs.h. */
13605short int ascii_mm[] =
13606 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13607 short int ascii_ii[] =
13608 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13609 int use_ascii (int i) {
13610 return ascii_mm[i] + ascii_ii[i];
13611 }
13612 short int ebcdic_ii[] =
13613 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13614 short int ebcdic_mm[] =
13615 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13616 int use_ebcdic (int i) {
13617 return ebcdic_mm[i] + ebcdic_ii[i];
13618 }
13619 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013620
Matthias Kloseb9621712010-04-24 17:59:49 +000013621int
13622main ()
13623{
13624return use_ascii (foo) == use_ebcdic (foo);
13625 ;
13626 return 0;
13627}
13628_ACEOF
13629if ac_fn_c_try_compile "$LINENO"; then :
13630 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13631 ac_cv_c_bigendian=yes
13632 fi
13633 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13634 if test "$ac_cv_c_bigendian" = unknown; then
13635 ac_cv_c_bigendian=no
13636 else
13637 # finding both strings is unlikely to happen, but who knows?
13638 ac_cv_c_bigendian=unknown
13639 fi
13640 fi
13641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013645/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013646$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013647int
13648main ()
13649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 /* Are we little or big endian? From Harbison&Steele. */
13652 union
13653 {
13654 long int l;
13655 char c[sizeof (long int)];
13656 } u;
13657 u.l = 1;
13658 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013659
13660 ;
13661 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013662}
Martin v. Löwis11437992002-04-12 09:54:03 +000013663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013664if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013665 ac_cv_c_bigendian=no
13666else
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13670 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13676$as_echo "$ac_cv_c_bigendian" >&6; }
13677 case $ac_cv_c_bigendian in #(
13678 yes)
13679 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13680;; #(
13681 no)
13682 ;; #(
13683 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687 ;; #(
13688 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013689 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013690 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013692
Michael W. Hudson54241132001-12-07 15:38:26 +000013693
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013694# ABI version string for Python extension modules. This appears between the
13695# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13696# from the following attributes which affect the ABI of this Python build (in
13697# this order):
13698#
13699# * The Python implementation (always 'cpython-' for us)
13700# * The major and minor version numbers
13701# * --with-pydebug (adds a 'd')
13702# * --with-pymalloc (adds a 'm')
13703# * --with-wide-unicode (adds a 'u')
13704#
13705# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013706# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13707# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013708
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13710$as_echo_n "checking ABIFLAGS... " >&6; }
13711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13712$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13714$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013715SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13717$as_echo "$SOABI" >&6; }
13718
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013719
13720case $ac_sys_system in
13721 Linux*|GNU*)
13722 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13723 *)
13724 EXT_SUFFIX=${SHLIB_SUFFIX};;
13725esac
13726
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13728$as_echo_n "checking LDVERSION... " >&6; }
13729LDVERSION='$(VERSION)$(ABIFLAGS)'
13730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13731$as_echo "$LDVERSION" >&6; }
13732
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013733# Check whether right shifting a negative integer extends the sign bit
13734# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13736$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013737if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013742 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013743else
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013745/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013746
13747int main()
13748{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013749 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013750}
13751
Martin v. Löwis11437992002-04-12 09:54:03 +000013752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013753if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013754 ac_cv_rshift_extends_sign=yes
13755else
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013760fi
13761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762fi
13763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13765$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013766if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013767then
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013770
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013771fi
13772
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013773# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13775$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013778else
Martin v. Löwis11437992002-04-12 09:54:03 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013781/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013782#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013783int
13784main ()
13785{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013786
13787 FILE *f = fopen("/dev/null", "r");
13788 flockfile(f);
13789 getc_unlocked(f);
13790 funlockfile(f);
13791
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 ;
13793 return 0;
13794}
13795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013797 ac_cv_have_getc_unlocked=yes
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 ac_cv_have_getc_unlocked=no
13800fi
13801rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13806$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013807if test "$ac_cv_have_getc_unlocked" = yes
13808then
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013811
13812fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013813
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013814# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013815# save the value of LIBS so we don't actually link Python with readline
13816LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013817
Gregory P. Smith18820942008-09-07 06:24:49 +000013818# On some systems we need to link readline to a termcap compatible
13819# library. NOTE: Keep the precedence of listed libraries synchronised
13820# with setup.py.
13821py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13823$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013824for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013825 if test -z "$py_libtermcap"; then
13826 READLINE_LIBS="-lreadline"
13827 else
13828 READLINE_LIBS="-lreadline -l$py_libtermcap"
13829 fi
13830 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013832/* end confdefs.h. */
13833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834/* Override any GCC internal prototype to avoid an error.
13835 Use char because int might match the return type of a GCC
13836 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013837#ifdef __cplusplus
13838extern "C"
13839#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013840char readline ();
13841int
13842main ()
13843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013845 ;
13846 return 0;
13847}
13848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013849if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013850 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013852rm -f core conftest.err conftest.$ac_objext \
13853 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013854 if test $py_cv_lib_readline = yes; then
13855 break
13856 fi
13857done
13858# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13859#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013860if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13862$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013863else
Matthias Kloseb9621712010-04-24 17:59:49 +000013864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13865$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013866
Matthias Kloseb9621712010-04-24 17:59:49 +000013867$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013868
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013869fi
13870
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013871# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13873$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013874if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013876else
13877 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013878LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013880/* end confdefs.h. */
13881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882/* Override any GCC internal prototype to avoid an error.
13883 Use char because int might match the return type of a GCC
13884 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013885#ifdef __cplusplus
13886extern "C"
13887#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013888char rl_callback_handler_install ();
13889int
13890main ()
13891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013893 ;
13894 return 0;
13895}
13896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013897if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013898 ac_cv_lib_readline_rl_callback_handler_install=yes
13899else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013902rm -f core conftest.err conftest.$ac_objext \
13903 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013904LIBS=$ac_check_lib_save_LIBS
13905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13907$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013908if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013911
13912fi
13913
13914
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013915# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013917/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013918#include <readline/readline.h>
13919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013921 have_readline=yes
13922else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013923 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013924
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013925fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013926rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013927if test $have_readline = yes
13928then
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013930/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013931#include <readline/readline.h>
13932
13933_ACEOF
13934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013938
13939fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013940rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013943/* end confdefs.h. */
13944#include <readline/readline.h>
13945
13946_ACEOF
13947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013951
13952fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013953rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013954
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013955fi
13956
Martin v. Löwis0daad592001-09-30 21:09:59 +000013957# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13959$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013960if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013962else
Martin v. Löwis11437992002-04-12 09:54:03 +000013963 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013964LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968/* Override any GCC internal prototype to avoid an error.
13969 Use char because int might match the return type of a GCC
13970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013971#ifdef __cplusplus
13972extern "C"
13973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013974char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013975int
13976main ()
13977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;
13980 return 0;
13981}
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013988rm -f core conftest.err conftest.$ac_objext \
13989 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013990LIBS=$ac_check_lib_save_LIBS
13991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13993$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013994if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013997
Martin v. Löwis0daad592001-09-30 21:09:59 +000013998fi
13999
Michael W. Hudson54241132001-12-07 15:38:26 +000014000
Thomas Wouters89d996e2007-09-08 17:39:28 +000014001# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14003$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014004if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014006else
14007 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014008LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014010/* end confdefs.h. */
14011
14012/* Override any GCC internal prototype to avoid an error.
14013 Use char because int might match the return type of a GCC
14014 builtin and then its argument prototype would still apply. */
14015#ifdef __cplusplus
14016extern "C"
14017#endif
14018char rl_completion_display_matches_hook ();
14019int
14020main ()
14021{
14022return rl_completion_display_matches_hook ();
14023 ;
14024 return 0;
14025}
14026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014027if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014028 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14029else
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014032rm -f core conftest.err conftest.$ac_objext \
14033 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014034LIBS=$ac_check_lib_save_LIBS
14035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14037$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014038if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014041
14042fi
14043
14044
Martin v. Löwis0daad592001-09-30 21:09:59 +000014045# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14047$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014048if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014050else
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014052LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056/* Override any GCC internal prototype to avoid an error.
14057 Use char because int might match the return type of a GCC
14058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014059#ifdef __cplusplus
14060extern "C"
14061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014062char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014063int
14064main ()
14065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 ;
14068 return 0;
14069}
14070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014073else
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014076rm -f core conftest.err conftest.$ac_objext \
14077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014078LIBS=$ac_check_lib_save_LIBS
14079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14081$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014085
Guido van Rossum353ae582001-07-10 16:45:32 +000014086fi
14087
Jack Jansendd19cf82001-12-06 22:36:17 +000014088
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014089# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014091/* end confdefs.h. */
14092#include <readline/readline.h>
14093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014094if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014095 have_readline=yes
14096else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014097 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014098
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014099fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014100rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101if test $have_readline = yes
14102then
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014104/* end confdefs.h. */
14105#include <readline/readline.h>
14106
14107_ACEOF
14108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014112
14113fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014114rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014115
14116fi
14117
Martin v. Löwis82bca632006-02-10 20:49:30 +000014118# End of readline checks: restore LIBS
14119LIBS=$LIBS_no_readline
14120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14122$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014123if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014125else
Martin v. Löwis11437992002-04-12 09:54:03 +000014126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014128 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014129else
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014131/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014132
14133int main()
14134{
14135 int val1 = nice(1);
14136 if (val1 != -1 && val1 == nice(2))
14137 exit(0);
14138 exit(1);
14139}
14140
Martin v. Löwis11437992002-04-12 09:54:03 +000014141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014142if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014143 ac_cv_broken_nice=yes
14144else
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14148 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014149fi
14150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151fi
14152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14154$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014155if test "$ac_cv_broken_nice" = yes
14156then
Martin v. Löwis11437992002-04-12 09:54:03 +000014157
Matthias Kloseb9621712010-04-24 17:59:49 +000014158$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014159
14160fi
14161
Matthias Kloseb9621712010-04-24 17:59:49 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14163$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014164if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014168 ac_cv_broken_poll=no
14169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014171/* end confdefs.h. */
14172
14173#include <poll.h>
14174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014175int main()
14176{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014177 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014179
14180 close (42);
14181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014183 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014185 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014186 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014187 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188 return 1;
14189}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014190
14191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014193 ac_cv_broken_poll=yes
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014201fi
14202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14204$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014205if test "$ac_cv_broken_poll" = yes
14206then
14207
Matthias Kloseb9621712010-04-24 17:59:49 +000014208$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014209
14210fi
14211
Brett Cannon43802422005-02-10 20:48:03 +000014212# 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 +000014213# (which is not required by ISO C or UNIX spec) and/or if we support
14214# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014215ac_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 +000014216#include <$ac_cv_struct_tm>
14217
Matthias Kloseb9621712010-04-24 17:59:49 +000014218"
Victor Stinnere0be4232011-10-25 13:06:09 +020014219if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014220
14221cat >>confdefs.h <<_ACEOF
14222#define HAVE_STRUCT_TM_TM_ZONE 1
14223_ACEOF
14224
14225
14226fi
14227
14228if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14229
Matthias Kloseb9621712010-04-24 17:59:49 +000014230$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014231
14232else
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14234"
Victor Stinnere0be4232011-10-25 13:06:09 +020014235if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237else
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239fi
14240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014242#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243_ACEOF
14244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14246$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014247if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249else
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014251/* end confdefs.h. */
14252#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253#if !HAVE_DECL_TZNAME
14254extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014255#endif
14256
14257int
14258main ()
14259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014261 ;
14262 return 0;
14263}
14264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014265if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014266 ac_cv_var_tzname=yes
14267else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014270rm -f core conftest.err conftest.$ac_objext \
14271 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14274$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014275 if test $ac_cv_var_tzname = yes; then
14276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014278
14279 fi
14280fi
14281
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014282
Martin v. Löwis1d459062005-03-14 21:23:33 +000014283# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14285$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014286if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014288else
14289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014291 ac_cv_working_tzset=no
14292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014294/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014295
14296#include <stdlib.h>
14297#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014298#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014299
14300#if HAVE_TZNAME
14301extern char *tzname[];
14302#endif
14303
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014304int main()
14305{
Brett Cannon18367812003-09-19 00:59:16 +000014306 /* Note that we need to ensure that not only does tzset(3)
14307 do 'something' with localtime, but it works as documented
14308 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014309 This includes making sure that tzname is set properly if
14310 tm->tm_zone does not exist since it is the alternative way
14311 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014312
14313 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014314 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014315 */
14316
Martin v. Löwis1d459062005-03-14 21:23:33 +000014317 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014318 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14319
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014320 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014321 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014322 if (localtime(&groundhogday)->tm_hour != 0)
14323 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014324#if HAVE_TZNAME
14325 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14326 if (strcmp(tzname[0], "UTC") ||
14327 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14328 exit(1);
14329#endif
Brett Cannon18367812003-09-19 00:59:16 +000014330
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014331 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014332 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014333 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014334 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014335#if HAVE_TZNAME
14336 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14337 exit(1);
14338#endif
Brett Cannon18367812003-09-19 00:59:16 +000014339
14340 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14341 tzset();
14342 if (localtime(&groundhogday)->tm_hour != 11)
14343 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014344#if HAVE_TZNAME
14345 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14346 exit(1);
14347#endif
14348
14349#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014350 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14351 exit(1);
14352 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14353 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014354#endif
Brett Cannon18367812003-09-19 00:59:16 +000014355
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014356 exit(0);
14357}
14358
14359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014360if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014361 ac_cv_working_tzset=yes
14362else
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014367fi
14368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369fi
14370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14372$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014373if test "$ac_cv_working_tzset" = yes
14374then
14375
Matthias Kloseb9621712010-04-24 17:59:49 +000014376$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014377
14378fi
14379
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014380# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14382$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014383if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014385else
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014387/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014388#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014389int
14390main ()
14391{
14392
14393struct stat st;
14394st.st_mtim.tv_nsec = 1;
14395
14396 ;
14397 return 0;
14398}
14399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014401 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14406fi
14407
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14409$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014410if test "$ac_cv_stat_tv_nsec" = yes
14411then
14412
Matthias Kloseb9621712010-04-24 17:59:49 +000014413$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014414
14415fi
14416
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014417# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14419$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014420if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014424/* end confdefs.h. */
14425#include <sys/stat.h>
14426int
14427main ()
14428{
14429
14430struct stat st;
14431st.st_mtimespec.tv_nsec = 1;
14432
14433 ;
14434 return 0;
14435}
14436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014438 ac_cv_stat_tv_nsec2=yes
14439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14443fi
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14446$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014447if test "$ac_cv_stat_tv_nsec2" = yes
14448then
14449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014451
14452fi
14453
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014454ac_save_cppflags="$CPPFLAGS"
14455CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014456# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14458$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014459if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014461else
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014463/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014464#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014465int
14466main ()
14467{
Jack Jansen666b1e72001-10-31 12:11:48 +000014468
14469 int rtn;
14470 rtn = mvwdelch(0,0,0);
14471
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ;
14473 return 0;
14474}
14475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014476if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014477 ac_cv_mvwdelch_is_expression=yes
14478else
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14482fi
14483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14485$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014486
14487if test "$ac_cv_mvwdelch_is_expression" = yes
14488then
Martin v. Löwis11437992002-04-12 09:54:03 +000014489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014491
14492fi
14493
Matthias Kloseb9621712010-04-24 17:59:49 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14495$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014496if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014498else
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014500/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014501#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014502int
14503main ()
14504{
Jack Jansen666b1e72001-10-31 12:11:48 +000014505
14506 WINDOW *w;
14507 w->_flags = 0;
14508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 ;
14510 return 0;
14511}
14512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014513if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014514 ac_cv_window_has_flags=yes
14515else
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14519fi
14520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14522$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014523
Jack Jansen666b1e72001-10-31 12:11:48 +000014524
14525if test "$ac_cv_window_has_flags" = yes
14526then
Martin v. Löwis11437992002-04-12 09:54:03 +000014527
Matthias Kloseb9621712010-04-24 17:59:49 +000014528$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014529
14530fi
14531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14533$as_echo_n "checking for is_term_resized... " >&6; }
14534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014535/* end confdefs.h. */
14536#include <curses.h>
14537int
14538main ()
14539{
14540void *x=is_term_resized
14541 ;
14542 return 0;
14543}
14544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014546
Matthias Kloseb9621712010-04-24 17:59:49 +000014547$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014548
Matthias Kloseb159a552010-04-25 21:00:44 +000014549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014550$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014551else
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14553$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014554
14555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14557
Matthias Kloseb9621712010-04-24 17:59:49 +000014558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14559$as_echo_n "checking for resize_term... " >&6; }
14560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014561/* end confdefs.h. */
14562#include <curses.h>
14563int
14564main ()
14565{
14566void *x=resize_term
14567 ;
14568 return 0;
14569}
14570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014571if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014574
Matthias Kloseb159a552010-04-25 21:00:44 +000014575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014576$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14579$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014580
14581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14583
Matthias Kloseb9621712010-04-24 17:59:49 +000014584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14585$as_echo_n "checking for resizeterm... " >&6; }
14586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014587/* end confdefs.h. */
14588#include <curses.h>
14589int
14590main ()
14591{
14592void *x=resizeterm
14593 ;
14594 return 0;
14595}
14596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014600
Matthias Kloseb159a552010-04-25 21:00:44 +000014601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014602$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14605$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014606
14607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014609# last curses configure check
14610CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14613$as_echo "$as_me: checking for device files" >&6;}
14614
14615if test "x$cross_compiling" = xyes; then
14616 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14618$as_echo_n "checking for /dev/ptmx... " >&6; }
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14620$as_echo "not set" >&6; }
14621 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14622 fi
14623 if test "${ac_cv_file__dev_ptc+set}" != set; then
14624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14625$as_echo_n "checking for /dev/ptc... " >&6; }
14626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14627$as_echo "not set" >&6; }
14628 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14629 fi
14630fi
14631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14633$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014634if ${ac_cv_file__dev_ptmx+:} false; then :
14635 $as_echo_n "(cached) " >&6
14636else
14637 test "$cross_compiling" = yes &&
14638 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14639if test -r "/dev/ptmx"; then
14640 ac_cv_file__dev_ptmx=yes
14641else
14642 ac_cv_file__dev_ptmx=no
14643fi
14644fi
14645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14646$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14647if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014648
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014649fi
14650
14651if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014654
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14657$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014658if ${ac_cv_file__dev_ptc+:} false; then :
14659 $as_echo_n "(cached) " >&6
14660else
14661 test "$cross_compiling" = yes &&
14662 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14663if test -r "/dev/ptc"; then
14664 ac_cv_file__dev_ptc=yes
14665else
14666 ac_cv_file__dev_ptc=no
14667fi
14668fi
14669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14670$as_echo "$ac_cv_file__dev_ptc" >&6; }
14671if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014672
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014673fi
14674
14675if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014676
Matthias Kloseb9621712010-04-24 17:59:49 +000014677$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014678
Neal Norwitz865400f2003-03-21 01:42:58 +000014679fi
14680
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014681if test "$have_long_long" = yes
14682then
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14684$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014685 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014687else
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014689 ac_cv_have_long_long_format="cross -- assuming no"
14690 if test x$GCC = xyes; then
14691 save_CFLAGS=$CFLAGS
14692 CFLAGS="$CFLAGS -Werror -Wformat"
14693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14694/* end confdefs.h. */
14695
14696 #include <stdio.h>
14697 #include <stddef.h>
14698
14699int
14700main ()
14701{
14702
14703 char *buffer;
14704 sprintf(buffer, "%lld", (long long)123);
14705 sprintf(buffer, "%lld", (long long)-123);
14706 sprintf(buffer, "%llu", (unsigned long long)123);
14707
14708 ;
14709 return 0;
14710}
14711_ACEOF
14712if ac_fn_c_try_compile "$LINENO"; then :
14713 ac_cv_have_long_long_format=yes
14714
14715fi
14716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14717 CFLAGS=$save_CFLAGS
14718 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014719else
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014721/* end confdefs.h. */
14722
14723 #include <stdio.h>
14724 #include <stddef.h>
14725 #include <string.h>
14726
14727 #ifdef HAVE_SYS_TYPES_H
14728 #include <sys/types.h>
14729 #endif
14730
14731 int main()
14732 {
14733 char buffer[256];
14734
14735 if (sprintf(buffer, "%lld", (long long)123) < 0)
14736 return 1;
14737 if (strcmp(buffer, "123"))
14738 return 1;
14739
14740 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14741 return 1;
14742 if (strcmp(buffer, "-123"))
14743 return 1;
14744
14745 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14746 return 1;
14747 if (strcmp(buffer, "123"))
14748 return 1;
14749
14750 return 0;
14751 }
14752
14753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014754if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014755 ac_cv_have_long_long_format=yes
14756else
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014761fi
14762
14763
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014764fi
14765
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14767$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014768fi
14769
Mark Dickinson89d7d412009-12-31 20:50:59 +000014770if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014771then
14772
Matthias Kloseb9621712010-04-24 17:59:49 +000014773$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014774
14775fi
14776
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014777if test $ac_sys_system = Darwin
14778then
14779 LIBS="$LIBS -framework CoreFoundation"
14780fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14783$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014784if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014788 ac_cv_have_size_t_format="cross -- assuming yes"
14789
Thomas Wouters477c8d52006-05-27 19:21:47 +000014790else
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014792/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014793
Thomas Wouters477c8d52006-05-27 19:21:47 +000014794#include <stdio.h>
14795#include <stddef.h>
14796#include <string.h>
14797
Christian Heimes2c181612007-12-17 20:04:13 +000014798#ifdef HAVE_SYS_TYPES_H
14799#include <sys/types.h>
14800#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014801
14802#ifdef HAVE_SSIZE_T
14803typedef ssize_t Py_ssize_t;
14804#elif SIZEOF_VOID_P == SIZEOF_LONG
14805typedef long Py_ssize_t;
14806#else
14807typedef int Py_ssize_t;
14808#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014809
Christian Heimes2c181612007-12-17 20:04:13 +000014810int main()
14811{
14812 char buffer[256];
14813
Thomas Wouters477c8d52006-05-27 19:21:47 +000014814 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14815 return 1;
14816
Thomas Wouters89f507f2006-12-13 04:49:30 +000014817 if (strcmp(buffer, "123"))
14818 return 1;
14819
14820 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14821 return 1;
14822
14823 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014824 return 1;
14825
14826 return 0;
14827}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014828
Thomas Wouters477c8d52006-05-27 19:21:47 +000014829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014830if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014831 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014832else
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014837fi
14838
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14841$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014842if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014843
Matthias Kloseb9621712010-04-24 17:59:49 +000014844$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014845
14846fi
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014849#ifdef HAVE_SYS_TYPES_H
14850#include <sys/types.h>
14851#endif
14852#ifdef HAVE_SYS_SOCKET_H
14853#include <sys/socket.h>
14854#endif
14855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856"
Victor Stinnere0be4232011-10-25 13:06:09 +020014857if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014858
Martin v. Löwis11437992002-04-12 09:54:03 +000014859else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014862
14863fi
14864
Michael W. Hudson54241132001-12-07 15:38:26 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14867$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014868if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014870else
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014872 ac_cv_broken_mbstowcs=no
14873else
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014875/* end confdefs.h. */
14876
Stefan Krah19c21392012-11-22 23:47:32 +010014877#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014878#include<stdlib.h>
14879int main() {
14880 size_t len = -1;
14881 const char *str = "text";
14882 len = mbstowcs(NULL, str, 0);
14883 return (len != 4);
14884}
14885
14886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014887if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014888 ac_cv_broken_mbstowcs=no
14889else
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014894fi
14895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014896fi
14897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14899$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014900if test "$ac_cv_broken_mbstowcs" = yes
14901then
14902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014904
14905fi
14906
Antoine Pitroub52ec782009-01-25 16:34:23 +000014907# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14909$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014910
14911# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014912if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014913 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014914if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014915then
14916
Matthias Kloseb9621712010-04-24 17:59:49 +000014917$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14920$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014921fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014922if test "$withval" = no
14923then
14924
14925$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14926
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14928$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014929fi
14930
Antoine Pitrou042b1282010-08-13 21:15:58 +000014931else
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14933$as_echo "no value specified" >&6; }
14934fi
14935
Antoine Pitroub52ec782009-01-25 16:34:23 +000014936
Matthias Kloseb17289e2012-03-15 19:51:34 +010014937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14938$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14939if ${ac_cv_computed_gotos+:} false; then :
14940 $as_echo_n "(cached) " >&6
14941else
14942 if test "$cross_compiling" = yes; then :
14943 if test "${with_computed_gotos+set}" = set; then
14944 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14945 else
14946 ac_cv_computed_gotos=no
14947 fi
14948else
14949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14950/* end confdefs.h. */
14951
14952int main(int argc, char **argv)
14953{
14954 static void *targets[1] = { &&LABEL1 };
14955 goto LABEL2;
14956LABEL1:
14957 return 0;
14958LABEL2:
14959 goto *targets[0];
14960 return 1;
14961}
14962
14963_ACEOF
14964if ac_fn_c_try_run "$LINENO"; then :
14965 ac_cv_computed_gotos=yes
14966else
14967 ac_cv_computed_gotos=no
14968fi
14969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14970 conftest.$ac_objext conftest.beam conftest.$ac_ext
14971fi
14972
14973fi
14974
14975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14976$as_echo "$ac_cv_computed_gotos" >&6; }
14977case "$ac_cv_computed_gotos" in yes*)
14978
14979$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14980
14981esac
14982
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014983case $ac_sys_system in
14984AIX*)
14985
14986$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14987 ;;
14988esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014989
Michael W. Hudson54241132001-12-07 15:38:26 +000014990
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014991
14992
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014993for h in `(cd $srcdir;echo Python/thread_*.h)`
14994do
14995 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14996done
14997
Michael W. Hudson54241132001-12-07 15:38:26 +000014998
Neal Norwitzd24499d2005-12-18 21:36:39 +000014999SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15001$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015002for dir in $SRCDIRS; do
15003 if test ! -d $dir; then
15004 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015005 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015006done
Matthias Kloseb9621712010-04-24 17:59:49 +000015007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15008$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015009
Stefan Krah1919b7e2012-03-21 18:25:23 +010015010# Availability of -O2:
15011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15012$as_echo_n "checking for -O2... " >&6; }
15013saved_cflags="$CFLAGS"
15014CFLAGS="-O2"
15015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15016/* end confdefs.h. */
15017
15018int
15019main ()
15020{
15021
15022
15023 ;
15024 return 0;
15025}
15026_ACEOF
15027if ac_fn_c_try_compile "$LINENO"; then :
15028 have_O2=yes
15029else
15030 have_O2=no
15031fi
15032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15034$as_echo "$have_O2" >&6; }
15035CFLAGS="$saved_cflags"
15036
15037# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15038# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15040$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15041saved_cflags="$CFLAGS"
15042CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15043if test "$have_O2" = no; then
15044 CFLAGS=""
15045fi
15046if test "$cross_compiling" = yes; then :
15047 have_glibc_memmove_bug=undefined
15048else
15049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15050/* end confdefs.h. */
15051
15052#include <stdio.h>
15053#include <stdlib.h>
15054#include <string.h>
15055void foo(void *p, void *q) { memmove(p, q, 19); }
15056int main() {
15057 char a[32] = "123456789000000000";
15058 foo(&a[9], a);
15059 if (strcmp(a, "123456789123456789000000000") != 0)
15060 return 1;
15061 foo(a, &a[9]);
15062 if (strcmp(a, "123456789000000000") != 0)
15063 return 1;
15064 return 0;
15065}
15066
15067_ACEOF
15068if ac_fn_c_try_run "$LINENO"; then :
15069 have_glibc_memmove_bug=no
15070else
15071 have_glibc_memmove_bug=yes
15072fi
15073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15074 conftest.$ac_objext conftest.beam conftest.$ac_ext
15075fi
15076
15077CFLAGS="$saved_cflags"
15078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15079$as_echo "$have_glibc_memmove_bug" >&6; }
15080if test "$have_glibc_memmove_bug" = yes; then
15081
15082$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15083
15084fi
15085
15086if test "$have_gcc_asm_for_x87" = yes; then
15087 # Some versions of gcc miscompile inline asm:
15088 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15089 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15090 case $CC in
15091 *gcc*)
15092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15093$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15094 saved_cflags="$CFLAGS"
15095 CFLAGS="-O2"
15096 if test "$cross_compiling" = yes; then :
15097 have_ipa_pure_const_bug=undefined
15098else
15099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15100/* end confdefs.h. */
15101
15102 __attribute__((noinline)) int
15103 foo(int *p) {
15104 int r;
15105 asm ( "movl \$6, (%1)\n\t"
15106 "xorl %0, %0\n\t"
15107 : "=r" (r) : "r" (p) : "memory"
15108 );
15109 return r;
15110 }
15111 int main() {
15112 int p = 8;
15113 if ((foo(&p) ? : p) != 6)
15114 return 1;
15115 return 0;
15116 }
15117
15118_ACEOF
15119if ac_fn_c_try_run "$LINENO"; then :
15120 have_ipa_pure_const_bug=no
15121else
15122 have_ipa_pure_const_bug=yes
15123fi
15124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15125 conftest.$ac_objext conftest.beam conftest.$ac_ext
15126fi
15127
15128 CFLAGS="$saved_cflags"
15129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15130$as_echo "$have_ipa_pure_const_bug" >&6; }
15131 if test "$have_ipa_pure_const_bug" = yes; then
15132
15133$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15134
15135 fi
15136 ;;
15137 esac
15138fi
15139
Guido van Rossum627b2d71993-12-24 10:39:16 +000015140# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015141ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015142
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015143ac_config_files="$ac_config_files Modules/ld_so_aix"
15144
Martin v. Löwis11437992002-04-12 09:54:03 +000015145cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146# This file is a shell script that caches the results of configure
15147# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015148# scripts and configure runs, see configure's option --config-cache.
15149# It is not useful on other systems. If it contains results you don't
15150# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015151#
Martin v. Löwis11437992002-04-12 09:54:03 +000015152# config.status only pays attention to the cache file if you give it
15153# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154#
Skip Montanaro6dead952003-09-25 14:50:04 +000015155# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015156# loading this file, other *unset* `ac_cv_foo' will be assigned the
15157# following values.
15158
15159_ACEOF
15160
Guido van Rossumf78abae1997-01-21 22:02:36 +000015161# The following way of writing the cache mishandles newlines in values,
15162# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015164# Ultrix sh set writes to stderr and can't be redirected directly,
15165# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166(
15167 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15168 eval ac_val=\$$ac_var
15169 case $ac_val in #(
15170 *${as_nl}*)
15171 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15173$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174 esac
15175 case $ac_var in #(
15176 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15178 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179 esac ;;
15180 esac
15181 done
15182
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15185 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 # `set' does not quote correctly, so add quotes: double-quote
15187 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015189 "s/'/'\\\\''/g;
15190 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 *)
15193 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196 esac |
15197 sort
15198) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015199 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15204 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015205 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15206 :end' >>confcache
15207if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15208 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015209 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15211$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015212 if test ! -f "$cache_file" || test -h "$cache_file"; then
15213 cat confcache >"$cache_file"
15214 else
15215 case $cache_file in #(
15216 */* | ?:*)
15217 mv -f confcache "$cache_file"$$ &&
15218 mv -f "$cache_file"$$ "$cache_file" ;; #(
15219 *)
15220 mv -f confcache "$cache_file" ;;
15221 esac
15222 fi
15223 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015224 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15226$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015227 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015228fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015229rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015231test "x$prefix" = xNONE && prefix=$ac_default_prefix
15232# Let make expand exec_prefix.
15233test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015234
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015235DEFS=-DHAVE_CONFIG_H
15236
Skip Montanaro6dead952003-09-25 14:50:04 +000015237ac_libobjs=
15238ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015239U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015240for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15241 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015244 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15245 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15247 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015248done
15249LIBOBJS=$ac_libobjs
15250
15251LTLIBOBJS=$ac_ltlibobjs
15252
15253
Martin v. Löwis11437992002-04-12 09:54:03 +000015254
Matthias Kloseb9621712010-04-24 17:59:49 +000015255
Victor Stinnere0be4232011-10-25 13:06:09 +020015256: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015257ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015258ac_clean_files_save=$ac_clean_files
15259ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015260{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15261$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15262as_write_fail=0
15263cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015264#! $SHELL
15265# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015266# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015267# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015268# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015269
Martin v. Löwis11437992002-04-12 09:54:03 +000015270debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015271ac_cs_recheck=false
15272ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274SHELL=\${CONFIG_SHELL-$SHELL}
15275export SHELL
15276_ASEOF
15277cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15278## -------------------- ##
15279## M4sh Initialization. ##
15280## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282# Be more Bourne compatible
15283DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015284if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 emulate sh
15286 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015288 # is contrary to our usage. Disable this feature.
15289 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015291else
Matthias Kloseb9621712010-04-24 17:59:49 +000015292 case `(set -o) 2>/dev/null` in #(
15293 *posix*) :
15294 set -o posix ;; #(
15295 *) :
15296 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015298fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015299
15300
Matthias Kloseb9621712010-04-24 17:59:49 +000015301as_nl='
15302'
15303export as_nl
15304# Printing a long string crashes Solaris 7 /usr/bin/printf.
15305as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15306as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15307as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15308# Prefer a ksh shell builtin over an external printf program on Solaris,
15309# but without wasting forks for bash or zsh.
15310if test -z "$BASH_VERSION$ZSH_VERSION" \
15311 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15312 as_echo='print -r --'
15313 as_echo_n='print -rn --'
15314elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15315 as_echo='printf %s\n'
15316 as_echo_n='printf %s'
15317else
15318 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15319 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15320 as_echo_n='/usr/ucb/echo -n'
15321 else
15322 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15323 as_echo_n_body='eval
15324 arg=$1;
15325 case $arg in #(
15326 *"$as_nl"*)
15327 expr "X$arg" : "X\\(.*\\)$as_nl";
15328 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15329 esac;
15330 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15331 '
15332 export as_echo_n_body
15333 as_echo_n='sh -c $as_echo_n_body as_echo'
15334 fi
15335 export as_echo_body
15336 as_echo='sh -c $as_echo_body as_echo'
15337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015338
15339# The user is always right.
15340if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 PATH_SEPARATOR=:
15342 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15343 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15344 PATH_SEPARATOR=';'
15345 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348
15349# IFS
15350# We need space, tab and new line, in precisely that order. Quoting is
15351# there to prevent editors from complaining about space-tab.
15352# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15353# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354IFS=" "" $as_nl"
15355
15356# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015357as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015358case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359 *[\\/]* ) as_myself=$0 ;;
15360 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015361for as_dir in $PATH
15362do
15363 IFS=$as_save_IFS
15364 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15366 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369 ;;
15370esac
15371# We did not find ourselves, most probably we were run as `sh COMMAND'
15372# in which case we are not to be found in the path.
15373if test "x$as_myself" = x; then
15374 as_myself=$0
15375fi
15376if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15378 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379fi
15380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381# Unset variables that we do not need and which cause bugs (e.g. in
15382# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15383# suppresses any "Segmentation fault" message there. '((' could
15384# trigger a bug in pdksh 5.2.14.
15385for as_var in BASH_ENV ENV MAIL MAILPATH
15386do eval test x\${$as_var+set} = xset \
15387 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388done
15389PS1='$ '
15390PS2='> '
15391PS4='+ '
15392
15393# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015394LC_ALL=C
15395export LC_ALL
15396LANGUAGE=C
15397export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398
Matthias Kloseb9621712010-04-24 17:59:49 +000015399# CDPATH.
15400(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15401
15402
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015403# as_fn_error STATUS ERROR [LINENO LOG_FD]
15404# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015407# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015408as_fn_error ()
15409{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015410 as_status=$1; test $as_status -eq 0 && as_status=1
15411 if test "$4"; then
15412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015415 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015416 as_fn_exit $as_status
15417} # as_fn_error
15418
15419
15420# as_fn_set_status STATUS
15421# -----------------------
15422# Set $? to STATUS, without forking.
15423as_fn_set_status ()
15424{
15425 return $1
15426} # as_fn_set_status
15427
15428# as_fn_exit STATUS
15429# -----------------
15430# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15431as_fn_exit ()
15432{
15433 set +e
15434 as_fn_set_status $1
15435 exit $1
15436} # as_fn_exit
15437
15438# as_fn_unset VAR
15439# ---------------
15440# Portably unset VAR.
15441as_fn_unset ()
15442{
15443 { eval $1=; unset $1;}
15444}
15445as_unset=as_fn_unset
15446# as_fn_append VAR VALUE
15447# ----------------------
15448# Append the text in VALUE to the end of the definition contained in VAR. Take
15449# advantage of any shell optimizations that allow amortized linear growth over
15450# repeated appends, instead of the typical quadratic growth present in naive
15451# implementations.
15452if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15453 eval 'as_fn_append ()
15454 {
15455 eval $1+=\$2
15456 }'
15457else
15458 as_fn_append ()
15459 {
15460 eval $1=\$$1\$2
15461 }
15462fi # as_fn_append
15463
15464# as_fn_arith ARG...
15465# ------------------
15466# Perform arithmetic evaluation on the ARGs, and store the result in the
15467# global $as_val. Take advantage of shells that can avoid forks. The arguments
15468# must be portable across $(()) and expr.
15469if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15470 eval 'as_fn_arith ()
15471 {
15472 as_val=$(( $* ))
15473 }'
15474else
15475 as_fn_arith ()
15476 {
15477 as_val=`expr "$@" || test $? -eq 1`
15478 }
15479fi # as_fn_arith
15480
15481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482if expr a : '\(a\)' >/dev/null 2>&1 &&
15483 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15484 as_expr=expr
15485else
15486 as_expr=false
15487fi
15488
15489if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15490 as_basename=basename
15491else
15492 as_basename=false
15493fi
15494
Matthias Kloseb9621712010-04-24 17:59:49 +000015495if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15496 as_dirname=dirname
15497else
15498 as_dirname=false
15499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015501as_me=`$as_basename -- "$0" ||
15502$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15503 X"$0" : 'X\(//\)$' \| \
15504 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015505$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015506 sed '/^.*\/\([^/][^/]*\)\/*$/{
15507 s//\1/
15508 q
15509 }
15510 /^X\/\(\/\/\)$/{
15511 s//\1/
15512 q
15513 }
15514 /^X\/\(\/\).*/{
15515 s//\1/
15516 q
15517 }
15518 s/.*/./; q'`
15519
Matthias Kloseb9621712010-04-24 17:59:49 +000015520# Avoid depending upon Character Ranges.
15521as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15522as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15523as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15524as_cr_digits='0123456789'
15525as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526
15527ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015528case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015529-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 xy) ECHO_C='\c';;
15533 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15534 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535 esac;;
15536*)
15537 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015538esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015539
Martin v. Löwis11437992002-04-12 09:54:03 +000015540rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541if test -d conf$$.dir; then
15542 rm -f conf$$.dir/conf$$.file
15543else
15544 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015547if (echo >conf$$.file) 2>/dev/null; then
15548 if ln -s conf$$.file conf$$ 2>/dev/null; then
15549 as_ln_s='ln -s'
15550 # ... but there are two gotchas:
15551 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15552 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015553 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015555 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 elif ln conf$$.file conf$$ 2>/dev/null; then
15557 as_ln_s=ln
15558 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015559 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015561else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015562 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015564rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15565rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015566
Matthias Kloseb9621712010-04-24 17:59:49 +000015567
15568# as_fn_mkdir_p
15569# -------------
15570# Create "$as_dir" as a directory, including parents if necessary.
15571as_fn_mkdir_p ()
15572{
15573
15574 case $as_dir in #(
15575 -*) as_dir=./$as_dir;;
15576 esac
15577 test -d "$as_dir" || eval $as_mkdir_p || {
15578 as_dirs=
15579 while :; do
15580 case $as_dir in #(
15581 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15582 *) as_qdir=$as_dir;;
15583 esac
15584 as_dirs="'$as_qdir' $as_dirs"
15585 as_dir=`$as_dirname -- "$as_dir" ||
15586$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15587 X"$as_dir" : 'X\(//\)[^/]' \| \
15588 X"$as_dir" : 'X\(//\)$' \| \
15589 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15590$as_echo X"$as_dir" |
15591 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15592 s//\1/
15593 q
15594 }
15595 /^X\(\/\/\)[^/].*/{
15596 s//\1/
15597 q
15598 }
15599 /^X\(\/\/\)$/{
15600 s//\1/
15601 q
15602 }
15603 /^X\(\/\).*/{
15604 s//\1/
15605 q
15606 }
15607 s/.*/./; q'`
15608 test -d "$as_dir" && break
15609 done
15610 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015611 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015612
15613
15614} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015615if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015617else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015618 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015619 as_mkdir_p=false
15620fi
15621
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015622
15623# as_fn_executable_p FILE
15624# -----------------------
15625# Test if FILE is an executable regular file.
15626as_fn_executable_p ()
15627{
15628 test -f "$1" && test -x "$1"
15629} # as_fn_executable_p
15630as_test_x='test -x'
15631as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015632
15633# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015634as_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 +000015635
15636# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015637as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
15639
Martin v. Löwis11437992002-04-12 09:54:03 +000015640exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015641## ----------------------------------- ##
15642## Main body of $CONFIG_STATUS script. ##
15643## ----------------------------------- ##
15644_ASEOF
15645test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15648# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015649# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015650# values after options handling.
15651ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015652This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015653generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015654
15655 CONFIG_FILES = $CONFIG_FILES
15656 CONFIG_HEADERS = $CONFIG_HEADERS
15657 CONFIG_LINKS = $CONFIG_LINKS
15658 CONFIG_COMMANDS = $CONFIG_COMMANDS
15659 $ $0 $@
15660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015661on `(hostname || uname -n) 2>/dev/null | sed 1q`
15662"
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664_ACEOF
15665
Matthias Kloseb9621712010-04-24 17:59:49 +000015666case $ac_config_files in *"
15667"*) set x $ac_config_files; shift; ac_config_files=$*;;
15668esac
15669
15670case $ac_config_headers in *"
15671"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15672esac
15673
15674
15675cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015676# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015677config_files="$ac_config_files"
15678config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
Matthias Kloseb9621712010-04-24 17:59:49 +000015682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015683ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015684\`$as_me' instantiates files and other configuration actions
15685from templates according to the current configuration. Unless the files
15686and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015689
15690 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 --config print configuration, then exit
15693 -q, --quiet, --silent
15694 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 -d, --debug don't remove temporary files
15696 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 --file=FILE[:TEMPLATE]
15698 instantiate the configuration file FILE
15699 --header=FILE[:TEMPLATE]
15700 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015701
15702Configuration files:
15703$config_files
15704
15705Configuration headers:
15706$config_headers
15707
Matthias Kloseb9621712010-04-24 17:59:49 +000015708Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15712ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015713ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015714python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015715configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015716 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015718Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015719This config.status script is free software; the Free Software Foundation
15720gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015721
15722ac_pwd='$ac_pwd'
15723srcdir='$srcdir'
15724INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015725MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015726test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015727_ACEOF
15728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15730# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015731ac_need_defaults=:
15732while test $# != 0
15733do
15734 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015735 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15737 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015738 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015740 --*=)
15741 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15742 ac_optarg=
15743 ac_shift=:
15744 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015746 ac_option=$1
15747 ac_optarg=$2
15748 ac_shift=shift
15749 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 esac
15751
Skip Montanaro6dead952003-09-25 14:50:04 +000015752 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015754 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15755 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 $as_echo "$ac_cs_version"; exit ;;
15758 --config | --confi | --conf | --con | --co | --c )
15759 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 debug=: ;;
15762 --file | --fil | --fi | --f )
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"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015766 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 esac
15768 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 ac_need_defaults=false;;
15770 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015771 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 case $ac_optarg in
15773 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15774 esac
15775 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777 --he | --h)
15778 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015779 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015780Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015783 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15784 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15785 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015786
15787 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015788 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015789Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015793
15794 esac
15795 shift
15796done
15797
Skip Montanaro6dead952003-09-25 14:50:04 +000015798ac_configure_extra_args=
15799
15800if $ac_cs_silent; then
15801 exec 6>/dev/null
15802 ac_configure_extra_args="$ac_configure_extra_args --silent"
15803fi
15804
15805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015806cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015807if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015808 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 shift
15810 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15811 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015813 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015814fi
15815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015817cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818exec 5>>config.log
15819{
15820 echo
15821 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15822## Running $as_me. ##
15823_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015824 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015828cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832
15833# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015834for ac_config_target in $ac_config_targets
15835do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015836 case $ac_config_target in
15837 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15838 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15839 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015840 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15841 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15843 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015844 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015845 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846
Victor Stinnere0be4232011-10-25 13:06:09 +020015847 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015848 esac
15849done
15850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851
Martin v. Löwis11437992002-04-12 09:54:03 +000015852# If the user did not use the arguments to specify the items to instantiate,
15853# then the envvar interface is used. Set only those that are not.
15854# We use the long form for the default assignment because of an extremely
15855# bizarre bug on SunOS 4.1.3.
15856if $ac_need_defaults; then
15857 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15858 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15859fi
15860
Skip Montanaro6dead952003-09-25 14:50:04 +000015861# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015863# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864# Hook for its removal unless debugging.
15865# Note that there is a small window in which the directory will not be cleaned:
15866# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015867$debug ||
15868{
Victor Stinnere0be4232011-10-25 13:06:09 +020015869 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015870 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015871 : "${ac_tmp:=$tmp}"
15872 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015875}
Martin v. Löwis11437992002-04-12 09:54:03 +000015876# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015880 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015881} ||
15882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883 tmp=./conf$$-$RANDOM
15884 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015885} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015886ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015887
Matthias Kloseb9621712010-04-24 17:59:49 +000015888# Set up the scripts for CONFIG_FILES section.
15889# No need to generate them if there are no CONFIG_FILES.
15890# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015891if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015892
Matthias Kloseb9621712010-04-24 17:59:49 +000015893
15894ac_cr=`echo X | tr X '\015'`
15895# On cygwin, bash can eat \r inside `` if the user requested igncr.
15896# But we know of no other shell where ac_cr would be empty at this
15897# point, so we can use a bashism as a fallback.
15898if test "x$ac_cr" = x; then
15899 eval ac_cr=\$\'\\r\'
15900fi
15901ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15902if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015903 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015904else
15905 ac_cs_awk_cr=$ac_cr
15906fi
15907
Victor Stinnere0be4232011-10-25 13:06:09 +020015908echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015909_ACEOF
15910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911
Matthias Kloseb9621712010-04-24 17:59:49 +000015912{
15913 echo "cat >conf$$subs.awk <<_ACEOF" &&
15914 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15915 echo "_ACEOF"
15916} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015917 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15918ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919ac_delim='%!_!# '
15920for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015921 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015922 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923
Matthias Kloseb9621712010-04-24 17:59:49 +000015924 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15925 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926 break
15927 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015928 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929 else
15930 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015931 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932done
Matthias Kloseb9621712010-04-24 17:59:49 +000015933rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015934
Matthias Kloseb9621712010-04-24 17:59:49 +000015935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015936cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015938sed -n '
15939h
15940s/^/S["/; s/!.*/"]=/
15941p
15942g
15943s/^[^!]*!//
15944:repl
15945t repl
15946s/'"$ac_delim"'$//
15947t delim
15948:nl
15949h
15950s/\(.\{148\}\)..*/\1/
15951t more1
15952s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15953p
15954n
15955b repl
15956:more1
15957s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15958p
15959g
15960s/.\{148\}//
15961t nl
15962:delim
15963h
15964s/\(.\{148\}\)..*/\1/
15965t more2
15966s/["\\]/\\&/g; s/^/"/; s/$/"/
15967p
15968b
15969:more2
15970s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15971p
15972g
15973s/.\{148\}//
15974t delim
15975' <conf$$subs.awk | sed '
15976/^[^""]/{
15977 N
15978 s/\n//
15979}
15980' >>$CONFIG_STATUS || ac_write_fail=1
15981rm -f conf$$subs.awk
15982cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15983_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015984cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 for (key in S) S_is_set[key] = 1
15986 FS = ""
15987
15988}
15989{
15990 line = $ 0
15991 nfields = split(line, field, "@")
15992 substed = 0
15993 len = length(field[1])
15994 for (i = 2; i < nfields; i++) {
15995 key = field[i]
15996 keylen = length(key)
15997 if (S_is_set[key]) {
15998 value = S[key]
15999 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16000 len += length(value) + length(field[++i])
16001 substed = 1
16002 } else
16003 len += 1 + keylen
16004 }
16005
16006 print line
16007}
16008
16009_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16012if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16013 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16014else
16015 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016016fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016017 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016018_ACEOF
16019
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016020# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16021# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016022# trailing colons and then remove the whole line if VPATH becomes empty
16023# (actually we leave an empty line to preserve line numbers).
16024if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016025 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16026h
16027s///
16028s/^/:/
16029s/[ ]*$/:/
16030s/:\$(srcdir):/:/g
16031s/:\${srcdir}:/:/g
16032s/:@srcdir@:/:/g
16033s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016035x
16036s/\(=[ ]*\).*/\1/
16037G
16038s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039s/^[^=]*=[ ]*$//
16040}'
16041fi
16042
Matthias Kloseb9621712010-04-24 17:59:49 +000016043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016044fi # test -n "$CONFIG_FILES"
16045
Matthias Kloseb9621712010-04-24 17:59:49 +000016046# Set up the scripts for CONFIG_HEADERS section.
16047# No need to generate them if there are no CONFIG_HEADERS.
16048# This happens for instance with `./config.status Makefile'.
16049if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016050cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016051BEGIN {
16052_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016053
Matthias Kloseb9621712010-04-24 17:59:49 +000016054# Transform confdefs.h into an awk script `defines.awk', embedded as
16055# here-document in config.status, that substitutes the proper values into
16056# config.h.in to produce config.h.
16057
16058# Create a delimiter string that does not exist in confdefs.h, to ease
16059# handling of long lines.
16060ac_delim='%!_!# '
16061for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016062 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16063 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016064 break
16065 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016066 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 else
16068 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16069 fi
16070done
16071
16072# For the awk script, D is an array of macro values keyed by name,
16073# likewise P contains macro parameters if any. Preserve backslash
16074# newline sequences.
16075
16076ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16077sed -n '
16078s/.\{148\}/&'"$ac_delim"'/g
16079t rset
16080:rset
16081s/^[ ]*#[ ]*define[ ][ ]*/ /
16082t def
16083d
16084:def
16085s/\\$//
16086t bsnl
16087s/["\\]/\\&/g
16088s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16089D["\1"]=" \3"/p
16090s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16091d
16092:bsnl
16093s/["\\]/\\&/g
16094s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16095D["\1"]=" \3\\\\\\n"\\/p
16096t cont
16097s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16098t cont
16099d
16100:cont
16101n
16102s/.\{148\}/&'"$ac_delim"'/g
16103t clear
16104:clear
16105s/\\$//
16106t bsnlc
16107s/["\\]/\\&/g; s/^/"/; s/$/"/p
16108d
16109:bsnlc
16110s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16111b cont
16112' <confdefs.h | sed '
16113s/'"$ac_delim"'/"\\\
16114"/g' >>$CONFIG_STATUS || ac_write_fail=1
16115
16116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16117 for (key in D) D_is_set[key] = 1
16118 FS = ""
16119}
16120/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16121 line = \$ 0
16122 split(line, arg, " ")
16123 if (arg[1] == "#") {
16124 defundef = arg[2]
16125 mac1 = arg[3]
16126 } else {
16127 defundef = substr(arg[1], 2)
16128 mac1 = arg[2]
16129 }
16130 split(mac1, mac2, "(") #)
16131 macro = mac2[1]
16132 prefix = substr(line, 1, index(line, defundef) - 1)
16133 if (D_is_set[macro]) {
16134 # Preserve the white space surrounding the "#".
16135 print prefix "define", macro P[macro] D[macro]
16136 next
16137 } else {
16138 # Replace #undef with comments. This is necessary, for example,
16139 # in the case of _POSIX_SOURCE, which is predefined and required
16140 # on some systems where configure will not decide to define it.
16141 if (defundef == "undef") {
16142 print "/*", prefix defundef, macro, "*/"
16143 next
16144 }
16145 }
16146}
16147{ print }
16148_ACAWK
16149_ACEOF
16150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016151 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016152fi # test -n "$CONFIG_HEADERS"
16153
16154
16155eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16156shift
16157for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016158do
16159 case $ac_tag in
16160 :[FHLC]) ac_mode=$ac_tag; continue;;
16161 esac
16162 case $ac_mode$ac_tag in
16163 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016164 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165 :[FH]-) ac_tag=-:-;;
16166 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16167 esac
16168 ac_save_IFS=$IFS
16169 IFS=:
16170 set x $ac_tag
16171 IFS=$ac_save_IFS
16172 shift
16173 ac_file=$1
16174 shift
16175
16176 case $ac_mode in
16177 :L) ac_source=$1;;
16178 :[FH])
16179 ac_file_inputs=
16180 for ac_f
16181 do
16182 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016183 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184 *) # Look for the file first in the build tree, then in the source tree
16185 # (if the path is not absolute). The absolute path cannot be DOS-style,
16186 # because $ac_f cannot contain `:'.
16187 test -f "$ac_f" ||
16188 case $ac_f in
16189 [\\/$]*) false;;
16190 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16191 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016192 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016194 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16195 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196 done
16197
16198 # Let's still pretend it is `configure' which instantiates (i.e., don't
16199 # use $as_me), people would be surprised to read:
16200 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016201 configure_input='Generated from '`
16202 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16203 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 if test x"$ac_file" != x-; then
16205 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016206 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16207$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016209 # Neutralize special characters interpreted by sed in replacement strings.
16210 case $configure_input in #(
16211 *\&* | *\|* | *\\* )
16212 ac_sed_conf_input=`$as_echo "$configure_input" |
16213 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16214 *) ac_sed_conf_input=$configure_input;;
16215 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216
16217 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016218 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16219 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220 esac
16221 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 esac
16223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016225$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226 X"$ac_file" : 'X\(//\)[^/]' \| \
16227 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016229$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16231 s//\1/
16232 q
16233 }
16234 /^X\(\/\/\)[^/].*/{
16235 s//\1/
16236 q
16237 }
16238 /^X\(\/\/\)$/{
16239 s//\1/
16240 q
16241 }
16242 /^X\(\/\).*/{
16243 s//\1/
16244 q
16245 }
16246 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 ac_builddir=.
16249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250case "$ac_dir" in
16251.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16252*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016253 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016255 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 case $ac_top_builddir_sub in
16257 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16258 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16259 esac ;;
16260esac
16261ac_abs_top_builddir=$ac_pwd
16262ac_abs_builddir=$ac_pwd$ac_dir_suffix
16263# for backward compatibility:
16264ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016265
16266case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269 ac_top_srcdir=$ac_top_builddir_sub
16270 ac_abs_top_srcdir=$ac_pwd ;;
16271 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273 ac_top_srcdir=$srcdir
16274 ac_abs_top_srcdir=$srcdir ;;
16275 *) # Relative name.
16276 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16277 ac_top_srcdir=$ac_top_build_prefix$srcdir
16278 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016279esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016281
Martin v. Löwis11437992002-04-12 09:54:03 +000016282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283 case $ac_mode in
16284 :F)
16285 #
16286 # CONFIG_FILE
16287 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016288
16289 case $INSTALL in
16290 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016293 ac_MKDIR_P=$MKDIR_P
16294 case $MKDIR_P in
16295 [\\/$]* | ?:[\\/]* ) ;;
16296 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16297 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016298_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299
Matthias Kloseb9621712010-04-24 17:59:49 +000016300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301# If the template does not know about datarootdir, expand it.
16302# FIXME: This hack should be removed a few years after 2.60.
16303ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016304ac_sed_dataroot='
16305/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306 p
16307 q
16308}
16309/@datadir@/p
16310/@docdir@/p
16311/@infodir@/p
16312/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016313/@mandir@/p'
16314case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315*datarootdir*) ac_datarootdir_seen=yes;;
16316*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016317 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16318$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016320cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321 ac_datarootdir_hack='
16322 s&@datadir@&$datadir&g
16323 s&@docdir@&$docdir&g
16324 s&@infodir@&$infodir&g
16325 s&@localedir@&$localedir&g
16326 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016327 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328esac
16329_ACEOF
16330
16331# Neutralize VPATH when `$srcdir' = `.'.
16332# Shell code in configure.ac might set extrasub.
16333# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16335ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016336$extrasub
16337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016339:t
16340/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016341s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016343s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344s&@srcdir@&$ac_srcdir&;t t
16345s&@abs_srcdir@&$ac_abs_srcdir&;t t
16346s&@top_srcdir@&$ac_top_srcdir&;t t
16347s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16348s&@builddir@&$ac_builddir&;t t
16349s&@abs_builddir@&$ac_abs_builddir&;t t
16350s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16351s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016352s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016354"
Victor Stinnere0be4232011-10-25 13:06:09 +020016355eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16356 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016358test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016359 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16360 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16361 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016362 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016363which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016364$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016365which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016366
Victor Stinnere0be4232011-10-25 13:06:09 +020016367 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016369 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16370 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016372 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373 ;;
16374 :H)
16375 #
16376 # CONFIG_HEADER
16377 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016379 {
16380 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016381 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16382 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016383 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016384 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16386$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016389 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016390 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 fi
16392 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016393 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016394 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016395 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399
16400 esac
16401
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016402
16403 case $ac_file$ac_mode in
16404 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16405
16406 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407done # for ac_tag
16408
Guido van Rossum627b2d71993-12-24 10:39:16 +000016409
Matthias Kloseb9621712010-04-24 17:59:49 +000016410as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016411_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016412ac_clean_files=$ac_clean_files_save
16413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016415 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016416
Martin v. Löwis11437992002-04-12 09:54:03 +000016417
16418# configure is writing to config.log, and then calls config.status.
16419# config.status does its own redirection, appending to config.log.
16420# Unfortunately, on DOS this fails, as config.log is still kept open
16421# by configure, so config.status won't be able to write to it; its
16422# output is simply discarded. So we exec the FD to /dev/null,
16423# effectively closing config.log, so it can be properly (re)opened and
16424# appended to by config.status. When coming back to configure, we
16425# need to make the FD available again.
16426if test "$no_create" != yes; then
16427 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016428 ac_config_status_args=
16429 test "$silent" = yes &&
16430 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016432 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 exec 5>>config.log
16434 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16435 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016436 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016437fi
16438if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16439 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16440$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016441fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016442
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016443
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016444echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016445if test ! -f Modules/Setup
16446then
16447 cp $srcdir/Modules/Setup.dist Modules/Setup
16448fi
16449
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016450echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016451if test ! -f Modules/Setup.local
16452then
16453 echo "# Edit this file for local setup changes" >Modules/Setup.local
16454fi
16455
16456echo "creating Makefile"
16457$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16458 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016459 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016460mv config.c Modules