blob: d3c722fcd52cb5e550152d50ead0a07bff1ec143 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $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 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_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 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000627SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000628THREADHEADERS
629UNICODE_OBJS
630LIBC
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
656SO
657LIBTOOL_CRUFT
658OTHER_LIBTOOL_OPT
659UNIVERSAL_ARCH_FLAGS
660BASECFLAGS
661OPT
662LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000663MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100667HAS_HG
668HGBRANCH
669HGTAG
670HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400671BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000672SVNVERSION
673ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100674ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000675AR
676RANLIB
677GNULD
678LINKCC
679RUNSHARED
680INSTSONAME
681LDLIBRARYDIR
682BLDLIBRARY
683DLLLIBRARY
684LDLIBRARY
685LIBRARY
686BUILDEXEEXT
687EGREP
688GREP
689CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100690MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100691ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000692MAINCC
693CXX
694OBJEXT
695EXEEXT
696ac_ct_CC
697CPPFLAGS
698LDFLAGS
699CFLAGS
700CC
701EXPORT_MACOSX_DEPLOYMENT_TARGET
702CONFIGURE_MACOSX_DEPLOYMENT_TARGET
703EXTRAMACHDEPPATH
704EXTRAPLATDIR
705SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100706_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000707MACHDEP
708FRAMEWORKINSTALLAPPSPREFIX
709FRAMEWORKUNIXTOOLSPREFIX
710FRAMEWORKALTINSTALLLAST
711FRAMEWORKALTINSTALLFIRST
712FRAMEWORKINSTALLLAST
713FRAMEWORKINSTALLFIRST
714PYTHONFRAMEWORKINSTALLDIR
715PYTHONFRAMEWORKPREFIX
716PYTHONFRAMEWORKDIR
717PYTHONFRAMEWORKIDENTIFIER
718PYTHONFRAMEWORK
719LIPO_32BIT_FLAGS
720ARCH_RUN_32BIT
721UNIVERSALSDK
722CONFIG_ARGS
723SOVERSION
724VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100725PYTHON_FOR_BUILD
726host_os
727host_vendor
728host_cpu
729host
730build_os
731build_vendor
732build_cpu
733build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000734target_alias
735host_alias
736build_alias
737LIBS
738ECHO_T
739ECHO_N
740ECHO_C
741DEFS
742mandir
743localedir
744libdir
745psdir
746pdfdir
747dvidir
748htmldir
749infodir
750docdir
751oldincludedir
752includedir
753localstatedir
754sharedstatedir
755sysconfdir
756datadir
757datarootdir
758libexecdir
759sbindir
760bindir
761program_transform_name
762prefix
763exec_prefix
764PACKAGE_URL
765PACKAGE_BUGREPORT
766PACKAGE_STRING
767PACKAGE_VERSION
768PACKAGE_TARNAME
769PACKAGE_NAME
770PATH_SEPARATOR
771SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000772ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000773ac_user_opts='
774enable_option_checking
775enable_universalsdk
776with_universal_archs
777with_framework_name
778enable_framework
779with_gcc
780with_cxx_main
781with_suffix
782enable_shared
783enable_profiling
784with_pydebug
785enable_toolbox_glue
786with_libs
787with_system_expat
788with_system_ffi
789with_dbmliborder
790with_signal_module
791with_dec_threads
792with_threads
793with_thread
794with_pth
795enable_ipv6
796with_doc_strings
797with_tsc
798with_pymalloc
799with_valgrind
800with_wctype_functions
801with_fpectl
802with_libm
803with_libc
804enable_big_digits
805enable_unicode
806'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 ac_precious_vars='build_alias
808host_alias
809target_alias
810CC
811CFLAGS
812LDFLAGS
813LIBS
814CPPFLAGS
815CPP'
816
Guido van Rossum627b2d71993-12-24 10:39:16 +0000817
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000819ac_init_help=
820ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000821ac_unrecognized_opts=
822ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823# The variables have the same names as the options, with
824# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000825cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828no_recursion=
829prefix=NONE
830program_prefix=NONE
831program_suffix=NONE
832program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837x_includes=NONE
838x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000839
840# Installation directory options.
841# These are left unexpanded so users can "make install exec_prefix=/foo"
842# and all the variables that are supposed to be based on exec_prefix
843# by default will actually change.
844# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846bindir='${exec_prefix}/bin'
847sbindir='${exec_prefix}/sbin'
848libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000849datarootdir='${prefix}/share'
850datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851sysconfdir='${prefix}/etc'
852sharedstatedir='${prefix}/com'
853localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854includedir='${prefix}/include'
855oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
857infodir='${datarootdir}/info'
858htmldir='${docdir}'
859dvidir='${docdir}'
860pdfdir='${docdir}'
861psdir='${docdir}'
862libdir='${exec_prefix}/lib'
863localedir='${datarootdir}/locale'
864mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000867ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000869do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870 # If the previous option needs an argument, assign it.
871 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 ac_prev=
874 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000875 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Martin v. Löwiseba40652007-08-30 20:10:57 +0000877 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000878 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
879 *=) ac_optarg= ;;
880 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000881 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883 # Accept the important Cygnus configure options, so we can diagnose typos.
884
Martin v. Löwiseba40652007-08-30 20:10:57 +0000885 case $ac_dashdash$ac_option in
886 --)
887 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889 -bindir | --bindir | --bindi | --bind | --bin | --bi)
890 ac_prev=bindir ;;
891 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893
894 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000895 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899 -cache-file | --cache-file | --cache-fil | --cache-fi \
900 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
901 ac_prev=cache_file ;;
902 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
903 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 cache_file=$ac_optarg ;;
905
906 --config-cache | -C)
907 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Martin v. Löwiseba40652007-08-30 20:10:57 +0000909 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000911 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913
Martin v. Löwiseba40652007-08-30 20:10:57 +0000914 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
915 | --dataroo | --dataro | --datar)
916 ac_prev=datarootdir ;;
917 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
918 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
919 datarootdir=$ac_optarg ;;
920
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000922 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000924 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000925 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000926 ac_useropt_orig=$ac_useropt
927 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
928 case $ac_user_opts in
929 *"
930"enable_$ac_useropt"
931"*) ;;
932 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
933 ac_unrecognized_sep=', ';;
934 esac
935 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936
937 -docdir | --docdir | --docdi | --doc | --do)
938 ac_prev=docdir ;;
939 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
940 docdir=$ac_optarg ;;
941
942 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
943 ac_prev=dvidir ;;
944 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
945 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
947 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000948 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000950 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000951 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000952 ac_useropt_orig=$ac_useropt
953 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
954 case $ac_user_opts in
955 *"
956"enable_$ac_useropt"
957"*) ;;
958 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
959 ac_unrecognized_sep=', ';;
960 esac
961 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
964 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
965 | --exec | --exe | --ex)
966 ac_prev=exec_prefix ;;
967 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
968 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
969 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971
972 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000973 # Obsolete; use --with-gas.
974 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 -help | --help | --hel | --he | -h)
977 ac_init_help=long ;;
978 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
979 ac_init_help=recursive ;;
980 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
981 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Martin v. Löwiseba40652007-08-30 20:10:57 +0000988 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
989 ac_prev=htmldir ;;
990 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
991 | --ht=*)
992 htmldir=$ac_optarg ;;
993
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994 -includedir | --includedir | --includedi | --included | --include \
995 | --includ | --inclu | --incl | --inc)
996 ac_prev=includedir ;;
997 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
998 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
1001 -infodir | --infodir | --infodi | --infod | --info | --inf)
1002 ac_prev=infodir ;;
1003 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
1006 -libdir | --libdir | --libdi | --libd)
1007 ac_prev=libdir ;;
1008 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010
1011 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1012 | --libexe | --libex | --libe)
1013 ac_prev=libexecdir ;;
1014 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1015 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
Martin v. Löwiseba40652007-08-30 20:10:57 +00001018 -localedir | --localedir | --localedi | --localed | --locale)
1019 ac_prev=localedir ;;
1020 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1021 localedir=$ac_optarg ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001024 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025 ac_prev=localstatedir ;;
1026 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001027 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1031 ac_prev=mandir ;;
1032 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036 # Obsolete; use --without-fp.
1037 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
1039 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041 no_create=yes ;;
1042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1044 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1045 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1048 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1049 | --oldin | --oldi | --old | --ol | --o)
1050 ac_prev=oldincludedir ;;
1051 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1052 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1053 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1057 ac_prev=prefix ;;
1058 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1062 | --program-pre | --program-pr | --program-p)
1063 ac_prev=program_prefix ;;
1064 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1065 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1069 | --program-suf | --program-su | --program-s)
1070 ac_prev=program_suffix ;;
1071 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1072 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -program-transform-name | --program-transform-name \
1076 | --program-transform-nam | --program-transform-na \
1077 | --program-transform-n | --program-transform- \
1078 | --program-transform | --program-transfor \
1079 | --program-transfo | --program-transf \
1080 | --program-trans | --program-tran \
1081 | --progr-tra | --program-tr | --program-t)
1082 ac_prev=program_transform_name ;;
1083 -program-transform-name=* | --program-transform-name=* \
1084 | --program-transform-nam=* | --program-transform-na=* \
1085 | --program-transform-n=* | --program-transform-=* \
1086 | --program-transform=* | --program-transfor=* \
1087 | --program-transfo=* | --program-transf=* \
1088 | --program-trans=* | --program-tran=* \
1089 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Martin v. Löwiseba40652007-08-30 20:10:57 +00001092 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1093 ac_prev=pdfdir ;;
1094 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1095 pdfdir=$ac_optarg ;;
1096
1097 -psdir | --psdir | --psdi | --psd | --ps)
1098 ac_prev=psdir ;;
1099 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1100 psdir=$ac_optarg ;;
1101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1103 | -silent | --silent | --silen | --sile | --sil)
1104 silent=yes ;;
1105
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1107 ac_prev=sbindir ;;
1108 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1109 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111
1112 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1113 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1114 | --sharedst | --shareds | --shared | --share | --shar \
1115 | --sha | --sh)
1116 ac_prev=sharedstatedir ;;
1117 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1118 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1119 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1120 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123 -site | --site | --sit)
1124 ac_prev=site ;;
1125 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1129 ac_prev=srcdir ;;
1130 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001133 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1134 | --syscon | --sysco | --sysc | --sys | --sy)
1135 ac_prev=sysconfdir ;;
1136 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1137 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
1145 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1146 verbose=yes ;;
1147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 -version | --version | --versio | --versi | --vers | -V)
1149 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001152 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001154 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001155 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001156 ac_useropt_orig=$ac_useropt
1157 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1158 case $ac_user_opts in
1159 *"
1160"with_$ac_useropt"
1161"*) ;;
1162 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1163 ac_unrecognized_sep=', ';;
1164 esac
1165 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
1167 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001168 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001171 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001172 ac_useropt_orig=$ac_useropt
1173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1174 case $ac_user_opts in
1175 *"
1176"with_$ac_useropt"
1177"*) ;;
1178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1179 ac_unrecognized_sep=', ';;
1180 esac
1181 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183 --x)
1184 # Obsolete; use --with-x.
1185 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
1187 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1188 | --x-incl | --x-inc | --x-in | --x-i)
1189 ac_prev=x_includes ;;
1190 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1191 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1195 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1196 ac_prev=x_libraries ;;
1197 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1198 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001201 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1202Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203 ;;
1204
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 *=*)
1206 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1207 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001208 case $ac_envvar in #(
1209 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001210 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001211 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 export $ac_envvar ;;
1214
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001215 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001217 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001219 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001220 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 ;;
1222
1223 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224done
1225
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001228 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229fi
1230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001231if test -n "$ac_unrecognized_opts"; then
1232 case $enable_option_checking in
1233 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001234 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001235 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1236 esac
1237fi
1238
1239# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001240for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1241 datadir sysconfdir sharedstatedir localstatedir includedir \
1242 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1243 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001245 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001246 # Remove trailing slashes.
1247 case $ac_val in
1248 */ )
1249 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1250 eval $ac_var=\$ac_val;;
1251 esac
1252 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001254 [\\/$]* | ?:[\\/]* ) continue;;
1255 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001257 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001258done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260# There might be people who depend on the old broken behavior: `$host'
1261# used to hold the argument of --host etc.
1262# FIXME: To remove some day.
1263build=$build_alias
1264host=$host_alias
1265target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267# FIXME: To remove some day.
1268if test "x$host_alias" != x; then
1269 if test "x$build_alias" = x; then
1270 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 elif test "x$build_alias" != "x$host_alias"; then
1272 cross_compiling=yes
1273 fi
1274fi
1275
1276ac_tool_prefix=
1277test -n "$host_alias" && ac_tool_prefix=$host_alias-
1278
1279test "$silent" = yes && exec 6>/dev/null
1280
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281
Martin v. Löwiseba40652007-08-30 20:10:57 +00001282ac_pwd=`pwd` && test -n "$ac_pwd" &&
1283ac_ls_di=`ls -di .` &&
1284ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001285 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001286test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001287 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001288
1289
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290# Find the source files, if location was not specified.
1291if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001292 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001294 ac_confdir=`$as_dirname -- "$as_myself" ||
1295$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1296 X"$as_myself" : 'X\(//\)[^/]' \| \
1297 X"$as_myself" : 'X\(//\)$' \| \
1298 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1299$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001300 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1301 s//\1/
1302 q
1303 }
1304 /^X\(\/\/\)[^/].*/{
1305 s//\1/
1306 q
1307 }
1308 /^X\(\/\/\)$/{
1309 s//\1/
1310 q
1311 }
1312 /^X\(\/\).*/{
1313 s//\1/
1314 q
1315 }
1316 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001317 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001318 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319 srcdir=..
1320 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001321else
1322 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001324if test ! -r "$srcdir/$ac_unique_file"; then
1325 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001326 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001328ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1329ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001330 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001331 pwd)`
1332# When building in place, set srcdir=.
1333if test "$ac_abs_confdir" = "$ac_pwd"; then
1334 srcdir=.
1335fi
1336# Remove unnecessary trailing slashes from srcdir.
1337# Double slashes in file names in object file debugging info
1338# mess up M-x gdb in Emacs.
1339case $srcdir in
1340*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1341esac
1342for ac_var in $ac_precious_vars; do
1343 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1344 eval ac_env_${ac_var}_value=\$${ac_var}
1345 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1346 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1347done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001348
Martin v. Löwis11437992002-04-12 09:54:03 +00001349#
1350# Report the --help message.
1351#
1352if test "$ac_init_help" = "long"; then
1353 # Omit some internal or obsolete options to make the list less imposing.
1354 # This message is too long to be a string in the A/UX 3.1 sh.
1355 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001356\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001357
1358Usage: $0 [OPTION]... [VAR=VALUE]...
1359
1360To assign environment variables (e.g., CC, CFLAGS...), specify them as
1361VAR=VALUE. See below for descriptions of some of the useful variables.
1362
1363Defaults for the options are specified in brackets.
1364
1365Configuration:
1366 -h, --help display this help and exit
1367 --help=short display options specific to this package
1368 --help=recursive display the short help of all the included packages
1369 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001370 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001371 --cache-file=FILE cache test results in FILE [disabled]
1372 -C, --config-cache alias for \`--cache-file=config.cache'
1373 -n, --no-create do not create output files
1374 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1375
Martin v. Löwis11437992002-04-12 09:54:03 +00001376Installation directories:
1377 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001378 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001380 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
1382By default, \`make install' will install all the files in
1383\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1384an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1385for instance \`--prefix=\$HOME'.
1386
1387For better control, use the options below.
1388
1389Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001390 --bindir=DIR user executables [EPREFIX/bin]
1391 --sbindir=DIR system admin executables [EPREFIX/sbin]
1392 --libexecdir=DIR program executables [EPREFIX/libexec]
1393 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1394 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1395 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1396 --libdir=DIR object code libraries [EPREFIX/lib]
1397 --includedir=DIR C header files [PREFIX/include]
1398 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1399 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1400 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1401 --infodir=DIR info documentation [DATAROOTDIR/info]
1402 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1403 --mandir=DIR man documentation [DATAROOTDIR/man]
1404 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1405 --htmldir=DIR html documentation [DOCDIR]
1406 --dvidir=DIR dvi documentation [DOCDIR]
1407 --pdfdir=DIR pdf documentation [DOCDIR]
1408 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001409_ACEOF
1410
1411 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001412
1413System types:
1414 --build=BUILD configure for building on BUILD [guessed]
1415 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416_ACEOF
1417fi
1418
1419if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001420 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001421 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001422 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 cat <<\_ACEOF
1424
1425Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001426 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1428 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001429 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001430 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001431 --enable-framework[=INSTALLDIR]
1432 Build (MacOSX|Darwin) framework
1433 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001434 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1436 --enable-ipv6 Enable ipv6 (with ipv4) support
1437 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001438 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001439 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001441 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001442
1443Optional Packages:
1444 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1445 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001446 --with-universal-archs=ARCH
1447 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001448 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001449 --with-framework-name=FRAMEWORK
1450 specify an alternate name of the framework built
1451 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001453 --with-cxx-main=<compiler>
1454 compile main() and link python executable with C++
1455 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --with-suffix=.exe set executable suffix
1457 --with-pydebug build with Py_DEBUG defined
1458 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001459 --with-system-expat build pyexpat module using an installed expat
1460 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001461 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001462 --with-dbmliborder=db1:db2:...
1463 order to check db backends for dbm. Valid value is a
1464 colon separated string with the backend names
1465 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --with-signal-module disable/enable signal module
1467 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1468 --with(out)-threads[=DIRECTORY]
1469 disable/enable thread support
1470 --with(out)-thread[=DIRECTORY]
1471 deprecated; use --with(out)-threads
1472 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001474 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001476 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-fpectl enable SIGFPE catching
1479 --with-libm=STRING math library
1480 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482Some influential environment variables:
1483 CC C compiler command
1484 CFLAGS C compiler flags
1485 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1486 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001487 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001488 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 CPP C preprocessor
1491
1492Use these variables to override the choices made by `configure' or to help
1493it to find libraries and programs with nonstandard names/locations.
1494
Georg Brandl464432d2009-05-20 18:24:08 +00001495Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001496_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001498fi
1499
1500if test "$ac_init_help" = "recursive"; then
1501 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001502 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001503 test -d "$ac_dir" ||
1504 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1505 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001506 ac_builddir=.
1507
Martin v. Löwiseba40652007-08-30 20:10:57 +00001508case "$ac_dir" in
1509.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1510*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001511 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001513 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001514 case $ac_top_builddir_sub in
1515 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1516 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1517 esac ;;
1518esac
1519ac_abs_top_builddir=$ac_pwd
1520ac_abs_builddir=$ac_pwd$ac_dir_suffix
1521# for backward compatibility:
1522ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001523
1524case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001525 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001527 ac_top_srcdir=$ac_top_builddir_sub
1528 ac_abs_top_srcdir=$ac_pwd ;;
1529 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001531 ac_top_srcdir=$srcdir
1532 ac_abs_top_srcdir=$srcdir ;;
1533 *) # Relative name.
1534 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1535 ac_top_srcdir=$ac_top_build_prefix$srcdir
1536 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001537esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539
Martin v. Löwiseba40652007-08-30 20:10:57 +00001540 cd "$ac_dir" || { ac_status=$?; continue; }
1541 # Check for guested configure.
1542 if test -f "$ac_srcdir/configure.gnu"; then
1543 echo &&
1544 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1545 elif test -f "$ac_srcdir/configure"; then
1546 echo &&
1547 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001549 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001550 fi || ac_status=$?
1551 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 done
1553fi
1554
Martin v. Löwiseba40652007-08-30 20:10:57 +00001555test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001556if $ac_init_version; then
1557 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001558python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001559generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001561Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562This configure script is free software; the Free Software Foundation
1563gives unlimited permission to copy, distribute and modify it.
1564_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001565 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001566fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001567
1568## ------------------------ ##
1569## Autoconf initialization. ##
1570## ------------------------ ##
1571
1572# ac_fn_c_try_compile LINENO
1573# --------------------------
1574# Try to compile conftest.$ac_ext, and return whether this succeeded.
1575ac_fn_c_try_compile ()
1576{
1577 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1578 rm -f conftest.$ac_objext
1579 if { { ac_try="$ac_compile"
1580case "(($ac_try" in
1581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1582 *) ac_try_echo=$ac_try;;
1583esac
1584eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1585$as_echo "$ac_try_echo"; } >&5
1586 (eval "$ac_compile") 2>conftest.err
1587 ac_status=$?
1588 if test -s conftest.err; then
1589 grep -v '^ *+' conftest.err >conftest.er1
1590 cat conftest.er1 >&5
1591 mv -f conftest.er1 conftest.err
1592 fi
1593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1594 test $ac_status = 0; } && {
1595 test -z "$ac_c_werror_flag" ||
1596 test ! -s conftest.err
1597 } && test -s conftest.$ac_objext; then :
1598 ac_retval=0
1599else
1600 $as_echo "$as_me: failed program was:" >&5
1601sed 's/^/| /' conftest.$ac_ext >&5
1602
1603 ac_retval=1
1604fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001605 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001606 as_fn_set_status $ac_retval
1607
1608} # ac_fn_c_try_compile
1609
1610# ac_fn_c_try_cpp LINENO
1611# ----------------------
1612# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1613ac_fn_c_try_cpp ()
1614{
1615 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1616 if { { ac_try="$ac_cpp conftest.$ac_ext"
1617case "(($ac_try" in
1618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1619 *) ac_try_echo=$ac_try;;
1620esac
1621eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1622$as_echo "$ac_try_echo"; } >&5
1623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1624 ac_status=$?
1625 if test -s conftest.err; then
1626 grep -v '^ *+' conftest.err >conftest.er1
1627 cat conftest.er1 >&5
1628 mv -f conftest.er1 conftest.err
1629 fi
1630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001631 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1633 test ! -s conftest.err
1634 }; then :
1635 ac_retval=0
1636else
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=1
1641fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001642 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001643 as_fn_set_status $ac_retval
1644
1645} # ac_fn_c_try_cpp
1646
1647# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1648# -------------------------------------------------------
1649# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1650# the include files in INCLUDES and setting the cache variable VAR
1651# accordingly.
1652ac_fn_c_check_header_mongrel ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001655 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1657$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001658if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001659 $as_echo_n "(cached) " >&6
1660fi
1661eval ac_res=\$$3
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1663$as_echo "$ac_res" >&6; }
1664else
1665 # Is the header compilable?
1666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1667$as_echo_n "checking $2 usability... " >&6; }
1668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1669/* end confdefs.h. */
1670$4
1671#include <$2>
1672_ACEOF
1673if ac_fn_c_try_compile "$LINENO"; then :
1674 ac_header_compiler=yes
1675else
1676 ac_header_compiler=no
1677fi
1678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1680$as_echo "$ac_header_compiler" >&6; }
1681
1682# Is the header present?
1683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1684$as_echo_n "checking $2 presence... " >&6; }
1685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1686/* end confdefs.h. */
1687#include <$2>
1688_ACEOF
1689if ac_fn_c_try_cpp "$LINENO"; then :
1690 ac_header_preproc=yes
1691else
1692 ac_header_preproc=no
1693fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001694rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1696$as_echo "$ac_header_preproc" >&6; }
1697
1698# So? What about this header?
1699case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1700 yes:no: )
1701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1702$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1704$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1705 ;;
1706 no:yes:* )
1707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1708$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1710$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1712$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1714$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1716$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001717( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001718## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001719## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001720 ) | sed "s/^/$as_me: WARNING: /" >&2
1721 ;;
1722esac
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1724$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001725if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001726 $as_echo_n "(cached) " >&6
1727else
1728 eval "$3=\$ac_header_compiler"
1729fi
1730eval ac_res=\$$3
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1732$as_echo "$ac_res" >&6; }
1733fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001734 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001735
1736} # ac_fn_c_check_header_mongrel
1737
1738# ac_fn_c_try_run LINENO
1739# ----------------------
1740# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1741# that executables *can* be run.
1742ac_fn_c_try_run ()
1743{
1744 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1745 if { { ac_try="$ac_link"
1746case "(($ac_try" in
1747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1748 *) ac_try_echo=$ac_try;;
1749esac
1750eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1751$as_echo "$ac_try_echo"; } >&5
1752 (eval "$ac_link") 2>&5
1753 ac_status=$?
1754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1756 { { case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_try") 2>&5
1763 ac_status=$?
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; }; }; then :
1766 ac_retval=0
1767else
1768 $as_echo "$as_me: program exited with status $ac_status" >&5
1769 $as_echo "$as_me: failed program was:" >&5
1770sed 's/^/| /' conftest.$ac_ext >&5
1771
1772 ac_retval=$ac_status
1773fi
1774 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001776 as_fn_set_status $ac_retval
1777
1778} # ac_fn_c_try_run
1779
1780# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1781# -------------------------------------------------------
1782# Tests whether HEADER exists and can be compiled using the include files in
1783# INCLUDES, setting the cache variable VAR accordingly.
1784ac_fn_c_check_header_compile ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1788$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001789if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001790 $as_echo_n "(cached) " >&6
1791else
1792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1793/* end confdefs.h. */
1794$4
1795#include <$2>
1796_ACEOF
1797if ac_fn_c_try_compile "$LINENO"; then :
1798 eval "$3=yes"
1799else
1800 eval "$3=no"
1801fi
1802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1803fi
1804eval ac_res=\$$3
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1806$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001808
1809} # ac_fn_c_check_header_compile
1810
1811# ac_fn_c_try_link LINENO
1812# -----------------------
1813# Try to link conftest.$ac_ext, and return whether this succeeded.
1814ac_fn_c_try_link ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 rm -f conftest.$ac_objext conftest$ac_exeext
1818 if { { ac_try="$ac_link"
1819case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_link") 2>conftest.err
1826 ac_status=$?
1827 if test -s conftest.err; then
1828 grep -v '^ *+' conftest.err >conftest.er1
1829 cat conftest.er1 >&5
1830 mv -f conftest.er1 conftest.err
1831 fi
1832 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1833 test $ac_status = 0; } && {
1834 test -z "$ac_c_werror_flag" ||
1835 test ! -s conftest.err
1836 } && test -s conftest$ac_exeext && {
1837 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001838 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001839 }; then :
1840 ac_retval=0
1841else
1842 $as_echo "$as_me: failed program was:" >&5
1843sed 's/^/| /' conftest.$ac_ext >&5
1844
1845 ac_retval=1
1846fi
1847 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1848 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1849 # interfere with the next link command; also delete a directory that is
1850 # left behind by Apple's compiler. We do this before executing the actions.
1851 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001853 as_fn_set_status $ac_retval
1854
1855} # ac_fn_c_try_link
1856
1857# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1858# -------------------------------------------
1859# Tests whether TYPE exists after having included INCLUDES, setting cache
1860# variable VAR accordingly.
1861ac_fn_c_check_type ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1865$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001866if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001867 $as_echo_n "(cached) " >&6
1868else
1869 eval "$3=no"
1870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1871/* end confdefs.h. */
1872$4
1873int
1874main ()
1875{
1876if (sizeof ($2))
1877 return 0;
1878 ;
1879 return 0;
1880}
1881_ACEOF
1882if ac_fn_c_try_compile "$LINENO"; then :
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884/* end confdefs.h. */
1885$4
1886int
1887main ()
1888{
1889if (sizeof (($2)))
1890 return 0;
1891 ;
1892 return 0;
1893}
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"; then :
1896
1897else
1898 eval "$3=yes"
1899fi
1900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001907 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001908
1909} # ac_fn_c_check_type
1910
1911# ac_fn_c_find_uintX_t LINENO BITS VAR
1912# ------------------------------------
1913# Finds an unsigned integer type with width BITS, setting cache variable VAR
1914# accordingly.
1915ac_fn_c_find_uintX_t ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1919$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001920if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 # Order is important - never check a type that is potentially smaller
1925 # than half of the expected target width.
1926 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1927 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929/* end confdefs.h. */
1930$ac_includes_default
1931int
1932main ()
1933{
1934static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001935test_array [0] = 0;
1936return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001937
1938 ;
1939 return 0;
1940}
1941_ACEOF
1942if ac_fn_c_try_compile "$LINENO"; then :
1943 case $ac_type in #(
1944 uint$2_t) :
1945 eval "$3=yes" ;; #(
1946 *) :
1947 eval "$3=\$ac_type" ;;
1948esac
1949fi
1950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001951 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001952
1953else
1954 break
1955fi
1956 done
1957fi
1958eval ac_res=\$$3
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1960$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001961 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001962
1963} # ac_fn_c_find_uintX_t
1964
1965# ac_fn_c_find_intX_t LINENO BITS VAR
1966# -----------------------------------
1967# Finds a signed integer type with width BITS, setting cache variable VAR
1968# accordingly.
1969ac_fn_c_find_intX_t ()
1970{
1971 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1973$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001974if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001975 $as_echo_n "(cached) " >&6
1976else
1977 eval "$3=no"
1978 # Order is important - never check a type that is potentially smaller
1979 # than half of the expected target width.
1980 for ac_type in int$2_t 'int' 'long int' \
1981 'long long int' 'short int' 'signed char'; do
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001985 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001986int
1987main ()
1988{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001989static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001990test_array [0] = 0;
1991return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001992
1993 ;
1994 return 0;
1995}
1996_ACEOF
1997if ac_fn_c_try_compile "$LINENO"; then :
1998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002001 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002002int
2003main ()
2004{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002005static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002006 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002007test_array [0] = 0;
2008return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002009
2010 ;
2011 return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_compile "$LINENO"; then :
2015
2016else
2017 case $ac_type in #(
2018 int$2_t) :
2019 eval "$3=yes" ;; #(
2020 *) :
2021 eval "$3=\$ac_type" ;;
2022esac
2023fi
2024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2025fi
2026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002027 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002028
2029else
2030 break
2031fi
2032 done
2033fi
2034eval ac_res=\$$3
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2036$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002037 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002038
2039} # ac_fn_c_find_intX_t
2040
2041# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2042# --------------------------------------------
2043# Tries to find the compile-time value of EXPR in a program that includes
2044# INCLUDES, setting VAR accordingly. Returns whether the value could be
2045# computed
2046ac_fn_c_compute_int ()
2047{
2048 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2049 if test "$cross_compiling" = yes; then
2050 # Depending upon the size, compute the lo and hi bounds.
2051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002058test_array [0] = 0;
2059return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_lo=0 ac_mid=0
2067 while :; do
2068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002075test_array [0] = 0;
2076return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_hi=$ac_mid; break
2084else
2085 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2086 if test $ac_lo -le $ac_mid; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002102test_array [0] = 0;
2103return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=-1 ac_mid=-1
2111 while :; do
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115int
2116main ()
2117{
2118static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002119test_array [0] = 0;
2120return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002121
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127 ac_lo=$ac_mid; break
2128else
2129 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2130 if test $ac_mid -le $ac_hi; then
2131 ac_lo= ac_hi=
2132 break
2133 fi
2134 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2135fi
2136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137 done
2138else
2139 ac_lo= ac_hi=
2140fi
2141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142fi
2143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144# Binary search between lo and hi bounds.
2145while test "x$ac_lo" != "x$ac_hi"; do
2146 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150int
2151main ()
2152{
2153static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002154test_array [0] = 0;
2155return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002156
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_compile "$LINENO"; then :
2162 ac_hi=$ac_mid
2163else
2164 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167done
2168case $ac_lo in #((
2169?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2170'') ac_retval=1 ;;
2171esac
2172 else
2173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h. */
2175$4
2176static long int longval () { return $2; }
2177static unsigned long int ulongval () { return $2; }
2178#include <stdio.h>
2179#include <stdlib.h>
2180int
2181main ()
2182{
2183
2184 FILE *f = fopen ("conftest.val", "w");
2185 if (! f)
2186 return 1;
2187 if (($2) < 0)
2188 {
2189 long int i = longval ();
2190 if (i != ($2))
2191 return 1;
2192 fprintf (f, "%ld", i);
2193 }
2194 else
2195 {
2196 unsigned long int i = ulongval ();
2197 if (i != ($2))
2198 return 1;
2199 fprintf (f, "%lu", i);
2200 }
2201 /* Do not output a trailing newline, as this causes \r\n confusion
2202 on some platforms. */
2203 return ferror (f) || fclose (f) != 0;
2204
2205 ;
2206 return 0;
2207}
2208_ACEOF
2209if ac_fn_c_try_run "$LINENO"; then :
2210 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2211else
2212 ac_retval=1
2213fi
2214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2215 conftest.$ac_objext conftest.beam conftest.$ac_ext
2216rm -f conftest.val
2217
2218 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002219 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002220 as_fn_set_status $ac_retval
2221
2222} # ac_fn_c_compute_int
2223
2224# ac_fn_c_check_func LINENO FUNC VAR
2225# ----------------------------------
2226# Tests whether FUNC exists, setting the cache variable VAR accordingly
2227ac_fn_c_check_func ()
2228{
2229 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2231$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002232if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002233 $as_echo_n "(cached) " >&6
2234else
2235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236/* end confdefs.h. */
2237/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2238 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2239#define $2 innocuous_$2
2240
2241/* System header to define __stub macros and hopefully few prototypes,
2242 which can conflict with char $2 (); below.
2243 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2244 <limits.h> exists even on freestanding compilers. */
2245
2246#ifdef __STDC__
2247# include <limits.h>
2248#else
2249# include <assert.h>
2250#endif
2251
2252#undef $2
2253
2254/* Override any GCC internal prototype to avoid an error.
2255 Use char because int might match the return type of a GCC
2256 builtin and then its argument prototype would still apply. */
2257#ifdef __cplusplus
2258extern "C"
2259#endif
2260char $2 ();
2261/* The GNU C library defines this for functions which it implements
2262 to always fail with ENOSYS. Some functions are actually named
2263 something starting with __ and the normal name is an alias. */
2264#if defined __stub_$2 || defined __stub___$2
2265choke me
2266#endif
2267
2268int
2269main ()
2270{
2271return $2 ();
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_link "$LINENO"; then :
2277 eval "$3=yes"
2278else
2279 eval "$3=no"
2280fi
2281rm -f core conftest.err conftest.$ac_objext \
2282 conftest$ac_exeext conftest.$ac_ext
2283fi
2284eval ac_res=\$$3
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2286$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002287 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002288
2289} # ac_fn_c_check_func
2290
2291# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2292# ----------------------------------------------------
2293# Tries to find if the field MEMBER exists in type AGGR, after including
2294# INCLUDES, setting cache variable VAR accordingly.
2295ac_fn_c_check_member ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2299$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002300if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$5
2306int
2307main ()
2308{
2309static $2 ac_aggr;
2310if (ac_aggr.$3)
2311return 0;
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_compile "$LINENO"; then :
2317 eval "$4=yes"
2318else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$5
2322int
2323main ()
2324{
2325static $2 ac_aggr;
2326if (sizeof ac_aggr.$3)
2327return 0;
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 eval "$4=yes"
2334else
2335 eval "$4=no"
2336fi
2337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341eval ac_res=\$$4
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002344 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002345
2346} # ac_fn_c_check_member
2347
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002348# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2349# ---------------------------------------------
2350# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2351# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002352ac_fn_c_check_decl ()
2353{
2354 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002355 as_decl_name=`echo $2|sed 's/ *(.*//'`
2356 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2358$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002359if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002360 $as_echo_n "(cached) " >&6
2361else
2362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363/* end confdefs.h. */
2364$4
2365int
2366main ()
2367{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002368#ifndef $as_decl_name
2369#ifdef __cplusplus
2370 (void) $as_decl_use;
2371#else
2372 (void) $as_decl_name;
2373#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002374#endif
2375
2376 ;
2377 return 0;
2378}
2379_ACEOF
2380if ac_fn_c_try_compile "$LINENO"; then :
2381 eval "$3=yes"
2382else
2383 eval "$3=no"
2384fi
2385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386fi
2387eval ac_res=\$$3
2388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2389$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002390 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002391
2392} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002393cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002394This file contains any messages produced by compilers while
2395running configure, to aid debugging if configure makes a mistake.
2396
Martin v. Löwis174440b2008-10-03 08:59:41 +00002397It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002398generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002399
2400 $ $0 $@
2401
2402_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002403exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002404{
2405cat <<_ASUNAME
2406## --------- ##
2407## Platform. ##
2408## --------- ##
2409
2410hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2411uname -m = `(uname -m) 2>/dev/null || echo unknown`
2412uname -r = `(uname -r) 2>/dev/null || echo unknown`
2413uname -s = `(uname -s) 2>/dev/null || echo unknown`
2414uname -v = `(uname -v) 2>/dev/null || echo unknown`
2415
2416/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2417/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2418
2419/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2420/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2421/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002423/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2424/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2425/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2426
2427_ASUNAME
2428
2429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430for as_dir in $PATH
2431do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002434 $as_echo "PATH: $as_dir"
2435 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002436IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002437
2438} >&5
2439
2440cat >&5 <<_ACEOF
2441
2442
2443## ----------- ##
2444## Core tests. ##
2445## ----------- ##
2446
2447_ACEOF
2448
2449
2450# Keep a trace of the command line.
2451# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002452# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002453# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002454# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002455ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002456ac_configure_args0=
2457ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002458ac_must_keep_next=false
2459for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002460do
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 for ac_arg
2462 do
2463 case $ac_arg in
2464 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2465 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2466 | -silent | --silent | --silen | --sile | --sil)
2467 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002469 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002470 esac
2471 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002472 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002474 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002475 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002476 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002478 case $ac_arg in
2479 *=* | --config-cache | -C | -disable-* | --disable-* \
2480 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2481 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2482 | -with-* | --with-* | -without-* | --without-* | --x)
2483 case "$ac_configure_args0 " in
2484 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2485 esac
2486 ;;
2487 -* ) ac_must_keep_next=true ;;
2488 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002490 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 ;;
2492 esac
2493 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002494done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002495{ ac_configure_args0=; unset ac_configure_args0;}
2496{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002497
2498# When interrupted or exit'd, cleanup temporary files, and complete
2499# config.log. We remove comments because anyway the quotes in there
2500# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002501# WARNING: Use '\'' to represent an apostrophe within the trap.
2502# 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 +00002503trap 'exit_status=$?
2504 # Save into config.log some information that might help in debugging.
2505 {
2506 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002507
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002508 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002509## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002510## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 echo
2512 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002513(
2514 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2515 eval ac_val=\$$ac_var
2516 case $ac_val in #(
2517 *${as_nl}*)
2518 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002519 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2520$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521 esac
2522 case $ac_var in #(
2523 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002524 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2525 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526 esac ;;
2527 esac
2528 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002530 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2531 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533 "s/'\''/'\''\\\\'\'''\''/g;
2534 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2535 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002536 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002538 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539 esac |
2540 sort
2541)
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002543
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002544 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002545## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002546## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002547 echo
2548 for ac_var in $ac_subst_vars
2549 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550 eval ac_val=\$$ac_var
2551 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002552 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002553 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002554 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 done | sort
2556 echo
2557
2558 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002559 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002560## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002561## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002562 echo
2563 for ac_var in $ac_subst_files
2564 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565 eval ac_val=\$$ac_var
2566 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002567 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002568 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002569 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 done | sort
2571 echo
2572 fi
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002575 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002576## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002577## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 echo
2581 fi
2582 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002583 $as_echo "$as_me: caught signal $ac_signal"
2584 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002585 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002586 rm -f core *.core core.conftest.* &&
2587 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002590for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002591 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002592done
2593ac_signal=0
2594
2595# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002597
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002598$as_echo "/* confdefs.h */" > confdefs.h
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600# Predefined preprocessor variables.
2601
2602cat >>confdefs.h <<_ACEOF
2603#define PACKAGE_NAME "$PACKAGE_NAME"
2604_ACEOF
2605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2608_ACEOF
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_VERSION "$PACKAGE_VERSION"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_STRING "$PACKAGE_STRING"
2616_ACEOF
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2620_ACEOF
2621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_URL "$PACKAGE_URL"
2624_ACEOF
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626
2627# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002628# Prefer an explicitly selected file to automatically selected ones.
2629ac_site_file1=NONE
2630ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002632 # We do not want a PATH search for config.site.
2633 case $CONFIG_SITE in #((
2634 -*) ac_site_file1=./$CONFIG_SITE;;
2635 */*) ac_site_file1=$CONFIG_SITE;;
2636 *) ac_site_file1=./$CONFIG_SITE;;
2637 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002638elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002639 ac_site_file1=$prefix/share/config.site
2640 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002642 ac_site_file1=$ac_default_prefix/share/config.site
2643 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002644fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002645for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002647 test "x$ac_site_file" = xNONE && continue
2648 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2650$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002652 . "$ac_site_file" \
2653 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2655as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002656See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002657 fi
2658done
2659
2660if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002661 # Some versions of bash will fail to source /dev/null (special files
2662 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2663 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2665$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002667 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2668 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 esac
2670 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002672 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2673$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 >$cache_file
2675fi
2676
2677# Check that the precious variables saved in the cache have kept the same
2678# value.
2679ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2682 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002683 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2684 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 case $ac_old_set,$ac_new_set in
2686 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2688$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 +00002689 ac_cache_corrupted=: ;;
2690 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002691 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2692$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 ac_cache_corrupted=: ;;
2694 ,);;
2695 *)
2696 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002697 # differences in whitespace do not lead to failure.
2698 ac_old_val_w=`echo x $ac_old_val`
2699 ac_new_val_w=`echo x $ac_new_val`
2700 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2702$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2703 ac_cache_corrupted=:
2704 else
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2706$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2707 eval $ac_var=\$ac_old_val
2708 fi
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2710$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2712$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 fi;;
2714 esac
2715 # Pass precious variables to config.status.
2716 if test "$ac_new_set" = set; then
2717 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002718 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 *) ac_arg=$ac_var=$ac_new_val ;;
2720 esac
2721 case " $ac_configure_args " in
2722 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002723 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 esac
2725 fi
2726done
2727if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002728 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2729$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2731$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002732 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002733fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002734## -------------------- ##
2735## Main body of script. ##
2736## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002737
Guido van Rossum7f43da71994-08-01 12:15:30 +00002738ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002740ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2741ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2742ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002743
Guido van Rossum627b2d71993-12-24 10:39:16 +00002744
Michael W. Hudson54241132001-12-07 15:38:26 +00002745
Martin v. Löwiseba40652007-08-30 20:10:57 +00002746ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002747
2748
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002749ac_aux_dir=
2750for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2751 if test -f "$ac_dir/install-sh"; then
2752 ac_aux_dir=$ac_dir
2753 ac_install_sh="$ac_aux_dir/install-sh -c"
2754 break
2755 elif test -f "$ac_dir/install.sh"; then
2756 ac_aux_dir=$ac_dir
2757 ac_install_sh="$ac_aux_dir/install.sh -c"
2758 break
2759 elif test -f "$ac_dir/shtool"; then
2760 ac_aux_dir=$ac_dir
2761 ac_install_sh="$ac_aux_dir/shtool install -c"
2762 break
2763 fi
2764done
2765if test -z "$ac_aux_dir"; then
2766 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2767fi
2768
2769# These three variables are undocumented and unsupported,
2770# and are intended to be withdrawn in a future Autoconf release.
2771# They can cause serious problems if a builder's source tree is in a directory
2772# whose full name contains unusual characters.
2773ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2774ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2775ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2776
2777
2778# Make sure we can run config.sub.
2779$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2780 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2781
2782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2783$as_echo_n "checking build system type... " >&6; }
2784if ${ac_cv_build+:} false; then :
2785 $as_echo_n "(cached) " >&6
2786else
2787 ac_build_alias=$build_alias
2788test "x$ac_build_alias" = x &&
2789 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2790test "x$ac_build_alias" = x &&
2791 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2792ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2793 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2794
2795fi
2796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2797$as_echo "$ac_cv_build" >&6; }
2798case $ac_cv_build in
2799*-*-*) ;;
2800*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2801esac
2802build=$ac_cv_build
2803ac_save_IFS=$IFS; IFS='-'
2804set x $ac_cv_build
2805shift
2806build_cpu=$1
2807build_vendor=$2
2808shift; shift
2809# Remember, the first character of IFS is used to create $*,
2810# except with old shells:
2811build_os=$*
2812IFS=$ac_save_IFS
2813case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2814
2815
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2817$as_echo_n "checking host system type... " >&6; }
2818if ${ac_cv_host+:} false; then :
2819 $as_echo_n "(cached) " >&6
2820else
2821 if test "x$host_alias" = x; then
2822 ac_cv_host=$ac_cv_build
2823else
2824 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2825 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2826fi
2827
2828fi
2829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2830$as_echo "$ac_cv_host" >&6; }
2831case $ac_cv_host in
2832*-*-*) ;;
2833*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2834esac
2835host=$ac_cv_host
2836ac_save_IFS=$IFS; IFS='-'
2837set x $ac_cv_host
2838shift
2839host_cpu=$1
2840host_vendor=$2
2841shift; shift
2842# Remember, the first character of IFS is used to create $*,
2843# except with old shells:
2844host_os=$*
2845IFS=$ac_save_IFS
2846case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2847
2848
2849
2850
2851
2852if test "$cross_compiling" = yes; then
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2854$as_echo_n "checking for python interpreter for cross build... " >&6; }
2855 if test -z "$PYTHON_FOR_BUILD"; then
2856 for interp in python$PACKAGE_VERSION python2 python; do
2857 which $interp >/dev/null 2>&1 || continue
2858 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2859 break
2860 fi
2861 interp=
2862 done
2863 if test x$interp = x; then
2864 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2865 fi
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2867$as_echo "$interp" >&6; }
2868 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/plat-$(MACHDEP) '$interp
2869 fi
2870elif test "$cross_compiling" = maybe; then
2871 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2872else
2873 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2874fi
2875
2876
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
Georg Brandlbcd64a32009-03-31 21:45:18 +00002878if test "$prefix" != "/"; then
2879 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2880fi
2881
2882
Martin v. Löwis11437992002-04-12 09:54:03 +00002883
2884
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002885# We don't use PACKAGE_ variables, and they cause conflicts
2886# with other autoconf-based packages that include Python.h
2887grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2888rm confdefs.h
2889mv confdefs.h.new confdefs.h
2890
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002891
Martin v. Löwis174440b2008-10-03 08:59:41 +00002892VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002893
Martin v. Löwis1142de32002-03-29 16:28:31 +00002894
2895SOVERSION=1.0
2896
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002897# The later defininition of _XOPEN_SOURCE disables certain features
2898# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2899
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002900$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002901
2902
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002903# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2904# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2905# them.
2906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002907$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002908
2909
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002910# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2911# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2912# them.
2913
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002914$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002915
2916
Martin v. Löwisd6320502004-08-12 13:45:08 +00002917# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2918# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2919
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002920$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002921
2922
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002923# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2924# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2925# them.
2926
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002927$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002928
2929
2930
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002931define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002932
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002933# Arguments passed to configure.
2934
2935CONFIG_ARGS="$ac_configure_args"
2936
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2938$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002939# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002940if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002941 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002942 case $enableval in
2943 yes)
2944 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002945 if test ! -d "${enableval}"
2946 then
2947 enableval=/
2948 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002949 ;;
2950 esac
2951 case $enableval in
2952 no)
2953 UNIVERSALSDK=
2954 enable_universalsdk=
2955 ;;
2956 *)
2957 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002958 if test ! -d "${UNIVERSALSDK}"
2959 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002960 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002961 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002962 ;;
2963 esac
2964
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002965
Ronald Oussoren988117f2006-04-29 11:31:35 +00002966else
2967
2968 UNIVERSALSDK=
2969 enable_universalsdk=
2970
Martin v. Löwiseba40652007-08-30 20:10:57 +00002971fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002972
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002973if test -n "${UNIVERSALSDK}"
2974then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2976$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2979$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002980fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002981
Martin v. Löwiseba40652007-08-30 20:10:57 +00002982
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002983
2984
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002985UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002986
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2988$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002989
2990# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002991if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002992 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2994$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002995 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002996 if test "${enable_universalsdk}" ; then
2997 :
2998 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002999 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003000 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003001
3002else
3003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3005$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003006
3007fi
3008
3009
3010
3011
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003012
3013# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003014if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003015 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003016 if test "${enable_framework}"; then
3017 :
3018 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003019 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003020 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003021 PYTHONFRAMEWORK=${withval}
3022 PYTHONFRAMEWORKDIR=${withval}.framework
3023 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3024
3025else
3026
3027 PYTHONFRAMEWORK=Python
3028 PYTHONFRAMEWORKDIR=Python.framework
3029 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3030
3031fi
3032
Martin v. Löwiseba40652007-08-30 20:10:57 +00003033# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003034if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003035 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003036 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003037 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003038 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003039 esac
3040 case $enableval in
3041 no)
3042 PYTHONFRAMEWORK=
3043 PYTHONFRAMEWORKDIR=no-framework
3044 PYTHONFRAMEWORKPREFIX=
3045 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003046 FRAMEWORKINSTALLFIRST=
3047 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003048 FRAMEWORKALTINSTALLFIRST=
3049 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003050 if test "x${prefix}" = "xNONE"; then
3051 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3052 else
3053 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3054 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003055 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003056 ;;
3057 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003058 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003059 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003060 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003061 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003062 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3063 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003064 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003065
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003066 if test "x${prefix}" = "xNONE" ; then
3067 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003068
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003069 else
3070 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3071 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003072
3073 case "${enableval}" in
3074 /System*)
3075 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3076 if test "${prefix}" = "NONE" ; then
3077 # See below
3078 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3079 fi
3080 ;;
3081
3082 /Library*)
3083 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3084 ;;
3085
3086 */Library/Frameworks)
3087 MDIR="`dirname "${enableval}"`"
3088 MDIR="`dirname "${MDIR}"`"
3089 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3090
3091 if test "${prefix}" = "NONE"; then
3092 # User hasn't specified the
3093 # --prefix option, but wants to install
3094 # the framework in a non-default location,
3095 # ensure that the compatibility links get
3096 # installed relative to that prefix as well
3097 # instead of in /usr/local.
3098 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3099 fi
3100 ;;
3101
3102 *)
3103 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3104 ;;
3105 esac
3106
Jack Jansen127e56e2001-09-11 14:41:54 +00003107 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003108
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003109 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003110 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003111 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003112
Martin v. Löwiseba40652007-08-30 20:10:57 +00003113 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003114
Martin v. Löwiseba40652007-08-30 20:10:57 +00003115 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003116
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003117 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3118
3119 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3120
Jack Jansene578a632001-08-15 01:27:14 +00003121 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003122
Guido van Rossum563e7081996-09-10 18:20:48 +00003123else
Martin v. Löwis11437992002-04-12 09:54:03 +00003124
Jack Jansene578a632001-08-15 01:27:14 +00003125 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003127 PYTHONFRAMEWORKPREFIX=
3128 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003129 FRAMEWORKINSTALLFIRST=
3130 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003131 FRAMEWORKALTINSTALLFIRST=
3132 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003133 if test "x${prefix}" = "xNONE" ; then
3134 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3135 else
3136 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3137 fi
Jack Jansene578a632001-08-15 01:27:14 +00003138 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003139
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003140
Martin v. Löwiseba40652007-08-30 20:10:57 +00003141fi
3142
Michael W. Hudson54241132001-12-07 15:38:26 +00003143
3144
3145
3146
Jack Jansene578a632001-08-15 01:27:14 +00003147
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003148
3149
Ronald Oussoren5b787322006-06-06 19:50:24 +00003150
3151
3152
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003153
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003154
Jack Jansene578a632001-08-15 01:27:14 +00003155##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003156## AS_HELP_STRING([--with-dyld],
3157## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003158##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003159# Set name for machine-dependent library files
3160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3162$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003163if test -z "$MACHDEP"
3164then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003165 # avoid using uname for cross builds
3166 if test "$cross_compiling" = yes; then
3167 # ac_sys_system and ac_sys_release are only used for setting
3168 # `define_xopen_source' in the case statement below. For the
3169 # current supported cross builds, this macro is not adjusted.
3170 case "$host" in
3171 *-*-linux*)
3172 ac_sys_system=Linux
3173 ;;
3174 *-*-cygwin*)
3175 ac_sys_system=Cygwin
3176 ;;
3177 *)
3178 # for now, limit cross builds to known configurations
3179 MACHDEP="unknown"
3180 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3181 esac
3182 ac_sys_release=
3183 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003184 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003185 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003186 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003187 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003188 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003189 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003190 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003191 fi
3192 ac_md_system=`echo $ac_sys_system |
3193 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3194 ac_md_release=`echo $ac_sys_release |
3195 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3196 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003197
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003198 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003199 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003200 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003201 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003202 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003203 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003204 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003205 esac
3206fi
3207
3208
3209if test "$cross_compiling" = yes; then
3210 case "$host" in
3211 *-*-linux*)
3212 case "$host_cpu" in
3213 arm*)
3214 _host_cpu=arm
3215 ;;
3216 *)
3217 _host_cpu=$host_cpu
3218 esac
3219 ;;
3220 *-*-cygwin*)
3221 _host_cpu=
3222 ;;
3223 *)
3224 # for now, limit cross builds to known configurations
3225 MACHDEP="unknown"
3226 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003228 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229fi
Guido van Rossum91922671997-10-09 20:24:13 +00003230
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003231# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3232# disable features if it is defined, without any means to access these
3233# features as extensions. For these systems, we skip the definition of
3234# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3235# some feature, make sure there is no alternative way to access this
3236# feature. Also, when using wildcards, make sure you have verified the
3237# need for not defining _XOPEN_SOURCE on all systems matching the
3238# wildcard, and that the wildcard does not include future systems
3239# (which may remove their limitations).
3240case $ac_sys_system/$ac_sys_release in
3241 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3242 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003243 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003244 # In addition, Stefan Krah confirms that issue #1244610 exists through
3245 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003246 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003247 define_xopen_source=no
3248 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3249 # also defined. This can be overridden by defining _BSD_SOURCE
3250 # As this has a different meaning on Linux, only define it on OpenBSD
3251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003252$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003253
3254 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003255 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003256 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3257 # also defined. This can be overridden by defining _BSD_SOURCE
3258 # As this has a different meaning on Linux, only define it on OpenBSD
3259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003260$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003261
3262 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003263 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3264 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3265 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003266 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003267 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003268 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3269 # request to enable features supported by the standard as a request
3270 # to disable features not supported by the standard. The best way
3271 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3272 # entirely and define __EXTENSIONS__ instead.
3273 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003274 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003275 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3276 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003277 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003278 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003279 define_xopen_source=no;;
3280 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003281 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003282 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003283 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003284 # On FreeBSD 4, the math functions C89 does not cover are never defined
3285 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3286 FreeBSD/4.*)
3287 define_xopen_source=no;;
3288 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3289 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3290 # identifies itself as Darwin/7.*
3291 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3292 # disables platform specific features beyond repair.
3293 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3294 # has no effect, don't bother defining them
3295 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003296 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003297 Darwin/1[0-9].*)
3298 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003299 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3300 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3301 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003302 AIX/4)
3303 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003304 AIX/5)
3305 if test `uname -r` -eq 1; then
3306 define_xopen_source=no
3307 fi
3308 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003309 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3310 # defining NI_NUMERICHOST.
3311 QNX/6.3.2)
3312 define_xopen_source=no
3313 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003314
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003315esac
3316
3317if test $define_xopen_source = yes
3318then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003319
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003320$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003321
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003322
3323 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3324 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3325 # several APIs are not declared. Since this is also needed in some
3326 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003327
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003328$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003329
3330
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003332$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003333
3334
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003335fi
3336
Guido van Rossum91922671997-10-09 20:24:13 +00003337#
3338# SGI compilers allow the specification of the both the ABI and the
3339# ISA on the command line. Depending on the values of these switches,
3340# different and often incompatable code will be generated.
3341#
3342# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3343# thus supply support for various ABI/ISA combinations. The MACHDEP
3344# variable is also adjusted.
3345#
3346
3347if test ! -z "$SGI_ABI"
3348then
3349 CC="cc $SGI_ABI"
3350 LDFLAGS="$SGI_ABI $LDFLAGS"
3351 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3354$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003355
Jack Jansen83f898c2002-12-30 22:23:40 +00003356# And add extra plat-mac for darwin
3357
Jack Jansen7b59b422003-03-17 15:44:10 +00003358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3360$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003361if test -z "$EXTRAPLATDIR"
3362then
3363 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003364 darwin)
3365 EXTRAPLATDIR="\$(PLATMACDIRS)"
3366 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3367 ;;
3368 *)
3369 EXTRAPLATDIR=""
3370 EXTRAMACHDEPPATH=""
3371 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003372 esac
3373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3375$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003376
Jack Jansen6b08a402004-06-03 12:41:45 +00003377# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3378# it may influence the way we can build extensions, so distutils
3379# needs to check it
3380
Ronald Oussoren988117f2006-04-29 11:31:35 +00003381
Jack Jansen6b08a402004-06-03 12:41:45 +00003382CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003383EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003384
Guido van Rossum627b2d71993-12-24 10:39:16 +00003385# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003386
3387# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3388# for debug/optimization stuff. BASECFLAGS is for flags that are required
3389# just to get things to compile and link. Users are free to override OPT
3390# when running configure or make. The build should not break if they do.
3391# BASECFLAGS should generally not be messed with, however.
3392
3393# XXX shouldn't some/most/all of this code be merged with the stuff later
3394# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3396$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003397
Martin v. Löwiseba40652007-08-30 20:10:57 +00003398# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003399if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003400 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003401 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003402 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003403 without_gcc=yes;;
3404 yes) CC=gcc
3405 without_gcc=no;;
3406 *) CC=$withval
3407 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003408 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003409else
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003411 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003412 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003413 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003414 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003415 case $BE_HOST_CPU in
3416 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003417 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003418 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003419 BASECFLAGS="$BASECFLAGS -export pragma"
3420 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003421 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003422 ;;
3423 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003424 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003425 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003426 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003427 ;;
3428 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003429 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003430 ;;
3431 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003432 AR="\$(srcdir)/Modules/ar_beos"
3433 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003434 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003435 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003436 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003437fi
3438
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3440$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003441
Guido van Rossum8b131c51995-03-09 14:10:13 +00003442# If the user switches compilers, we can't believe the cache
3443if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3444then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003445 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003446(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003447fi
3448
Trent Nelson15daa352012-12-13 06:46:39 +00003449if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3450 # Normally, MIPSpro CC treats #error directives as warnings, which means
3451 # a successful exit code is returned (0). This is a problem because IRIX
3452 # has a bunch of system headers with this guard at the top:
3453 #
3454 # #ifndef __c99
3455 # #error This header file is to be used only for c99 mode compilations
3456 # #else
3457 #
3458 # When autoconf tests for such a header, like stdint.h, this happens:
3459 #
3460 # configure:4619: cc -c conftest.c >&5
3461 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3462 # #error directive: This header file is to be used only for c99 mode
3463 # compilations
3464 #
3465 # #error This header file is to be used only for c99 mode compilations
3466 # ^
3467 #
3468 # configure:4619: $? = 0
3469 # configure:4619: result: yes
3470 #
3471 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3472 # warning as an error, which causes cc to return a non-zero result,
3473 # which autoconf can interpret correctly.
3474 CFLAGS="$CFLAGS -diag_error 1035"
3475 # Whilst we're here, we might as well make sure CXX defaults to something
3476 # sensible if we're not using gcc.
3477 if test -z "$CXX"; then
3478 CXX="CC"
3479 fi
3480fi
3481
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003482# If the user set CFLAGS, use this instead of the automatically
3483# determined setting
3484preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003485ac_ext=c
3486ac_cpp='$CPP $CPPFLAGS'
3487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3489ac_compiler_gnu=$ac_cv_c_compiler_gnu
3490if test -n "$ac_tool_prefix"; then
3491 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3492set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3494$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003495if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003496 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003497else
3498 if test -n "$CC"; then
3499 ac_cv_prog_CC="$CC" # Let the user override the test.
3500else
Martin v. Löwis11437992002-04-12 09:54:03 +00003501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3502for as_dir in $PATH
3503do
3504 IFS=$as_save_IFS
3505 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003506 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003509 $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 +00003510 break 2
3511 fi
3512done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003513 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003514IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003515
Jack Jansendd19cf82001-12-06 22:36:17 +00003516fi
3517fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003518CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003519if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3521$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3524$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003525fi
3526
Martin v. Löwiseba40652007-08-30 20:10:57 +00003527
Martin v. Löwis11437992002-04-12 09:54:03 +00003528fi
3529if test -z "$ac_cv_prog_CC"; then
3530 ac_ct_CC=$CC
3531 # Extract the first word of "gcc", so it can be a program name with args.
3532set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3534$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003535if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003536 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003537else
3538 if test -n "$ac_ct_CC"; then
3539 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3540else
3541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3542for as_dir in $PATH
3543do
3544 IFS=$as_save_IFS
3545 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003546 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003549 $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 +00003550 break 2
3551 fi
3552done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003553 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003554IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003555
3556fi
3557fi
3558ac_ct_CC=$ac_cv_prog_ac_ct_CC
3559if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3561$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3564$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003565fi
3566
Martin v. Löwiseba40652007-08-30 20:10:57 +00003567 if test "x$ac_ct_CC" = x; then
3568 CC=""
3569 else
3570 case $cross_compiling:$ac_tool_warned in
3571yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003574ac_tool_warned=yes ;;
3575esac
3576 CC=$ac_ct_CC
3577 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003578else
3579 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003580fi
3581
Jack Jansendd19cf82001-12-06 22:36:17 +00003582if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003583 if test -n "$ac_tool_prefix"; then
3584 # 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 +00003585set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3587$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003588if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003589 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003590else
3591 if test -n "$CC"; then
3592 ac_cv_prog_CC="$CC" # Let the user override the test.
3593else
Martin v. Löwis11437992002-04-12 09:54:03 +00003594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3595for as_dir in $PATH
3596do
3597 IFS=$as_save_IFS
3598 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003599 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003602 $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 +00003603 break 2
3604 fi
3605done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003606 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003607IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003608
3609fi
3610fi
3611CC=$ac_cv_prog_CC
3612if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3614$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3617$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003618fi
3619
Martin v. Löwiseba40652007-08-30 20:10:57 +00003620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003622fi
3623if test -z "$CC"; then
3624 # Extract the first word of "cc", so it can be a program name with args.
3625set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3627$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003628if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003630else
3631 if test -n "$CC"; then
3632 ac_cv_prog_CC="$CC" # Let the user override the test.
3633else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003634 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636for as_dir in $PATH
3637do
3638 IFS=$as_save_IFS
3639 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3643 ac_prog_rejected=yes
3644 continue
3645 fi
3646 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647 $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 +00003648 break 2
3649 fi
3650done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003651 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003652IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003653
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003654if test $ac_prog_rejected = yes; then
3655 # We found a bogon in the path, so make sure we never use it.
3656 set dummy $ac_cv_prog_CC
3657 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003659 # We chose a different compiler from the bogus one.
3660 # However, it has the same basename, so the bogon will be chosen
3661 # first if we set CC to just the basename; use the full file name.
3662 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003663 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003664 fi
3665fi
3666fi
3667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003669if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3671$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3674$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003675fi
3676
Martin v. Löwiseba40652007-08-30 20:10:57 +00003677
Martin v. Löwis11437992002-04-12 09:54:03 +00003678fi
3679if test -z "$CC"; then
3680 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003681 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 do
3683 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3684set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3686$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003687if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003688 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003689else
3690 if test -n "$CC"; then
3691 ac_cv_prog_CC="$CC" # Let the user override the test.
3692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3694for as_dir in $PATH
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003698 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003701 $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 +00003702 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003704done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003705 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003706IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
3708fi
3709fi
3710CC=$ac_cv_prog_CC
3711if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3713$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3716$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003717fi
3718
Martin v. Löwiseba40652007-08-30 20:10:57 +00003719
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 test -n "$CC" && break
3721 done
3722fi
3723if test -z "$CC"; then
3724 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003725 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003726do
3727 # Extract the first word of "$ac_prog", so it can be a program name with args.
3728set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3730$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003731if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
3734 if test -n "$ac_ct_CC"; then
3735 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3736else
3737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738for as_dir in $PATH
3739do
3740 IFS=$as_save_IFS
3741 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003742 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003745 $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 +00003746 break 2
3747 fi
3748done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003749 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003751
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753fi
3754ac_ct_CC=$ac_cv_prog_ac_ct_CC
3755if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3757$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003762
Martin v. Löwiseba40652007-08-30 20:10:57 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 test -n "$ac_ct_CC" && break
3765done
Michael W. Hudson54241132001-12-07 15:38:26 +00003766
Martin v. Löwiseba40652007-08-30 20:10:57 +00003767 if test "x$ac_ct_CC" = x; then
3768 CC=""
3769 else
3770 case $cross_compiling:$ac_tool_warned in
3771yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003774ac_tool_warned=yes ;;
3775esac
3776 CC=$ac_ct_CC
3777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003778fi
3779
3780fi
3781
3782
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003785as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003786See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003787
3788# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003789$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3790set X $ac_compile
3791ac_compiler=$2
3792for ac_option in --version -v -V -qversion; do
3793 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794case "(($ac_try" in
3795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3796 *) ac_try_echo=$ac_try;;
3797esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3799$as_echo "$ac_try_echo"; } >&5
3800 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003802 if test -s conftest.err; then
3803 sed '10a\
3804... rest of stderr output deleted ...
3805 10q' conftest.err >conftest.er1
3806 cat conftest.er1 >&5
3807 fi
3808 rm -f conftest.er1 conftest.err
3809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3810 test $ac_status = 0; }
3811done
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003814/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003815
Martin v. Löwis11437992002-04-12 09:54:03 +00003816int
3817main ()
3818{
3819
3820 ;
3821 return 0;
3822}
3823_ACEOF
3824ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003825ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003826# Try to create an executable without -o first, disregard a.out.
3827# It will help us diagnose broken compilers, and finding out an intuition
3828# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3830$as_echo_n "checking whether the C compiler works... " >&6; }
3831ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3832
3833# The possible output files:
3834ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3835
Martin v. Löwiseba40652007-08-30 20:10:57 +00003836ac_rmfiles=
3837for ac_file in $ac_files
3838do
3839 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003841 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3842 esac
3843done
3844rm -f $ac_rmfiles
3845
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003846if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003847case "(($ac_try" in
3848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3849 *) ac_try_echo=$ac_try;;
3850esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3852$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003853 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3856 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003857 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3858# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3859# in a Makefile. We should not override ac_cv_exeext if it was cached,
3860# so that the user can short-circuit this test for compilers unknown to
3861# Autoconf.
3862for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003863do
3864 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003866 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003867 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003868 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003869 # We found the default executable, but exeext='' is most
3870 # certainly right.
3871 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003872 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003873 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003874 then :; else
3875 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3876 fi
3877 # We set ac_cv_exeext here because the later test for it is not
3878 # safe: cross compilers may not add the suffix if given an `-o'
3879 # argument, so we may need to know it at that point already.
3880 # Even if this section looks crufty: it has the advantage of
3881 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003882 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003883 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003884 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 esac
3886done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003887test "$ac_cv_exeext" = no && ac_cv_exeext=
3888
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003889else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003890 ac_file=''
3891fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003892if test -z "$ac_file"; then :
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3894$as_echo "no" >&6; }
3895$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003896sed 's/^/| /' conftest.$ac_ext >&5
3897
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003898{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003900as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003901See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003902else
3903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3904$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3907$as_echo_n "checking for C compiler default output file name... " >&6; }
3908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3909$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003910ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003911
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003912rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003913ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3915$as_echo_n "checking for suffix of executables... " >&6; }
3916if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003917case "(($ac_try" in
3918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3919 *) ac_try_echo=$ac_try;;
3920esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003921eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3922$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003924 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3926 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003927 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3928# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3929# work properly (i.e., refer to `conftest.exe'), while it won't with
3930# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003931for ac_file in conftest.exe conftest conftest.*; do
3932 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003934 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003936 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003937 * ) break;;
3938 esac
3939done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003941 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003943as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003944See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003946rm -f conftest conftest$ac_cv_exeext
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3948$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003949
3950rm -f conftest.$ac_ext
3951EXEEXT=$ac_cv_exeext
3952ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3954/* end confdefs.h. */
3955#include <stdio.h>
3956int
3957main ()
3958{
3959FILE *f = fopen ("conftest.out", "w");
3960 return ferror (f) || fclose (f) != 0;
3961
3962 ;
3963 return 0;
3964}
Skip Montanaro6dead952003-09-25 14:50:04 +00003965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003966ac_clean_files="$ac_clean_files conftest.out"
3967# Check that the compiler produces executables we can run. If not, either
3968# the compiler is broken, or we cross compile.
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3970$as_echo_n "checking whether we are cross compiling... " >&6; }
3971if test "$cross_compiling" != yes; then
3972 { { ac_try="$ac_link"
3973case "(($ac_try" in
3974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3975 *) ac_try_echo=$ac_try;;
3976esac
3977eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3978$as_echo "$ac_try_echo"; } >&5
3979 (eval "$ac_link") 2>&5
3980 ac_status=$?
3981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3982 test $ac_status = 0; }
3983 if { ac_try='./conftest$ac_cv_exeext'
3984 { { case "(($ac_try" in
3985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3986 *) ac_try_echo=$ac_try;;
3987esac
3988eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3989$as_echo "$ac_try_echo"; } >&5
3990 (eval "$ac_try") 2>&5
3991 ac_status=$?
3992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3993 test $ac_status = 0; }; }; then
3994 cross_compiling=no
3995 else
3996 if test "$cross_compiling" = maybe; then
3997 cross_compiling=yes
3998 else
3999 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004001as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004002If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004003See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004004 fi
4005 fi
4006fi
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4008$as_echo "$cross_compiling" >&6; }
4009
4010rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4011ac_clean_files=$ac_clean_files_save
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4013$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004014if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004015 $as_echo_n "(cached) " >&6
4016else
4017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004019
Martin v. Löwis11437992002-04-12 09:54:03 +00004020int
4021main ()
4022{
4023
4024 ;
4025 return 0;
4026}
4027_ACEOF
4028rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004029if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004030case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4035$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004036 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004037 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4039 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004040 for ac_file in conftest.o conftest.obj conftest.*; do
4041 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004043 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004044 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4045 break;;
4046 esac
4047done
4048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004049 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004050sed 's/^/| /' conftest.$ac_ext >&5
4051
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004052{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004054as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004055See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004056fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004057rm -f conftest.$ac_cv_objext conftest.$ac_ext
4058fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4060$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004061OBJEXT=$ac_cv_objext
4062ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4064$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004065if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004066 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004070
Martin v. Löwis11437992002-04-12 09:54:03 +00004071int
4072main ()
4073{
4074#ifndef __GNUC__
4075 choke me
4076#endif
4077
4078 ;
4079 return 0;
4080}
4081_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004083 ac_compiler_gnu=yes
4084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004085 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004088ac_cv_c_compiler_gnu=$ac_compiler_gnu
4089
4090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4092$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4093if test $ac_compiler_gnu = yes; then
4094 GCC=yes
4095else
4096 GCC=
4097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004098ac_test_CFLAGS=${CFLAGS+set}
4099ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4101$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004102if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004104else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004105 ac_save_c_werror_flag=$ac_c_werror_flag
4106 ac_c_werror_flag=yes
4107 ac_cv_prog_cc_g=no
4108 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004111
Martin v. Löwis11437992002-04-12 09:54:03 +00004112int
4113main ()
4114{
4115
4116 ;
4117 return 0;
4118}
4119_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004120if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004121 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004123 CFLAGS=""
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004125/* end confdefs.h. */
4126
4127int
4128main ()
4129{
4130
4131 ;
4132 return 0;
4133}
4134_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004135if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004136
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004137else
4138 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004139 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004141/* end confdefs.h. */
4142
4143int
4144main ()
4145{
4146
4147 ;
4148 return 0;
4149}
4150_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004152 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4159 ac_c_werror_flag=$ac_save_c_werror_flag
4160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4162$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004163if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004165elif test $ac_cv_prog_cc_g = yes; then
4166 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004167 CFLAGS="-g -O2"
4168 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004169 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170 fi
4171else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004172 if test "$GCC" = yes; then
4173 CFLAGS="-O2"
4174 else
4175 CFLAGS=
4176 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4179$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004180if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004181 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004182else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004183 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004184ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* end confdefs.h. */
4187#include <stdarg.h>
4188#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004189struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004190/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4191struct buf { int x; };
4192FILE * (*rcsopen) (struct buf *, struct stat *, int);
4193static char *e (p, i)
4194 char **p;
4195 int i;
4196{
4197 return p[i];
4198}
4199static char *f (char * (*g) (char **, int), char **p, ...)
4200{
4201 char *s;
4202 va_list v;
4203 va_start (v,p);
4204 s = g (p, va_arg (v,int));
4205 va_end (v);
4206 return s;
4207}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004208
4209/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4210 function prototypes and stuff, but not '\xHH' hex character constants.
4211 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004212 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004213 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4214 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004215 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004216int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4217
Martin v. Löwiseba40652007-08-30 20:10:57 +00004218/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4219 inside strings and character constants. */
4220#define FOO(x) 'x'
4221int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4222
Skip Montanaro6dead952003-09-25 14:50:04 +00004223int test (int i, double x);
4224struct s1 {int (*f) (int a);};
4225struct s2 {int (*f) (double a);};
4226int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4227int argc;
4228char **argv;
4229int
4230main ()
4231{
4232return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4233 ;
4234 return 0;
4235}
4236_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004237for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4238 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004239do
4240 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004241 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004244rm -f core conftest.err conftest.$ac_objext
4245 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004246done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004247rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004248CC=$ac_save_CC
4249
4250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004251# AC_CACHE_VAL
4252case "x$ac_cv_prog_cc_c89" in
4253 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4255$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4258$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004259 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004260 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4262$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004263esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004264if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004265
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004266fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004267
Martin v. Löwis11437992002-04-12 09:54:03 +00004268ac_ext=c
4269ac_cpp='$CPP $CPPFLAGS'
4270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4272ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004274if test ! -z "$preset_cflags"
4275then
4276 CFLAGS=$preset_cflags
4277fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004278
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004279
4280
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4282$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004283
Martin v. Löwiseba40652007-08-30 20:10:57 +00004284# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004285if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004286 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004287
4288 case $withval in
4289 no) with_cxx_main=no
4290 MAINCC='$(CC)';;
4291 yes) with_cxx_main=yes
4292 MAINCC='$(CXX)';;
4293 *) with_cxx_main=yes
4294 MAINCC=$withval
4295 if test -z "$CXX"
4296 then
4297 CXX=$withval
4298 fi;;
4299 esac
4300else
4301
4302 with_cxx_main=no
4303 MAINCC='$(CC)'
4304
Martin v. Löwiseba40652007-08-30 20:10:57 +00004305fi
4306
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4308$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004309
4310preset_cxx="$CXX"
4311if test -z "$CXX"
4312then
4313 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004314 gcc) if test -n "$ac_tool_prefix"; then
4315 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4316set dummy ${ac_tool_prefix}g++; ac_word=$2
4317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4318$as_echo_n "checking for $ac_word... " >&6; }
4319if ${ac_cv_path_CXX+:} false; then :
4320 $as_echo_n "(cached) " >&6
4321else
4322 case $CXX in
4323 [\\/]* | ?:[\\/]*)
4324 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4325 ;;
4326 *)
4327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4328for as_dir in notfound
4329do
4330 IFS=$as_save_IFS
4331 test -z "$as_dir" && as_dir=.
4332 for ac_exec_ext in '' $ac_executable_extensions; do
4333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4334 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4336 break 2
4337 fi
4338done
4339 done
4340IFS=$as_save_IFS
4341
4342 ;;
4343esac
4344fi
4345CXX=$ac_cv_path_CXX
4346if test -n "$CXX"; then
4347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4348$as_echo "$CXX" >&6; }
4349else
4350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4351$as_echo "no" >&6; }
4352fi
4353
4354
4355fi
4356if test -z "$ac_cv_path_CXX"; then
4357 ac_pt_CXX=$CXX
4358 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004359set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4361$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004362if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004363 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004364else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004365 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004366 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004367 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004368 ;;
4369 *)
4370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in notfound
4372do
4373 IFS=$as_save_IFS
4374 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004375 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004377 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004379 break 2
4380 fi
4381done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004382 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004383IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004384
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004385 ;;
4386esac
4387fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004388ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4389if test -n "$ac_pt_CXX"; then
4390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4391$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004396
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004397 if test "x$ac_pt_CXX" = x; then
4398 CXX="g++"
4399 else
4400 case $cross_compiling:$ac_tool_warned in
4401yes:)
4402{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4403$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4404ac_tool_warned=yes ;;
4405esac
4406 CXX=$ac_pt_CXX
4407 fi
4408else
4409 CXX="$ac_cv_path_CXX"
4410fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004411 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004412 cc) if test -n "$ac_tool_prefix"; then
4413 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4414set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4416$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004417if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004418 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004419else
4420 case $CXX in
4421 [\\/]* | ?:[\\/]*)
4422 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4423 ;;
4424 *)
4425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4426for as_dir in notfound
4427do
4428 IFS=$as_save_IFS
4429 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004430 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004431 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004432 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004434 break 2
4435 fi
4436done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004437 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004438IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004439
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004440 ;;
4441esac
4442fi
4443CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004444if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4446$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4449$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004451
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004452
4453fi
4454if test -z "$ac_cv_path_CXX"; then
4455 ac_pt_CXX=$CXX
4456 # Extract the first word of "c++", so it can be a program name with args.
4457set dummy c++; ac_word=$2
4458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4459$as_echo_n "checking for $ac_word... " >&6; }
4460if ${ac_cv_path_ac_pt_CXX+:} false; then :
4461 $as_echo_n "(cached) " >&6
4462else
4463 case $ac_pt_CXX in
4464 [\\/]* | ?:[\\/]*)
4465 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4466 ;;
4467 *)
4468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469for as_dir in notfound
4470do
4471 IFS=$as_save_IFS
4472 test -z "$as_dir" && as_dir=.
4473 for ac_exec_ext in '' $ac_executable_extensions; do
4474 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4475 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4476 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4477 break 2
4478 fi
4479done
4480 done
4481IFS=$as_save_IFS
4482
4483 ;;
4484esac
4485fi
4486ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4487if test -n "$ac_pt_CXX"; then
4488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4489$as_echo "$ac_pt_CXX" >&6; }
4490else
4491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4492$as_echo "no" >&6; }
4493fi
4494
4495 if test "x$ac_pt_CXX" = x; then
4496 CXX="c++"
4497 else
4498 case $cross_compiling:$ac_tool_warned in
4499yes:)
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4501$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4502ac_tool_warned=yes ;;
4503esac
4504 CXX=$ac_pt_CXX
4505 fi
4506else
4507 CXX="$ac_cv_path_CXX"
4508fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004509 ;;
4510 esac
4511 if test "$CXX" = "notfound"
4512 then
4513 CXX=""
4514 fi
4515fi
4516if test -z "$CXX"
4517then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004518 if test -n "$ac_tool_prefix"; then
4519 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4520 do
4521 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4522set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4524$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004525if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004526 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004527else
4528 if test -n "$CXX"; then
4529 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4530else
4531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4532for as_dir in $PATH
4533do
4534 IFS=$as_save_IFS
4535 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004536 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004538 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004540 break 2
4541 fi
4542done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004543 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004544IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004545
4546fi
4547fi
4548CXX=$ac_cv_prog_CXX
4549if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4551$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004552else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4554$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004555fi
4556
Martin v. Löwiseba40652007-08-30 20:10:57 +00004557
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004558 test -n "$CXX" && break
4559 done
4560fi
4561if test -z "$CXX"; then
4562 ac_ct_CXX=$CXX
4563 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4564do
4565 # Extract the first word of "$ac_prog", so it can be a program name with args.
4566set dummy $ac_prog; ac_word=$2
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4568$as_echo_n "checking for $ac_word... " >&6; }
4569if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4570 $as_echo_n "(cached) " >&6
4571else
4572 if test -n "$ac_ct_CXX"; then
4573 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4574else
4575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4576for as_dir in $PATH
4577do
4578 IFS=$as_save_IFS
4579 test -z "$as_dir" && as_dir=.
4580 for ac_exec_ext in '' $ac_executable_extensions; do
4581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4582 ac_cv_prog_ac_ct_CXX="$ac_prog"
4583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4584 break 2
4585 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004586done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004587 done
4588IFS=$as_save_IFS
4589
4590fi
4591fi
4592ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4593if test -n "$ac_ct_CXX"; then
4594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4595$as_echo "$ac_ct_CXX" >&6; }
4596else
4597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4598$as_echo "no" >&6; }
4599fi
4600
4601
4602 test -n "$ac_ct_CXX" && break
4603done
4604
4605 if test "x$ac_ct_CXX" = x; then
4606 CXX="notfound"
4607 else
4608 case $cross_compiling:$ac_tool_warned in
4609yes:)
4610{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4611$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4612ac_tool_warned=yes ;;
4613esac
4614 CXX=$ac_ct_CXX
4615 fi
4616fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004617
4618 if test "$CXX" = "notfound"
4619 then
4620 CXX=""
4621 fi
4622fi
4623if test "$preset_cxx" != "$CXX"
4624then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004625 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004626
4627 By default, distutils will build C++ extension modules with \"$CXX\".
4628 If this is not intended, then set CXX on the configure command line.
4629 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004630$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004631
4632 By default, distutils will build C++ extension modules with \"$CXX\".
4633 If this is not intended, then set CXX on the configure command line.
4634 " >&2;}
4635fi
4636
doko@python.org4e63fbe2013-01-25 13:08:27 +01004637MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4638
4639
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004640
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004641# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004642
4643ac_ext=c
4644ac_cpp='$CPP $CPPFLAGS'
4645ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4646ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4647ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4649$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004650# On Suns, sometimes $CPP names a directory.
4651if test -n "$CPP" && test -d "$CPP"; then
4652 CPP=
4653fi
4654if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004655 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004656 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004657else
Martin v. Löwis11437992002-04-12 09:54:03 +00004658 # Double quotes because CPP needs to be expanded
4659 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4660 do
4661 ac_preproc_ok=false
4662for ac_c_preproc_warn_flag in '' yes
4663do
4664 # Use a header file that comes with gcc, so configuring glibc
4665 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004666 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4667 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004668 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004669 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004671/* end confdefs.h. */
4672#ifdef __STDC__
4673# include <limits.h>
4674#else
4675# include <assert.h>
4676#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004677 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004679if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004680
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004681else
Martin v. Löwis11437992002-04-12 09:54:03 +00004682 # Broken: fails on valid input.
4683continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004684fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004685rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004686
Martin v. Löwiseba40652007-08-30 20:10:57 +00004687 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004688 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004691#include <ac_nonexistent.h>
4692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004693if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 # Broken: success on invalid input.
4695continue
4696else
Martin v. Löwis11437992002-04-12 09:54:03 +00004697 # Passes both tests.
4698ac_preproc_ok=:
4699break
4700fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004701rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004702
4703done
4704# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004705rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004706if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004707 break
4708fi
4709
4710 done
4711 ac_cv_prog_CPP=$CPP
4712
4713fi
4714 CPP=$ac_cv_prog_CPP
4715else
4716 ac_cv_prog_CPP=$CPP
4717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4719$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004720ac_preproc_ok=false
4721for ac_c_preproc_warn_flag in '' yes
4722do
4723 # Use a header file that comes with gcc, so configuring glibc
4724 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004725 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4726 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004727 # On the NeXT, cc -E runs the code through the compiler's parser,
4728 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004730/* end confdefs.h. */
4731#ifdef __STDC__
4732# include <limits.h>
4733#else
4734# include <assert.h>
4735#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004736 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004737_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004738if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004739
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004740else
Martin v. Löwis11437992002-04-12 09:54:03 +00004741 # Broken: fails on valid input.
4742continue
4743fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004744rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004745
Martin v. Löwiseba40652007-08-30 20:10:57 +00004746 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004747 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004750#include <ac_nonexistent.h>
4751_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004752if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004753 # Broken: success on invalid input.
4754continue
4755else
Martin v. Löwis11437992002-04-12 09:54:03 +00004756 # Passes both tests.
4757ac_preproc_ok=:
4758break
4759fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004760rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004761
4762done
4763# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004764rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004765if $ac_preproc_ok; then :
4766
Martin v. Löwis11437992002-04-12 09:54:03 +00004767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004770as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004771See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004772fi
4773
4774ac_ext=c
4775ac_cpp='$CPP $CPPFLAGS'
4776ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4777ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4778ac_compiler_gnu=$ac_cv_c_compiler_gnu
4779
4780
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4782$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004783if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004784 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004786 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004787 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004788 # Loop through the user's path and test for each of PROGNAME-LIST
4789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004790for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4791do
4792 IFS=$as_save_IFS
4793 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004794 for ac_prog in grep ggrep; do
4795 for ac_exec_ext in '' $ac_executable_extensions; do
4796 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004797 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004798# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004799 # Check for GNU $ac_path_GREP
4800case `"$ac_path_GREP" --version 2>&1` in
4801*GNU*)
4802 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4803*)
4804 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004805 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004806 while :
4807 do
4808 cat "conftest.in" "conftest.in" >"conftest.tmp"
4809 mv "conftest.tmp" "conftest.in"
4810 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004811 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004812 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4813 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004814 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004815 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4816 # Best one so far, save it but keep looking for a better one
4817 ac_cv_path_GREP="$ac_path_GREP"
4818 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004819 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004820 # 10*(2^10) chars as input seems more than enough
4821 test $ac_count -gt 10 && break
4822 done
4823 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4824esac
4825
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004826 $ac_path_GREP_found && break 3
4827 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004828 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004829 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004830IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004831 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004832 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004833 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004834else
4835 ac_cv_path_GREP=$GREP
4836fi
4837
Martin v. Löwiseba40652007-08-30 20:10:57 +00004838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4840$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004841 GREP="$ac_cv_path_GREP"
4842
4843
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4845$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004846if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004847 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004848else
4849 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4850 then ac_cv_path_EGREP="$GREP -E"
4851 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004852 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004853 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004854 # Loop through the user's path and test for each of PROGNAME-LIST
4855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004856for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4857do
4858 IFS=$as_save_IFS
4859 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860 for ac_prog in egrep; do
4861 for ac_exec_ext in '' $ac_executable_extensions; do
4862 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004863 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865 # Check for GNU $ac_path_EGREP
4866case `"$ac_path_EGREP" --version 2>&1` in
4867*GNU*)
4868 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4869*)
4870 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004871 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004872 while :
4873 do
4874 cat "conftest.in" "conftest.in" >"conftest.tmp"
4875 mv "conftest.tmp" "conftest.in"
4876 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004877 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004878 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4879 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004880 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004881 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4882 # Best one so far, save it but keep looking for a better one
4883 ac_cv_path_EGREP="$ac_path_EGREP"
4884 ac_path_EGREP_max=$ac_count
4885 fi
4886 # 10*(2^10) chars as input seems more than enough
4887 test $ac_count -gt 10 && break
4888 done
4889 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4890esac
4891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004892 $ac_path_EGREP_found && break 3
4893 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004894 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004896IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004897 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004898 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004899 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004900else
4901 ac_cv_path_EGREP=$EGREP
4902fi
4903
Martin v. Löwiseba40652007-08-30 20:10:57 +00004904 fi
4905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4907$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004908 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004909
4910
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4912$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004913if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004914 $as_echo_n "(cached) " >&6
4915else
4916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004917/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004918#include <stdlib.h>
4919#include <stdarg.h>
4920#include <string.h>
4921#include <float.h>
4922
4923int
4924main ()
4925{
4926
4927 ;
4928 return 0;
4929}
4930_ACEOF
4931if ac_fn_c_try_compile "$LINENO"; then :
4932 ac_cv_header_stdc=yes
4933else
4934 ac_cv_header_stdc=no
4935fi
4936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4937
4938if test $ac_cv_header_stdc = yes; then
4939 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941/* end confdefs.h. */
4942#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004943
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004944_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004946 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004947
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004949 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004950fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004951rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004953fi
4954
4955if test $ac_cv_header_stdc = yes; then
4956 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4958/* end confdefs.h. */
4959#include <stdlib.h>
4960
4961_ACEOF
4962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4963 $EGREP "free" >/dev/null 2>&1; then :
4964
4965else
4966 ac_cv_header_stdc=no
4967fi
4968rm -f conftest*
4969
4970fi
4971
4972if test $ac_cv_header_stdc = yes; then
4973 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4974 if test "$cross_compiling" = yes; then :
4975 :
4976else
4977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4978/* end confdefs.h. */
4979#include <ctype.h>
4980#include <stdlib.h>
4981#if ((' ' & 0x0FF) == 0x020)
4982# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4983# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4984#else
4985# define ISLOWER(c) \
4986 (('a' <= (c) && (c) <= 'i') \
4987 || ('j' <= (c) && (c) <= 'r') \
4988 || ('s' <= (c) && (c) <= 'z'))
4989# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4990#endif
4991
4992#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4993int
4994main ()
4995{
4996 int i;
4997 for (i = 0; i < 256; i++)
4998 if (XOR (islower (i), ISLOWER (i))
4999 || toupper (i) != TOUPPER (i))
5000 return 2;
5001 return 0;
5002}
5003_ACEOF
5004if ac_fn_c_try_run "$LINENO"; then :
5005
5006else
5007 ac_cv_header_stdc=no
5008fi
5009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5010 conftest.$ac_objext conftest.beam conftest.$ac_ext
5011fi
5012
5013fi
5014fi
5015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5016$as_echo "$ac_cv_header_stdc" >&6; }
5017if test $ac_cv_header_stdc = yes; then
5018
5019$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5020
5021fi
5022
5023# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5024for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5025 inttypes.h stdint.h unistd.h
5026do :
5027 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5028ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5029"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005030if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005031 cat >>confdefs.h <<_ACEOF
5032#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5033_ACEOF
5034
5035fi
5036
5037done
5038
5039
5040
5041 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005042if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005043 MINIX=yes
5044else
5045 MINIX=
5046fi
5047
5048
5049 if test "$MINIX" = yes; then
5050
5051$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5052
5053
5054$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5055
5056
5057$as_echo "#define _MINIX 1" >>confdefs.h
5058
5059 fi
5060
5061
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5063$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005064if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005065 $as_echo_n "(cached) " >&6
5066else
5067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5068/* end confdefs.h. */
5069
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005070# define __EXTENSIONS__ 1
5071 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005072int
5073main ()
5074{
5075
5076 ;
5077 return 0;
5078}
5079_ACEOF
5080if ac_fn_c_try_compile "$LINENO"; then :
5081 ac_cv_safe_to_define___extensions__=yes
5082else
5083 ac_cv_safe_to_define___extensions__=no
5084fi
5085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5086fi
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5088$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5089 test $ac_cv_safe_to_define___extensions__ = yes &&
5090 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5091
5092 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5093
5094 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5095
5096 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5097
5098 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5099
5100
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005101
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005102# Check for unsupported systems
5103case $ac_sys_system/$ac_sys_release in
5104atheos*|Linux*/1*)
5105 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5106 echo See README for details.
5107 exit 1;;
5108esac
5109
5110
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5112$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005113
5114# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005115if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005116 withval=$with_suffix;
5117 case $withval in
5118 no) EXEEXT=;;
5119 yes) EXEEXT=.exe;;
5120 *) EXEEXT=$withval;;
5121 esac
5122fi
5123
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5125$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005126
5127# Test whether we're running on a non-case-sensitive system, in which
5128# case we give a warning if no ext is given
5129
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5131$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005132if test ! -d CaseSensitiveTestDir; then
5133mkdir CaseSensitiveTestDir
5134fi
5135
5136if test -d casesensitivetestdir
5137then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5139$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140 BUILDEXEEXT=.exe
5141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5143$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005144 BUILDEXEEXT=$EXEEXT
5145fi
5146rmdir CaseSensitiveTestDir
5147
5148case $MACHDEP in
5149bsdos*)
5150 case $CC in
5151 gcc) CC="$CC -D_HAVE_BSDI";;
5152 esac;;
5153esac
5154
5155case $ac_sys_system in
5156hp*|HP*)
5157 case $CC in
5158 cc|*/cc) CC="$CC -Ae";;
5159 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005160SunOS*)
5161 # Some functions have a prototype only with that define, e.g. confstr
5162
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005163$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005164
5165 ;;
5166esac
5167
5168
5169
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5171$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005172if test -z "$LIBRARY"
5173then
5174 LIBRARY='libpython$(VERSION).a'
5175fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5177$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005178
5179# LDLIBRARY is the name of the library to link against (as opposed to the
5180# name of the library into which to insert object files). BLDLIBRARY is also
5181# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5182# is blank as the main program is not linked directly against LDLIBRARY.
5183# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5184# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5185# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5186# DLLLIBRARY is the shared (i.e., DLL) library.
5187#
5188# RUNSHARED is used to run shared python without installed libraries
5189#
5190# INSTSONAME is the name of the shared library that will be use to install
5191# on the system - some systems like version suffix, others don't
5192
5193
5194
5195
5196
5197
5198LDLIBRARY="$LIBRARY"
5199BLDLIBRARY='$(LDLIBRARY)'
5200INSTSONAME='$(LDLIBRARY)'
5201DLLLIBRARY=''
5202LDLIBRARYDIR=''
5203RUNSHARED=''
5204
5205# LINKCC is the command that links the python executable -- default is $(CC).
5206# If CXX is set, and if it is needed to link a main function that was
5207# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5208# python might then depend on the C++ runtime
5209# This is altered for AIX in order to build the export list before
5210# linking.
5211
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5213$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005214if test -z "$LINKCC"
5215then
5216 LINKCC='$(PURIFY) $(MAINCC)'
5217 case $ac_sys_system in
5218 AIX*)
5219 exp_extra="\"\""
5220 if test $ac_sys_release -ge 5 -o \
5221 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5222 exp_extra="."
5223 fi
5224 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005225 QNX*)
5226 # qcc must be used because the other compilers do not
5227 # support -N.
5228 LINKCC=qcc;;
5229 esac
5230fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5232$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005233
5234# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5235# make sure we default having it set to "no": this is used by
5236# distutils.unixccompiler to know if it should add --enable-new-dtags
5237# to linker command lines, and failing to detect GNU ld simply results
5238# in the same bahaviour as before.
5239
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5241$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005242ac_prog=ld
5243if test "$GCC" = yes; then
5244 ac_prog=`$CC -print-prog-name=ld`
5245fi
5246case `"$ac_prog" -V 2>&1 < /dev/null` in
5247 *GNU*)
5248 GNULD=yes;;
5249 *)
5250 GNULD=no;;
5251esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5253$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5256$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005257# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005258if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005259 enableval=$enable_shared;
5260fi
5261
5262
5263if test -z "$enable_shared"
5264then
5265 case $ac_sys_system in
5266 CYGWIN* | atheos*)
5267 enable_shared="yes";;
5268 *)
5269 enable_shared="no";;
5270 esac
5271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5273$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5276$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005277# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005278if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005279 enableval=$enable_profiling;
5280fi
5281
5282if test "x$enable_profiling" = xyes; then
5283 ac_save_cc="$CC"
5284 CC="$(CC) -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286/* end confdefs.h. */
5287int main() { return 0; }
5288_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005289if ac_fn_c_try_link "$LINENO"; then :
5290
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005291else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005292 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005293fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005294rm -f core conftest.err conftest.$ac_objext \
5295 conftest$ac_exeext conftest.$ac_ext
5296 CC="$ac_save_cc"
5297else
5298 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005299fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5301$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005302
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005303if test "x$enable_profiling" = xyes; then
5304 BASECFLAGS="-pg $BASECFLAGS"
5305 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005306fi
5307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5309$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005310
5311# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5312# library that we build, but we do not want to link against it (we
5313# will find it with a -framework option). For this reason there is an
5314# extra variable BLDLIBRARY against which Python and the extension
5315# modules are linked, BLDLIBRARY. This is normally the same as
5316# LDLIBRARY, but empty for MacOSX framework builds.
5317if test "$enable_framework"
5318then
5319 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5320 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5321 BLDLIBRARY=''
5322else
5323 BLDLIBRARY='$(LDLIBRARY)'
5324fi
5325
5326# Other platforms follow
5327if test $enable_shared = "yes"; then
5328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005329$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330
5331 case $ac_sys_system in
5332 BeOS*)
5333 LDLIBRARY='libpython$(VERSION).so'
5334 ;;
5335 CYGWIN*)
5336 LDLIBRARY='libpython$(VERSION).dll.a'
5337 DLLLIBRARY='libpython$(VERSION).dll'
5338 ;;
5339 SunOS*)
5340 LDLIBRARY='libpython$(VERSION).so'
5341 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
5342 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5343 INSTSONAME="$LDLIBRARY".$SOVERSION
5344 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005345 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005346 LDLIBRARY='libpython$(VERSION).so'
5347 BLDLIBRARY='-L. -lpython$(VERSION)'
5348 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5349 case $ac_sys_system in
5350 FreeBSD*)
5351 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5352 ;;
5353 esac
5354 INSTSONAME="$LDLIBRARY".$SOVERSION
5355 ;;
5356 hp*|HP*)
5357 case `uname -m` in
5358 ia64)
5359 LDLIBRARY='libpython$(VERSION).so'
5360 ;;
5361 *)
5362 LDLIBRARY='libpython$(VERSION).sl'
5363 ;;
5364 esac
5365 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
5366 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5367 ;;
5368 OSF*)
5369 LDLIBRARY='libpython$(VERSION).so'
5370 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
5371 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5372 ;;
5373 atheos*)
5374 LDLIBRARY='libpython$(VERSION).so'
5375 BLDLIBRARY='-L. -lpython$(VERSION)'
5376 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5377 ;;
5378 Darwin*)
5379 LDLIBRARY='libpython$(VERSION).dylib'
5380 BLDLIBRARY='-L. -lpython$(VERSION)'
5381 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5382 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005383 AIX*)
5384 LDLIBRARY='libpython$(VERSION).so'
5385 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5386 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005387
5388 esac
5389else # shared is disabled
5390 case $ac_sys_system in
5391 CYGWIN*)
5392 BLDLIBRARY='$(LIBRARY)'
5393 LDLIBRARY='libpython$(VERSION).dll.a'
5394 ;;
5395 esac
5396fi
5397
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005398if test "$cross_compiling" = yes; then
5399 RUNSHARED=
5400fi
5401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5403$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005404
5405if test -n "$ac_tool_prefix"; then
5406 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5407set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5409$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005410if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005411 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005412else
5413 if test -n "$RANLIB"; then
5414 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5415else
5416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5417for as_dir in $PATH
5418do
5419 IFS=$as_save_IFS
5420 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005421 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005422 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005423 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005424 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005425 break 2
5426 fi
5427done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005428 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005429IFS=$as_save_IFS
5430
5431fi
5432fi
5433RANLIB=$ac_cv_prog_RANLIB
5434if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5436$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5439$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005440fi
5441
5442
5443fi
5444if test -z "$ac_cv_prog_RANLIB"; then
5445 ac_ct_RANLIB=$RANLIB
5446 # Extract the first word of "ranlib", so it can be a program name with args.
5447set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5449$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005450if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005451 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005452else
5453 if test -n "$ac_ct_RANLIB"; then
5454 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5455else
5456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5457for as_dir in $PATH
5458do
5459 IFS=$as_save_IFS
5460 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005461 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005462 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005463 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005464 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005465 break 2
5466 fi
5467done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005468 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469IFS=$as_save_IFS
5470
5471fi
5472fi
5473ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5474if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5476$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5479$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005480fi
5481
5482 if test "x$ac_ct_RANLIB" = x; then
5483 RANLIB=":"
5484 else
5485 case $cross_compiling:$ac_tool_warned in
5486yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005487{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5488$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005489ac_tool_warned=yes ;;
5490esac
5491 RANLIB=$ac_ct_RANLIB
5492 fi
5493else
5494 RANLIB="$ac_cv_prog_RANLIB"
5495fi
5496
5497
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005498if test -n "$ac_tool_prefix"; then
5499 for ac_prog in ar aal
5500 do
5501 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5502set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5504$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005505if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005506 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507else
5508 if test -n "$AR"; then
5509 ac_cv_prog_AR="$AR" # Let the user override the test.
5510else
5511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5512for as_dir in $PATH
5513do
5514 IFS=$as_save_IFS
5515 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005516 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005517 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005518 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005520 break 2
5521 fi
5522done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005523 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005524IFS=$as_save_IFS
5525
5526fi
5527fi
5528AR=$ac_cv_prog_AR
5529if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5531$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5534$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005535fi
5536
5537
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005538 test -n "$AR" && break
5539 done
5540fi
5541if test -z "$AR"; then
5542 ac_ct_AR=$AR
5543 for ac_prog in ar aal
5544do
5545 # Extract the first word of "$ac_prog", so it can be a program name with args.
5546set dummy $ac_prog; ac_word=$2
5547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5548$as_echo_n "checking for $ac_word... " >&6; }
5549if ${ac_cv_prog_ac_ct_AR+:} false; then :
5550 $as_echo_n "(cached) " >&6
5551else
5552 if test -n "$ac_ct_AR"; then
5553 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5554else
5555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5556for as_dir in $PATH
5557do
5558 IFS=$as_save_IFS
5559 test -z "$as_dir" && as_dir=.
5560 for ac_exec_ext in '' $ac_executable_extensions; do
5561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5562 ac_cv_prog_ac_ct_AR="$ac_prog"
5563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5564 break 2
5565 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005566done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005567 done
5568IFS=$as_save_IFS
5569
5570fi
5571fi
5572ac_ct_AR=$ac_cv_prog_ac_ct_AR
5573if test -n "$ac_ct_AR"; then
5574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5575$as_echo "$ac_ct_AR" >&6; }
5576else
5577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578$as_echo "no" >&6; }
5579fi
5580
5581
5582 test -n "$ac_ct_AR" && break
5583done
5584
5585 if test "x$ac_ct_AR" = x; then
5586 AR="ar"
5587 else
5588 case $cross_compiling:$ac_tool_warned in
5589yes:)
5590{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5591$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5592ac_tool_warned=yes ;;
5593esac
5594 AR=$ac_ct_AR
5595 fi
5596fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005597
5598
5599# tweak ARFLAGS only if the user didn't set it on the command line
5600
5601if test -z "$ARFLAGS"
5602then
5603 ARFLAGS="rc"
5604fi
5605
5606
5607# Extract the first word of "svnversion", so it can be a program name with args.
5608set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5610$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005611if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005612 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005613else
5614 if test -n "$SVNVERSION"; then
5615 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5616else
5617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5618for as_dir in $PATH
5619do
5620 IFS=$as_save_IFS
5621 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005622 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005624 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005625 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005626 break 2
5627 fi
5628done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005629 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005630IFS=$as_save_IFS
5631
5632 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5633fi
5634fi
5635SVNVERSION=$ac_cv_prog_SVNVERSION
5636if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5638$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5641$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005642fi
5643
5644
5645if test $SVNVERSION = found
5646then
5647 SVNVERSION="svnversion \$(srcdir)"
5648else
5649 SVNVERSION="echo Unversioned directory"
5650fi
5651
Trent Nelsond86ceec2012-10-16 09:42:45 -04005652
Trent Nelsonabf20512012-10-17 04:32:49 -04005653if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005654 # If we're building out-of-tree make sure Include (in the current dir)
5655 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5656 # and graminit.h to get picked up from the correct directory.
5657 # (A side effect of this is that these resources will automatically be
5658 # regenerated when building out-of-tree, regardless of whether or not
5659 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5660 # off.)
5661 BASECPPFLAGS="-IInclude"
5662else
5663 BASECPPFLAGS=""
5664fi
5665
Georg Brandl3a5508e2011-03-06 10:42:21 +01005666
5667
5668
5669# Extract the first word of "hg", so it can be a program name with args.
5670set dummy hg; ac_word=$2
5671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5672$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005673if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005674 $as_echo_n "(cached) " >&6
5675else
5676 if test -n "$HAS_HG"; then
5677 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5678else
5679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5680for as_dir in $PATH
5681do
5682 IFS=$as_save_IFS
5683 test -z "$as_dir" && as_dir=.
5684 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005686 ac_cv_prog_HAS_HG="found"
5687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5688 break 2
5689 fi
5690done
5691 done
5692IFS=$as_save_IFS
5693
5694 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5695fi
5696fi
5697HAS_HG=$ac_cv_prog_HAS_HG
5698if test -n "$HAS_HG"; then
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5700$as_echo "$HAS_HG" >&6; }
5701else
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5703$as_echo "no" >&6; }
5704fi
5705
5706
5707if test $HAS_HG = found
5708then
5709 HGVERSION="hg id -i \$(srcdir)"
5710 HGTAG="hg id -t \$(srcdir)"
5711 HGBRANCH="hg id -b \$(srcdir)"
5712else
5713 HGVERSION=""
5714 HGTAG=""
5715 HGBRANCH=""
5716fi
5717
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005718case $MACHDEP in
5719bsdos*|hp*|HP*)
5720 # install -d does not work on BSDI or HP-UX
5721 if test -z "$INSTALL"
5722 then
5723 INSTALL="${srcdir}/install-sh -c"
5724 fi
5725esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005726# Find a good install program. We prefer a C program (faster),
5727# so one script is as good as another. But avoid the broken or
5728# incompatible versions:
5729# SysV /etc/install, /usr/sbin/install
5730# SunOS /usr/etc/install
5731# IRIX /sbin/install
5732# AIX /bin/install
5733# AmigaOS /C/install, which installs bootblocks on floppy discs
5734# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5735# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5736# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5737# OS/2's system install, which has a completely different semantic
5738# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005739# Reject install programs that cannot install multiple files.
5740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5741$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005742if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005743if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005744 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005745else
5746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747for as_dir in $PATH
5748do
5749 IFS=$as_save_IFS
5750 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005751 # Account for people who put trailing slashes in PATH elements.
5752case $as_dir/ in #((
5753 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005754 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005755 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005756 /usr/ucb/* ) ;;
5757 *)
5758 # OSF1 and SCO ODT 3.0 have their own names for install.
5759 # Don't use installbsd from OSF since it installs stuff as root
5760 # by default.
5761 for ac_prog in ginstall scoinst install; do
5762 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005763 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005764 if test $ac_prog = install &&
5765 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5766 # AIX install. It has an incompatible calling convention.
5767 :
5768 elif test $ac_prog = install &&
5769 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5770 # program-specific install script used by HP pwplus--don't use.
5771 :
5772 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005773 rm -rf conftest.one conftest.two conftest.dir
5774 echo one > conftest.one
5775 echo two > conftest.two
5776 mkdir conftest.dir
5777 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5778 test -s conftest.one && test -s conftest.two &&
5779 test -s conftest.dir/conftest.one &&
5780 test -s conftest.dir/conftest.two
5781 then
5782 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5783 break 3
5784 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005785 fi
5786 fi
5787 done
5788 done
5789 ;;
5790esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005791
5792 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005793IFS=$as_save_IFS
5794
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005795rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005796
5797fi
5798 if test "${ac_cv_path_install+set}" = set; then
5799 INSTALL=$ac_cv_path_install
5800 else
5801 # As a last resort, use the slow shell script. Don't cache a
5802 # value for INSTALL within a source directory, because that will
5803 # break other packages using the cache if that directory is
5804 # removed, or if the value is a relative name.
5805 INSTALL=$ac_install_sh
5806 fi
5807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5809$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005810
5811# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5812# It thinks the first close brace ends the variable substitution.
5813test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5814
5815test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5816
5817test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5818
Trent Nelsonf6407a12012-08-30 14:56:13 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5820$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5821if test -z "$MKDIR_P"; then
5822 if ${ac_cv_path_mkdir+:} false; then :
5823 $as_echo_n "(cached) " >&6
5824else
5825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5826for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5827do
5828 IFS=$as_save_IFS
5829 test -z "$as_dir" && as_dir=.
5830 for ac_prog in mkdir gmkdir; do
5831 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005832 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005833 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5834 'mkdir (GNU coreutils) '* | \
5835 'mkdir (coreutils) '* | \
5836 'mkdir (fileutils) '4.1*)
5837 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5838 break 3;;
5839 esac
5840 done
5841 done
5842 done
5843IFS=$as_save_IFS
5844
5845fi
5846
5847 test -d ./--version && rmdir ./--version
5848 if test "${ac_cv_path_mkdir+set}" = set; then
5849 MKDIR_P="$ac_cv_path_mkdir -p"
5850 else
5851 # As a last resort, use the slow shell script. Don't cache a
5852 # value for MKDIR_P within a source directory, because that will
5853 # break other packages using the cache if that directory is
5854 # removed, or if the value is a relative name.
5855 MKDIR_P="$ac_install_sh -d"
5856 fi
5857fi
5858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5859$as_echo "$MKDIR_P" >&6; }
5860
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005861
5862# Not every filesystem supports hard links
5863
5864if test -z "$LN" ; then
5865 case $ac_sys_system in
5866 BeOS*) LN="ln -s";;
5867 CYGWIN*) LN="ln -s";;
5868 atheos*) LN="ln -s";;
5869 *) LN=ln;;
5870 esac
5871fi
5872
5873# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5875$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005876
5877# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005878if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005879 withval=$with_pydebug;
5880if test "$withval" != no
5881then
5882
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005883$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005884
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5886$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005887 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005888else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005890fi
5891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005894fi
5895
5896
5897# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5898# merged with this chunk of code?
5899
5900# Optimizer/debugger flags
5901# ------------------------
5902# (The following bit of code is complicated enough - please keep things
5903# indented properly. Just pretend you're editing Python code. ;-)
5904
5905# There are two parallel sets of case statements below, one that checks to
5906# see if OPT was set and one that does BASECFLAGS setting based upon
5907# compiler and platform. BASECFLAGS tweaks need to be made even if the
5908# user set OPT.
5909
5910# tweak OPT based on compiler and platform, only if the user didn't set
5911# it on the command line
5912
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005913if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005914then
5915 case $GCC in
5916 yes)
5917 if test "$CC" != 'g++' ; then
5918 STRICT_PROTO="-Wstrict-prototypes"
5919 fi
5920 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5921 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5922 WRAP="-fwrapv"
5923 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005924
5925 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005926 case $CC in
5927 *clang*) WRAP="-fwrapv"
5928 ;;
5929 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005930
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005931 case $ac_cv_prog_cc_g in
5932 yes)
5933 if test "$Py_DEBUG" = 'true' ; then
5934 # Optimization messes up debuggers, so turn it off for
5935 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005936 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005937 else
5938 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5939 fi
5940 ;;
5941 *)
5942 OPT="-O3 -Wall $STRICT_PROTO"
5943 ;;
5944 esac
5945 case $ac_sys_system in
5946 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5947 ;;
5948 esac
5949 ;;
5950
5951 *)
5952 OPT="-O"
5953 ;;
5954 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955fi
5956
5957
5958
5959# The -arch flags for universal builds on OSX
5960UNIVERSAL_ARCH_FLAGS=
5961
5962
5963# tweak BASECFLAGS based on compiler and platform
5964case $GCC in
5965yes)
5966 # Python violates C99 rules, by casting between incompatible
5967 # pointer types. GCC may generate bad code as a result of that,
5968 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5970$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005971 ac_save_cc="$CC"
5972 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005973 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005974 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005977/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005978
5979int
5980main ()
5981{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005982
Gregory P. Smith373469a2009-11-01 21:03:38 +00005983 ;
5984 return 0;
5985}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005986_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005987if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005988 ac_cv_no_strict_aliasing_ok=yes
5989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005990 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005991fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005993fi
5994
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005995 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5997$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005998 if test $ac_cv_no_strict_aliasing_ok = yes
5999 then
6000 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6001 fi
6002
6003 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6004 # support. Without this, treatment of subnormals doesn't follow
6005 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006006 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006007 alpha*)
6008 BASECFLAGS="$BASECFLAGS -mieee"
6009 ;;
6010 esac
6011
6012 case $ac_sys_system in
6013 SCO_SV*)
6014 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6015 ;;
6016 # is there any other compiler on Darwin besides gcc?
6017 Darwin*)
6018 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6019 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006020 if test "${CC}" = gcc
6021 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6023$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006024 case "${UNIVERSALSDK}" in
6025 */MacOSX10.4u.sdk)
6026 # Build using 10.4 SDK, force usage of gcc when the
6027 # compiler is gcc, otherwise the user will get very
6028 # confusing error messages when building on OSX 10.6
6029 CC=gcc-4.0
6030 CPP=cpp-4.0
6031 ;;
6032 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6034$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006035 fi
6036
6037 # Calculate the right deployment target for this build.
6038 #
6039 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6040 if test ${cur_target} '>' 10.2; then
6041 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006042 if test ${enable_universalsdk}; then
6043 if test "${UNIVERSAL_ARCHS}" = "all"; then
6044 # Ensure that the default platform for a
6045 # 4-way universal build is OSX 10.5,
6046 # that's the first OS release where
6047 # 4-way builds make sense.
6048 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006049
6050 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6051 cur_target='10.5'
6052
6053 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6054 cur_target='10.5'
6055
6056 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6057 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006058 fi
6059 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006060 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006061 # On Intel macs default to a deployment
6062 # target of 10.4, that's the first OSX
6063 # release with Intel support.
6064 cur_target="10.4"
6065 fi
6066 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006067 fi
6068 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6069
6070 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6071 # environment with a value that is the same as what we'll use
6072 # in the Makefile to ensure that we'll get the same compiler
6073 # environment during configure and build time.
6074 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6075 export MACOSX_DEPLOYMENT_TARGET
6076 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6077
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006078 if test "${enable_universalsdk}"; then
6079 UNIVERSAL_ARCH_FLAGS=""
6080 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6081 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6082 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006083 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006084
6085 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6086 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6087 LIPO_32BIT_FLAGS=""
6088 ARCH_RUN_32BIT="true"
6089
6090 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6091 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6092 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006093 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006094
6095 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6096 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6097 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006098 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006099
6100 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6101 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6102 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006103 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006104
6105 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006106 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006107
6108 fi
6109
6110
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006111 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6112 if test "${UNIVERSALSDK}" != "/"
6113 then
6114 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6115 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6116 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006117 fi
6118
6119 fi
6120
6121
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006122 ;;
6123 OSF*)
6124 BASECFLAGS="$BASECFLAGS -mieee"
6125 ;;
6126 esac
6127 ;;
6128
6129*)
6130 case $ac_sys_system in
6131 OpenUNIX*|UnixWare*)
6132 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6133 ;;
6134 OSF*)
6135 BASECFLAGS="$BASECFLAGS -ieee -std"
6136 ;;
6137 SCO_SV*)
6138 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6139 ;;
6140 esac
6141 ;;
6142esac
6143
6144if test "$Py_DEBUG" = 'true'; then
6145 :
6146else
6147 OPT="-DNDEBUG $OPT"
6148fi
6149
6150if test "$ac_arch_flags"
6151then
6152 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6153fi
6154
6155# disable check for icc since it seems to pass, but generates a warning
6156if test "$CC" = icc
6157then
6158 ac_cv_opt_olimit_ok=no
6159fi
6160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6162$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006163if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006164 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006165else
6166 ac_save_cc="$CC"
6167CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006169/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006170
6171int
6172main ()
6173{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006174
Gregory P. Smith373469a2009-11-01 21:03:38 +00006175 ;
6176 return 0;
6177}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006178_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006179if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006180 ac_cv_opt_olimit_ok=yes
6181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006182 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006183
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006184fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006186CC="$ac_save_cc"
6187fi
6188
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6190$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006191if test $ac_cv_opt_olimit_ok = yes; then
6192 case $ac_sys_system in
6193 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6194 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6195 # environment?
6196 Darwin*)
6197 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006198 # XXX thankfully this useless troublemaker of a flag has been
6199 # eradicated in the 3.x line. For now, make sure it isn't picked
6200 # up by any of our other platforms that use CC.
6201 AIX*|SunOS*|HP-UX*|IRIX*)
6202 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006203 *)
6204 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6205 ;;
6206 esac
6207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6209$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006210 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006211 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006212else
6213 ac_save_cc="$CC"
6214 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006216/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006217
6218int
6219main ()
6220{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006221
Gregory P. Smith373469a2009-11-01 21:03:38 +00006222 ;
6223 return 0;
6224}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006225_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006226if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006227 ac_cv_olimit_ok=yes
6228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006229 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006230
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006231fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006233 CC="$ac_save_cc"
6234fi
6235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6237$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006238 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006239 case $ac_sys_system in
6240 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6241 HP-UX*)
6242 ;;
6243 *)
6244 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6245 ;;
6246 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006247 fi
6248fi
6249
6250# Check whether GCC supports PyArg_ParseTuple format
6251if test "$GCC" = "yes"
6252then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6254$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006255 save_CFLAGS=$CFLAGS
6256 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006258/* end confdefs.h. */
6259
6260 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006261int
6262main ()
6263{
6264
6265 ;
6266 return 0;
6267}
Matthias Klosec511b472010-05-08 11:01:39 +00006268
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006269_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006270if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006271
Matthias Klosec511b472010-05-08 11:01:39 +00006272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006274
Matthias Klosec511b472010-05-08 11:01:39 +00006275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006276$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006277
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006278else
Matthias Klosec511b472010-05-08 11:01:39 +00006279
6280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006281$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006282
6283fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6285 CFLAGS=$save_CFLAGS
6286fi
6287
6288# On some compilers, pthreads are available without further options
6289# (e.g. MacOS X). On some of these systems, the compiler will not
6290# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6291# So we have to see first whether pthreads are available without
6292# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6294$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006295if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006296 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006298 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006299 ac_cv_pthread_is_default=no
6300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006302/* end confdefs.h. */
6303
Stefan Krahae66ca62012-11-22 22:36:57 +01006304#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006305#include <pthread.h>
6306
6307void* routine(void* p){return NULL;}
6308
6309int main(){
6310 pthread_t p;
6311 if(pthread_create(&p,NULL,routine,NULL)!=0)
6312 return 1;
6313 (void)pthread_detach(p);
6314 return 0;
6315}
6316
6317_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006318if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006319
6320 ac_cv_pthread_is_default=yes
6321 ac_cv_kthread=no
6322 ac_cv_pthread=no
6323
6324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006329fi
6330
6331
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006332fi
6333
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6335$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006336
6337
6338if test $ac_cv_pthread_is_default = yes
6339then
6340 ac_cv_kpthread=no
6341else
6342# -Kpthread, if available, provides the right #defines
6343# and linker options to make pthread_create available
6344# Some compilers won't report that they do not support -Kpthread,
6345# so we need to run a program to see whether it really made the
6346# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6348$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006349if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006350 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006351else
6352 ac_save_cc="$CC"
6353CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006354if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006355 ac_cv_kpthread=no
6356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006358/* end confdefs.h. */
6359
Stefan Krahae66ca62012-11-22 22:36:57 +01006360#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006361#include <pthread.h>
6362
6363void* routine(void* p){return NULL;}
6364
6365int main(){
6366 pthread_t p;
6367 if(pthread_create(&p,NULL,routine,NULL)!=0)
6368 return 1;
6369 (void)pthread_detach(p);
6370 return 0;
6371}
6372
6373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006374if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006375 ac_cv_kpthread=yes
6376else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006377 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006378fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006381fi
6382
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006383CC="$ac_save_cc"
6384fi
6385
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6387$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006388fi
6389
6390if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6391then
6392# -Kthread, if available, provides the right #defines
6393# and linker options to make pthread_create available
6394# Some compilers won't report that they do not support -Kthread,
6395# so we need to run a program to see whether it really made the
6396# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6398$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006399if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006400 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006401else
6402 ac_save_cc="$CC"
6403CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006404if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006405 ac_cv_kthread=no
6406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006408/* end confdefs.h. */
6409
Stefan Krahae66ca62012-11-22 22:36:57 +01006410#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006411#include <pthread.h>
6412
6413void* routine(void* p){return NULL;}
6414
6415int main(){
6416 pthread_t p;
6417 if(pthread_create(&p,NULL,routine,NULL)!=0)
6418 return 1;
6419 (void)pthread_detach(p);
6420 return 0;
6421}
6422
6423_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006424if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006425 ac_cv_kthread=yes
6426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006427 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6430 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006431fi
6432
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006433CC="$ac_save_cc"
6434fi
6435
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6437$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006438fi
6439
6440if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6441then
6442# -pthread, if available, provides the right #defines
6443# and linker options to make pthread_create available
6444# Some compilers won't report that they do not support -pthread,
6445# so we need to run a program to see whether it really made the
6446# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6448$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006449if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006450 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006451else
6452 ac_save_cc="$CC"
6453CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006454if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006455 ac_cv_pthread=no
6456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006458/* end confdefs.h. */
6459
Stefan Krahae66ca62012-11-22 22:36:57 +01006460#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006461#include <pthread.h>
6462
6463void* routine(void* p){return NULL;}
6464
6465int main(){
6466 pthread_t p;
6467 if(pthread_create(&p,NULL,routine,NULL)!=0)
6468 return 1;
6469 (void)pthread_detach(p);
6470 return 0;
6471}
6472
6473_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006474if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006475 ac_cv_pthread=yes
6476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006478fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006481fi
6482
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006483CC="$ac_save_cc"
6484fi
6485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6487$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006488fi
6489
6490# If we have set a CC compiler flag for thread support then
6491# check if it works for CXX, too.
6492ac_cv_cxx_thread=no
6493if test ! -z "$CXX"
6494then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6496$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006497ac_save_cxx="$CXX"
6498
6499if test "$ac_cv_kpthread" = "yes"
6500then
6501 CXX="$CXX -Kpthread"
6502 ac_cv_cxx_thread=yes
6503elif test "$ac_cv_kthread" = "yes"
6504then
6505 CXX="$CXX -Kthread"
6506 ac_cv_cxx_thread=yes
6507elif test "$ac_cv_pthread" = "yes"
6508then
6509 CXX="$CXX -pthread"
6510 ac_cv_cxx_thread=yes
6511fi
6512
6513if test $ac_cv_cxx_thread = yes
6514then
6515 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6516 $CXX -c conftest.$ac_ext 2>&5
6517 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6518 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6519 then
6520 ac_cv_cxx_thread=yes
6521 else
6522 ac_cv_cxx_thread=no
6523 fi
6524 rm -fr conftest*
6525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6527$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006528fi
6529CXX="$ac_save_cxx"
6530
6531
6532# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6534$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006535if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006536 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006537else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006539/* end confdefs.h. */
6540#include <stdlib.h>
6541#include <stdarg.h>
6542#include <string.h>
6543#include <float.h>
6544
6545int
6546main ()
6547{
6548
6549 ;
6550 return 0;
6551}
6552_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006553if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006554 ac_cv_header_stdc=yes
6555else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006556 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006557fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6559
6560if test $ac_cv_header_stdc = yes; then
6561 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006563/* end confdefs.h. */
6564#include <string.h>
6565
6566_ACEOF
6567if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006568 $EGREP "memchr" >/dev/null 2>&1; then :
6569
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006570else
6571 ac_cv_header_stdc=no
6572fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006573rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006574
6575fi
6576
6577if test $ac_cv_header_stdc = yes; then
6578 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006580/* end confdefs.h. */
6581#include <stdlib.h>
6582
6583_ACEOF
6584if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006585 $EGREP "free" >/dev/null 2>&1; then :
6586
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006587else
6588 ac_cv_header_stdc=no
6589fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006590rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006591
6592fi
6593
6594if test $ac_cv_header_stdc = yes; then
6595 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006596 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006597 :
6598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006600/* end confdefs.h. */
6601#include <ctype.h>
6602#include <stdlib.h>
6603#if ((' ' & 0x0FF) == 0x020)
6604# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6605# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6606#else
6607# define ISLOWER(c) \
6608 (('a' <= (c) && (c) <= 'i') \
6609 || ('j' <= (c) && (c) <= 'r') \
6610 || ('s' <= (c) && (c) <= 'z'))
6611# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6612#endif
6613
6614#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6615int
6616main ()
6617{
6618 int i;
6619 for (i = 0; i < 256; i++)
6620 if (XOR (islower (i), ISLOWER (i))
6621 || toupper (i) != TOUPPER (i))
6622 return 2;
6623 return 0;
6624}
6625_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006626if ac_fn_c_try_run "$LINENO"; then :
6627
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006628else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006629 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006630fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6632 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006633fi
6634
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006635fi
6636fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6638$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006639if test $ac_cv_header_stdc = yes; then
6640
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006641$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006642
6643fi
6644
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006645for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6646fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006647ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006648shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006649unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006650sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6651sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006652sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006653sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006654sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006655sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006656bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006657do :
6658 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6659ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006660if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006661 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006662#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006663_ACEOF
6664
6665fi
6666
Guido van Rossum627b2d71993-12-24 10:39:16 +00006667done
6668
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006669ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006670for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006671 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6673$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006674if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006675 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006676else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006678/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006679#include <sys/types.h>
6680#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006681
Martin v. Löwis11437992002-04-12 09:54:03 +00006682int
6683main ()
6684{
6685if ((DIR *) 0)
6686return 0;
6687 ;
6688 return 0;
6689}
6690_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006692 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006698eval ac_res=\$$as_ac_Header
6699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6700$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006701if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006702 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006703#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006704_ACEOF
6705
6706ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006707fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006708
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006709done
6710# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6711if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6713$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006714if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006715 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006716else
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006720
Martin v. Löwiseba40652007-08-30 20:10:57 +00006721/* Override any GCC internal prototype to avoid an error.
6722 Use char because int might match the return type of a GCC
6723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006724#ifdef __cplusplus
6725extern "C"
6726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006727char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006728int
6729main ()
6730{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006731return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006732 ;
6733 return 0;
6734}
6735_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006736for ac_lib in '' dir; do
6737 if test -z "$ac_lib"; then
6738 ac_res="none required"
6739 else
6740 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006741 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006743 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006746rm -f core conftest.err conftest.$ac_objext \
6747 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006748 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006751done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006752if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006753
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754else
6755 ac_cv_search_opendir=no
6756fi
6757rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006758LIBS=$ac_func_search_save_LIBS
6759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6761$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006763if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006765
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006766fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006767
Michael W. Hudson54241132001-12-07 15:38:26 +00006768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6770$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006771if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006773else
6774 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006777
Martin v. Löwiseba40652007-08-30 20:10:57 +00006778/* Override any GCC internal prototype to avoid an error.
6779 Use char because int might match the return type of a GCC
6780 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006781#ifdef __cplusplus
6782extern "C"
6783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006784char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006785int
6786main ()
6787{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006788return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006789 ;
6790 return 0;
6791}
6792_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006793for ac_lib in '' x; do
6794 if test -z "$ac_lib"; then
6795 ac_res="none required"
6796 else
6797 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006798 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006799 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006801 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006803rm -f core conftest.err conftest.$ac_objext \
6804 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006805 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006806 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006809if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811else
6812 ac_cv_search_opendir=no
6813fi
6814rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006815LIBS=$ac_func_search_save_LIBS
6816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6818$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006820if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006821 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006822
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006823fi
6824
6825fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6828$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006829if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006830 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006833/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006834#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006835int
6836main ()
6837{
6838return makedev(0, 0);
6839 ;
6840 return 0;
6841}
6842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006843if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006844 ac_cv_header_sys_types_h_makedev=yes
6845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006846 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006848rm -f core conftest.err conftest.$ac_objext \
6849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006850
6851fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6853$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006854
6855if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006857if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006858
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006859$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006860
6861fi
6862
6863
6864
6865 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006866 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006867if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006868
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006870
6871fi
6872
6873
6874 fi
6875fi
6876
Michael W. Hudson54241132001-12-07 15:38:26 +00006877
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006878# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006879for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006880do :
6881 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006882#ifdef HAVE_CURSES_H
6883#include <curses.h>
6884#endif
6885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006886"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006887if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006888 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006890_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006891
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006892fi
6893
6894done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006895
6896
Martin v. Löwis11017b12006-01-14 18:12:57 +00006897# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006898for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006899do :
6900 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 +00006901#ifdef HAVE_ASM_TYPES_H
6902#include <asm/types.h>
6903#endif
6904#ifdef HAVE_SYS_SOCKET_H
6905#include <sys/socket.h>
6906#endif
6907
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006909if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006910 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006911#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006912_ACEOF
6913
6914fi
6915
6916done
6917
6918
Guido van Rossum627b2d71993-12-24 10:39:16 +00006919# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006920was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6922$as_echo_n "checking for clock_t in time.h... " >&6; }
6923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006924/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006925#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006926
6927_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006929 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006930 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006931else
Martin v. Löwis11437992002-04-12 09:54:03 +00006932
6933
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006934$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006935
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006936
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006938rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006939
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6941$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006942
Neal Norwitz11690112002-07-30 01:08:28 +00006943# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6945$as_echo_n "checking for makedev... " >&6; }
6946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006947/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006948
6949#if defined(MAJOR_IN_MKDEV)
6950#include <sys/mkdev.h>
6951#elif defined(MAJOR_IN_SYSMACROS)
6952#include <sys/sysmacros.h>
6953#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006954#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006955#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006956int
6957main ()
6958{
6959 makedev(0, 0)
6960 ;
6961 return 0;
6962}
6963_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006964if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006965 ac_cv_has_makedev=yes
6966else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006967 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006969rm -f core conftest.err conftest.$ac_objext \
6970 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006971if test "$ac_cv_has_makedev" = "no"; then
6972 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006974/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006975
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006976#define _OSF_SOURCE 1
6977#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006978
Neal Norwitz11690112002-07-30 01:08:28 +00006979int
6980main ()
6981{
6982 makedev(0, 0)
6983 ;
6984 return 0;
6985}
6986_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006987if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006988 ac_cv_has_makedev=yes
6989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006990 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006991fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992rm -f core conftest.err conftest.$ac_objext \
6993 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006994 if test "$ac_cv_has_makedev" = "yes"; then
6995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006996$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006997
6998 fi
6999fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7001$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007002if test "$ac_cv_has_makedev" = "yes"; then
7003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007005
7006fi
7007
Martin v. Löwis399a6892002-10-04 10:22:02 +00007008# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7009# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7010# defined, but the compiler does not support pragma redefine_extname,
7011# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7012# structures (such as rlimit64) without declaring them. As a
7013# work-around, disable LFS on such configurations
7014
7015use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7017$as_echo_n "checking Solaris LFS bug... " >&6; }
7018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007019/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007020
7021#define _LARGEFILE_SOURCE 1
7022#define _FILE_OFFSET_BITS 64
7023#include <sys/resource.h>
7024
Martin v. Löwis399a6892002-10-04 10:22:02 +00007025int
7026main ()
7027{
7028struct rlimit foo;
7029 ;
7030 return 0;
7031}
7032_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007034 sol_lfs_bug=no
7035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007036 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7040$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007041if test "$sol_lfs_bug" = "yes"; then
7042 use_lfs=no
7043fi
7044
7045if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007046# Two defines needed to enable largefile support on various platforms
7047# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007048case $ac_sys_system/$ac_sys_release in
7049AIX*)
7050
7051$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7052
7053 ;;
7054esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007055
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007056$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007057
7058
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007059$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007060
Martin v. Löwis399a6892002-10-04 10:22:02 +00007061fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007062
Guido van Rossum84e7b241996-08-19 21:59:00 +00007063# Add some code to confdefs.h so that the test for off_t works on SCO
7064cat >> confdefs.h <<\EOF
7065#if defined(SCO_DS)
7066#undef _OFF_T
7067#endif
7068EOF
7069
Guido van Rossumef2255b2000-03-10 22:30:29 +00007070# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007071ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007072if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007074else
Martin v. Löwis11437992002-04-12 09:54:03 +00007075
7076cat >>confdefs.h <<_ACEOF
7077#define mode_t int
7078_ACEOF
7079
7080fi
7081
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007082ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007083if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007085else
Martin v. Löwis11437992002-04-12 09:54:03 +00007086
7087cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007088#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007089_ACEOF
7090
7091fi
7092
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007093ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007094if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007096else
Martin v. Löwis11437992002-04-12 09:54:03 +00007097
7098cat >>confdefs.h <<_ACEOF
7099#define pid_t int
7100_ACEOF
7101
7102fi
7103
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007104
Martin v. Löwis11437992002-04-12 09:54:03 +00007105cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007106#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007107_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007108
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007109ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007110if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007111
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007112else
Martin v. Löwis11437992002-04-12 09:54:03 +00007113
7114cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007115#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007116_ACEOF
7117
7118fi
7119
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7121$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007122if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007123 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007124else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007126/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007127#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007128
7129_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007131 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007132 ac_cv_type_uid_t=yes
7133else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007134 ac_cv_type_uid_t=no
7135fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007136rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007137
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7140$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007141if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007142
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
7145
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007146$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007147
7148fi
7149
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007150
7151# There are two separate checks for each of the exact-width integer types we
7152# need. First we check whether the type is available using the usual
7153# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7154# and <stdint.h> where available). We then also use the special type checks of
7155# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7156# directly, #define's uint32_t to be a suitable type.
7157
7158ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7159if test "x$ac_cv_type_uint32_t" = xyes; then :
7160
7161$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7162
7163fi
7164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7166case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007167 no|yes) ;; #(
7168 *)
7169
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007170$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007171
7172
7173cat >>confdefs.h <<_ACEOF
7174#define uint32_t $ac_cv_c_uint32_t
7175_ACEOF
7176;;
7177 esac
7178
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007179
7180ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7181if test "x$ac_cv_type_uint64_t" = xyes; then :
7182
7183$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7184
7185fi
7186
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007187ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7188case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007189 no|yes) ;; #(
7190 *)
7191
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007192$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007193
7194
7195cat >>confdefs.h <<_ACEOF
7196#define uint64_t $ac_cv_c_uint64_t
7197_ACEOF
7198;;
7199 esac
7200
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007201
7202ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7203if test "x$ac_cv_type_int32_t" = xyes; then :
7204
7205$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7206
7207fi
7208
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007209ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7210case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007211 no|yes) ;; #(
7212 *)
7213
7214cat >>confdefs.h <<_ACEOF
7215#define int32_t $ac_cv_c_int32_t
7216_ACEOF
7217;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007218esac
7219
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007220
7221ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7222if test "x$ac_cv_type_int64_t" = xyes; then :
7223
7224$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7225
7226fi
7227
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007228ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7229case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007230 no|yes) ;; #(
7231 *)
7232
7233cat >>confdefs.h <<_ACEOF
7234#define int64_t $ac_cv_c_int64_t
7235_ACEOF
7236;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007237esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007238
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007239
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007240ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007241if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007242
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007243$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007244
7245fi
7246
Jack Jansendd19cf82001-12-06 22:36:17 +00007247
Michael W. Hudson54241132001-12-07 15:38:26 +00007248# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007249# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007250# The cast to long int works around a bug in the HP C Compiler
7251# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7252# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7253# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7255$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007256if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007257 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007259 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 +00007260
Martin v. Löwis11437992002-04-12 09:54:03 +00007261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262 if test "$ac_cv_type_int" = yes; then
7263 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007265as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007266See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007267 else
7268 ac_cv_sizeof_int=0
7269 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007271
Martin v. Löwis11437992002-04-12 09:54:03 +00007272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7274$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007275
7276
7277
Martin v. Löwis11437992002-04-12 09:54:03 +00007278cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007279#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007280_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007281
7282
Martin v. Löwiseba40652007-08-30 20:10:57 +00007283# The cast to long int works around a bug in the HP C Compiler
7284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7286# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7288$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007289if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007290 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007292 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 +00007293
Martin v. Löwis11437992002-04-12 09:54:03 +00007294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295 if test "$ac_cv_type_long" = yes; then
7296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007298as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007299See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007300 else
7301 ac_cv_sizeof_long=0
7302 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007304
Martin v. Löwis11437992002-04-12 09:54:03 +00007305fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7307$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007308
7309
7310
Martin v. Löwis11437992002-04-12 09:54:03 +00007311cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007312#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007313_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007314
7315
Martin v. Löwiseba40652007-08-30 20:10:57 +00007316# The cast to long int works around a bug in the HP C Compiler
7317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7319# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7321$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007322if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007325 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 +00007326
Martin v. Löwis11437992002-04-12 09:54:03 +00007327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007328 if test "$ac_cv_type_void_p" = yes; then
7329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007331as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007332See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007333 else
7334 ac_cv_sizeof_void_p=0
7335 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007336fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337
Martin v. Löwis11437992002-04-12 09:54:03 +00007338fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7340$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007341
7342
7343
Martin v. Löwis11437992002-04-12 09:54:03 +00007344cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007345#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007346_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007347
7348
Martin v. Löwiseba40652007-08-30 20:10:57 +00007349# The cast to long int works around a bug in the HP C Compiler
7350# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7351# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7352# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7354$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007355if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007356 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007358 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 +00007359
Martin v. Löwis11437992002-04-12 09:54:03 +00007360else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007361 if test "$ac_cv_type_short" = yes; then
7362 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7363$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007364as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007365See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007366 else
7367 ac_cv_sizeof_short=0
7368 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007369fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007370
Martin v. Löwis11437992002-04-12 09:54:03 +00007371fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7373$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007374
7375
7376
Martin v. Löwis11437992002-04-12 09:54:03 +00007377cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007378#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007379_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007380
7381
Martin v. Löwiseba40652007-08-30 20:10:57 +00007382# The cast to long int works around a bug in the HP C Compiler
7383# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7384# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7385# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7387$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007388if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007389 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007390else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391 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 +00007392
Martin v. Löwis11437992002-04-12 09:54:03 +00007393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007394 if test "$ac_cv_type_float" = yes; then
7395 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007397as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007398See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007399 else
7400 ac_cv_sizeof_float=0
7401 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007403
Martin v. Löwis11437992002-04-12 09:54:03 +00007404fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7406$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007407
7408
7409
Martin v. Löwis11437992002-04-12 09:54:03 +00007410cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007411#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007412_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007413
7414
Martin v. Löwiseba40652007-08-30 20:10:57 +00007415# The cast to long int works around a bug in the HP C Compiler
7416# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7417# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7418# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7420$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007421if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007422 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007424 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 +00007425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007427 if test "$ac_cv_type_double" = yes; then
7428 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7429$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007430as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007431See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007432 else
7433 ac_cv_sizeof_double=0
7434 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007435fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007436
Martin v. Löwis11437992002-04-12 09:54:03 +00007437fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7439$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007440
7441
7442
Martin v. Löwis11437992002-04-12 09:54:03 +00007443cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007444#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007445_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446
7447
Martin v. Löwiseba40652007-08-30 20:10:57 +00007448# The cast to long int works around a bug in the HP C Compiler
7449# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7450# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7451# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7453$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007454if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007455 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007457 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 +00007458
Martin v. Löwis11437992002-04-12 09:54:03 +00007459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007460 if test "$ac_cv_type_fpos_t" = yes; then
7461 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007463as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007464See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007465 else
7466 ac_cv_sizeof_fpos_t=0
7467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007468fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469
Martin v. Löwis11437992002-04-12 09:54:03 +00007470fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7472$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007473
7474
7475
Martin v. Löwis11437992002-04-12 09:54:03 +00007476cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007477#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007478_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007479
Michael W. Hudson54241132001-12-07 15:38:26 +00007480
Martin v. Löwiseba40652007-08-30 20:10:57 +00007481# The cast to long int works around a bug in the HP C Compiler
7482# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7483# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7484# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7486$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007487if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007488 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007490 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 +00007491
Martin v. Löwis18e16552006-02-15 17:27:45 +00007492else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007493 if test "$ac_cv_type_size_t" = yes; then
7494 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007496as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007497See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007498 else
7499 ac_cv_sizeof_size_t=0
7500 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007502
Martin v. Löwis18e16552006-02-15 17:27:45 +00007503fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7505$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007506
7507
7508
Martin v. Löwis18e16552006-02-15 17:27:45 +00007509cat >>confdefs.h <<_ACEOF
7510#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7511_ACEOF
7512
7513
Christian Heimes951cc0f2008-01-31 23:08:23 +00007514# The cast to long int works around a bug in the HP C Compiler
7515# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7516# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7517# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7519$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007520if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007521 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007523 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00007524
Christian Heimes951cc0f2008-01-31 23:08:23 +00007525else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007526 if test "$ac_cv_type_pid_t" = yes; then
7527 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7528$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007529as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007530See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007531 else
7532 ac_cv_sizeof_pid_t=0
7533 fi
7534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535
Christian Heimes951cc0f2008-01-31 23:08:23 +00007536fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7538$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007539
7540
7541
7542cat >>confdefs.h <<_ACEOF
7543#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7544_ACEOF
7545
7546
Michael W. Hudson54241132001-12-07 15:38:26 +00007547
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7549$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007550have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007552/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007553
Martin v. Löwis11437992002-04-12 09:54:03 +00007554int
7555main ()
7556{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007557long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007558 ;
7559 return 0;
7560}
7561_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007563
7564
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007565$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007566
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007567 have_long_long=yes
7568
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7572$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007573if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007574# The cast to long int works around a bug in the HP C Compiler
7575# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7576# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7577# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7579$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007580if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007581 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007582else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007583 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 +00007584
Martin v. Löwis11437992002-04-12 09:54:03 +00007585else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007586 if test "$ac_cv_type_long_long" = yes; then
7587 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007589as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007590See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007591 else
7592 ac_cv_sizeof_long_long=0
7593 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007594fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007595
Martin v. Löwis11437992002-04-12 09:54:03 +00007596fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7598$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007599
7600
7601
Martin v. Löwis11437992002-04-12 09:54:03 +00007602cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007603#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007604_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007605
Michael W. Hudson54241132001-12-07 15:38:26 +00007606
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007607fi
7608
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7610$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007611have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007613/* end confdefs.h. */
7614
7615int
7616main ()
7617{
Matthias Klosec511b472010-05-08 11:01:39 +00007618long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007619 ;
7620 return 0;
7621}
7622_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007623if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007624
7625
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007626$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007627
7628 have_long_double=yes
7629
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007630fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7633$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007634if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007635# The cast to long int works around a bug in the HP C Compiler
7636# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7637# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7638# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7640$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007641if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007642 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007644 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007645
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007647 if test "$ac_cv_type_long_double" = yes; then
7648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007650as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007651See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007652 else
7653 ac_cv_sizeof_long_double=0
7654 fi
7655fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007656
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7659$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007660
7661
7662
7663cat >>confdefs.h <<_ACEOF
7664#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7665_ACEOF
7666
7667
7668fi
7669
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7671$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007672have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007674/* end confdefs.h. */
7675
7676int
7677main ()
7678{
7679_Bool x; x = (_Bool)0;
7680 ;
7681 return 0;
7682}
7683_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007685
7686
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007687$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007688
7689 have_c99_bool=yes
7690
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7694$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007695if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007696# The cast to long int works around a bug in the HP C Compiler
7697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7699# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7701$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007702if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007703 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007705 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007706
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007708 if test "$ac_cv_type__Bool" = yes; then
7709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007711as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007712See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713 else
7714 ac_cv_sizeof__Bool=0
7715 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007717
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007718fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7720$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007721
7722
7723
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007724cat >>confdefs.h <<_ACEOF
7725#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7726_ACEOF
7727
7728
7729fi
7730
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007731ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007732 #include <stdint.h>
7733 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007734 #ifdef HAVE_INTTYPES_H
7735 #include <inttypes.h>
7736 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007737"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007738if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007739
7740cat >>confdefs.h <<_ACEOF
7741#define HAVE_UINTPTR_T 1
7742_ACEOF
7743
Martin v. Löwiseba40652007-08-30 20:10:57 +00007744# The cast to long int works around a bug in the HP C Compiler
7745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7747# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7749$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007750if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007753 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 +00007754
Martin v. Löwis11437992002-04-12 09:54:03 +00007755else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007756 if test "$ac_cv_type_uintptr_t" = yes; then
7757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007759as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007760See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007761 else
7762 ac_cv_sizeof_uintptr_t=0
7763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007764fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007765
Martin v. Löwis11437992002-04-12 09:54:03 +00007766fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7768$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007769
7770
7771
Martin v. Löwis11437992002-04-12 09:54:03 +00007772cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007773#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007774_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007775
Michael W. Hudson54241132001-12-07 15:38:26 +00007776
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007777fi
7778
Martin v. Löwisebe26702006-10-02 14:55:51 +00007779
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007780# The cast to long int works around a bug in the HP C Compiler
7781# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7782# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7783# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7785$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007786if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007787 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007789 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007790#ifdef HAVE_SYS_TYPES_H
7791#include <sys/types.h>
7792#endif
7793
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007794"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007795
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007797 if test "$ac_cv_type_off_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;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007800as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007801See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007802 else
7803 ac_cv_sizeof_off_t=0
7804 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007806
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7809$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007810
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007811
7812
Martin v. Löwis11437992002-04-12 09:54:03 +00007813cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007814#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007815_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007816
Michael W. Hudson54241132001-12-07 15:38:26 +00007817
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007818
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7820$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007821if test "$have_long_long" = yes
7822then
7823if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007824 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007825
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007826$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007827
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7829$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007833fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007834else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7836$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007837fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007838
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007839# The cast to long int works around a bug in the HP C Compiler
7840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7842# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7844$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007845if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007846 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007848 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007849#ifdef HAVE_SYS_TYPES_H
7850#include <sys/types.h>
7851#endif
7852#ifdef HAVE_TIME_H
7853#include <time.h>
7854#endif
7855
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007856"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007857
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007859 if test "$ac_cv_type_time_t" = yes; then
7860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007862as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007863See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007864 else
7865 ac_cv_sizeof_time_t=0
7866 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007868
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7871$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007872
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007873
7874
Martin v. Löwis11437992002-04-12 09:54:03 +00007875cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007876#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007877_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007878
Michael W. Hudson54241132001-12-07 15:38:26 +00007879
7880
Trent Mick635f6fb2000-08-23 21:33:05 +00007881# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007882ac_save_cc="$CC"
7883if test "$ac_cv_kpthread" = "yes"
7884then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007885elif test "$ac_cv_kthread" = "yes"
7886then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007887elif test "$ac_cv_pthread" = "yes"
7888then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7891$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007892have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007894/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007895
7896 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007897int
7898main ()
7899{
Guido van Rossum12580492000-09-24 16:47:19 +00007900pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 ;
7902 return 0;
7903}
Matthias Klosec511b472010-05-08 11:01:39 +00007904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007906if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007907 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7911$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007912if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007913 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007914# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7915# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7916# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7918$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007919if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007920 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007923#ifdef HAVE_PTHREAD_H
7924#include <pthread.h>
7925#endif
7926
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007927"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007928
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007929else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007930 if test "$ac_cv_type_pthread_t" = yes; then
7931 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007933as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007934See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007935 else
7936 ac_cv_sizeof_pthread_t=0
7937 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007938fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007939
Trent Mick635f6fb2000-08-23 21:33:05 +00007940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7942$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007943
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007944
7945
Martin v. Löwis11437992002-04-12 09:54:03 +00007946cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007947#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007948_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007949
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007950
Trent Mick635f6fb2000-08-23 21:33:05 +00007951fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007952CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7955$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007956# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007958 enableval=$enable_toolbox_glue;
7959fi
Jack Jansene578a632001-08-15 01:27:14 +00007960
7961
7962if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007963then
Jack Jansene578a632001-08-15 01:27:14 +00007964 case $ac_sys_system/$ac_sys_release in
7965 Darwin/*)
7966 enable_toolbox_glue="yes";;
7967 *)
7968 enable_toolbox_glue="no";;
7969 esac
7970fi
7971case "$enable_toolbox_glue" in
7972yes)
Jack Jansene578a632001-08-15 01:27:14 +00007973 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007974 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007976$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007977
7978 ;;
7979*)
Jack Jansene578a632001-08-15 01:27:14 +00007980 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007981 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007982 ;;
7983esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7985$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007986
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007987
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007988
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007989case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007990 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007991 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7992 ;;
7993 Darwin/*)
7994 OTHER_LIBTOOL_OPT=""
7995 ;;
7996esac
7997
7998
Ronald Oussoren25967582009-09-06 10:00:26 +00007999ARCH_RUN_32BIT=""
8000
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008001case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008002 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008003 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8004 if test "${enable_universalsdk}"; then
8005 :
8006 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008007 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008008 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008009 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008010 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008011 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008012 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008013 if test ${gcc_version} '<' 4.0
8014 then
8015 LIBTOOL_CRUFT="-lcc_dynamic"
8016 else
8017 LIBTOOL_CRUFT=""
8018 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008019 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008020 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008023/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008024
Ronald Oussoren25967582009-09-06 10:00:26 +00008025 #include <unistd.h>
8026 int main(int argc, char*argv[])
8027 {
8028 if (sizeof(long) == 4) {
8029 return 0;
8030 } else {
8031 return 1;
8032 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008033 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008034
Ronald Oussoren25967582009-09-06 10:00:26 +00008035_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008036if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008037 ac_osx_32bit=yes
8038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008040fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008043fi
8044
8045
Ronald Oussoren25967582009-09-06 10:00:26 +00008046 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008047 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008048 i386)
8049 MACOSX_DEFAULT_ARCH="i386"
8050 ;;
8051 ppc)
8052 MACOSX_DEFAULT_ARCH="ppc"
8053 ;;
8054 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008055 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008056 ;;
8057 esac
8058 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008059 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008060 i386)
8061 MACOSX_DEFAULT_ARCH="x86_64"
8062 ;;
8063 ppc)
8064 MACOSX_DEFAULT_ARCH="ppc64"
8065 ;;
8066 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008067 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008068 ;;
8069 esac
8070
8071 #ARCH_RUN_32BIT="true"
8072 fi
8073
8074 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008075 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008076 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008077esac
8078
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8080$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008081if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008082then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008083 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008085 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008087$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8090$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008091 if test $enable_shared = "yes"
8092 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008093 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00008094 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008095else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008098fi
8099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8101$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008102case $ac_sys_system/$ac_sys_release in
8103 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008104
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8108$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008109 ;;
8110 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8112$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008113 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008114esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008115
Guido van Rossum0a516c91994-09-12 10:58:40 +00008116# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008117
Michael W. Hudson54241132001-12-07 15:38:26 +00008118
8119
8120
8121
Ronald Oussoren75912852010-04-08 08:13:31 +00008122
Guido van Rossum0a516c91994-09-12 10:58:40 +00008123# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008124# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8126$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008127if test -z "$SO"
8128then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008129 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008130 hp*|HP*)
8131 case `uname -m` in
8132 ia64) SO=.so;;
8133 *) SO=.sl;;
8134 esac
8135 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008136 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008137 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008138 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008139else
8140 # this might also be a termcap variable, see #610332
8141 echo
8142 echo '====================================================================='
8143 echo '+ +'
8144 echo '+ WARNING: You have set SO in your environment. +'
8145 echo '+ Do you really mean to change the extension for shared libraries? +'
8146 echo '+ Continuing in 10 seconds to let you to ponder. +'
8147 echo '+ +'
8148 echo '====================================================================='
8149 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8152$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008153
Ronald Oussoren79f90492009-01-02 10:44:46 +00008154
Neal Norwitz58e28882006-05-19 07:00:58 +00008155cat >>confdefs.h <<_ACEOF
8156#define SHLIB_EXT "$SO"
8157_ACEOF
8158
Guido van Rossum0a516c91994-09-12 10:58:40 +00008159# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008160# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008161# (Shared libraries in this instance are shared modules to be loaded into
8162# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8164$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008165if test -z "$LDSHARED"
8166then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008167 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008168 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008169 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008170 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008171 ;;
8172 BeOS*)
8173 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008174 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008175 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008176 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008177 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008178 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008179 if test "$GCC" = "yes" ; then
8180 LDSHARED='$(CC) -shared'
8181 LDCXXSHARED='$(CXX) -shared'
8182 else
8183 LDSHARED='$(CC) -G'
8184 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008185 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008186 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008187 if test "$GCC" = "yes" ; then
8188 LDSHARED='$(CC) -shared'
8189 LDCXXSHARED='$(CXX) -shared'
8190 else
8191 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008192 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008193 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008194 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008195 LDSHARED='$(CC) -bundle'
8196 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008197 if test "$enable_framework" ; then
8198 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008199 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8200 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008201 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008202 else
8203 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008204 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008205 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008206 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008207 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008208 LDSHARED='$(CC) -bundle'
8209 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008210 if test "$enable_framework" ; then
8211 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008212 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8213 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008214 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008215 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008216 # No framework, use the Python app as bundle-loader
8217 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008218 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008219 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008220 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008221 Darwin/*)
8222 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8223 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008224
Ronald Oussoren5640ce22008-06-05 12:58:24 +00008225 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008226 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00008227 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00008228 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008229 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00008230 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8231 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008232 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008233 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008234 LDSHARED='$(CC) -bundle'
8235 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008236 if test "$enable_framework" ; then
8237 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008238 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8239 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008240 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008241 else
8242 # No framework, use the Python app as bundle-loader
8243 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8244 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008245 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008246 fi
8247 fi
8248 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008249 Linux*|GNU*|QNX*)
8250 LDSHARED='$(CC) -shared'
8251 LDCXXSHARED='$(CXX) -shared';;
8252 BSD/OS*/4*)
8253 LDSHARED="gcc -shared"
8254 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008255 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008256 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008257 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008258 LDSHARED='$(CC) -shared'
8259 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008260 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008261 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008262 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008263 OpenBSD*)
8264 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8265 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008266 LDSHARED='$(CC) -shared $(CCSHARED)'
8267 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008268 else
8269 case `uname -r` in
8270 [01].* | 2.[0-7] | 2.[0-7].*)
8271 LDSHARED="ld -Bshareable ${LDFLAGS}"
8272 ;;
8273 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008274 LDSHARED='$(CC) -shared $(CCSHARED)'
8275 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008276 ;;
8277 esac
8278 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008279 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008280 LDSHARED='$(CC) -shared'
8281 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008282 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008283 if test "$GCC" = "yes" ; then
8284 LDSHARED='$(CC) -shared'
8285 LDCXXSHARED='$(CXX) -shared'
8286 else
8287 LDSHARED='$(CC) -G'
8288 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008289 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008290 SCO_SV*)
8291 LDSHARED='$(CC) -Wl,-G,-Bexport'
8292 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8293 CYGWIN*)
8294 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8295 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8296 atheos*)
8297 LDSHARED="gcc -shared"
8298 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008299 *) LDSHARED="ld";;
8300 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8303$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008304LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008305BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008306# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008307# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8309$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008310if test -z "$CCSHARED"
8311then
Guido van Rossum07397971997-04-29 21:49:50 +00008312 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008313 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008314 then CCSHARED="-fPIC";
8315 elif test `uname -p` = sparc;
8316 then CCSHARED="-xcode=pic32";
8317 else CCSHARED="-Kpic";
8318 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008319 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008320 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008321 else CCSHARED="+z";
8322 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008323 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008324 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008325 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008326 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008327 if test "$GCC" = "yes"
8328 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008329 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008330 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008331 SCO_SV*)
8332 if test "$GCC" = "yes"
8333 then CCSHARED="-fPIC"
8334 else CCSHARED="-Kpic -belf"
8335 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008336 IRIX*/6*) case $CC in
8337 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008338 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008339 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008340 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008341 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8344$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008345# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008346# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8348$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008349if test -z "$LINKFORSHARED"
8350then
Guido van Rossum07397971997-04-29 21:49:50 +00008351 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008352 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008353 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008354 LINKFORSHARED="-Wl,-E -Wl,+s";;
8355# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008356 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008357 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008358 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008360 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8361 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008362 # not used by the core itself but which needs to be in the core so
8363 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008364 # -prebind is no longer used, because it actually seems to give a
8365 # slowdown in stead of a speedup, maybe due to the large number of
8366 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008367
8368 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008369 if test "$enable_framework"
8370 then
Jack Jansenda49e192005-01-07 13:08:22 +00008371 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008372 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008373 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008374 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008375 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008376 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008377 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008378 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8379 then
8380 LINKFORSHARED="-Wl,--export-dynamic"
8381 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008382 SunOS/5*) case $CC in
8383 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008384 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008385 then
8386 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008387 fi;;
8388 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008389 CYGWIN*)
8390 if test $enable_shared = "no"
8391 then
8392 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8393 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008394 QNX*)
8395 # -Wl,-E causes the symbols to be added to the dynamic
8396 # symbol table so that they can be found when a module
8397 # is loaded. -N 2048K causes the stack size to be set
8398 # to 2048 kilobytes so that the stack doesn't overflow
8399 # when running test_compile.py.
8400 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008401 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8404$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008405
Michael W. Hudson54241132001-12-07 15:38:26 +00008406
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008407
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8409$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008410if test ! "$LIBRARY" = "$LDLIBRARY"
8411then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008412 case $ac_sys_system in
8413 CYGWIN*)
8414 # Cygwin needs CCSHARED when building extension DLLs
8415 # but not when building the interpreter DLL.
8416 CFLAGSFORSHARED='';;
8417 *)
8418 CFLAGSFORSHARED='$(CCSHARED)'
8419 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008420fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8422$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008423
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008424# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8425# library (with --enable-shared).
8426# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008427# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8428# if it is not required, since it creates a dependency of the shared library
8429# to LIBS. This, in turn, means that applications linking the shared libpython
8430# don't need to link LIBS explicitly. The default should be only changed
8431# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8434$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008435case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008436 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008437 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008438esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8440$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008441
8442
Guido van Rossum627b2d71993-12-24 10:39:16 +00008443# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8445$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008446if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008447 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448else
Martin v. Löwis11437992002-04-12 09:54:03 +00008449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008450LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008453
Martin v. Löwiseba40652007-08-30 20:10:57 +00008454/* Override any GCC internal prototype to avoid an error.
8455 Use char because int might match the return type of a GCC
8456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008457#ifdef __cplusplus
8458extern "C"
8459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008460char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008461int
8462main ()
8463{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ;
8466 return 0;
8467}
8468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008472 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008474rm -f core conftest.err conftest.$ac_objext \
8475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8479$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008480if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 cat >>confdefs.h <<_ACEOF
8482#define HAVE_LIBDL 1
8483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008485 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008487fi
8488 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8490$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008491if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008492 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008493else
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008495LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008498
Martin v. Löwiseba40652007-08-30 20:10:57 +00008499/* Override any GCC internal prototype to avoid an error.
8500 Use char because int might match the return type of a GCC
8501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502#ifdef __cplusplus
8503extern "C"
8504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008505char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008509return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ;
8511 return 0;
8512}
8513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008517 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008518fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008519rm -f core conftest.err conftest.$ac_objext \
8520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008521LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008522fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8524$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008525if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 cat >>confdefs.h <<_ACEOF
8527#define HAVE_LIBDLD 1
8528_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008529
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008530 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008531
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008532fi
8533 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008534
Ronald Oussoren79f90492009-01-02 10:44:46 +00008535# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008536if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8538$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008539if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008540 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008541else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008542 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008545
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546/* Override any GCC internal prototype to avoid an error.
8547 Use char because int might match the return type of a GCC
8548 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008549#ifdef __cplusplus
8550extern "C"
8551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008552char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008553int
8554main ()
8555{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ;
8558 return 0;
8559}
8560_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008561for ac_lib in '' pthread rt posix4; do
8562 if test -z "$ac_lib"; then
8563 ac_res="none required"
8564 else
8565 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008566 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008568 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008570fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008571rm -f core conftest.err conftest.$ac_objext \
8572 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008573 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008574 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008577if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008578
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579else
8580 ac_cv_search_sem_init=no
8581fi
8582rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008583LIBS=$ac_func_search_save_LIBS
8584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8586$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008587ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008588if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008590
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008591fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008592 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008593 # posix4 on Solaris 2.6
8594 # pthread (first!) on Linux
8595fi
8596
Martin v. Löwis19d17342003-06-14 21:03:05 +00008597# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8599$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008600if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008601 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008602else
8603 ac_check_lib_save_LIBS=$LIBS
8604LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008606/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008607
Martin v. Löwiseba40652007-08-30 20:10:57 +00008608/* Override any GCC internal prototype to avoid an error.
8609 Use char because int might match the return type of a GCC
8610 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008611#ifdef __cplusplus
8612extern "C"
8613#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008614char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008615int
8616main ()
8617{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008619 ;
8620 return 0;
8621}
8622_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008624 ac_cv_lib_intl_textdomain=yes
8625else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008626 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008627fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008628rm -f core conftest.err conftest.$ac_objext \
8629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008630LIBS=$ac_check_lib_save_LIBS
8631fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8633$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008634if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008635
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008637
8638fi
8639
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008640
8641# checks for system dependent C++ extensions support
8642case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008643 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8644$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008646/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008647
Georg Brandl94800df2011-02-25 11:09:02 +00008648 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008649int
8650main ()
8651{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008652loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 ;
8654 return 0;
8655}
Matthias Klosec511b472010-05-08 11:01:39 +00008656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008658if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008659
Matthias Klosec511b472010-05-08 11:01:39 +00008660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008661$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008662
Matthias Klosec511b472010-05-08 11:01:39 +00008663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008664$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008665
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008666else
Matthias Klosec511b472010-05-08 11:01:39 +00008667
8668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008669$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008670
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008672rm -f core conftest.err conftest.$ac_objext \
8673 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008674 *) ;;
8675esac
8676
Guido van Rossum70c7f481998-03-26 18:44:10 +00008677# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008678# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8680$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008681if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008682 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008683else
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008685LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008688
Martin v. Löwiseba40652007-08-30 20:10:57 +00008689/* Override any GCC internal prototype to avoid an error.
8690 Use char because int might match the return type of a GCC
8691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008692#ifdef __cplusplus
8693extern "C"
8694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008695char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008696int
8697main ()
8698{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ;
8701 return 0;
8702}
8703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008707 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008708fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709rm -f core conftest.err conftest.$ac_objext \
8710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008711LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8714$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008715if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008716 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008717fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008718 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8720$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008721if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008723else
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008725LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008728
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729/* Override any GCC internal prototype to avoid an error.
8730 Use char because int might match the return type of a GCC
8731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008732#ifdef __cplusplus
8733extern "C"
8734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008735char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008736int
8737main ()
8738{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008739return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 ;
8741 return 0;
8742}
8743_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008746else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008747 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008748fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749rm -f core conftest.err conftest.$ac_objext \
8750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008751LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008752fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8754$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008755if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008756 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008757fi
8758 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008759
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008760case "$ac_sys_system" in
8761BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8763$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008764if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008765 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008766else
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008768LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008771
Martin v. Löwiseba40652007-08-30 20:10:57 +00008772/* Override any GCC internal prototype to avoid an error.
8773 Use char because int might match the return type of a GCC
8774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008775#ifdef __cplusplus
8776extern "C"
8777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008778char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008779int
8780main ()
8781{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008782return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 ;
8784 return 0;
8785}
8786_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008787if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008790 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008791fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008792rm -f core conftest.err conftest.$ac_objext \
8793 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008794LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8797$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008798if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008799 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008800fi
8801 # BeOS
8802;;
8803esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008804
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8806$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008807
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008809if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8812$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008813LIBS="$withval $LIBS"
8814
8815else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8817$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818fi
8819
Guido van Rossum7f43da71994-08-01 12:15:30 +00008820
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008821if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008822 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8823set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8825$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008826if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008827 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008828else
8829 case $PKG_CONFIG in
8830 [\\/]* | ?:[\\/]*)
8831 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8832 ;;
8833 *)
8834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8835for as_dir in $PATH
8836do
8837 IFS=$as_save_IFS
8838 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008839 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008841 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008843 break 2
8844 fi
8845done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008846 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008847IFS=$as_save_IFS
8848
8849 ;;
8850esac
8851fi
8852PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8853if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8855$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8858$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008859fi
8860
8861
8862fi
8863if test -z "$ac_cv_path_PKG_CONFIG"; then
8864 ac_pt_PKG_CONFIG=$PKG_CONFIG
8865 # Extract the first word of "pkg-config", so it can be a program name with args.
8866set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8868$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008869if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008870 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008871else
8872 case $ac_pt_PKG_CONFIG in
8873 [\\/]* | ?:[\\/]*)
8874 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8875 ;;
8876 *)
8877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8878for as_dir in $PATH
8879do
8880 IFS=$as_save_IFS
8881 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008884 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008886 break 2
8887 fi
8888done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008889 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008890IFS=$as_save_IFS
8891
8892 ;;
8893esac
8894fi
8895ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8896if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8898$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8901$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008902fi
8903
8904 if test "x$ac_pt_PKG_CONFIG" = x; then
8905 PKG_CONFIG=""
8906 else
8907 case $cross_compiling:$ac_tool_warned in
8908yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008911ac_tool_warned=yes ;;
8912esac
8913 PKG_CONFIG=$ac_pt_PKG_CONFIG
8914 fi
8915else
8916 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8917fi
8918
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008919
8920# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8922$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008923
8924# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008926 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008927else
8928 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008929fi
8930
8931
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8933$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008934
8935# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8937$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008938
8939# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008941 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008942else
8943 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008944fi
8945
8946
8947if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008948 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8949else
8950 LIBFFI_INCLUDEDIR=""
8951fi
8952
8953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8955$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008956
Benjamin Peterson867475c2009-04-29 20:36:25 +00008957# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8959$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008960
8961# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008962if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008963 withval=$with_dbmliborder;
8964if test x$with_dbmliborder = xyes
8965then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008966as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008967else
8968 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8969 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8970 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008971 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008972 fi
8973 done
8974fi
8975fi
8976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8978$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008979
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008980# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008981
8982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8984$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008985
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 withval=$with_signal_module;
8989fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008990
8991
8992if test -z "$with_signal_module"
8993then with_signal_module="yes"
8994fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8996$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008997
8998if test "${with_signal_module}" = "yes"; then
8999 USE_SIGNAL_MODULE=""
9000 SIGNAL_OBJS=""
9001else
9002 USE_SIGNAL_MODULE="#"
9003 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9004fi
9005
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009006# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009007
Barry Warsawc0d24d82000-06-29 16:12:00 +00009008USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009009
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9011$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009012
Guido van Rossumec2f0731997-01-22 20:54:01 +00009013
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9018$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009019LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009020if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009021 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009022fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009023else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9025$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009026fi
9027
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
9029# Templates for things AC_DEFINEd more than once.
9030# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009031
9032
Martin v. Löwis11437992002-04-12 09:54:03 +00009033
9034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9036$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009037
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009039if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040 withval=$with_threads;
9041fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009042
9043
Barry Warsawc0d24d82000-06-29 16:12:00 +00009044# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009045
Martin v. Löwiseba40652007-08-30 20:10:57 +00009046# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009047if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009048 withval=$with_thread; with_threads=$with_thread
9049fi
9050
Barry Warsawc0d24d82000-06-29 16:12:00 +00009051
9052if test -z "$with_threads"
9053then with_threads="yes"
9054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9056$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009057
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009058
Barry Warsawc0d24d82000-06-29 16:12:00 +00009059if test "$with_threads" = "no"
9060then
9061 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009062elif test "$ac_cv_pthread_is_default" = yes
9063then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009064 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009065
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009066 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009067 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009068
9069 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009071elif test "$ac_cv_kpthread" = "yes"
9072then
9073 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009074 if test "$ac_cv_cxx_thread" = "yes"; then
9075 CXX="$CXX -Kpthread"
9076 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009077 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009078
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009079 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009080 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009081elif test "$ac_cv_kthread" = "yes"
9082then
9083 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009084 if test "$ac_cv_cxx_thread" = "yes"; then
9085 CXX="$CXX -Kthread"
9086 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009088
9089 posix_threads=yes
9090 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009091elif test "$ac_cv_pthread" = "yes"
9092then
9093 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009094 if test "$ac_cv_cxx_thread" = "yes"; then
9095 CXX="$CXX -pthread"
9096 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009097 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009098
9099 posix_threads=yes
9100 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009101else
9102 if test ! -z "$with_threads" -a -d "$with_threads"
9103 then LDFLAGS="$LDFLAGS -L$with_threads"
9104 fi
9105 if test ! -z "$withval" -a -d "$withval"
9106 then LDFLAGS="$LDFLAGS -L$withval"
9107 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009108
9109 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009110 # define _POSIX_THREADS in unistd.h. Some apparently don't
9111 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9113$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009115/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009116
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009117#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009118#ifdef _POSIX_THREADS
9119yes
9120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009121
9122_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009124 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009125 unistd_defines_pthreads=yes
9126else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009127 unistd_defines_pthreads=no
9128fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009129rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009130
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9132$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009133
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009134 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009137if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009138 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009139
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009140 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009141
Martin v. Löwis11437992002-04-12 09:54:03 +00009142
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009143$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009144
9145 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009146 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009147else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009148
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009149 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009150if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009151 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009152
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009153 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009154
Martin v. Löwis11437992002-04-12 09:54:03 +00009155
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009156$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009157
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009158 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009159else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9162$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009165if test "${with_pth+set}" = set; then :
9166 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9167$as_echo "$withval" >&6; }
9168 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009169
9170
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009171$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009172
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009173 LIBS="-lpth $LIBS"
9174 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9177$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009178
9179 # Just looking for pthread_create in libpthread is not enough:
9180 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9181 # So we really have to include pthread.h, and then link.
9182 _libs=$LIBS
9183 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9185$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009187/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009188
9189#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009190#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009191
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009192void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009193int
9194main ()
9195{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009196
9197pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 ;
9199 return 0;
9200}
9201_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009202if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009203
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9205$as_echo "yes" >&6; }
9206 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009207
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009208 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009209 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009210else
Martin v. Löwis11437992002-04-12 09:54:03 +00009211
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009212 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009214if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009216
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009217 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009218 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009219else
Guido van Rossumad678af1998-10-02 14:42:15 +00009220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009221 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009222if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009223 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009224
9225
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009226$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009227
9228 THREADOBJ="Python/thread.o"
9229else
9230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009231 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009232if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009233 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009234
9235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009236$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009238 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009239else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9242$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009243if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009244 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009245else
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009247LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009250
Martin v. Löwiseba40652007-08-30 20:10:57 +00009251/* Override any GCC internal prototype to avoid an error.
9252 Use char because int might match the return type of a GCC
9253 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009254#ifdef __cplusplus
9255extern "C"
9256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009257char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009258int
9259main ()
9260{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 ;
9263 return 0;
9264}
9265_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009267 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009268else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009269 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009271rm -f core conftest.err conftest.$ac_objext \
9272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009273LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9276$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009277if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009278 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009279
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009280 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009281 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009282 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009283else
Greg Steinadf63d62000-07-05 10:38:09 +00009284
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9286$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009287if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009289else
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009291LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009294
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295/* Override any GCC internal prototype to avoid an error.
9296 Use char because int might match the return type of a GCC
9297 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009298#ifdef __cplusplus
9299extern "C"
9300#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009301char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009302int
9303main ()
9304{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009305return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 ;
9307 return 0;
9308}
9309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009310if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009311 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009313 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009315rm -f core conftest.err conftest.$ac_objext \
9316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009317LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009318fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9320$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009321if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009323
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009324 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009325 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009326 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009327else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9330$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009331if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009332 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009333else
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009335LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009338
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339/* Override any GCC internal prototype to avoid an error.
9340 Use char because int might match the return type of a GCC
9341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009342#ifdef __cplusplus
9343extern "C"
9344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009345char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009346int
9347main ()
9348{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009349return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ;
9351 return 0;
9352}
9353_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009354if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009358fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009359rm -f core conftest.err conftest.$ac_objext \
9360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009361LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009362fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9364$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009365if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009366 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009367
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009368 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009369 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009370 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009371else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9374$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009375if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009377else
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009379LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009382
Martin v. Löwiseba40652007-08-30 20:10:57 +00009383/* Override any GCC internal prototype to avoid an error.
9384 Use char because int might match the return type of a GCC
9385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009386#ifdef __cplusplus
9387extern "C"
9388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009389char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009390int
9391main ()
9392{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 ;
9395 return 0;
9396}
9397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009398if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009401 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403rm -f core conftest.err conftest.$ac_objext \
9404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009405LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009406fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9408$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009409if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009410 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009411
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009412 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009413 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009414 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009415else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009416
Martin v. Löwis130fb172001-07-19 11:00:41 +00009417 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009418fi
9419
Guido van Rossum627b2d71993-12-24 10:39:16 +00009420
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009421fi
9422
Guido van Rossum0be3e491997-05-22 20:33:33 +00009423fi
9424
Guido van Rossum49545951997-12-02 19:28:29 +00009425fi
9426
Guido van Rossumb93a8621998-05-07 13:27:32 +00009427fi
9428
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009429
Michael W. Hudson54241132001-12-07 15:38:26 +00009430fi
9431
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009432
9433fi
9434
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009435fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009436rm -f core conftest.err conftest.$ac_objext \
9437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009438fi
9439
Martin v. Löwis11437992002-04-12 09:54:03 +00009440fi
9441
9442
9443fi
9444
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009445
Michael W. Hudson54241132001-12-07 15:38:26 +00009446
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9448$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009449if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009450 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009451else
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009453LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457/* Override any GCC internal prototype to avoid an error.
9458 Use char because int might match the return type of a GCC
9459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460#ifdef __cplusplus
9461extern "C"
9462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009463char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009467return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ;
9469 return 0;
9470}
9471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009475 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009476fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009477rm -f core conftest.err conftest.$ac_objext \
9478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009479LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9482$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009483if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009484 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009485
Martin v. Löwis130fb172001-07-19 11:00:41 +00009486 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009487 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009488 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009489fi
9490
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009491
Neal Norwitza978ab02002-11-02 16:58:05 +00009492 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9494$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009495if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009496 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009497else
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009499LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503/* Override any GCC internal prototype to avoid an error.
9504 Use char because int might match the return type of a GCC
9505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506#ifdef __cplusplus
9507extern "C"
9508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009509char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510int
9511main ()
9512{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009513return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ;
9515 return 0;
9516}
9517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009522fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009523rm -f core conftest.err conftest.$ac_objext \
9524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9528$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009529if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009531
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009532 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009533 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009534 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009535fi
9536
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009537 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009538
Martin v. Löwis130fb172001-07-19 11:00:41 +00009539 if test "$USE_THREAD_MODULE" != "#"
9540 then
9541 # If the above checks didn't disable threads, (at least) OSF1
9542 # needs this '-threads' argument during linking.
9543 case $ac_sys_system in
9544 OSF1) LDLAST=-threads;;
9545 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009546 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009547fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009548
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009549if test "$posix_threads" = "yes"; then
9550 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009551
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009553
9554 fi
9555
9556 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9557 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009558 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009560
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009561 ;;
9562 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009563$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009564
9565 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009566 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009567$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009568
9569 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009570 esac
9571
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9573$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009574 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009575 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009576else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009577 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009578 ac_cv_pthread_system_supported=no
9579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009581/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009582
9583 #include <stdio.h>
9584 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009585 void *foo(void *parm) {
9586 return NULL;
9587 }
9588 main() {
9589 pthread_attr_t attr;
9590 pthread_t id;
9591 if (pthread_attr_init(&attr)) exit(-1);
9592 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9593 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9594 exit(0);
9595 }
9596_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009597if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009598 ac_cv_pthread_system_supported=yes
9599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009600 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009601fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9603 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009604fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009605
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606
Guido van Rossum627b2d71993-12-24 10:39:16 +00009607fi
9608
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9610$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009611 if test "$ac_cv_pthread_system_supported" = "yes"; then
9612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009614
9615 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616 for ac_func in pthread_sigmask
9617do :
9618 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009619if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009620 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009622_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009623 case $ac_sys_system in
9624 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009625
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009626$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009627
9628 ;;
9629 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009630fi
9631done
9632
9633fi
9634
9635
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009636# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9639$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009640# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009642 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009643 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009646 ipv6=no
9647 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009648 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9649$as_echo "yes" >&6; }
9650 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009651
9652 ipv6=yes
9653 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009655else
Martin v. Löwis11437992002-04-12 09:54:03 +00009656
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009658/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009659 /* AF_INET6 available check */
9660#include <sys/types.h>
9661#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009662int
9663main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009664{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009665int domain = AF_INET6;
9666 ;
9667 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009668}
Martin v. Löwis11437992002-04-12 09:54:03 +00009669_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009670if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9673$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009674 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009675
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009676else
Matthias Klosec511b472010-05-08 11:01:39 +00009677
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9679$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009680 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009681
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009682fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009684
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009685if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9687$as_echo_n "checking if RFC2553 API is available... " >&6; }
9688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009689/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009690
9691 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009692#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009693int
9694main ()
9695{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009696struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009697 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 ;
9699 return 0;
9700}
Matthias Klosec511b472010-05-08 11:01:39 +00009701
Martin v. Löwis11437992002-04-12 09:54:03 +00009702_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009704
9705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009706$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009707 ipv6=yes
9708
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009709else
Matthias Klosec511b472010-05-08 11:01:39 +00009710
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009713 ipv6=no
9714
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009717fi
9718
9719if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009721
9722fi
9723
Martin v. Löwiseba40652007-08-30 20:10:57 +00009724fi
9725
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009726
9727ipv6type=unknown
9728ipv6lib=none
9729ipv6trylibc=no
9730
9731if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9733$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009734 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9735 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009736 case $i in
9737 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009739/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009740
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009741#include <netinet/in.h>
9742#ifdef IPV6_INRIA_VERSION
9743yes
9744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009745_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009746if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009747 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009748 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009749fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009750rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009751
9752 ;;
9753 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009756
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009757#include <netinet/in.h>
9758#ifdef __KAME__
9759yes
9760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009761_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009763 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009764 ipv6type=$i;
9765 ipv6lib=inet6
9766 ipv6libdir=/usr/local/v6/lib
9767 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009768fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009769rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009770
9771 ;;
9772 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009774/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009775
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009776#include <features.h>
9777#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9778yes
9779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009780_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009782 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009783 ipv6type=$i;
9784 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009785fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009786rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009787
9788 ;;
9789 linux-inet6)
9790 if test -d /usr/inet6; then
9791 ipv6type=$i
9792 ipv6lib=inet6
9793 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009794 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009795 fi
9796 ;;
9797 solaris)
9798 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009799 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009800 ipv6type=$i
9801 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009802 fi
9803 fi
9804 ;;
9805 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009807/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009809#include <sys/param.h>
9810#ifdef _TOSHIBA_INET6
9811yes
9812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009813_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009815 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009816 ipv6type=$i;
9817 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009818 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009819fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009820rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821
9822 ;;
9823 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009825/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009826
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009827#include </usr/local/v6/include/sys/v6config.h>
9828#ifdef __V6D__
9829yes
9830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009831_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009833 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009834 ipv6type=$i;
9835 ipv6lib=v6;
9836 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009837 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009838fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009839rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009840
9841 ;;
9842 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009844/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009846#include <sys/param.h>
9847#ifdef _ZETA_MINAMI_INET6
9848yes
9849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009850_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009852 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009853 ipv6type=$i;
9854 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009855 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009856fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009857rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009858
9859 ;;
9860 esac
9861 if test "$ipv6type" != "unknown"; then
9862 break
9863 fi
9864 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9866$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009867fi
9868
9869if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9870 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9871 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9872 echo "using lib$ipv6lib"
9873 else
9874 if test $ipv6trylibc = "yes"; then
9875 echo "using libc"
9876 else
9877 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9878 echo "You need to fetch lib$ipv6lib.a from appropriate"
9879 echo 'ipv6 kit and compile beforehand.'
9880 exit 1
9881 fi
9882 fi
9883fi
9884
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9886$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009888/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009889
9890 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009891int
9892main ()
9893{
9894FSIORefNum fRef = 0
9895 ;
9896 return 0;
9897}
Mark Dickinson0712b562010-05-08 19:13:21 +00009898
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009899_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009900if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009901
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009902
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009903$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009904
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9906$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009907
Mark Dickinson0712b562010-05-08 19:13:21 +00009908else
9909
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9911$as_echo "no" >&6; }
9912
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009913fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9915
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009916# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9918$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009919
Martin v. Löwiseba40652007-08-30 20:10:57 +00009920# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009921if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922 withval=$with_doc_strings;
9923fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009924
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009925
9926if test -z "$with_doc_strings"
9927then with_doc_strings="yes"
9928fi
9929if test "$with_doc_strings" != "no"
9930then
9931
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009932$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009933
9934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9936$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009937
Neil Schemenauera35c6882001-02-27 04:45:05 +00009938# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9940$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009941
Martin v. Löwiseba40652007-08-30 20:10:57 +00009942# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009943if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009945if test "$withval" != no
9946then
9947
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009948$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009949
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9951$as_echo "yes" >&6; }
9952else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009954fi
9955else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9957$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009958fi
9959
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009960
9961# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9963$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009964
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009966if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009967 withval=$with_pymalloc;
9968fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009969
Neil Schemenauera35c6882001-02-27 04:45:05 +00009970
Neil Schemenauer16c22972002-03-22 15:34:49 +00009971if test -z "$with_pymalloc"
9972then with_pymalloc="yes"
9973fi
9974if test "$with_pymalloc" != "no"
9975then
Martin v. Löwis11437992002-04-12 09:54:03 +00009976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009977$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009978
9979fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9981$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009982
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009983# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9985$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009986
9987# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009989 withval=$with_valgrind;
9990else
9991 with_valgrind=no
9992fi
9993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9995$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009996if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009997 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009998if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010000$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010001
10002else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010003 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010004
10005fi
10006
10007
10008fi
10009
Barry Warsawef82cd72000-06-30 16:21:01 +000010010# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10012$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010013
Martin v. Löwiseba40652007-08-30 20:10:57 +000010014# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010015if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010016 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010017if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010018then
10019
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010020$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10023$as_echo "yes" >&6; }
10024else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10025$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010026fi
10027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010030fi
10031
Barry Warsawef82cd72000-06-30 16:21:01 +000010032
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010033# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010034
Guido van Rossum98935bf2001-09-05 19:13:16 +000010035DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010036
Guido van Rossume97ee181999-12-20 21:27:22 +000010037# the dlopen() function means we might want to use dynload_shlib.o. some
10038# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010039for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040do :
10041 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010042if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010044#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010045_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010046
Guido van Rossume97ee181999-12-20 21:27:22 +000010047fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010048done
Guido van Rossume97ee181999-12-20 21:27:22 +000010049
Michael W. Hudson54241132001-12-07 15:38:26 +000010050
Guido van Rossume97ee181999-12-20 21:27:22 +000010051# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10052# loading of modules.
10053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10055$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010056if test -z "$DYNLOADFILE"
10057then
10058 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010059 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10060 if test "$ac_cv_func_dlopen" = yes
10061 then DYNLOADFILE="dynload_shlib.o"
10062 else DYNLOADFILE="dynload_aix.o"
10063 fi
10064 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010065 BeOS*) DYNLOADFILE="dynload_beos.o";;
10066 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010067 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10068 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010069 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010070 *)
10071 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10072 # out any dynamic loading
10073 if test "$ac_cv_func_dlopen" = yes
10074 then DYNLOADFILE="dynload_shlib.o"
10075 else DYNLOADFILE="dynload_stub.o"
10076 fi
10077 ;;
10078 esac
10079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10081$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010082if test "$DYNLOADFILE" != "dynload_stub.o"
10083then
Martin v. Löwis11437992002-04-12 09:54:03 +000010084
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010086
10087fi
10088
Neil Schemenauer4e425612001-06-19 15:44:15 +000010089# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10090
Michael W. Hudson54241132001-12-07 15:38:26 +000010091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10093$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010094if test -z "$MACHDEP_OBJS"
10095then
Jack Jansene578a632001-08-15 01:27:14 +000010096 MACHDEP_OBJS=$extra_machdep_objs
10097else
10098 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10101$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010102
Guido van Rossum627b2d71993-12-24 10:39:16 +000010103# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010104for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10105 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000010106 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010107 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000010108 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010109 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010110 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010111 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10112 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010113 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010114 setlocale setregid setreuid setresuid setresgid \
10115 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010116 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010117 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010118 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010119do :
10120 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10121ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010122if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010125_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010126
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010127fi
10128done
10129
Michael W. Hudson54241132001-12-07 15:38:26 +000010130
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010131# For some functions, having a definition is not sufficient, since
10132# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10134$as_echo_n "checking for chroot... " >&6; }
10135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010136/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010137#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010138int
10139main ()
10140{
10141void *x=chroot
10142 ;
10143 return 0;
10144}
10145_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010146if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010148$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010149
Matthias Klosec511b472010-05-08 11:01:39 +000010150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010151$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010155
10156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10159$as_echo_n "checking for link... " >&6; }
10160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010161/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010162#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010163int
10164main ()
10165{
10166void *x=link
10167 ;
10168 return 0;
10169}
10170_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010174
Matthias Klosec511b472010-05-08 11:01:39 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010176$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010180
10181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10184$as_echo_n "checking for symlink... " >&6; }
10185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010186/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010187#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010188int
10189main ()
10190{
10191void *x=symlink
10192 ;
10193 return 0;
10194}
10195_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010197
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010198$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010199
Matthias Klosec511b472010-05-08 11:01:39 +000010200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010201$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010202else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010205
10206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10209$as_echo_n "checking for fchdir... " >&6; }
10210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010211/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010212#include <unistd.h>
10213int
10214main ()
10215{
10216void *x=fchdir
10217 ;
10218 return 0;
10219}
10220_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010223$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010224
Matthias Klosec511b472010-05-08 11:01:39 +000010225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010226$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010227else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10229$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010230
10231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10234$as_echo_n "checking for fsync... " >&6; }
10235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010237#include <unistd.h>
10238int
10239main ()
10240{
10241void *x=fsync
10242 ;
10243 return 0;
10244}
10245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010249
Matthias Klosec511b472010-05-08 11:01:39 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010251$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010252else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010255
10256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10259$as_echo_n "checking for fdatasync... " >&6; }
10260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010262#include <unistd.h>
10263int
10264main ()
10265{
10266void *x=fdatasync
10267 ;
10268 return 0;
10269}
10270_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010272
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010274
Matthias Klosec511b472010-05-08 11:01:39 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010277else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010280
10281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10284$as_echo_n "checking for epoll... " >&6; }
10285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010286/* end confdefs.h. */
10287#include <sys/epoll.h>
10288int
10289main ()
10290{
10291void *x=epoll_create
10292 ;
10293 return 0;
10294}
10295_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010299
Matthias Klosec511b472010-05-08 11:01:39 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010301$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010302else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010305
10306fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10309$as_echo_n "checking for kqueue... " >&6; }
10310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010311/* end confdefs.h. */
10312
10313#include <sys/types.h>
10314#include <sys/event.h>
10315
10316int
10317main ()
10318{
10319int x=kqueue()
10320 ;
10321 return 0;
10322}
10323_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010324if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010326$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010327
Matthias Klosec511b472010-05-08 11:01:39 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010329$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010333
10334fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010336# On some systems (eg. FreeBSD 5), we would find a definition of the
10337# functions ctermid_r, setgroups in the library, but no prototype
10338# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10339# address to avoid compiler warnings and potential miscompilations
10340# because of the missing prototypes.
10341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10343$as_echo_n "checking for ctermid_r... " >&6; }
10344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010345/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010346
Martin v. Löwisd5843682002-11-21 20:41:28 +000010347#include <stdio.h>
10348
Martin v. Löwisd5843682002-11-21 20:41:28 +000010349int
10350main ()
10351{
10352void* p = ctermid_r
10353 ;
10354 return 0;
10355}
10356_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010359$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010360
Matthias Klosec511b472010-05-08 11:01:39 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010362$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010366
10367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10369
Antoine Pitroub170f172010-09-10 18:47:36 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10371$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010372if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010373 $as_echo_n "(cached) " >&6
10374else
10375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010377#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010378int
10379main ()
10380{
10381void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010382
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010383 ;
10384 return 0;
10385}
10386_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010387if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010388 ac_cv_flock_decl=yes
10389else
10390 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010391
10392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010394
Antoine Pitroub170f172010-09-10 18:47:36 +000010395fi
10396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10397$as_echo "$ac_cv_flock_decl" >&6; }
10398if test "x${ac_cv_flock_decl}" = xyes; then
10399 for ac_func in flock
10400do :
10401 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010402if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010403 cat >>confdefs.h <<_ACEOF
10404#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010405_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010406
Antoine Pitrou85729812010-09-07 14:55:24 +000010407else
Antoine Pitroub170f172010-09-10 18:47:36 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010409$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010410if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010411 $as_echo_n "(cached) " >&6
10412else
10413 ac_check_lib_save_LIBS=$LIBS
10414LIBS="-lbsd $LIBS"
10415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10416/* end confdefs.h. */
10417
10418/* Override any GCC internal prototype to avoid an error.
10419 Use char because int might match the return type of a GCC
10420 builtin and then its argument prototype would still apply. */
10421#ifdef __cplusplus
10422extern "C"
10423#endif
10424char flock ();
10425int
10426main ()
10427{
10428return flock ();
10429 ;
10430 return 0;
10431}
10432_ACEOF
10433if ac_fn_c_try_link "$LINENO"; then :
10434 ac_cv_lib_bsd_flock=yes
10435else
10436 ac_cv_lib_bsd_flock=no
10437fi
10438rm -f core conftest.err conftest.$ac_objext \
10439 conftest$ac_exeext conftest.$ac_ext
10440LIBS=$ac_check_lib_save_LIBS
10441fi
10442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10443$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010444if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010445 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010446
10447
10448$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10449
10450
10451fi
10452
10453
10454fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010455done
10456
Antoine Pitrou85729812010-09-07 14:55:24 +000010457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010458
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10460$as_echo_n "checking for getpagesize... " >&6; }
10461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010462/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010463
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010464#include <unistd.h>
10465
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010466int
10467main ()
10468{
10469void* p = getpagesize
10470 ;
10471 return 0;
10472}
10473_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010477
Matthias Klosec511b472010-05-08 11:01:39 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010479$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10482$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010483
10484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010486
Charles-François Natali93a11752011-11-27 13:01:35 +010010487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10488$as_echo_n "checking for broken unsetenv... " >&6; }
10489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10490/* end confdefs.h. */
10491
10492#include <stdlib.h>
10493
10494int
10495main ()
10496{
10497int res = unsetenv("DUMMY")
10498 ;
10499 return 0;
10500}
10501_ACEOF
10502if ac_fn_c_try_compile "$LINENO"; then :
10503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505else
10506
10507$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10508
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10510$as_echo "yes" >&6; }
10511
10512fi
10513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10514
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010515for ac_prog in true
10516do
10517 # Extract the first word of "$ac_prog", so it can be a program name with args.
10518set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10520$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010521if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010522 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010523else
10524 if test -n "$TRUE"; then
10525 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10526else
10527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10528for as_dir in $PATH
10529do
10530 IFS=$as_save_IFS
10531 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010532 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010533 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010534 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010535 $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 +000010536 break 2
10537 fi
10538done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010539 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010540IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010541
10542fi
10543fi
10544TRUE=$ac_cv_prog_TRUE
10545if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10547$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010548else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10550$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010551fi
10552
Martin v. Löwiseba40652007-08-30 20:10:57 +000010553
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554 test -n "$TRUE" && break
10555done
10556test -n "$TRUE" || TRUE="/bin/true"
10557
10558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10560$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010561if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010562 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010563else
10564 ac_check_lib_save_LIBS=$LIBS
10565LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010567/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010568
Martin v. Löwiseba40652007-08-30 20:10:57 +000010569/* Override any GCC internal prototype to avoid an error.
10570 Use char because int might match the return type of a GCC
10571 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010572#ifdef __cplusplus
10573extern "C"
10574#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010575char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010576int
10577main ()
10578{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010579return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010580 ;
10581 return 0;
10582}
10583_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010584if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010585 ac_cv_lib_c_inet_aton=yes
10586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010587 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010588fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010589rm -f core conftest.err conftest.$ac_objext \
10590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010591LIBS=$ac_check_lib_save_LIBS
10592fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10594$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010595if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10599$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010600if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010601 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010602else
10603 ac_check_lib_save_LIBS=$LIBS
10604LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010606/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010607
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608/* Override any GCC internal prototype to avoid an error.
10609 Use char because int might match the return type of a GCC
10610 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010611#ifdef __cplusplus
10612extern "C"
10613#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010614char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010615int
10616main ()
10617{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010618return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010619 ;
10620 return 0;
10621}
10622_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010624 ac_cv_lib_resolv_inet_aton=yes
10625else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010626 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010627fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010628rm -f core conftest.err conftest.$ac_objext \
10629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010630LIBS=$ac_check_lib_save_LIBS
10631fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10633$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010634if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010635 cat >>confdefs.h <<_ACEOF
10636#define HAVE_LIBRESOLV 1
10637_ACEOF
10638
10639 LIBS="-lresolv $LIBS"
10640
10641fi
10642
10643
10644fi
10645
10646
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010647# On Tru64, chflags seems to be present, but calling it will
10648# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10650$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010651if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010653else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010654 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010655 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010658/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010659
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010660#include <sys/stat.h>
10661#include <unistd.h>
10662int main(int argc, char*argv[])
10663{
10664 if(chflags(argv[0], 0) != 0)
10665 return 1;
10666 return 0;
10667}
Ned Deily43e10542011-06-27 23:41:53 -070010668
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010669_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010670if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010671 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010673 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010674fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010677fi
10678
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010679
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10682$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010683if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010684 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010685if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010686 ac_cv_have_chflags="yes"
10687else
10688 ac_cv_have_chflags="no"
10689fi
10690
10691fi
10692if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010694$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010695
10696fi
10697
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10699$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010700if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010701 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010702else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010703 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010704 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010707/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010708
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010709#include <sys/stat.h>
10710#include <unistd.h>
10711int main(int argc, char*argv[])
10712{
10713 if(lchflags(argv[0], 0) != 0)
10714 return 1;
10715 return 0;
10716}
Ned Deily43e10542011-06-27 23:41:53 -070010717
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010718_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010719if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010720 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010722 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010723fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010726fi
10727
10728
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010729fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10731$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010732if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010733 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010734if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010735 ac_cv_have_lchflags="yes"
10736else
10737 ac_cv_have_lchflags="no"
10738fi
10739
10740fi
10741if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010742
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010743$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010744
10745fi
10746
Ronald Oussorenf8752642006-07-06 10:13:35 +000010747case $ac_sys_system/$ac_sys_release in
10748Darwin/*)
10749 _CUR_CFLAGS="${CFLAGS}"
10750 _CUR_LDFLAGS="${LDFLAGS}"
10751 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10752 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10753 ;;
10754esac
10755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10757$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010758if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010760else
10761 ac_check_lib_save_LIBS=$LIBS
10762LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010764/* end confdefs.h. */
10765
Martin v. Löwiseba40652007-08-30 20:10:57 +000010766/* Override any GCC internal prototype to avoid an error.
10767 Use char because int might match the return type of a GCC
10768 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010769#ifdef __cplusplus
10770extern "C"
10771#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010772char inflateCopy ();
10773int
10774main ()
10775{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010776return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010777 ;
10778 return 0;
10779}
10780_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010781if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010782 ac_cv_lib_z_inflateCopy=yes
10783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010784 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010785fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010786rm -f core conftest.err conftest.$ac_objext \
10787 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010788LIBS=$ac_check_lib_save_LIBS
10789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10791$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010792if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010795
10796fi
10797
10798
Ronald Oussorenf8752642006-07-06 10:13:35 +000010799case $ac_sys_system/$ac_sys_release in
10800Darwin/*)
10801 CFLAGS="${_CUR_CFLAGS}"
10802 LDFLAGS="${_CUR_LDFLAGS}"
10803 ;;
10804esac
10805
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10807$as_echo_n "checking for hstrerror... " >&6; }
10808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010809/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010810
Martin v. Löwise9416172003-05-03 10:12:45 +000010811#include <netdb.h>
10812
Martin v. Löwise9416172003-05-03 10:12:45 +000010813int
10814main ()
10815{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010816void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010817 ;
10818 return 0;
10819}
10820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010823$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010824
Matthias Klosec511b472010-05-08 11:01:39 +000010825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010826$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10829$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010830
10831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010832rm -f core conftest.err conftest.$ac_objext \
10833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010834
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10836$as_echo_n "checking for inet_aton... " >&6; }
10837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010838/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010839
Martin v. Löwis86d66262006-02-17 08:40:11 +000010840#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010841#include <sys/socket.h>
10842#include <netinet/in.h>
10843#include <arpa/inet.h>
10844
Martin v. Löwise9416172003-05-03 10:12:45 +000010845int
10846main ()
10847{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010848void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010849 ;
10850 return 0;
10851}
10852_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010855$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010856
Matthias Klosec511b472010-05-08 11:01:39 +000010857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010858$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10861$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010862
10863fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010864rm -f core conftest.err conftest.$ac_objext \
10865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10868$as_echo_n "checking for inet_pton... " >&6; }
10869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010870/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010871
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010872#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010873#include <sys/socket.h>
10874#include <netinet/in.h>
10875#include <arpa/inet.h>
10876
Martin v. Löwise9416172003-05-03 10:12:45 +000010877int
10878main ()
10879{
10880void* p = inet_pton
10881 ;
10882 return 0;
10883}
10884_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010885if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010887$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010888
Matthias Klosec511b472010-05-08 11:01:39 +000010889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010890$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010894
10895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010897
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010898# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10900$as_echo_n "checking for setgroups... " >&6; }
10901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010902/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010903
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010904#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010905#ifdef HAVE_GRP_H
10906#include <grp.h>
10907#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010908
Martin v. Löwisd5843682002-11-21 20:41:28 +000010909int
10910main ()
10911{
10912void* p = setgroups
10913 ;
10914 return 0;
10915}
10916_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010917if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010918
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010919$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010920
Matthias Klosec511b472010-05-08 11:01:39 +000010921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010922$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10925$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010926
10927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010929
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010930# check for openpty and forkpty
10931
10932for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933do :
10934 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010935if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010936 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010937#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010938_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010939
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10942$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010943if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010944 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010945else
Martin v. Löwis11437992002-04-12 09:54:03 +000010946 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010947LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010950
Martin v. Löwiseba40652007-08-30 20:10:57 +000010951/* Override any GCC internal prototype to avoid an error.
10952 Use char because int might match the return type of a GCC
10953 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010954#ifdef __cplusplus
10955extern "C"
10956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010957char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010958int
10959main ()
10960{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010961return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ;
10963 return 0;
10964}
10965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010966if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010967 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010969 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010971rm -f core conftest.err conftest.$ac_objext \
10972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010973LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10976$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010977if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010978 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010979 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10982$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010983if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010984 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010985else
10986 ac_check_lib_save_LIBS=$LIBS
10987LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010989/* end confdefs.h. */
10990
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991/* Override any GCC internal prototype to avoid an error.
10992 Use char because int might match the return type of a GCC
10993 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010994#ifdef __cplusplus
10995extern "C"
10996#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010997char openpty ();
10998int
10999main ()
11000{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011001return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011002 ;
11003 return 0;
11004}
11005_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011007 ac_cv_lib_bsd_openpty=yes
11008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011009 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011rm -f core conftest.err conftest.$ac_objext \
11012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011013LIBS=$ac_check_lib_save_LIBS
11014fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11016$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011017if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011018 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011019 LIBS="$LIBS -lbsd"
11020fi
11021
11022
11023fi
11024
Fred Drake8cef4cf2000-06-28 16:40:38 +000011025
11026fi
11027done
11028
11029for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030do :
11031 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011032if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011035_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011036
Fred Drake8cef4cf2000-06-28 16:40:38 +000011037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11039$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011040if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011042else
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011044LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011047
Martin v. Löwiseba40652007-08-30 20:10:57 +000011048/* Override any GCC internal prototype to avoid an error.
11049 Use char because int might match the return type of a GCC
11050 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011051#ifdef __cplusplus
11052extern "C"
11053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011054char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011055int
11056main ()
11057{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011058return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 ;
11060 return 0;
11061}
11062_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011063if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068rm -f core conftest.err conftest.$ac_objext \
11069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011070LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011071fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11073$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011074if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011075 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011076 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11079$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011080if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011082else
11083 ac_check_lib_save_LIBS=$LIBS
11084LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011086/* end confdefs.h. */
11087
Martin v. Löwiseba40652007-08-30 20:10:57 +000011088/* Override any GCC internal prototype to avoid an error.
11089 Use char because int might match the return type of a GCC
11090 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011091#ifdef __cplusplus
11092extern "C"
11093#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011094char forkpty ();
11095int
11096main ()
11097{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011098return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011099 ;
11100 return 0;
11101}
11102_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011103if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011104 ac_cv_lib_bsd_forkpty=yes
11105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011106 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011107fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011108rm -f core conftest.err conftest.$ac_objext \
11109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011110LIBS=$ac_check_lib_save_LIBS
11111fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11113$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011114if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011115 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011116 LIBS="$LIBS -lbsd"
11117fi
11118
11119
11120fi
11121
Fred Drake8cef4cf2000-06-28 16:40:38 +000011122
11123fi
11124done
11125
Jack Jansendd19cf82001-12-06 22:36:17 +000011126
Brett Cannonaa5778d2008-03-18 04:09:00 +000011127# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011128for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011129do :
11130 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011131if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011132 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011133#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011134_ACEOF
11135
11136fi
11137done
11138
11139
Michael W. Hudson54241132001-12-07 15:38:26 +000011140# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011141for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011142do :
11143 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11144ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011145if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011147#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011148_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011149
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011150fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011151done
11152
Michael W. Hudson54241132001-12-07 15:38:26 +000011153
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011154ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011155if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011156 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011157
Martin v. Löwis1142de32002-03-29 16:28:31 +000011158else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011159 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011160 *" dup2.$ac_objext "* ) ;;
11161 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011162 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011163esac
11164
Martin v. Löwis1142de32002-03-29 16:28:31 +000011165fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011166
11167ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011168if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011169 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11170
11171else
11172 case " $LIBOBJS " in
11173 *" getcwd.$ac_objext "* ) ;;
11174 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11175 ;;
11176esac
11177
11178fi
11179
11180ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011181if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011182 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11183
11184else
11185 case " $LIBOBJS " in
11186 *" strdup.$ac_objext "* ) ;;
11187 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11188 ;;
11189esac
11190
11191fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011192
11193
11194for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011195do :
11196 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011197if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011199#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011200_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011202/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011203#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011204int
11205main ()
11206{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011207getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 ;
11209 return 0;
11210}
11211_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011215
Guido van Rossum627b2d71993-12-24 10:39:16 +000011216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011218
Guido van Rossum627b2d71993-12-24 10:39:16 +000011219fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011220done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011221
Jack Jansen150753c2003-03-29 22:07:47 +000011222for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011223do :
11224 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011225if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011226 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011227#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011230/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011231#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011232int
11233main ()
11234{
11235setpgrp(0,0);
11236 ;
11237 return 0;
11238}
11239_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011242$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011243
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011246
11247fi
11248done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011249
Thomas Wouters3a584202000-08-05 23:28:51 +000011250for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251do :
11252 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011253if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011255#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011256_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011258/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011259#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011260int
11261main ()
11262{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011263gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ;
11265 return 0;
11266}
11267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268if ac_fn_c_try_compile "$LINENO"; then :
11269
Guido van Rossum627b2d71993-12-24 10:39:16 +000011270else
Skip Montanaro6dead952003-09-25 14:50:04 +000011271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011272$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011273
Martin v. Löwis11437992002-04-12 09:54:03 +000011274
Guido van Rossum627b2d71993-12-24 10:39:16 +000011275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011277
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011278fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011279done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011280
Michael W. Hudson54241132001-12-07 15:38:26 +000011281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11283$as_echo_n "checking for major... " >&6; }
11284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011285/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011286
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011287#if defined(MAJOR_IN_MKDEV)
11288#include <sys/mkdev.h>
11289#elif defined(MAJOR_IN_SYSMACROS)
11290#include <sys/sysmacros.h>
11291#else
11292#include <sys/types.h>
11293#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011294
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011295int
11296main ()
11297{
11298
11299 makedev(major(0),minor(0));
11300
11301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011305if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011306
11307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011309
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11311$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011312
11313else
Skip Montanaro6dead952003-09-25 14:50:04 +000011314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011317
11318fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011319rm -f core conftest.err conftest.$ac_objext \
11320 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011321
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011322# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011323# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11325$as_echo_n "checking for getaddrinfo... " >&6; }
11326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011328
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011329#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011330#include <sys/socket.h>
11331#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011332#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011333
Martin v. Löwis11437992002-04-12 09:54:03 +000011334int
11335main ()
11336{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011337getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 ;
11339 return 0;
11340}
11341_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011342if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011343 have_getaddrinfo=yes
11344else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011345 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011346fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011347rm -f core conftest.err conftest.$ac_objext \
11348 conftest$ac_exeext conftest.$ac_ext
11349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11350$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011351if test $have_getaddrinfo = yes
11352then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11354$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011355 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011356 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011358 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011359
11360if test "${enable_ipv6+set}" = set; then
11361 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11362else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011363 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011364fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011368
Stefan Krah0afe4e42012-11-22 23:56:51 +010011369#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011370#include <sys/types.h>
11371#include <netdb.h>
11372#include <string.h>
11373#include <sys/socket.h>
11374#include <netinet/in.h>
11375
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011376int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011377{
11378 int passive, gaierr, inet4 = 0, inet6 = 0;
11379 struct addrinfo hints, *ai, *aitop;
11380 char straddr[INET6_ADDRSTRLEN], strport[16];
11381
11382 for (passive = 0; passive <= 1; passive++) {
11383 memset(&hints, 0, sizeof(hints));
11384 hints.ai_family = AF_UNSPEC;
11385 hints.ai_flags = passive ? AI_PASSIVE : 0;
11386 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011387 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011388 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11389 (void)gai_strerror(gaierr);
11390 goto bad;
11391 }
11392 for (ai = aitop; ai; ai = ai->ai_next) {
11393 if (ai->ai_addr == NULL ||
11394 ai->ai_addrlen == 0 ||
11395 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11396 straddr, sizeof(straddr), strport, sizeof(strport),
11397 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11398 goto bad;
11399 }
11400 switch (ai->ai_family) {
11401 case AF_INET:
11402 if (strcmp(strport, "54321") != 0) {
11403 goto bad;
11404 }
11405 if (passive) {
11406 if (strcmp(straddr, "0.0.0.0") != 0) {
11407 goto bad;
11408 }
11409 } else {
11410 if (strcmp(straddr, "127.0.0.1") != 0) {
11411 goto bad;
11412 }
11413 }
11414 inet4++;
11415 break;
11416 case AF_INET6:
11417 if (strcmp(strport, "54321") != 0) {
11418 goto bad;
11419 }
11420 if (passive) {
11421 if (strcmp(straddr, "::") != 0) {
11422 goto bad;
11423 }
11424 } else {
11425 if (strcmp(straddr, "::1") != 0) {
11426 goto bad;
11427 }
11428 }
11429 inet6++;
11430 break;
11431 case AF_UNSPEC:
11432 goto bad;
11433 break;
11434 default:
11435 /* another family support? */
11436 break;
11437 }
11438 }
11439 }
11440
11441 if (!(inet4 == 0 || inet4 == 2))
11442 goto bad;
11443 if (!(inet6 == 0 || inet6 == 2))
11444 goto bad;
11445
11446 if (aitop)
11447 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011448 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011449
11450 bad:
11451 if (aitop)
11452 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011453 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011454}
11455
Martin v. Löwis11437992002-04-12 09:54:03 +000011456_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011457if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011458 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011460 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011461fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11463 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011465
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011466fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011467
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011469
Benjamin Peterson75fed812010-11-01 01:47:19 +000011470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11471$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11472
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011473if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011474then
11475 if test $ipv6 = yes
11476 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011477 echo 'Fatal: You must get working getaddrinfo() function.'
11478 echo ' or you can specify "--disable-ipv6"'.
11479 exit 1
11480 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011481else
Martin v. Löwis11437992002-04-12 09:54:03 +000011482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011483$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011484
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011485fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011486
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011487for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488do :
11489 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011490if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011493_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011494
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011495fi
11496done
11497
Michael W. Hudson54241132001-12-07 15:38:26 +000011498
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011499# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11501$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011502if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011503 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011504else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011507#include <sys/types.h>
11508#include <sys/time.h>
11509#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011510
Martin v. Löwis11437992002-04-12 09:54:03 +000011511int
11512main ()
11513{
11514if ((struct tm *) 0)
11515return 0;
11516 ;
11517 return 0;
11518}
11519_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011520if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011521 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011523 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11528$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011529if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011531$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011532
11533fi
11534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11536$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011537if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011538 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011541/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011542#include <sys/types.h>
11543#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011544
Martin v. Löwis11437992002-04-12 09:54:03 +000011545int
11546main ()
11547{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011548struct tm tm;
11549 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011550 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ;
11552 return 0;
11553}
11554_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011555if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011556 ac_cv_struct_tm=time.h
11557else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011558 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011561fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11563$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011564if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011567
11568fi
11569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011570ac_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 +000011571#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011573"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011574if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011575
11576cat >>confdefs.h <<_ACEOF
11577#define HAVE_STRUCT_TM_TM_ZONE 1
11578_ACEOF
11579
11580
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011581fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011582
Martin v. Löwis11437992002-04-12 09:54:03 +000011583if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011585$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011586
11587else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011588 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11589"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011590if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011591 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011593 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011594fi
11595
Martin v. Löwiseba40652007-08-30 20:10:57 +000011596cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011598_ACEOF
11599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11601$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011602if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011603 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011604else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011606/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011607#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011608#if !HAVE_DECL_TZNAME
11609extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011611
Martin v. Löwis11437992002-04-12 09:54:03 +000011612int
11613main ()
11614{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011615return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011616 ;
11617 return 0;
11618}
11619_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011620if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011621 ac_cv_var_tzname=yes
11622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011623 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011624fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011625rm -f core conftest.err conftest.$ac_objext \
11626 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011627fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11629$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011630 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011632$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011634 fi
11635fi
11636
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011637ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011638if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011639
11640cat >>confdefs.h <<_ACEOF
11641#define HAVE_STRUCT_STAT_ST_RDEV 1
11642_ACEOF
11643
11644
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011645fi
11646
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011647ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011648if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011649
Martin v. Löwis11437992002-04-12 09:54:03 +000011650cat >>confdefs.h <<_ACEOF
11651#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11652_ACEOF
11653
11654
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011655fi
11656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011657ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011658if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011659
11660cat >>confdefs.h <<_ACEOF
11661#define HAVE_STRUCT_STAT_ST_FLAGS 1
11662_ACEOF
11663
11664
11665fi
11666
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011667ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011668if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011669
11670cat >>confdefs.h <<_ACEOF
11671#define HAVE_STRUCT_STAT_ST_GEN 1
11672_ACEOF
11673
11674
11675fi
11676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011677ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011678if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011679
11680cat >>confdefs.h <<_ACEOF
11681#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11682_ACEOF
11683
11684
11685fi
11686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011687ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011688if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690cat >>confdefs.h <<_ACEOF
11691#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11692_ACEOF
11693
11694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011695$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011696
11697else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011698 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011699 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011700 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11701 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011702esac
11703
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011704fi
11705
Michael W. Hudson54241132001-12-07 15:38:26 +000011706
Martin v. Löwis11437992002-04-12 09:54:03 +000011707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11709$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011710if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011712else
Matthias Klosec511b472010-05-08 11:01:39 +000011713
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011715/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011716#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011717int
11718main ()
11719{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011720return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011721 ;
11722 return 0;
11723}
11724_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011726 ac_cv_header_time_altzone=yes
11727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011728 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011731
Martin v. Löwiseba40652007-08-30 20:10:57 +000011732fi
11733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11735$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011736if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011738$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011739
11740fi
11741
Guido van Rossumda88dad1995-01-26 00:46:29 +000011742was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11744$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011746/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011747
11748#include <sys/types.h>
11749#include <sys/select.h>
11750#include <sys/time.h>
11751
Martin v. Löwis11437992002-04-12 09:54:03 +000011752int
11753main ()
11754{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011755;
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 ;
11757 return 0;
11758}
11759_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011761
11762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011763$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011764
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011765 was_it_defined=yes
11766
Martin v. Löwiseba40652007-08-30 20:10:57 +000011767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11770$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011771
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11773$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011774if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011775 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011778/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011779#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011780int
11781main ()
11782{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011783struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 ;
11785 return 0;
11786}
11787_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011788if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011789 ac_cv_struct_addrinfo=yes
11790else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011791 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11794fi
11795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11797$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011798if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011799
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011800$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011801
11802fi
11803
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11805$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011806if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011811
11812# include <sys/types.h>
11813# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011814int
11815main ()
11816{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011817struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011818 ;
11819 return 0;
11820}
11821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011822if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011823 ac_cv_struct_sockaddr_storage=yes
11824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011825 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11828fi
11829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11831$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011832if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011834$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011835
11836fi
11837
Guido van Rossum627b2d71993-12-24 10:39:16 +000011838# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11841$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011842if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011843 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011847$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011848int
11849main ()
11850{
11851static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011852test_array [0] = 0;
11853return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011854
11855 ;
11856 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011857}
Martin v. Löwis11437992002-04-12 09:54:03 +000011858_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011859if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011860 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011862 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11867$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011868if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011869 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011870
11871fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11874$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011875if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011876 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011879/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011880
Martin v. Löwis11437992002-04-12 09:54:03 +000011881int
11882main ()
11883{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011884
Martin v. Löwis11437992002-04-12 09:54:03 +000011885#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011886 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011887 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011888 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011889 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011890 char const *const *pcpcc;
11891 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011892 /* NEC SVR4.0.2 mips cc rejects this. */
11893 struct point {int x, y;};
11894 static struct point const zero = {0,0};
11895 /* AIX XL C 1.02.0.0 rejects this.
11896 It does not let you subtract one const X* pointer from another in
11897 an arm of an if-expression whose if-part is not a constant
11898 expression */
11899 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011900 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011901 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011902 ++pcpcc;
11903 ppc = (char**) pcpcc;
11904 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011905 { /* SCO 3.2v4 cc rejects this sort of thing. */
11906 char tx;
11907 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011908 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011909
Martin v. Löwis11437992002-04-12 09:54:03 +000011910 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011911 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011912 }
11913 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11914 int x[] = {25, 17};
11915 const int *foo = &x[0];
11916 ++foo;
11917 }
11918 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11919 typedef const int *iptr;
11920 iptr p = 0;
11921 ++p;
11922 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011923 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011924 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011925 struct s { int j; const int *ap[3]; } bx;
11926 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011927 }
11928 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11929 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011930 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011931 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011932 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011933#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011934
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 ;
11936 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011937}
Martin v. Löwis11437992002-04-12 09:54:03 +000011938_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011939if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011940 ac_cv_c_const=yes
11941else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011942 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11947$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011948if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011949
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011950$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011951
11952fi
11953
Michael W. Hudson54241132001-12-07 15:38:26 +000011954
Guido van Rossumda88dad1995-01-26 00:46:29 +000011955works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11957$as_echo_n "checking for working volatile... " >&6; }
11958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011959/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011960
Martin v. Löwis11437992002-04-12 09:54:03 +000011961int
11962main ()
11963{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011964volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011965 ;
11966 return 0;
11967}
11968_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011969if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011970 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011971else
Skip Montanaro6dead952003-09-25 14:50:04 +000011972
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011973$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011974
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011975
Guido van Rossum627b2d71993-12-24 10:39:16 +000011976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11979$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011980
Guido van Rossumda88dad1995-01-26 00:46:29 +000011981works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11983$as_echo_n "checking for working signed char... " >&6; }
11984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011985/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011986
Martin v. Löwis11437992002-04-12 09:54:03 +000011987int
11988main ()
11989{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011990signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011991 ;
11992 return 0;
11993}
11994_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011996 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011997else
Skip Montanaro6dead952003-09-25 14:50:04 +000011998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011999$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012000
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012001
Guido van Rossum7f43da71994-08-01 12:15:30 +000012002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12005$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012006
Guido van Rossumda88dad1995-01-26 00:46:29 +000012007have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12009$as_echo_n "checking for prototypes... " >&6; }
12010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012011/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012012int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012013int
12014main ()
12015{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 ;
12018 return 0;
12019}
12020_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012022
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012023$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012024
Matthias Klosec511b472010-05-08 11:01:39 +000012025 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12029$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012030
Guido van Rossumda88dad1995-01-26 00:46:29 +000012031works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12033$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012035/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012036
12037#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012038int foo(int x, ...) {
12039 va_list va;
12040 va_start(va, x);
12041 va_arg(va, int);
12042 va_arg(va, char *);
12043 va_arg(va, double);
12044 return 0;
12045}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012046
Martin v. Löwis11437992002-04-12 09:54:03 +000012047int
12048main ()
12049{
Guido van Rossum90eea071996-08-30 20:58:57 +000012050return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012051 ;
12052 return 0;
12053}
12054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012055if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012056
12057
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012059
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012060 works=yes
12061
Guido van Rossum627b2d71993-12-24 10:39:16 +000012062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12065$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012066
Martin v. Löwisd6320502004-08-12 13:45:08 +000012067# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12069$as_echo_n "checking for socketpair... " >&6; }
12070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012071/* end confdefs.h. */
12072
12073#include <sys/types.h>
12074#include <sys/socket.h>
12075
12076int
12077main ()
12078{
12079void *x=socketpair
12080 ;
12081 return 0;
12082}
12083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012084if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012087
Matthias Klosec511b472010-05-08 11:01:39 +000012088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12092$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012093
12094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012096
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012097# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12099$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012101/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012102#include <sys/types.h>
12103#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012104int
12105main ()
12106{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012107struct sockaddr x;
12108x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 ;
12110 return 0;
12111}
12112_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113if ac_fn_c_try_compile "$LINENO"; then :
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12115$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012118
12119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12121$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012122
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012125
Guido van Rossumda88dad1995-01-26 00:46:29 +000012126va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12128$as_echo_n "checking whether va_list is an array... " >&6; }
12129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012130/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012131
12132#ifdef HAVE_STDARG_PROTOTYPES
12133#include <stdarg.h>
12134#else
12135#include <varargs.h>
12136#endif
12137
Martin v. Löwis11437992002-04-12 09:54:03 +000012138int
12139main ()
12140{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012141va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 ;
12143 return 0;
12144}
12145_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012146if ac_fn_c_try_compile "$LINENO"; then :
12147
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012148else
Skip Montanaro6dead952003-09-25 14:50:04 +000012149
Martin v. Löwis11437992002-04-12 09:54:03 +000012150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012152
Guido van Rossumda88dad1995-01-26 00:46:29 +000012153 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012154
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12158$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012160# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012161
12162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012163ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012164if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012166 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12169$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012170 OLD_CFLAGS=$CFLAGS
12171 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012173/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012174
12175# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012176
Martin v. Löwis11437992002-04-12 09:54:03 +000012177int
12178main ()
12179{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012180
12181 char *name;
12182 struct hostent *he, *res;
12183 char buffer[2048];
12184 int buflen = 2048;
12185 int h_errnop;
12186
12187 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012188
12189 ;
12190 return 0;
12191}
12192_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012193if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012195 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012196
Martin v. Löwis11437992002-04-12 09:54:03 +000012197
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012198$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12201$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012202
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012203else
Skip Montanaro6dead952003-09-25 14:50:04 +000012204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12206$as_echo "no" >&6; }
12207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12208$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012210/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012211
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012212# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012213
Martin v. Löwis11437992002-04-12 09:54:03 +000012214int
12215main ()
12216{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012217
12218 char *name;
12219 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012220 char buffer[2048];
12221 int buflen = 2048;
12222 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012223
Matthias Klosec511b472010-05-08 11:01:39 +000012224 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012225
12226 ;
12227 return 0;
12228}
12229_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012231
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012232 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012233
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
Matthias Klosec511b472010-05-08 11:01:39 +000012235$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12238$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012239
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012240else
Skip Montanaro6dead952003-09-25 14:50:04 +000012241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12243$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12245$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247/* end confdefs.h. */
12248
12249# include <netdb.h>
12250
12251int
12252main ()
12253{
12254
12255 char *name;
12256 struct hostent *he;
12257 struct hostent_data data;
12258
12259 (void) gethostbyname_r(name, he, &data);
12260
12261 ;
12262 return 0;
12263}
12264_ACEOF
12265if ac_fn_c_try_compile "$LINENO"; then :
12266
12267 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12268
12269
12270$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12271
12272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12273$as_echo "yes" >&6; }
12274
12275else
12276
12277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12278$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012282
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012285
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012288 CFLAGS=$OLD_CFLAGS
12289
12290else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012292 for ac_func in gethostbyname
12293do :
12294 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012295if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012297#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012298_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012299
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012300fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012301done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012302
Michael W. Hudson54241132001-12-07 15:38:26 +000012303
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012304fi
12305
Michael W. Hudson54241132001-12-07 15:38:26 +000012306
12307
12308
12309
12310
12311
Guido van Rossum627b2d71993-12-24 10:39:16 +000012312# checks for system services
12313# (none yet)
12314
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012315# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012317if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012318
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12321$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012322if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012323 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012324else
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012326LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330/* Override any GCC internal prototype to avoid an error.
12331 Use char because int might match the return type of a GCC
12332 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012333#ifdef __cplusplus
12334extern "C"
12335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012336char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012337int
12338main ()
12339{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012340return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012341 ;
12342 return 0;
12343}
12344_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012345if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012346 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012347else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012348 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012349fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012350rm -f core conftest.err conftest.$ac_objext \
12351 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012352LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012353fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12355$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012356if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 cat >>confdefs.h <<_ACEOF
12358#define HAVE_LIBIEEE 1
12359_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012360
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012361 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012362
Guido van Rossum627b2d71993-12-24 10:39:16 +000012363fi
12364
Michael W. Hudson54241132001-12-07 15:38:26 +000012365
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012366fi
12367
Michael W. Hudson54241132001-12-07 15:38:26 +000012368
Guido van Rossum7f253911997-05-09 02:42:48 +000012369# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12371$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012372
Martin v. Löwiseba40652007-08-30 20:10:57 +000012373# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012374if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012375 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012376if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012377then
12378
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012379$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012380
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12382$as_echo "yes" >&6; }
12383else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12384$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012385fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12388$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389fi
12390
Guido van Rossum7f253911997-05-09 02:42:48 +000012391
Guido van Rossum7f43da71994-08-01 12:15:30 +000012392# check for --with-libm=...
12393
Guido van Rossum563e7081996-09-10 18:20:48 +000012394case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012395Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012396BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012397*) LIBM=-lm
12398esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12400$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
Martin v. Löwiseba40652007-08-30 20:10:57 +000012402# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012403if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012404 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012405if test "$withval" = no
12406then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12408$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012409elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012410then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12412$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012413else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012414fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12417$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012418fi
12419
Guido van Rossum7f43da71994-08-01 12:15:30 +000012420
12421# check for --with-libc=...
12422
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12424$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012428 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012429if test "$withval" = no
12430then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12432$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012433elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012434then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12436$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012437else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012438fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12441$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012442fi
12443
Guido van Rossum7f43da71994-08-01 12:15:30 +000012444
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012445# **************************************************
12446# * Check for various properties of floating point *
12447# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12450$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012451if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012452 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012453else
12454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012455if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012456 ac_cv_little_endian_double=no
12457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012459/* end confdefs.h. */
12460
12461#include <string.h>
12462int main() {
12463 double x = 9006104071832581.0;
12464 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12465 return 0;
12466 else
12467 return 1;
12468}
12469
12470_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012471if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012472 ac_cv_little_endian_double=yes
12473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012474 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12477 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012478fi
12479
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012480fi
12481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12483$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012484if test "$ac_cv_little_endian_double" = yes
12485then
12486
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012487$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012488
12489fi
12490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12492$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012493if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012494 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012495else
12496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012497if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012498 ac_cv_big_endian_double=no
12499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012501/* end confdefs.h. */
12502
12503#include <string.h>
12504int main() {
12505 double x = 9006104071832581.0;
12506 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12507 return 0;
12508 else
12509 return 1;
12510}
12511
12512_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012514 ac_cv_big_endian_double=yes
12515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012516 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012520fi
12521
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012522fi
12523
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12525$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012526if test "$ac_cv_big_endian_double" = yes
12527then
12528
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012530
12531fi
12532
12533# Some ARM platforms use a mixed-endian representation for doubles.
12534# While Python doesn't currently have full support for these platforms
12535# (see e.g., issue 1762561), we can at least make sure that float <-> string
12536# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12538$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012539if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012541else
12542
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012544 ac_cv_mixed_endian_double=no
12545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012547/* end confdefs.h. */
12548
12549#include <string.h>
12550int main() {
12551 double x = 9006104071832581.0;
12552 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12553 return 0;
12554 else
12555 return 1;
12556}
12557
12558_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012559if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012560 ac_cv_mixed_endian_double=yes
12561else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012563fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12565 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012566fi
12567
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012568fi
12569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12571$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012572if test "$ac_cv_mixed_endian_double" = yes
12573then
12574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012575$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012576
12577fi
12578
12579# The short float repr introduced in Python 3.1 requires the
12580# correctly-rounded string <-> double conversion functions from
12581# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12582# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012583# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012584# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012585
12586# This inline assembler syntax may also work for suncc and icc,
12587# so we try it on all platforms.
12588
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12590$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012592/* end confdefs.h. */
12593
12594int
12595main ()
12596{
12597
Mark Dickinsona548dee2009-11-15 13:12:43 +000012598 unsigned short cw;
12599 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12600 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012601
12602 ;
12603 return 0;
12604}
12605_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012606if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012607 have_gcc_asm_for_x87=yes
12608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012609 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012610fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12613$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012614if test "$have_gcc_asm_for_x87" = yes
12615then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012616
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012617$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012618
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012619fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012620
Mark Dickinson04b27232009-01-04 12:29:36 +000012621# Detect whether system arithmetic is subject to x87-style double
12622# rounding issues. The result of this test has little meaning on non
12623# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12624# mode is round-to-nearest and double rounding issues are present, and
12625# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12627$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012628# $BASECFLAGS may affect the result
12629ac_save_cc="$CC"
12630CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012632 ac_cv_x87_double_rounding=no
12633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012635/* end confdefs.h. */
12636
12637#include <stdlib.h>
12638#include <math.h>
12639int main() {
12640 volatile double x, y, z;
12641 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12642 x = 0.99999999999999989; /* 1-2**-53 */
12643 y = 1./x;
12644 if (y != 1.)
12645 exit(0);
12646 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12647 x = 1e16;
12648 y = 2.99999;
12649 z = x + y;
12650 if (z != 1e16+4.)
12651 exit(0);
12652 /* both tests show evidence of double rounding */
12653 exit(1);
12654}
12655
12656_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012658 ac_cv_x87_double_rounding=no
12659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012660 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012661fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012664fi
12665
Mark Dickinson99abd142009-10-24 13:44:16 +000012666CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12668$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012669if test "$ac_cv_x87_double_rounding" = yes
12670then
12671
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012672$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012673
12674fi
12675
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012676# ************************************
12677# * Check for mathematical functions *
12678# ************************************
12679
12680LIBS_SAVE=$LIBS
12681LIBS="$LIBS $LIBM"
12682
Mark Dickinson265d7382008-04-21 22:32:24 +000012683# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12684# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12686$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012687if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012688 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012689else
12690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012691if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012692 ac_cv_tanh_preserves_zero_sign=no
12693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012695/* end confdefs.h. */
12696
12697#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012698#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012699int main() {
12700 /* return 0 if either negative zeros don't exist
12701 on this platform or if negative zeros exist
12702 and tanh(-0.) == -0. */
12703 if (atan2(0., -1.) == atan2(-0., -1.) ||
12704 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12705 else exit(1);
12706}
12707
12708_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012709if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012710 ac_cv_tanh_preserves_zero_sign=yes
12711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012712 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012713fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012716fi
12717
Mark Dickinson265d7382008-04-21 22:32:24 +000012718fi
12719
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12721$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012722if test "$ac_cv_tanh_preserves_zero_sign" = yes
12723then
12724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012726
12727fi
12728
Mark Dickinson65898e02009-09-05 10:27:00 +000012729for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012730do :
12731 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12732ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012733if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012734 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012735#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012736_ACEOF
12737
12738fi
12739done
12740
Mark Dickinson65898e02009-09-05 10:27:00 +000012741for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012742do :
12743 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12744ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012745if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012746 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012747#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012748_ACEOF
12749
12750fi
12751done
12752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12754"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012755if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012756 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012758 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012759fi
12760
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012761cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012762#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012764ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12765"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012766if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012767 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012769 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012770fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012771
12772cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012774_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012775ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12776"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012777if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012778 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012780 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012781fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012782
12783cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012785_ACEOF
12786
12787
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012788LIBS=$LIBS_SAVE
12789
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012790# For multiprocessing module, check that sem_open
12791# actually works. For FreeBSD versions <= 7.2,
12792# the kernel module that provides POSIX semaphores
12793# isn't loaded by default, so an attempt to call
12794# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12796$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012797if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012798 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012801 ac_cv_posix_semaphores_enabled=yes
12802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012804/* end confdefs.h. */
12805
12806#include <unistd.h>
12807#include <fcntl.h>
12808#include <stdio.h>
12809#include <semaphore.h>
12810#include <sys/stat.h>
12811
12812int main(void) {
12813 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12814 if (a == SEM_FAILED) {
12815 perror("sem_open");
12816 return 1;
12817 }
12818 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012819 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012820 return 0;
12821}
12822
12823_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012825 ac_cv_posix_semaphores_enabled=yes
12826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012831fi
12832
12833
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012834fi
12835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12837$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012838if test $ac_cv_posix_semaphores_enabled = no
12839then
12840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012841$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012842
12843fi
12844
12845# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12847$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012848if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012849 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012851 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012852 ac_cv_broken_sem_getvalue=yes
12853else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012855/* end confdefs.h. */
12856
12857#include <unistd.h>
12858#include <fcntl.h>
12859#include <stdio.h>
12860#include <semaphore.h>
12861#include <sys/stat.h>
12862
12863int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012864 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012865 int count;
12866 int res;
12867 if(a==SEM_FAILED){
12868 perror("sem_open");
12869 return 1;
12870
12871 }
12872 res = sem_getvalue(a, &count);
12873 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012874 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012875 return res==-1 ? 1 : 0;
12876}
12877
12878_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012879if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012880 ac_cv_broken_sem_getvalue=no
12881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012882 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012883fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012886fi
12887
12888
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012889fi
12890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12892$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012893if test $ac_cv_broken_sem_getvalue = yes
12894then
12895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012897
12898fi
12899
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012900# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12902$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012903# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012904if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012905 enableval=$enable_big_digits; case $enable_big_digits in
12906yes)
12907 enable_big_digits=30 ;;
12908no)
12909 enable_big_digits=15 ;;
1291015|30)
12911 ;;
12912*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012913 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012914esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12916$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012917
12918cat >>confdefs.h <<_ACEOF
12919#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12920_ACEOF
12921
12922
12923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12925$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012926fi
12927
12928
Guido van Rossumef2255b2000-03-10 22:30:29 +000012929# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012930ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012931if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
12933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012935
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012936 wchar_h="yes"
12937
Guido van Rossumef2255b2000-03-10 22:30:29 +000012938else
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012940
12941fi
12942
Michael W. Hudson54241132001-12-07 15:38:26 +000012943
Martin v. Löwis11437992002-04-12 09:54:03 +000012944
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012945# determine wchar_t size
12946if test "$wchar_h" = yes
12947then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012948 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12951# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12953$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012954if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012957 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12958"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012959
Martin v. Löwis11437992002-04-12 09:54:03 +000012960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012961 if test "$ac_cv_type_wchar_t" = yes; then
12962 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012964as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012965See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012966 else
12967 ac_cv_sizeof_wchar_t=0
12968 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970
Martin v. Löwis11437992002-04-12 09:54:03 +000012971fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12973$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012974
12975
12976
Martin v. Löwis11437992002-04-12 09:54:03 +000012977cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012978#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012979_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012980
Michael W. Hudson54241132001-12-07 15:38:26 +000012981
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012982fi
12983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12985$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012986have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012988/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012989
12990#include <tcl.h>
12991#if TCL_UTF_MAX != 6
12992# error "NOT UCS4_TCL"
12993#endif
12994int
12995main ()
12996{
12997
12998 ;
12999 return 0;
13000}
13001_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013003
13004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013006
13007 have_ucs4_tcl=yes
13008
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13012$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013013
Skip Montanaro6dead952003-09-25 14:50:04 +000013014# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013015if test "$wchar_h" = yes
13016then
13017 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13019$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013020 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013022else
13023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013025 ac_cv_wchar_t_signed=yes
13026else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013029
13030 #include <wchar.h>
13031 int main()
13032 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013033 /* Success: exit code 0 */
13034 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013035 }
13036
13037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013038if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013039 ac_cv_wchar_t_signed=yes
13040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013041 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013045fi
13046
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013047fi
13048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13050$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013051fi
13052
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13054$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013055# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013056if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013057 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013058else
13059 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013060fi
13061
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013062
13063if test $enable_unicode = yes
13064then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013065 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013066 case "$have_ucs4_tcl" in
13067 yes) enable_unicode="ucs4"
13068 ;;
13069 *) enable_unicode="ucs2"
13070 ;;
13071 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013072fi
13073
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013074
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013075case "$enable_unicode" in
13076ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013077 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013078
13079 ;;
13080ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013081 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013082
13083 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013084no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013085*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013086esac
13087
Michael W. Hudson54241132001-12-07 15:38:26 +000013088
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
13090
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013091if test "$enable_unicode" = "no"
13092then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013093 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13095$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013096else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013097 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013099$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013100
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013101
13102 # wchar_t is only usable if it maps to an unsigned type
13103 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013104 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013105 then
13106 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013110 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013111
13112 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13113 then
13114 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013116
13117 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13118 then
13119 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013121
13122 else
13123 PY_UNICODE_TYPE="no type found"
13124 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13126$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013127fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013128
13129# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13131$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013132if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013135 ac_cv_c_bigendian=unknown
13136 # See if we're dealing with a universal compiler.
13137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13138/* end confdefs.h. */
13139#ifndef __APPLE_CC__
13140 not a universal capable compiler
13141 #endif
13142 typedef int dummy;
13143
Skip Montanaro6dead952003-09-25 14:50:04 +000013144_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013145if ac_fn_c_try_compile "$LINENO"; then :
13146
13147 # Check for potential -arch flags. It is not universal unless
13148 # there are at least two -arch flags with different values.
13149 ac_arch=
13150 ac_prev=
13151 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13152 if test -n "$ac_prev"; then
13153 case $ac_word in
13154 i?86 | x86_64 | ppc | ppc64)
13155 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13156 ac_arch=$ac_word
13157 else
13158 ac_cv_c_bigendian=universal
13159 break
13160 fi
13161 ;;
13162 esac
13163 ac_prev=
13164 elif test "x$ac_word" = "x-arch"; then
13165 ac_prev=arch
13166 fi
13167 done
13168fi
13169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13170 if test $ac_cv_c_bigendian = unknown; then
13171 # See if sys/param.h defines the BYTE_ORDER macro.
13172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013173/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013174#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013176
Martin v. Löwis11437992002-04-12 09:54:03 +000013177int
13178main ()
13179{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013180#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13181 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13182 && LITTLE_ENDIAN)
13183 bogus endian macros
13184 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013185
13186 ;
13187 return 0;
13188}
13189_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013190if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013191 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013193/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013194#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013196
Martin v. Löwis11437992002-04-12 09:54:03 +000013197int
13198main ()
13199{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013200#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201 not big endian
13202 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013203
13204 ;
13205 return 0;
13206}
13207_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013208if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013209 ac_cv_c_bigendian=yes
13210else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013211 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214fi
13215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13216 fi
13217 if test $ac_cv_c_bigendian = unknown; then
13218 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013220/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013221#include <limits.h>
13222
Martin v. Löwis11437992002-04-12 09:54:03 +000013223int
13224main ()
13225{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013226#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13227 bogus endian macros
13228 #endif
13229
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 ;
13231 return 0;
13232}
13233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234if ac_fn_c_try_compile "$LINENO"; then :
13235 # It does; now see whether it defined to _BIG_ENDIAN or not.
13236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13237/* end confdefs.h. */
13238#include <limits.h>
13239
13240int
13241main ()
13242{
13243#ifndef _BIG_ENDIAN
13244 not big endian
13245 #endif
13246
13247 ;
13248 return 0;
13249}
13250_ACEOF
13251if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013253else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013255fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13257fi
13258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13259 fi
13260 if test $ac_cv_c_bigendian = unknown; then
13261 # Compile a test program.
13262 if test "$cross_compiling" = yes; then :
13263 # Try to guess by grepping values from an object file.
13264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13265/* end confdefs.h. */
13266short int ascii_mm[] =
13267 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13268 short int ascii_ii[] =
13269 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13270 int use_ascii (int i) {
13271 return ascii_mm[i] + ascii_ii[i];
13272 }
13273 short int ebcdic_ii[] =
13274 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13275 short int ebcdic_mm[] =
13276 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13277 int use_ebcdic (int i) {
13278 return ebcdic_mm[i] + ebcdic_ii[i];
13279 }
13280 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013282int
13283main ()
13284{
13285return use_ascii (foo) == use_ebcdic (foo);
13286 ;
13287 return 0;
13288}
13289_ACEOF
13290if ac_fn_c_try_compile "$LINENO"; then :
13291 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13292 ac_cv_c_bigendian=yes
13293 fi
13294 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13295 if test "$ac_cv_c_bigendian" = unknown; then
13296 ac_cv_c_bigendian=no
13297 else
13298 # finding both strings is unlikely to happen, but who knows?
13299 ac_cv_c_bigendian=unknown
13300 fi
13301 fi
13302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013306/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013307$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013308int
13309main ()
13310{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013312 /* Are we little or big endian? From Harbison&Steele. */
13313 union
13314 {
13315 long int l;
13316 char c[sizeof (long int)];
13317 } u;
13318 u.l = 1;
13319 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013320
13321 ;
13322 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013323}
Martin v. Löwis11437992002-04-12 09:54:03 +000013324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013325if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013326 ac_cv_c_bigendian=no
13327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013328 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013329fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13331 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013334 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013335fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13337$as_echo "$ac_cv_c_bigendian" >&6; }
13338 case $ac_cv_c_bigendian in #(
13339 yes)
13340 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13341;; #(
13342 no)
13343 ;; #(
13344 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013345
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013346$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013347
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013348 ;; #(
13349 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013350 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013351 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013352 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013353
Michael W. Hudson54241132001-12-07 15:38:26 +000013354
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013355# Check whether right shifting a negative integer extends the sign bit
13356# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13358$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013359if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013360 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013361else
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013363if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013364 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013367/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013368
13369int main()
13370{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013371 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013372}
13373
Martin v. Löwis11437992002-04-12 09:54:03 +000013374_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013375if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013376 ac_cv_rshift_extends_sign=yes
13377else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013378 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013379fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13381 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013382fi
13383
Martin v. Löwiseba40652007-08-30 20:10:57 +000013384fi
13385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13387$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013388if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013389then
Martin v. Löwis11437992002-04-12 09:54:03 +000013390
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013391$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013392
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013393fi
13394
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013395# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13397$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013398if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013400else
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013403/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013404#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013405int
13406main ()
13407{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013408
13409 FILE *f = fopen("/dev/null", "r");
13410 flockfile(f);
13411 getc_unlocked(f);
13412 funlockfile(f);
13413
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 ;
13415 return 0;
13416}
13417_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013419 ac_cv_have_getc_unlocked=yes
13420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013421 ac_cv_have_getc_unlocked=no
13422fi
13423rm -f core conftest.err conftest.$ac_objext \
13424 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13428$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013429if test "$ac_cv_have_getc_unlocked" = yes
13430then
Martin v. Löwis11437992002-04-12 09:54:03 +000013431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013433
13434fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013435
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013436# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013437# save the value of LIBS so we don't actually link Python with readline
13438LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013439
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013440# On some systems we need to link readline to a termcap compatible
13441# library. NOTE: Keep the precedence of listed libraries synchronised
13442# with setup.py.
13443py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13445$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013446for py_libtermcap in "" ncursesw ncurses curses termcap; do
13447 if test -z "$py_libtermcap"; then
13448 READLINE_LIBS="-lreadline"
13449 else
13450 READLINE_LIBS="-lreadline -l$py_libtermcap"
13451 fi
13452 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013454/* end confdefs.h. */
13455
Martin v. Löwiseba40652007-08-30 20:10:57 +000013456/* Override any GCC internal prototype to avoid an error.
13457 Use char because int might match the return type of a GCC
13458 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013459#ifdef __cplusplus
13460extern "C"
13461#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013462char readline ();
13463int
13464main ()
13465{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013467 ;
13468 return 0;
13469}
13470_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013472 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474rm -f core conftest.err conftest.$ac_objext \
13475 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013476 if test $py_cv_lib_readline = yes; then
13477 break
13478 fi
13479done
13480# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13481#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013482if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13484$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013485else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13487$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013488
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013489$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013490
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013491fi
13492
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013493# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13495$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013496if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013497 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013498else
13499 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013500LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013502/* end confdefs.h. */
13503
Martin v. Löwiseba40652007-08-30 20:10:57 +000013504/* Override any GCC internal prototype to avoid an error.
13505 Use char because int might match the return type of a GCC
13506 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013507#ifdef __cplusplus
13508extern "C"
13509#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013510char rl_callback_handler_install ();
13511int
13512main ()
13513{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013514return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013515 ;
13516 return 0;
13517}
13518_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013519if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013520 ac_cv_lib_readline_rl_callback_handler_install=yes
13521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013522 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524rm -f core conftest.err conftest.$ac_objext \
13525 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013526LIBS=$ac_check_lib_save_LIBS
13527fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13529$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013530if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013532$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013533
13534fi
13535
13536
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013537# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013539/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013540#include <readline/readline.h>
13541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013543 have_readline=yes
13544else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013545 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013546
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013547fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013548rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013549if test $have_readline = yes
13550then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013552/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013553#include <readline/readline.h>
13554
13555_ACEOF
13556if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013559$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013560
13561fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013562rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013563
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013565/* end confdefs.h. */
13566#include <readline/readline.h>
13567
13568_ACEOF
13569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013570 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013572$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013573
13574fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013575rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013576
13577fi
13578
Martin v. Löwis0daad592001-09-30 21:09:59 +000013579# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13581$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013582if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013584else
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013586LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013589
Martin v. Löwiseba40652007-08-30 20:10:57 +000013590/* Override any GCC internal prototype to avoid an error.
13591 Use char because int might match the return type of a GCC
13592 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013593#ifdef __cplusplus
13594extern "C"
13595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013596char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013597int
13598main ()
13599{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013600return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013601 ;
13602 return 0;
13603}
13604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013606 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013608 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013609fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610rm -f core conftest.err conftest.$ac_objext \
13611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013612LIBS=$ac_check_lib_save_LIBS
13613fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13615$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013616if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013618$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013619
Martin v. Löwis0daad592001-09-30 21:09:59 +000013620fi
13621
Michael W. Hudson54241132001-12-07 15:38:26 +000013622
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013623# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13625$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013626if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013628else
13629 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013630LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013632/* end confdefs.h. */
13633
13634/* Override any GCC internal prototype to avoid an error.
13635 Use char because int might match the return type of a GCC
13636 builtin and then its argument prototype would still apply. */
13637#ifdef __cplusplus
13638extern "C"
13639#endif
13640char rl_completion_display_matches_hook ();
13641int
13642main ()
13643{
13644return rl_completion_display_matches_hook ();
13645 ;
13646 return 0;
13647}
13648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013650 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013652 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013653fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654rm -f core conftest.err conftest.$ac_objext \
13655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013656LIBS=$ac_check_lib_save_LIBS
13657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13659$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013660if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013662$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013663
13664fi
13665
13666
Martin v. Löwis0daad592001-09-30 21:09:59 +000013667# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13669$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013670if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013672else
Martin v. Löwis11437992002-04-12 09:54:03 +000013673 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013674LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
Martin v. Löwiseba40652007-08-30 20:10:57 +000013678/* Override any GCC internal prototype to avoid an error.
13679 Use char because int might match the return type of a GCC
13680 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013681#ifdef __cplusplus
13682extern "C"
13683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013684char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013685int
13686main ()
13687{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013688return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 ;
13690 return 0;
13691}
13692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013696 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013698rm -f core conftest.err conftest.$ac_objext \
13699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013700LIBS=$ac_check_lib_save_LIBS
13701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13703$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013704if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013706$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013707
Guido van Rossum353ae582001-07-10 16:45:32 +000013708fi
13709
Jack Jansendd19cf82001-12-06 22:36:17 +000013710
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013711# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013713/* end confdefs.h. */
13714#include <readline/readline.h>
13715_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013716if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013717 have_readline=yes
13718else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013719 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013720
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013721fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013722rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013723if test $have_readline = yes
13724then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013726/* end confdefs.h. */
13727#include <readline/readline.h>
13728
13729_ACEOF
13730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013731 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013733$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013734
13735fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013736rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013737
13738fi
13739
Martin v. Löwis82bca632006-02-10 20:49:30 +000013740# End of readline checks: restore LIBS
13741LIBS=$LIBS_no_readline
13742
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13744$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013745if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013747else
Martin v. Löwis11437992002-04-12 09:54:03 +000013748
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013749if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013750 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013753/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013754
13755int main()
13756{
13757 int val1 = nice(1);
13758 if (val1 != -1 && val1 == nice(2))
13759 exit(0);
13760 exit(1);
13761}
13762
Martin v. Löwis11437992002-04-12 09:54:03 +000013763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013764if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013765 ac_cv_broken_nice=yes
13766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013767 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013771fi
13772
Martin v. Löwiseba40652007-08-30 20:10:57 +000013773fi
13774
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13776$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013777if test "$ac_cv_broken_nice" = yes
13778then
Martin v. Löwis11437992002-04-12 09:54:03 +000013779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013780$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013781
13782fi
13783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13785$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013786if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013787 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013789 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013790 ac_cv_broken_poll=no
13791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013793/* end confdefs.h. */
13794
13795#include <poll.h>
13796
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013797int main()
13798{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013799 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013800 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013801
13802 close (42);
13803
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013804 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013805 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013806 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013807 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013808 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013809 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013810 return 1;
13811}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013812
13813_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013814if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013815 ac_cv_broken_poll=yes
13816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013817 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013818fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13820 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013822
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013823fi
13824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13826$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013827if test "$ac_cv_broken_poll" = yes
13828then
13829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013830$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013831
13832fi
13833
Brett Cannon43802422005-02-10 20:48:03 +000013834# 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 +000013835# (which is not required by ISO C or UNIX spec) and/or if we support
13836# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837ac_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 +000013838#include <$ac_cv_struct_tm>
13839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013841if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013842
13843cat >>confdefs.h <<_ACEOF
13844#define HAVE_STRUCT_TM_TM_ZONE 1
13845_ACEOF
13846
13847
13848fi
13849
13850if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013852$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013853
13854else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013855 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13856"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013857if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013858 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013860 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013861fi
13862
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013864#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013865_ACEOF
13866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13868$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013869if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013871else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013873/* end confdefs.h. */
13874#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875#if !HAVE_DECL_TZNAME
13876extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013877#endif
13878
13879int
13880main ()
13881{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013882return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013883 ;
13884 return 0;
13885}
13886_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013887if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013888 ac_cv_var_tzname=yes
13889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013890 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013891fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013892rm -f core conftest.err conftest.$ac_objext \
13893 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13896$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013897 if test $ac_cv_var_tzname = yes; then
13898
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013899$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013900
13901 fi
13902fi
13903
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013904
Martin v. Löwis1d459062005-03-14 21:23:33 +000013905# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13907$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013908if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013909 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013910else
13911
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013912if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013913 ac_cv_working_tzset=no
13914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013916/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013917
13918#include <stdlib.h>
13919#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013920#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013921
13922#if HAVE_TZNAME
13923extern char *tzname[];
13924#endif
13925
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013926int main()
13927{
Brett Cannon18367812003-09-19 00:59:16 +000013928 /* Note that we need to ensure that not only does tzset(3)
13929 do 'something' with localtime, but it works as documented
13930 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013931 This includes making sure that tzname is set properly if
13932 tm->tm_zone does not exist since it is the alternative way
13933 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013934
13935 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013936 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013937 */
13938
Martin v. Löwis1d459062005-03-14 21:23:33 +000013939 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013940 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13941
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013942 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013943 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013944 if (localtime(&groundhogday)->tm_hour != 0)
13945 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013946#if HAVE_TZNAME
13947 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13948 if (strcmp(tzname[0], "UTC") ||
13949 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13950 exit(1);
13951#endif
Brett Cannon18367812003-09-19 00:59:16 +000013952
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013953 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013954 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013955 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013956 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013957#if HAVE_TZNAME
13958 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13959 exit(1);
13960#endif
Brett Cannon18367812003-09-19 00:59:16 +000013961
13962 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13963 tzset();
13964 if (localtime(&groundhogday)->tm_hour != 11)
13965 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013966#if HAVE_TZNAME
13967 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13968 exit(1);
13969#endif
13970
13971#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013972 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13973 exit(1);
13974 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13975 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013976#endif
Brett Cannon18367812003-09-19 00:59:16 +000013977
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013978 exit(0);
13979}
13980
13981_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013982if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013983 ac_cv_working_tzset=yes
13984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013985 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013986fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013989fi
13990
Martin v. Löwiseba40652007-08-30 20:10:57 +000013991fi
13992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13994$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013995if test "$ac_cv_working_tzset" = yes
13996then
13997
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013999
14000fi
14001
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014002# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14004$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014005if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014006 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014009/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014010#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014011int
14012main ()
14013{
14014
14015struct stat st;
14016st.st_mtim.tv_nsec = 1;
14017
14018 ;
14019 return 0;
14020}
14021_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014022if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014023 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014025 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14028fi
14029
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14031$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014032if test "$ac_cv_stat_tv_nsec" = yes
14033then
14034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014035$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014036
14037fi
14038
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014039# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14041$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014042if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014043 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014044else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014046/* end confdefs.h. */
14047#include <sys/stat.h>
14048int
14049main ()
14050{
14051
14052struct stat st;
14053st.st_mtimespec.tv_nsec = 1;
14054
14055 ;
14056 return 0;
14057}
14058_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014059if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014060 ac_cv_stat_tv_nsec2=yes
14061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014062 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14065fi
14066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14068$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014069if test "$ac_cv_stat_tv_nsec2" = yes
14070then
14071
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014072$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014073
14074fi
14075
Jack Jansen666b1e72001-10-31 12:11:48 +000014076# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14078$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014079if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014080 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014083/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014084#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014085int
14086main ()
14087{
Jack Jansen666b1e72001-10-31 12:11:48 +000014088
14089 int rtn;
14090 rtn = mvwdelch(0,0,0);
14091
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 ;
14093 return 0;
14094}
14095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014097 ac_cv_mvwdelch_is_expression=yes
14098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14102fi
14103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14105$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014106
14107if test "$ac_cv_mvwdelch_is_expression" = yes
14108then
Martin v. Löwis11437992002-04-12 09:54:03 +000014109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014110$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014111
14112fi
14113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14115$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014116if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014117 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014118else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014120/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014121#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014122int
14123main ()
14124{
Jack Jansen666b1e72001-10-31 12:11:48 +000014125
14126 WINDOW *w;
14127 w->_flags = 0;
14128
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 ;
14130 return 0;
14131}
14132_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014133if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014134 ac_cv_window_has_flags=yes
14135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014136 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14139fi
14140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14142$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014143
Jack Jansen666b1e72001-10-31 12:11:48 +000014144
14145if test "$ac_cv_window_has_flags" = yes
14146then
Martin v. Löwis11437992002-04-12 09:54:03 +000014147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014148$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014149
14150fi
14151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14153$as_echo_n "checking for is_term_resized... " >&6; }
14154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014155/* end confdefs.h. */
14156#include <curses.h>
14157int
14158main ()
14159{
14160void *x=is_term_resized
14161 ;
14162 return 0;
14163}
14164_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014165if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014167$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014168
Matthias Klosec511b472010-05-08 11:01:39 +000014169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014170$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14173$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014174
14175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14179$as_echo_n "checking for resize_term... " >&6; }
14180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014181/* end confdefs.h. */
14182#include <curses.h>
14183int
14184main ()
14185{
14186void *x=resize_term
14187 ;
14188 return 0;
14189}
14190_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014191if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014194
Matthias Klosec511b472010-05-08 11:01:39 +000014195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14199$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014200
14201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14205$as_echo_n "checking for resizeterm... " >&6; }
14206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014207/* end confdefs.h. */
14208#include <curses.h>
14209int
14210main ()
14211{
14212void *x=resizeterm
14213 ;
14214 return 0;
14215}
14216_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014219$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014220
Matthias Klosec511b472010-05-08 11:01:39 +000014221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014222$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14225$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014226
14227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14229
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14231$as_echo "$as_me: checking for device files" >&6;}
14232
14233if test "x$cross_compiling" = xyes; then
14234 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14236$as_echo_n "checking for /dev/ptmx... " >&6; }
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14238$as_echo "not set" >&6; }
14239 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14240 fi
14241 if test "${ac_cv_file__dev_ptc+set}" != set; then
14242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14243$as_echo_n "checking for /dev/ptc... " >&6; }
14244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14245$as_echo "not set" >&6; }
14246 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14247 fi
14248fi
14249
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14251$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014252if ${ac_cv_file__dev_ptmx+:} false; then :
14253 $as_echo_n "(cached) " >&6
14254else
14255 test "$cross_compiling" = yes &&
14256 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14257if test -r "/dev/ptmx"; then
14258 ac_cv_file__dev_ptmx=yes
14259else
14260 ac_cv_file__dev_ptmx=no
14261fi
14262fi
14263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14264$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14265if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014266
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014267fi
14268
14269if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014272
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14275$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014276if ${ac_cv_file__dev_ptc+:} false; then :
14277 $as_echo_n "(cached) " >&6
14278else
14279 test "$cross_compiling" = yes &&
14280 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14281if test -r "/dev/ptc"; then
14282 ac_cv_file__dev_ptc=yes
14283else
14284 ac_cv_file__dev_ptc=no
14285fi
14286fi
14287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14288$as_echo "$ac_cv_file__dev_ptc" >&6; }
14289if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014290
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014291fi
14292
14293if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014295$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014296
Neal Norwitz865400f2003-03-21 01:42:58 +000014297fi
14298
Mark Dickinson82864d12009-11-15 16:18:58 +000014299if test "$have_long_long" = yes
14300then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14302$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014303 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014304 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014305else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014306 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014307 ac_cv_have_long_long_format="cross -- assuming no"
14308 if test x$GCC = xyes; then
14309 save_CFLAGS=$CFLAGS
14310 CFLAGS="$CFLAGS -Werror -Wformat"
14311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14312/* end confdefs.h. */
14313
14314 #include <stdio.h>
14315 #include <stddef.h>
14316
14317int
14318main ()
14319{
14320
14321 char *buffer;
14322 sprintf(buffer, "%lld", (long long)123);
14323 sprintf(buffer, "%lld", (long long)-123);
14324 sprintf(buffer, "%llu", (unsigned long long)123);
14325
14326 ;
14327 return 0;
14328}
14329_ACEOF
14330if ac_fn_c_try_compile "$LINENO"; then :
14331 ac_cv_have_long_long_format=yes
14332
14333fi
14334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14335 CFLAGS=$save_CFLAGS
14336 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014339/* end confdefs.h. */
14340
14341 #include <stdio.h>
14342 #include <stddef.h>
14343 #include <string.h>
14344
14345 #ifdef HAVE_SYS_TYPES_H
14346 #include <sys/types.h>
14347 #endif
14348
14349 int main()
14350 {
14351 char buffer[256];
14352
14353 if (sprintf(buffer, "%lld", (long long)123) < 0)
14354 return 1;
14355 if (strcmp(buffer, "123"))
14356 return 1;
14357
14358 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14359 return 1;
14360 if (strcmp(buffer, "-123"))
14361 return 1;
14362
14363 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14364 return 1;
14365 if (strcmp(buffer, "123"))
14366 return 1;
14367
14368 return 0;
14369 }
14370
14371_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014372if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014373 ac_cv_have_long_long_format=yes
14374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014375 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014376fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14378 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014379fi
14380
14381
Mark Dickinson82864d12009-11-15 16:18:58 +000014382fi
14383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14385$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014386fi
14387
Mark Dickinson5ce84742009-12-31 20:48:04 +000014388if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014389then
14390
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014391$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014392
14393fi
14394
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014395if test $ac_sys_system = Darwin
14396then
14397 LIBS="$LIBS -framework CoreFoundation"
14398fi
14399
Mark Dickinson82864d12009-11-15 16:18:58 +000014400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14402$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014403if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014404 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014407 ac_cv_have_size_t_format="cross -- assuming yes"
14408
Brett Cannon09d12362006-05-11 05:11:33 +000014409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014411/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014412
Brett Cannon09d12362006-05-11 05:11:33 +000014413#include <stdio.h>
14414#include <stddef.h>
14415#include <string.h>
14416
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014417#ifdef HAVE_SYS_TYPES_H
14418#include <sys/types.h>
14419#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014420
14421#ifdef HAVE_SSIZE_T
14422typedef ssize_t Py_ssize_t;
14423#elif SIZEOF_VOID_P == SIZEOF_LONG
14424typedef long Py_ssize_t;
14425#else
14426typedef int Py_ssize_t;
14427#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014428
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014429int main()
14430{
14431 char buffer[256];
14432
Brett Cannon09d12362006-05-11 05:11:33 +000014433 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14434 return 1;
14435
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014436 if (strcmp(buffer, "123"))
14437 return 1;
14438
14439 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14440 return 1;
14441
14442 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014443 return 1;
14444
14445 return 0;
14446}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014447
Brett Cannon09d12362006-05-11 05:11:33 +000014448_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014449if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014450 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014451else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014452 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014453fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14455 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014456fi
14457
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014458fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14460$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014461if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014463$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014464
14465fi
14466
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014467ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014468#ifdef HAVE_SYS_TYPES_H
14469#include <sys/types.h>
14470#endif
14471#ifdef HAVE_SYS_SOCKET_H
14472#include <sys/socket.h>
14473#endif
14474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014475"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014476if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014477
Martin v. Löwis11437992002-04-12 09:54:03 +000014478else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014481
14482fi
14483
Michael W. Hudson54241132001-12-07 15:38:26 +000014484
Benjamin Peterson7497e912010-10-16 00:53:39 +000014485case $ac_sys_system in
14486AIX*)
14487
14488$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14489 ;;
14490esac
14491
14492
Michael W. Hudson54241132001-12-07 15:38:26 +000014493
14494
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014495for h in `(cd $srcdir;echo Python/thread_*.h)`
14496do
14497 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14498done
14499
Michael W. Hudson54241132001-12-07 15:38:26 +000014500
Neal Norwitzd24499d2005-12-18 21:36:39 +000014501SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14503$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014504for dir in $SRCDIRS; do
14505 if test ! -d $dir; then
14506 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014507 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014508done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14510$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014511
Guido van Rossum627b2d71993-12-24 10:39:16 +000014512# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014513ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014514
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014515ac_config_files="$ac_config_files Modules/ld_so_aix"
14516
Martin v. Löwis11437992002-04-12 09:54:03 +000014517cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014518# This file is a shell script that caches the results of configure
14519# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014520# scripts and configure runs, see configure's option --config-cache.
14521# It is not useful on other systems. If it contains results you don't
14522# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014523#
Martin v. Löwis11437992002-04-12 09:54:03 +000014524# config.status only pays attention to the cache file if you give it
14525# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014526#
Skip Montanaro6dead952003-09-25 14:50:04 +000014527# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014528# loading this file, other *unset* `ac_cv_foo' will be assigned the
14529# following values.
14530
14531_ACEOF
14532
Guido van Rossumf78abae1997-01-21 22:02:36 +000014533# The following way of writing the cache mishandles newlines in values,
14534# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014535# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014536# Ultrix sh set writes to stderr and can't be redirected directly,
14537# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014538(
14539 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14540 eval ac_val=\$$ac_var
14541 case $ac_val in #(
14542 *${as_nl}*)
14543 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014544 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14545$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546 esac
14547 case $ac_var in #(
14548 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014549 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14550 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014551 esac ;;
14552 esac
14553 done
14554
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014556 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14557 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558 # `set' does not quote correctly, so add quotes: double-quote
14559 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014561 "s/'/'\\\\''/g;
14562 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014563 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014564 *)
14565 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014566 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014568 esac |
14569 sort
14570) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014572 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014573 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014574 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14576 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014577 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14578 :end' >>confcache
14579if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14580 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014581 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014582 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14583$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014584 if test ! -f "$cache_file" || test -h "$cache_file"; then
14585 cat confcache >"$cache_file"
14586 else
14587 case $cache_file in #(
14588 */* | ?:*)
14589 mv -f confcache "$cache_file"$$ &&
14590 mv -f "$cache_file"$$ "$cache_file" ;; #(
14591 *)
14592 mv -f confcache "$cache_file" ;;
14593 esac
14594 fi
14595 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014596 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014597 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14598$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014599 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014600fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014601rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014602
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014603test "x$prefix" = xNONE && prefix=$ac_default_prefix
14604# Let make expand exec_prefix.
14605test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014606
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014607DEFS=-DHAVE_CONFIG_H
14608
Skip Montanaro6dead952003-09-25 14:50:04 +000014609ac_libobjs=
14610ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014611U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014612for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14613 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014615 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014616 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14617 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014618 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14619 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014620done
14621LIBOBJS=$ac_libobjs
14622
14623LTLIBOBJS=$ac_ltlibobjs
14624
14625
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014627
Matthias Klose3cef2a92012-03-14 23:39:33 +010014628: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014629ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014630ac_clean_files_save=$ac_clean_files
14631ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14633$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14634as_write_fail=0
14635cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014636#! $SHELL
14637# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014638# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014639# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014640# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014641
Martin v. Löwis11437992002-04-12 09:54:03 +000014642debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014643ac_cs_recheck=false
14644ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014646SHELL=\${CONFIG_SHELL-$SHELL}
14647export SHELL
14648_ASEOF
14649cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14650## -------------------- ##
14651## M4sh Initialization. ##
14652## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014653
Martin v. Löwiseba40652007-08-30 20:10:57 +000014654# Be more Bourne compatible
14655DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014656if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 emulate sh
14658 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014659 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014660 # is contrary to our usage. Disable this feature.
14661 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014662 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014664 case `(set -o) 2>/dev/null` in #(
14665 *posix*) :
14666 set -o posix ;; #(
14667 *) :
14668 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014670fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014671
Skip Montanaro6dead952003-09-25 14:50:04 +000014672
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014673as_nl='
14674'
14675export as_nl
14676# Printing a long string crashes Solaris 7 /usr/bin/printf.
14677as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14678as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14679as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14680# Prefer a ksh shell builtin over an external printf program on Solaris,
14681# but without wasting forks for bash or zsh.
14682if test -z "$BASH_VERSION$ZSH_VERSION" \
14683 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14684 as_echo='print -r --'
14685 as_echo_n='print -rn --'
14686elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14687 as_echo='printf %s\n'
14688 as_echo_n='printf %s'
14689else
14690 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14691 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14692 as_echo_n='/usr/ucb/echo -n'
14693 else
14694 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14695 as_echo_n_body='eval
14696 arg=$1;
14697 case $arg in #(
14698 *"$as_nl"*)
14699 expr "X$arg" : "X\\(.*\\)$as_nl";
14700 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14701 esac;
14702 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14703 '
14704 export as_echo_n_body
14705 as_echo_n='sh -c $as_echo_n_body as_echo'
14706 fi
14707 export as_echo_body
14708 as_echo='sh -c $as_echo_body as_echo'
14709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014710
14711# The user is always right.
14712if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014713 PATH_SEPARATOR=:
14714 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14715 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14716 PATH_SEPARATOR=';'
14717 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014719
Martin v. Löwiseba40652007-08-30 20:10:57 +000014720
14721# IFS
14722# We need space, tab and new line, in precisely that order. Quoting is
14723# there to prevent editors from complaining about space-tab.
14724# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14725# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726IFS=" "" $as_nl"
14727
14728# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014729as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014730case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014731 *[\\/]* ) as_myself=$0 ;;
14732 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014733for as_dir in $PATH
14734do
14735 IFS=$as_save_IFS
14736 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014737 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14738 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014739IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
Martin v. Löwiseba40652007-08-30 20:10:57 +000014741 ;;
14742esac
14743# We did not find ourselves, most probably we were run as `sh COMMAND'
14744# in which case we are not to be found in the path.
14745if test "x$as_myself" = x; then
14746 as_myself=$0
14747fi
14748if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014749 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14750 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014751fi
14752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014753# Unset variables that we do not need and which cause bugs (e.g. in
14754# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14755# suppresses any "Segmentation fault" message there. '((' could
14756# trigger a bug in pdksh 5.2.14.
14757for as_var in BASH_ENV ENV MAIL MAILPATH
14758do eval test x\${$as_var+set} = xset \
14759 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014760done
14761PS1='$ '
14762PS2='> '
14763PS4='+ '
14764
14765# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014766LC_ALL=C
14767export LC_ALL
14768LANGUAGE=C
14769export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014770
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014771# CDPATH.
14772(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14773
14774
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014775# as_fn_error STATUS ERROR [LINENO LOG_FD]
14776# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014777# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14778# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014779# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014780as_fn_error ()
14781{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014782 as_status=$1; test $as_status -eq 0 && as_status=1
14783 if test "$4"; then
14784 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14785 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014786 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014787 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014788 as_fn_exit $as_status
14789} # as_fn_error
14790
14791
14792# as_fn_set_status STATUS
14793# -----------------------
14794# Set $? to STATUS, without forking.
14795as_fn_set_status ()
14796{
14797 return $1
14798} # as_fn_set_status
14799
14800# as_fn_exit STATUS
14801# -----------------
14802# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14803as_fn_exit ()
14804{
14805 set +e
14806 as_fn_set_status $1
14807 exit $1
14808} # as_fn_exit
14809
14810# as_fn_unset VAR
14811# ---------------
14812# Portably unset VAR.
14813as_fn_unset ()
14814{
14815 { eval $1=; unset $1;}
14816}
14817as_unset=as_fn_unset
14818# as_fn_append VAR VALUE
14819# ----------------------
14820# Append the text in VALUE to the end of the definition contained in VAR. Take
14821# advantage of any shell optimizations that allow amortized linear growth over
14822# repeated appends, instead of the typical quadratic growth present in naive
14823# implementations.
14824if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14825 eval 'as_fn_append ()
14826 {
14827 eval $1+=\$2
14828 }'
14829else
14830 as_fn_append ()
14831 {
14832 eval $1=\$$1\$2
14833 }
14834fi # as_fn_append
14835
14836# as_fn_arith ARG...
14837# ------------------
14838# Perform arithmetic evaluation on the ARGs, and store the result in the
14839# global $as_val. Take advantage of shells that can avoid forks. The arguments
14840# must be portable across $(()) and expr.
14841if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14842 eval 'as_fn_arith ()
14843 {
14844 as_val=$(( $* ))
14845 }'
14846else
14847 as_fn_arith ()
14848 {
14849 as_val=`expr "$@" || test $? -eq 1`
14850 }
14851fi # as_fn_arith
14852
14853
Martin v. Löwiseba40652007-08-30 20:10:57 +000014854if expr a : '\(a\)' >/dev/null 2>&1 &&
14855 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14856 as_expr=expr
14857else
14858 as_expr=false
14859fi
14860
14861if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14862 as_basename=basename
14863else
14864 as_basename=false
14865fi
14866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014867if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14868 as_dirname=dirname
14869else
14870 as_dirname=false
14871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014872
Martin v. Löwiseba40652007-08-30 20:10:57 +000014873as_me=`$as_basename -- "$0" ||
14874$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14875 X"$0" : 'X\(//\)$' \| \
14876 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014877$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014878 sed '/^.*\/\([^/][^/]*\)\/*$/{
14879 s//\1/
14880 q
14881 }
14882 /^X\/\(\/\/\)$/{
14883 s//\1/
14884 q
14885 }
14886 /^X\/\(\/\).*/{
14887 s//\1/
14888 q
14889 }
14890 s/.*/./; q'`
14891
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014892# Avoid depending upon Character Ranges.
14893as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14894as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14895as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14896as_cr_digits='0123456789'
14897as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014898
14899ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014900case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014901-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014902 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014903 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014904 xy) ECHO_C='\c';;
14905 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14906 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014907 esac;;
14908*)
14909 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014910esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014911
Martin v. Löwis11437992002-04-12 09:54:03 +000014912rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913if test -d conf$$.dir; then
14914 rm -f conf$$.dir/conf$$.file
14915else
14916 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014917 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014919if (echo >conf$$.file) 2>/dev/null; then
14920 if ln -s conf$$.file conf$$ 2>/dev/null; then
14921 as_ln_s='ln -s'
14922 # ... but there are two gotchas:
14923 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14924 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014925 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014926 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014927 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014928 elif ln conf$$.file conf$$ 2>/dev/null; then
14929 as_ln_s=ln
14930 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014931 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014932 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014933else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014934 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014936rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14937rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014938
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014939
14940# as_fn_mkdir_p
14941# -------------
14942# Create "$as_dir" as a directory, including parents if necessary.
14943as_fn_mkdir_p ()
14944{
14945
14946 case $as_dir in #(
14947 -*) as_dir=./$as_dir;;
14948 esac
14949 test -d "$as_dir" || eval $as_mkdir_p || {
14950 as_dirs=
14951 while :; do
14952 case $as_dir in #(
14953 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14954 *) as_qdir=$as_dir;;
14955 esac
14956 as_dirs="'$as_qdir' $as_dirs"
14957 as_dir=`$as_dirname -- "$as_dir" ||
14958$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14959 X"$as_dir" : 'X\(//\)[^/]' \| \
14960 X"$as_dir" : 'X\(//\)$' \| \
14961 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14962$as_echo X"$as_dir" |
14963 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14964 s//\1/
14965 q
14966 }
14967 /^X\(\/\/\)[^/].*/{
14968 s//\1/
14969 q
14970 }
14971 /^X\(\/\/\)$/{
14972 s//\1/
14973 q
14974 }
14975 /^X\(\/\).*/{
14976 s//\1/
14977 q
14978 }
14979 s/.*/./; q'`
14980 test -d "$as_dir" && break
14981 done
14982 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014983 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014984
14985
14986} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014987if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014988 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014989else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014990 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014991 as_mkdir_p=false
14992fi
14993
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014994
14995# as_fn_executable_p FILE
14996# -----------------------
14997# Test if FILE is an executable regular file.
14998as_fn_executable_p ()
14999{
15000 test -f "$1" && test -x "$1"
15001} # as_fn_executable_p
15002as_test_x='test -x'
15003as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015004
15005# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015006as_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 +000015007
15008# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015009as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015010
15011
Martin v. Löwis11437992002-04-12 09:54:03 +000015012exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015013## ----------------------------------- ##
15014## Main body of $CONFIG_STATUS script. ##
15015## ----------------------------------- ##
15016_ASEOF
15017test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15020# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015021# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015022# values after options handling.
15023ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015024This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015025generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015026
15027 CONFIG_FILES = $CONFIG_FILES
15028 CONFIG_HEADERS = $CONFIG_HEADERS
15029 CONFIG_LINKS = $CONFIG_LINKS
15030 CONFIG_COMMANDS = $CONFIG_COMMANDS
15031 $ $0 $@
15032
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033on `(hostname || uname -n) 2>/dev/null | sed 1q`
15034"
15035
Martin v. Löwis11437992002-04-12 09:54:03 +000015036_ACEOF
15037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015038case $ac_config_files in *"
15039"*) set x $ac_config_files; shift; ac_config_files=$*;;
15040esac
15041
15042case $ac_config_headers in *"
15043"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15044esac
15045
15046
15047cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015048# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015049config_files="$ac_config_files"
15050config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
Martin v. Löwiseba40652007-08-30 20:10:57 +000015052_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015054cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015055ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015056\`$as_me' instantiates files and other configuration actions
15057from templates according to the current configuration. Unless the files
15058and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015059
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015060Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015061
15062 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015064 --config print configuration, then exit
15065 -q, --quiet, --silent
15066 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 -d, --debug don't remove temporary files
15068 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015069 --file=FILE[:TEMPLATE]
15070 instantiate the configuration file FILE
15071 --header=FILE[:TEMPLATE]
15072 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015073
15074Configuration files:
15075$config_files
15076
15077Configuration headers:
15078$config_headers
15079
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015080Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015081
Martin v. Löwiseba40652007-08-30 20:10:57 +000015082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015083cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15084ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015085ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015086python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015087configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015088 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015089
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015090Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015091This config.status script is free software; the Free Software Foundation
15092gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015093
15094ac_pwd='$ac_pwd'
15095srcdir='$srcdir'
15096INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015097MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015098test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015099_ACEOF
15100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015101cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15102# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015103ac_need_defaults=:
15104while test $# != 0
15105do
15106 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015107 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15109 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015110 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015112 --*=)
15113 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15114 ac_optarg=
15115 ac_shift=:
15116 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015117 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015118 ac_option=$1
15119 ac_optarg=$2
15120 ac_shift=shift
15121 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 esac
15123
Skip Montanaro6dead952003-09-25 14:50:04 +000015124 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015126 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15127 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015129 $as_echo "$ac_cs_version"; exit ;;
15130 --config | --confi | --conf | --con | --co | --c )
15131 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015132 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 debug=: ;;
15134 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015135 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015136 case $ac_optarg in
15137 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015138 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015139 esac
15140 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 ac_need_defaults=false;;
15142 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015143 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015144 case $ac_optarg in
15145 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15146 esac
15147 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015149 --he | --h)
15150 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015151 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015152Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015153 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015154 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015155 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15156 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15157 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015158
15159 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015160 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015161Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015163 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015164 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015165
15166 esac
15167 shift
15168done
15169
Skip Montanaro6dead952003-09-25 14:50:04 +000015170ac_configure_extra_args=
15171
15172if $ac_cs_silent; then
15173 exec 6>/dev/null
15174 ac_configure_extra_args="$ac_configure_extra_args --silent"
15175fi
15176
15177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015178cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015179if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015180 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015181 shift
15182 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15183 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015185 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015186fi
15187
Martin v. Löwis11437992002-04-12 09:54:03 +000015188_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015190exec 5>>config.log
15191{
15192 echo
15193 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15194## Running $as_me. ##
15195_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015196 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015198
Martin v. Löwiseba40652007-08-30 20:10:57 +000015199_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015200cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015202
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015203cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015204
15205# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015206for ac_config_target in $ac_config_targets
15207do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208 case $ac_config_target in
15209 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15210 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15211 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15212 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015213 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15214 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15216 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015217 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015218 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219
Matthias Klose3cef2a92012-03-14 23:39:33 +010015220 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 esac
15222done
15223
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224
Martin v. Löwis11437992002-04-12 09:54:03 +000015225# If the user did not use the arguments to specify the items to instantiate,
15226# then the envvar interface is used. Set only those that are not.
15227# We use the long form for the default assignment because of an extremely
15228# bizarre bug on SunOS 4.1.3.
15229if $ac_need_defaults; then
15230 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15231 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15232fi
15233
Skip Montanaro6dead952003-09-25 14:50:04 +000015234# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015235# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015236# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237# Hook for its removal unless debugging.
15238# Note that there is a small window in which the directory will not be cleaned:
15239# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015240$debug ||
15241{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015242 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015244 : "${ac_tmp:=$tmp}"
15245 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015246' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015247 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015248}
Martin v. Löwis11437992002-04-12 09:54:03 +000015249# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015250
Martin v. Löwis11437992002-04-12 09:54:03 +000015251{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015252 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015253 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015254} ||
15255{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256 tmp=./conf$$-$RANDOM
15257 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015258} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015259ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015261# Set up the scripts for CONFIG_FILES section.
15262# No need to generate them if there are no CONFIG_FILES.
15263# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015264if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015266
15267ac_cr=`echo X | tr X '\015'`
15268# On cygwin, bash can eat \r inside `` if the user requested igncr.
15269# But we know of no other shell where ac_cr would be empty at this
15270# point, so we can use a bashism as a fallback.
15271if test "x$ac_cr" = x; then
15272 eval ac_cr=\$\'\\r\'
15273fi
15274ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15275if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015276 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015277else
15278 ac_cs_awk_cr=$ac_cr
15279fi
15280
Matthias Klose3cef2a92012-03-14 23:39:33 +010015281echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015282_ACEOF
15283
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015285{
15286 echo "cat >conf$$subs.awk <<_ACEOF" &&
15287 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15288 echo "_ACEOF"
15289} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015290 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15291ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015292ac_delim='%!_!# '
15293for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015294 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015295 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015296
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015297 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15298 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015299 break
15300 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015301 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015302 else
15303 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015305done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015308cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015309cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015310_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015311sed -n '
15312h
15313s/^/S["/; s/!.*/"]=/
15314p
15315g
15316s/^[^!]*!//
15317:repl
15318t repl
15319s/'"$ac_delim"'$//
15320t delim
15321:nl
15322h
15323s/\(.\{148\}\)..*/\1/
15324t more1
15325s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15326p
15327n
15328b repl
15329:more1
15330s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15331p
15332g
15333s/.\{148\}//
15334t nl
15335:delim
15336h
15337s/\(.\{148\}\)..*/\1/
15338t more2
15339s/["\\]/\\&/g; s/^/"/; s/$/"/
15340p
15341b
15342:more2
15343s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15344p
15345g
15346s/.\{148\}//
15347t delim
15348' <conf$$subs.awk | sed '
15349/^[^""]/{
15350 N
15351 s/\n//
15352}
15353' >>$CONFIG_STATUS || ac_write_fail=1
15354rm -f conf$$subs.awk
15355cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15356_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015357cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015358 for (key in S) S_is_set[key] = 1
15359 FS = ""
15360
15361}
15362{
15363 line = $ 0
15364 nfields = split(line, field, "@")
15365 substed = 0
15366 len = length(field[1])
15367 for (i = 2; i < nfields; i++) {
15368 key = field[i]
15369 keylen = length(key)
15370 if (S_is_set[key]) {
15371 value = S[key]
15372 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15373 len += length(value) + length(field[++i])
15374 substed = 1
15375 } else
15376 len += 1 + keylen
15377 }
15378
15379 print line
15380}
15381
15382_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015383_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15385if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15386 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15387else
15388 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015389fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015390 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015391_ACEOF
15392
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015393# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15394# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015395# trailing colons and then remove the whole line if VPATH becomes empty
15396# (actually we leave an empty line to preserve line numbers).
15397if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015398 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15399h
15400s///
15401s/^/:/
15402s/[ ]*$/:/
15403s/:\$(srcdir):/:/g
15404s/:\${srcdir}:/:/g
15405s/:@srcdir@:/:/g
15406s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015407s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015408x
15409s/\(=[ ]*\).*/\1/
15410G
15411s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015412s/^[^=]*=[ ]*$//
15413}'
15414fi
15415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015416cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015417fi # test -n "$CONFIG_FILES"
15418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015419# Set up the scripts for CONFIG_HEADERS section.
15420# No need to generate them if there are no CONFIG_HEADERS.
15421# This happens for instance with `./config.status Makefile'.
15422if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015423cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015424BEGIN {
15425_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015427# Transform confdefs.h into an awk script `defines.awk', embedded as
15428# here-document in config.status, that substitutes the proper values into
15429# config.h.in to produce config.h.
15430
15431# Create a delimiter string that does not exist in confdefs.h, to ease
15432# handling of long lines.
15433ac_delim='%!_!# '
15434for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015435 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15436 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015437 break
15438 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015439 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015440 else
15441 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15442 fi
15443done
15444
15445# For the awk script, D is an array of macro values keyed by name,
15446# likewise P contains macro parameters if any. Preserve backslash
15447# newline sequences.
15448
15449ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15450sed -n '
15451s/.\{148\}/&'"$ac_delim"'/g
15452t rset
15453:rset
15454s/^[ ]*#[ ]*define[ ][ ]*/ /
15455t def
15456d
15457:def
15458s/\\$//
15459t bsnl
15460s/["\\]/\\&/g
15461s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15462D["\1"]=" \3"/p
15463s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15464d
15465:bsnl
15466s/["\\]/\\&/g
15467s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15468D["\1"]=" \3\\\\\\n"\\/p
15469t cont
15470s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15471t cont
15472d
15473:cont
15474n
15475s/.\{148\}/&'"$ac_delim"'/g
15476t clear
15477:clear
15478s/\\$//
15479t bsnlc
15480s/["\\]/\\&/g; s/^/"/; s/$/"/p
15481d
15482:bsnlc
15483s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15484b cont
15485' <confdefs.h | sed '
15486s/'"$ac_delim"'/"\\\
15487"/g' >>$CONFIG_STATUS || ac_write_fail=1
15488
15489cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15490 for (key in D) D_is_set[key] = 1
15491 FS = ""
15492}
15493/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15494 line = \$ 0
15495 split(line, arg, " ")
15496 if (arg[1] == "#") {
15497 defundef = arg[2]
15498 mac1 = arg[3]
15499 } else {
15500 defundef = substr(arg[1], 2)
15501 mac1 = arg[2]
15502 }
15503 split(mac1, mac2, "(") #)
15504 macro = mac2[1]
15505 prefix = substr(line, 1, index(line, defundef) - 1)
15506 if (D_is_set[macro]) {
15507 # Preserve the white space surrounding the "#".
15508 print prefix "define", macro P[macro] D[macro]
15509 next
15510 } else {
15511 # Replace #undef with comments. This is necessary, for example,
15512 # in the case of _POSIX_SOURCE, which is predefined and required
15513 # on some systems where configure will not decide to define it.
15514 if (defundef == "undef") {
15515 print "/*", prefix defundef, macro, "*/"
15516 next
15517 }
15518 }
15519}
15520{ print }
15521_ACAWK
15522_ACEOF
15523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015524 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015525fi # test -n "$CONFIG_HEADERS"
15526
15527
15528eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15529shift
15530for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015531do
15532 case $ac_tag in
15533 :[FHLC]) ac_mode=$ac_tag; continue;;
15534 esac
15535 case $ac_mode$ac_tag in
15536 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015537 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015538 :[FH]-) ac_tag=-:-;;
15539 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15540 esac
15541 ac_save_IFS=$IFS
15542 IFS=:
15543 set x $ac_tag
15544 IFS=$ac_save_IFS
15545 shift
15546 ac_file=$1
15547 shift
15548
15549 case $ac_mode in
15550 :L) ac_source=$1;;
15551 :[FH])
15552 ac_file_inputs=
15553 for ac_f
15554 do
15555 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015556 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015557 *) # Look for the file first in the build tree, then in the source tree
15558 # (if the path is not absolute). The absolute path cannot be DOS-style,
15559 # because $ac_f cannot contain `:'.
15560 test -f "$ac_f" ||
15561 case $ac_f in
15562 [\\/$]*) false;;
15563 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15564 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015565 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015566 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015567 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15568 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569 done
15570
15571 # Let's still pretend it is `configure' which instantiates (i.e., don't
15572 # use $as_me), people would be surprised to read:
15573 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015574 configure_input='Generated from '`
15575 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15576 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577 if test x"$ac_file" != x-; then
15578 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015579 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15580$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015581 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015582 # Neutralize special characters interpreted by sed in replacement strings.
15583 case $configure_input in #(
15584 *\&* | *\|* | *\\* )
15585 ac_sed_conf_input=`$as_echo "$configure_input" |
15586 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15587 *) ac_sed_conf_input=$configure_input;;
15588 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589
15590 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015591 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15592 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015593 esac
15594 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015595 esac
15596
Martin v. Löwiseba40652007-08-30 20:10:57 +000015597 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015598$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015599 X"$ac_file" : 'X\(//\)[^/]' \| \
15600 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015601 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015602$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015603 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15604 s//\1/
15605 q
15606 }
15607 /^X\(\/\/\)[^/].*/{
15608 s//\1/
15609 q
15610 }
15611 /^X\(\/\/\)$/{
15612 s//\1/
15613 q
15614 }
15615 /^X\(\/\).*/{
15616 s//\1/
15617 q
15618 }
15619 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015620 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 ac_builddir=.
15622
Martin v. Löwiseba40652007-08-30 20:10:57 +000015623case "$ac_dir" in
15624.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15625*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015626 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015627 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015628 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015629 case $ac_top_builddir_sub in
15630 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15631 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15632 esac ;;
15633esac
15634ac_abs_top_builddir=$ac_pwd
15635ac_abs_builddir=$ac_pwd$ac_dir_suffix
15636# for backward compatibility:
15637ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
15639case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015640 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015642 ac_top_srcdir=$ac_top_builddir_sub
15643 ac_abs_top_srcdir=$ac_pwd ;;
15644 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015645 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015646 ac_top_srcdir=$srcdir
15647 ac_abs_top_srcdir=$srcdir ;;
15648 *) # Relative name.
15649 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15650 ac_top_srcdir=$ac_top_build_prefix$srcdir
15651 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015652esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015653ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015654
Martin v. Löwis11437992002-04-12 09:54:03 +000015655
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656 case $ac_mode in
15657 :F)
15658 #
15659 # CONFIG_FILE
15660 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015661
15662 case $INSTALL in
15663 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015664 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015666 ac_MKDIR_P=$MKDIR_P
15667 case $MKDIR_P in
15668 [\\/$]* | ?:[\\/]* ) ;;
15669 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15670 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015671_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015672
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015674# If the template does not know about datarootdir, expand it.
15675# FIXME: This hack should be removed a few years after 2.60.
15676ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015677ac_sed_dataroot='
15678/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015679 p
15680 q
15681}
15682/@datadir@/p
15683/@docdir@/p
15684/@infodir@/p
15685/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015686/@mandir@/p'
15687case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015688*datarootdir*) ac_datarootdir_seen=yes;;
15689*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15691$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015694 ac_datarootdir_hack='
15695 s&@datadir@&$datadir&g
15696 s&@docdir@&$docdir&g
15697 s&@infodir@&$infodir&g
15698 s&@localedir@&$localedir&g
15699 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015700 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015701esac
15702_ACEOF
15703
15704# Neutralize VPATH when `$srcdir' = `.'.
15705# Shell code in configure.ac might set extrasub.
15706# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15708ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015709$extrasub
15710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015712:t
15713/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015714s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015716s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015717s&@srcdir@&$ac_srcdir&;t t
15718s&@abs_srcdir@&$ac_abs_srcdir&;t t
15719s&@top_srcdir@&$ac_top_srcdir&;t t
15720s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15721s&@builddir@&$ac_builddir&;t t
15722s&@abs_builddir@&$ac_abs_builddir&;t t
15723s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15724s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015725s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015726$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015727"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015728eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15729 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015730
Martin v. Löwiseba40652007-08-30 20:10:57 +000015731test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015732 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15733 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15734 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015736which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015737$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015738which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015739
Matthias Klose3cef2a92012-03-14 23:39:33 +010015740 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015742 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15743 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015744 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015745 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015746 ;;
15747 :H)
15748 #
15749 # CONFIG_HEADER
15750 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015751 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015752 {
15753 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015754 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15755 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015756 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015757 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015758 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15759$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015761 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015762 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015763 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 fi
15765 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015766 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015767 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015768 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015770 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015771
Martin v. Löwiseba40652007-08-30 20:10:57 +000015772
15773 esac
15774
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015775
15776 case $ac_file$ac_mode in
15777 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15778
15779 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780done # for ac_tag
15781
Guido van Rossum627b2d71993-12-24 10:39:16 +000015782
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015783as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015784_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015785ac_clean_files=$ac_clean_files_save
15786
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015787test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015788 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015789
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
15791# configure is writing to config.log, and then calls config.status.
15792# config.status does its own redirection, appending to config.log.
15793# Unfortunately, on DOS this fails, as config.log is still kept open
15794# by configure, so config.status won't be able to write to it; its
15795# output is simply discarded. So we exec the FD to /dev/null,
15796# effectively closing config.log, so it can be properly (re)opened and
15797# appended to by config.status. When coming back to configure, we
15798# need to make the FD available again.
15799if test "$no_create" != yes; then
15800 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015801 ac_config_status_args=
15802 test "$silent" = yes &&
15803 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015805 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 exec 5>>config.log
15807 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15808 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015809 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015810fi
15811if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15813$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015814fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015815
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015816
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015817echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015818if test ! -f Modules/Setup
15819then
15820 cp $srcdir/Modules/Setup.dist Modules/Setup
15821fi
15822
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015823echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015824if test ! -f Modules/Setup.local
15825then
15826 echo "# Edit this file for local setup changes" >Modules/Setup.local
15827fi
15828
15829echo "creating Makefile"
15830$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15831 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015832 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015833
15834case $ac_sys_system in
15835BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015837
15838 Support for BeOS is deprecated as of Python 2.6.
15839 See PEP 11 for the gory details.
15840 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015841$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015842
15843 Support for BeOS is deprecated as of Python 2.6.
15844 See PEP 11 for the gory details.
15845 " >&2;}
15846 ;;
15847*) ;;
15848esac
15849
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015850mv config.c Modules