blob: 5f376af77567d6e086e5e8d8191a333716f62c72 [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
Ned Deily8e60f6e2013-05-30 00:14:29 -07002984ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002985
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002986UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002987
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2989$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002990
2991# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002992if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002993 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2995$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002996 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002997 if test "${enable_universalsdk}" ; then
2998 :
2999 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003000 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003001 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003002
3003else
3004
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3006$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003007
3008fi
3009
3010
3011
3012
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003013
3014# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003015if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003016 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003017 if test "${enable_framework}"; then
3018 :
3019 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003020 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003021 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003022 PYTHONFRAMEWORK=${withval}
3023 PYTHONFRAMEWORKDIR=${withval}.framework
3024 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3025
3026else
3027
3028 PYTHONFRAMEWORK=Python
3029 PYTHONFRAMEWORKDIR=Python.framework
3030 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3031
3032fi
3033
Martin v. Löwiseba40652007-08-30 20:10:57 +00003034# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003035if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003036 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003037 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003038 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003039 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003040 esac
3041 case $enableval in
3042 no)
3043 PYTHONFRAMEWORK=
3044 PYTHONFRAMEWORKDIR=no-framework
3045 PYTHONFRAMEWORKPREFIX=
3046 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003047 FRAMEWORKINSTALLFIRST=
3048 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003049 FRAMEWORKALTINSTALLFIRST=
3050 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003051 if test "x${prefix}" = "xNONE"; then
3052 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3053 else
3054 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3055 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003056 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003057 ;;
3058 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003059 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003060 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003061 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003062 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003063 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3064 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003065 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003066
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003067 if test "x${prefix}" = "xNONE" ; then
3068 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003069
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003070 else
3071 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3072 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003073
3074 case "${enableval}" in
3075 /System*)
3076 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3077 if test "${prefix}" = "NONE" ; then
3078 # See below
3079 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3080 fi
3081 ;;
3082
3083 /Library*)
3084 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3085 ;;
3086
3087 */Library/Frameworks)
3088 MDIR="`dirname "${enableval}"`"
3089 MDIR="`dirname "${MDIR}"`"
3090 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3091
3092 if test "${prefix}" = "NONE"; then
3093 # User hasn't specified the
3094 # --prefix option, but wants to install
3095 # the framework in a non-default location,
3096 # ensure that the compatibility links get
3097 # installed relative to that prefix as well
3098 # instead of in /usr/local.
3099 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3100 fi
3101 ;;
3102
3103 *)
3104 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3105 ;;
3106 esac
3107
Jack Jansen127e56e2001-09-11 14:41:54 +00003108 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003109
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003110 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003111 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003112 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003113
Martin v. Löwiseba40652007-08-30 20:10:57 +00003114 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003115
Martin v. Löwiseba40652007-08-30 20:10:57 +00003116 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003117
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003118 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3119
3120 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3121
Jack Jansene578a632001-08-15 01:27:14 +00003122 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003123
Guido van Rossum563e7081996-09-10 18:20:48 +00003124else
Martin v. Löwis11437992002-04-12 09:54:03 +00003125
Jack Jansene578a632001-08-15 01:27:14 +00003126 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003128 PYTHONFRAMEWORKPREFIX=
3129 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003130 FRAMEWORKINSTALLFIRST=
3131 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003132 FRAMEWORKALTINSTALLFIRST=
3133 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003134 if test "x${prefix}" = "xNONE" ; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansene578a632001-08-15 01:27:14 +00003139 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003140
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003141
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142fi
3143
Michael W. Hudson54241132001-12-07 15:38:26 +00003144
3145
3146
3147
Jack Jansene578a632001-08-15 01:27:14 +00003148
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003149
3150
Ronald Oussoren5b787322006-06-06 19:50:24 +00003151
3152
3153
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003154
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003155
Jack Jansene578a632001-08-15 01:27:14 +00003156##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003157## AS_HELP_STRING([--with-dyld],
3158## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003159##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003160# Set name for machine-dependent library files
3161
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3163$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003164if test -z "$MACHDEP"
3165then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003166 # avoid using uname for cross builds
3167 if test "$cross_compiling" = yes; then
3168 # ac_sys_system and ac_sys_release are only used for setting
3169 # `define_xopen_source' in the case statement below. For the
3170 # current supported cross builds, this macro is not adjusted.
3171 case "$host" in
3172 *-*-linux*)
3173 ac_sys_system=Linux
3174 ;;
3175 *-*-cygwin*)
3176 ac_sys_system=Cygwin
3177 ;;
3178 *)
3179 # for now, limit cross builds to known configurations
3180 MACHDEP="unknown"
3181 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3182 esac
3183 ac_sys_release=
3184 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003185 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003186 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003187 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003188 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003189 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003190 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003191 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003192 fi
3193 ac_md_system=`echo $ac_sys_system |
3194 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3195 ac_md_release=`echo $ac_sys_release |
3196 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3197 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003198
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003199 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003200 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003201 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003202 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003203 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003204 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003205 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003206 esac
3207fi
3208
3209
3210if test "$cross_compiling" = yes; then
3211 case "$host" in
3212 *-*-linux*)
3213 case "$host_cpu" in
3214 arm*)
3215 _host_cpu=arm
3216 ;;
3217 *)
3218 _host_cpu=$host_cpu
3219 esac
3220 ;;
3221 *-*-cygwin*)
3222 _host_cpu=
3223 ;;
3224 *)
3225 # for now, limit cross builds to known configurations
3226 MACHDEP="unknown"
3227 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003229 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003230fi
Guido van Rossum91922671997-10-09 20:24:13 +00003231
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003232# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3233# disable features if it is defined, without any means to access these
3234# features as extensions. For these systems, we skip the definition of
3235# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3236# some feature, make sure there is no alternative way to access this
3237# feature. Also, when using wildcards, make sure you have verified the
3238# need for not defining _XOPEN_SOURCE on all systems matching the
3239# wildcard, and that the wildcard does not include future systems
3240# (which may remove their limitations).
3241case $ac_sys_system/$ac_sys_release in
3242 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3243 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003244 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003245 # In addition, Stefan Krah confirms that issue #1244610 exists through
3246 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003247 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003248 define_xopen_source=no
3249 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3250 # also defined. This can be overridden by defining _BSD_SOURCE
3251 # As this has a different meaning on Linux, only define it on OpenBSD
3252
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003253$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003254
3255 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003256 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003257 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3258 # also defined. This can be overridden by defining _BSD_SOURCE
3259 # As this has a different meaning on Linux, only define it on OpenBSD
3260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003261$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003262
3263 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003264 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3265 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3266 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003267 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 +00003268 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003269 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3270 # request to enable features supported by the standard as a request
3271 # to disable features not supported by the standard. The best way
3272 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3273 # entirely and define __EXTENSIONS__ instead.
3274 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003275 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003276 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3277 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003278 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003279 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003280 define_xopen_source=no;;
3281 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003282 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003283 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003284 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003285 # On FreeBSD 4, the math functions C89 does not cover are never defined
3286 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3287 FreeBSD/4.*)
3288 define_xopen_source=no;;
3289 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3290 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3291 # identifies itself as Darwin/7.*
3292 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3293 # disables platform specific features beyond repair.
3294 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3295 # has no effect, don't bother defining them
3296 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003297 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003298 Darwin/1[0-9].*)
3299 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003300 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3301 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3302 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003303 AIX/4)
3304 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003305 AIX/5)
3306 if test `uname -r` -eq 1; then
3307 define_xopen_source=no
3308 fi
3309 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003310 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3311 # defining NI_NUMERICHOST.
3312 QNX/6.3.2)
3313 define_xopen_source=no
3314 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003315
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003316esac
3317
3318if test $define_xopen_source = yes
3319then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003320
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003321$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003322
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003323
3324 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3325 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3326 # several APIs are not declared. Since this is also needed in some
3327 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003329$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003330
3331
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003333$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003334
3335
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003336fi
3337
Guido van Rossum91922671997-10-09 20:24:13 +00003338#
3339# SGI compilers allow the specification of the both the ABI and the
3340# ISA on the command line. Depending on the values of these switches,
3341# different and often incompatable code will be generated.
3342#
3343# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3344# thus supply support for various ABI/ISA combinations. The MACHDEP
3345# variable is also adjusted.
3346#
3347
3348if test ! -z "$SGI_ABI"
3349then
3350 CC="cc $SGI_ABI"
3351 LDFLAGS="$SGI_ABI $LDFLAGS"
3352 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3353fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3355$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003356
Jack Jansen83f898c2002-12-30 22:23:40 +00003357# And add extra plat-mac for darwin
3358
Jack Jansen7b59b422003-03-17 15:44:10 +00003359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3361$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003362if test -z "$EXTRAPLATDIR"
3363then
3364 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003365 darwin)
3366 EXTRAPLATDIR="\$(PLATMACDIRS)"
3367 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3368 ;;
3369 *)
3370 EXTRAPLATDIR=""
3371 EXTRAMACHDEPPATH=""
3372 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003373 esac
3374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3376$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003377
Jack Jansen6b08a402004-06-03 12:41:45 +00003378# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3379# it may influence the way we can build extensions, so distutils
3380# needs to check it
3381
Ronald Oussoren988117f2006-04-29 11:31:35 +00003382
Jack Jansen6b08a402004-06-03 12:41:45 +00003383CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003384EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003385
Guido van Rossum627b2d71993-12-24 10:39:16 +00003386# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003387
3388# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3389# for debug/optimization stuff. BASECFLAGS is for flags that are required
3390# just to get things to compile and link. Users are free to override OPT
3391# when running configure or make. The build should not break if they do.
3392# BASECFLAGS should generally not be messed with, however.
3393
3394# XXX shouldn't some/most/all of this code be merged with the stuff later
3395# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3397$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003398
Martin v. Löwiseba40652007-08-30 20:10:57 +00003399# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003400if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003401 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003402 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003403 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003404 without_gcc=yes;;
3405 yes) CC=gcc
3406 without_gcc=no;;
3407 *) CC=$withval
3408 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003409 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003410else
Martin v. Löwis11437992002-04-12 09:54:03 +00003411
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003412 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003413 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003414 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003415 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003416 case $BE_HOST_CPU in
3417 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003418 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003419 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003420 BASECFLAGS="$BASECFLAGS -export pragma"
3421 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003422 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003423 ;;
3424 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003425 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003426 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003427 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003428 ;;
3429 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003430 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003431 ;;
3432 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003433 AR="\$(srcdir)/Modules/ar_beos"
3434 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003435 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003436 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003437 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438fi
3439
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3441$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003442
Guido van Rossum8b131c51995-03-09 14:10:13 +00003443# If the user switches compilers, we can't believe the cache
3444if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3445then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003446 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003447(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003448fi
3449
Trent Nelson15daa352012-12-13 06:46:39 +00003450if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3451 # Normally, MIPSpro CC treats #error directives as warnings, which means
3452 # a successful exit code is returned (0). This is a problem because IRIX
3453 # has a bunch of system headers with this guard at the top:
3454 #
3455 # #ifndef __c99
3456 # #error This header file is to be used only for c99 mode compilations
3457 # #else
3458 #
3459 # When autoconf tests for such a header, like stdint.h, this happens:
3460 #
3461 # configure:4619: cc -c conftest.c >&5
3462 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3463 # #error directive: This header file is to be used only for c99 mode
3464 # compilations
3465 #
3466 # #error This header file is to be used only for c99 mode compilations
3467 # ^
3468 #
3469 # configure:4619: $? = 0
3470 # configure:4619: result: yes
3471 #
3472 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3473 # warning as an error, which causes cc to return a non-zero result,
3474 # which autoconf can interpret correctly.
3475 CFLAGS="$CFLAGS -diag_error 1035"
3476 # Whilst we're here, we might as well make sure CXX defaults to something
3477 # sensible if we're not using gcc.
3478 if test -z "$CXX"; then
3479 CXX="CC"
3480 fi
3481fi
3482
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003483# If the user set CFLAGS, use this instead of the automatically
3484# determined setting
3485preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003486ac_ext=c
3487ac_cpp='$CPP $CPPFLAGS'
3488ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3489ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3490ac_compiler_gnu=$ac_cv_c_compiler_gnu
3491if test -n "$ac_tool_prefix"; then
3492 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3493set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3495$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003496if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003497 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003498else
3499 if test -n "$CC"; then
3500 ac_cv_prog_CC="$CC" # Let the user override the test.
3501else
Martin v. Löwis11437992002-04-12 09:54:03 +00003502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3503for as_dir in $PATH
3504do
3505 IFS=$as_save_IFS
3506 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003507 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003508 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003510 $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 +00003511 break 2
3512 fi
3513done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003514 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003515IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003516
Jack Jansendd19cf82001-12-06 22:36:17 +00003517fi
3518fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003519CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003520if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3522$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3525$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526fi
3527
Martin v. Löwiseba40652007-08-30 20:10:57 +00003528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529fi
3530if test -z "$ac_cv_prog_CC"; then
3531 ac_ct_CC=$CC
3532 # Extract the first word of "gcc", so it can be a program name with args.
3533set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3535$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003536if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003537 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003538else
3539 if test -n "$ac_ct_CC"; then
3540 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3541else
3542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3543for as_dir in $PATH
3544do
3545 IFS=$as_save_IFS
3546 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003547 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550 $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 +00003551 break 2
3552 fi
3553done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003554 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003555IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003556
3557fi
3558fi
3559ac_ct_CC=$ac_cv_prog_ac_ct_CC
3560if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3562$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3565$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003566fi
3567
Martin v. Löwiseba40652007-08-30 20:10:57 +00003568 if test "x$ac_ct_CC" = x; then
3569 CC=""
3570 else
3571 case $cross_compiling:$ac_tool_warned in
3572yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003575ac_tool_warned=yes ;;
3576esac
3577 CC=$ac_ct_CC
3578 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003579else
3580 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003581fi
3582
Jack Jansendd19cf82001-12-06 22:36:17 +00003583if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003584 if test -n "$ac_tool_prefix"; then
3585 # 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 +00003586set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3588$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003589if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003591else
3592 if test -n "$CC"; then
3593 ac_cv_prog_CC="$CC" # Let the user override the test.
3594else
Martin v. Löwis11437992002-04-12 09:54:03 +00003595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3596for as_dir in $PATH
3597do
3598 IFS=$as_save_IFS
3599 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003600 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603 $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 +00003604 break 2
3605 fi
3606done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003608IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003609
3610fi
3611fi
3612CC=$ac_cv_prog_CC
3613if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3615$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3618$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003619fi
3620
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624if test -z "$CC"; then
3625 # Extract the first word of "cc", so it can be a program name with args.
3626set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3628$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003629if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003631else
3632 if test -n "$CC"; then
3633 ac_cv_prog_CC="$CC" # Let the user override the test.
3634else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003635 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3637for as_dir in $PATH
3638do
3639 IFS=$as_save_IFS
3640 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003641 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3644 ac_prog_rejected=yes
3645 continue
3646 fi
3647 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003648 $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 +00003649 break 2
3650 fi
3651done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003652 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003653IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003654
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003655if test $ac_prog_rejected = yes; then
3656 # We found a bogon in the path, so make sure we never use it.
3657 set dummy $ac_cv_prog_CC
3658 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003660 # We chose a different compiler from the bogus one.
3661 # However, it has the same basename, so the bogon will be chosen
3662 # first if we set CC to just the basename; use the full file name.
3663 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003664 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003665 fi
3666fi
3667fi
3668fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003669CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003670if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3672$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3675$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003676fi
3677
Martin v. Löwiseba40652007-08-30 20:10:57 +00003678
Martin v. Löwis11437992002-04-12 09:54:03 +00003679fi
3680if test -z "$CC"; then
3681 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003682 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 do
3684 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3685set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3687$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003688if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003689 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003690else
3691 if test -n "$CC"; then
3692 ac_cv_prog_CC="$CC" # Let the user override the test.
3693else
Martin v. Löwis11437992002-04-12 09:54:03 +00003694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3695for as_dir in $PATH
3696do
3697 IFS=$as_save_IFS
3698 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003699 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003702 $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 +00003703 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003705done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003706 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003707IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003708
3709fi
3710fi
3711CC=$ac_cv_prog_CC
3712if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3714$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003715else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003718fi
3719
Martin v. Löwiseba40652007-08-30 20:10:57 +00003720
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 test -n "$CC" && break
3722 done
3723fi
3724if test -z "$CC"; then
3725 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003726 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003727do
3728 # Extract the first word of "$ac_prog", so it can be a program name with args.
3729set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3731$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003732if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003733 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003734else
3735 if test -n "$ac_ct_CC"; then
3736 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3737else
3738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3739for as_dir in $PATH
3740do
3741 IFS=$as_save_IFS
3742 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003743 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003746 $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 +00003747 break 2
3748 fi
3749done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003750 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003751IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003752
Martin v. Löwis11437992002-04-12 09:54:03 +00003753fi
3754fi
3755ac_ct_CC=$ac_cv_prog_ac_ct_CC
3756if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3758$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003759else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3761$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003763
Martin v. Löwiseba40652007-08-30 20:10:57 +00003764
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 test -n "$ac_ct_CC" && break
3766done
Michael W. Hudson54241132001-12-07 15:38:26 +00003767
Martin v. Löwiseba40652007-08-30 20:10:57 +00003768 if test "x$ac_ct_CC" = x; then
3769 CC=""
3770 else
3771 case $cross_compiling:$ac_tool_warned in
3772yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775ac_tool_warned=yes ;;
3776esac
3777 CC=$ac_ct_CC
3778 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003779fi
3780
3781fi
3782
3783
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003784test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003786as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003787See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003788
3789# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3791set X $ac_compile
3792ac_compiler=$2
3793for ac_option in --version -v -V -qversion; do
3794 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003795case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3800$as_echo "$ac_try_echo"; } >&5
3801 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003803 if test -s conftest.err; then
3804 sed '10a\
3805... rest of stderr output deleted ...
3806 10q' conftest.err >conftest.er1
3807 cat conftest.er1 >&5
3808 fi
3809 rm -f conftest.er1 conftest.err
3810 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3811 test $ac_status = 0; }
3812done
Martin v. Löwis11437992002-04-12 09:54:03 +00003813
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003815/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817int
3818main ()
3819{
3820
3821 ;
3822 return 0;
3823}
3824_ACEOF
3825ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003827# Try to create an executable without -o first, disregard a.out.
3828# It will help us diagnose broken compilers, and finding out an intuition
3829# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3831$as_echo_n "checking whether the C compiler works... " >&6; }
3832ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3833
3834# The possible output files:
3835ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3836
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837ac_rmfiles=
3838for ac_file in $ac_files
3839do
3840 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003841 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003842 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3843 esac
3844done
3845rm -f $ac_rmfiles
3846
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003847if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848case "(($ac_try" in
3849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3850 *) ac_try_echo=$ac_try;;
3851esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3853$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003854 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3857 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3859# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3860# in a Makefile. We should not override ac_cv_exeext if it was cached,
3861# so that the user can short-circuit this test for compilers unknown to
3862# Autoconf.
3863for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003864do
3865 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003868 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003869 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003870 # We found the default executable, but exeext='' is most
3871 # certainly right.
3872 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003873 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003874 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003875 then :; else
3876 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3877 fi
3878 # We set ac_cv_exeext here because the later test for it is not
3879 # safe: cross compilers may not add the suffix if given an `-o'
3880 # argument, so we may need to know it at that point already.
3881 # Even if this section looks crufty: it has the advantage of
3882 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003883 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003884 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003885 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 esac
3887done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888test "$ac_cv_exeext" = no && ac_cv_exeext=
3889
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003890else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003891 ac_file=''
3892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003893if test -z "$ac_file"; then :
3894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3895$as_echo "no" >&6; }
3896$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003897sed 's/^/| /' conftest.$ac_ext >&5
3898
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003899{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003901as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003902See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003903else
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3905$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3908$as_echo_n "checking for C compiler default output file name... " >&6; }
3909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3910$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003911ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003912
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003913rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003914ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3916$as_echo_n "checking for suffix of executables... " >&6; }
3917if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003918case "(($ac_try" in
3919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3920 *) ac_try_echo=$ac_try;;
3921esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3923$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003924 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003925 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3927 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3929# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3930# work properly (i.e., refer to `conftest.exe'), while it won't with
3931# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003932for ac_file in conftest.exe conftest conftest.*; do
3933 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003935 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003937 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003938 * ) break;;
3939 esac
3940done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003941else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003942 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003944as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003945See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003947rm -f conftest conftest$ac_cv_exeext
3948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3949$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003950
3951rm -f conftest.$ac_ext
3952EXEEXT=$ac_cv_exeext
3953ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3955/* end confdefs.h. */
3956#include <stdio.h>
3957int
3958main ()
3959{
3960FILE *f = fopen ("conftest.out", "w");
3961 return ferror (f) || fclose (f) != 0;
3962
3963 ;
3964 return 0;
3965}
Skip Montanaro6dead952003-09-25 14:50:04 +00003966_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003967ac_clean_files="$ac_clean_files conftest.out"
3968# Check that the compiler produces executables we can run. If not, either
3969# the compiler is broken, or we cross compile.
3970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3971$as_echo_n "checking whether we are cross compiling... " >&6; }
3972if test "$cross_compiling" != yes; then
3973 { { ac_try="$ac_link"
3974case "(($ac_try" in
3975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3976 *) ac_try_echo=$ac_try;;
3977esac
3978eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3979$as_echo "$ac_try_echo"; } >&5
3980 (eval "$ac_link") 2>&5
3981 ac_status=$?
3982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3983 test $ac_status = 0; }
3984 if { ac_try='./conftest$ac_cv_exeext'
3985 { { case "(($ac_try" in
3986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3987 *) ac_try_echo=$ac_try;;
3988esac
3989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3990$as_echo "$ac_try_echo"; } >&5
3991 (eval "$ac_try") 2>&5
3992 ac_status=$?
3993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3994 test $ac_status = 0; }; }; then
3995 cross_compiling=no
3996 else
3997 if test "$cross_compiling" = maybe; then
3998 cross_compiling=yes
3999 else
4000 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4001$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004002as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004003If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004004See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004005 fi
4006 fi
4007fi
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4009$as_echo "$cross_compiling" >&6; }
4010
4011rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4012ac_clean_files=$ac_clean_files_save
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4014$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004015if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004016 $as_echo_n "(cached) " >&6
4017else
4018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004020
Martin v. Löwis11437992002-04-12 09:54:03 +00004021int
4022main ()
4023{
4024
4025 ;
4026 return 0;
4027}
4028_ACEOF
4029rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004030if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004031case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4036$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004037 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004038 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4040 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004041 for ac_file in conftest.o conftest.obj conftest.*; do
4042 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004043 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004044 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004045 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4046 break;;
4047 esac
4048done
4049else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004051sed 's/^/| /' conftest.$ac_ext >&5
4052
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004053{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004055as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004056See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004058rm -f conftest.$ac_cv_objext conftest.$ac_ext
4059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4061$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004062OBJEXT=$ac_cv_objext
4063ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4065$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004066if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004067 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004071
Martin v. Löwis11437992002-04-12 09:54:03 +00004072int
4073main ()
4074{
4075#ifndef __GNUC__
4076 choke me
4077#endif
4078
4079 ;
4080 return 0;
4081}
4082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 ac_compiler_gnu=yes
4085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004086 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004089ac_cv_c_compiler_gnu=$ac_compiler_gnu
4090
4091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4093$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4094if test $ac_compiler_gnu = yes; then
4095 GCC=yes
4096else
4097 GCC=
4098fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004099ac_test_CFLAGS=${CFLAGS+set}
4100ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4102$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004103if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004104 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004105else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004106 ac_save_c_werror_flag=$ac_c_werror_flag
4107 ac_c_werror_flag=yes
4108 ac_cv_prog_cc_g=no
4109 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004112
Martin v. Löwis11437992002-04-12 09:54:03 +00004113int
4114main ()
4115{
4116
4117 ;
4118 return 0;
4119}
4120_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004121if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004122 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004123else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004124 CFLAGS=""
4125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004126/* end confdefs.h. */
4127
4128int
4129main ()
4130{
4131
4132 ;
4133 return 0;
4134}
4135_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004138else
4139 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004142/* end confdefs.h. */
4143
4144int
4145main ()
4146{
4147
4148 ;
4149 return 0;
4150}
4151_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004153 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4160 ac_c_werror_flag=$ac_save_c_werror_flag
4161fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4163$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004164if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004166elif test $ac_cv_prog_cc_g = yes; then
4167 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004168 CFLAGS="-g -O2"
4169 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004170 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171 fi
4172else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004173 if test "$GCC" = yes; then
4174 CFLAGS="-O2"
4175 else
4176 CFLAGS=
4177 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4180$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004181if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004182 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004183else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004184 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004185ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
4188#include <stdarg.h>
4189#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004190struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004191/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4192struct buf { int x; };
4193FILE * (*rcsopen) (struct buf *, struct stat *, int);
4194static char *e (p, i)
4195 char **p;
4196 int i;
4197{
4198 return p[i];
4199}
4200static char *f (char * (*g) (char **, int), char **p, ...)
4201{
4202 char *s;
4203 va_list v;
4204 va_start (v,p);
4205 s = g (p, va_arg (v,int));
4206 va_end (v);
4207 return s;
4208}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004209
4210/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4211 function prototypes and stuff, but not '\xHH' hex character constants.
4212 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004213 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004214 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4215 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004216 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004217int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4218
Martin v. Löwiseba40652007-08-30 20:10:57 +00004219/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4220 inside strings and character constants. */
4221#define FOO(x) 'x'
4222int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4223
Skip Montanaro6dead952003-09-25 14:50:04 +00004224int test (int i, double x);
4225struct s1 {int (*f) (int a);};
4226struct s2 {int (*f) (double a);};
4227int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4228int argc;
4229char **argv;
4230int
4231main ()
4232{
4233return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4234 ;
4235 return 0;
4236}
4237_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4239 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004240do
4241 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004242 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004243 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004245rm -f core conftest.err conftest.$ac_objext
4246 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004247done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004248rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004249CC=$ac_save_CC
4250
4251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004252# AC_CACHE_VAL
4253case "x$ac_cv_prog_cc_c89" in
4254 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4256$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004257 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4259$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004260 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004261 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4263$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004264esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004267fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004268
Martin v. Löwis11437992002-04-12 09:54:03 +00004269ac_ext=c
4270ac_cpp='$CPP $CPPFLAGS'
4271ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4272ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4273ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004275if test ! -z "$preset_cflags"
4276then
4277 CFLAGS=$preset_cflags
4278fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004279
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004280
4281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4283$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004284
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004286if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004287 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004288
4289 case $withval in
4290 no) with_cxx_main=no
4291 MAINCC='$(CC)';;
4292 yes) with_cxx_main=yes
4293 MAINCC='$(CXX)';;
4294 *) with_cxx_main=yes
4295 MAINCC=$withval
4296 if test -z "$CXX"
4297 then
4298 CXX=$withval
4299 fi;;
4300 esac
4301else
4302
4303 with_cxx_main=no
4304 MAINCC='$(CC)'
4305
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306fi
4307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4309$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004310
4311preset_cxx="$CXX"
4312if test -z "$CXX"
4313then
4314 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004315 gcc) if test -n "$ac_tool_prefix"; then
4316 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4317set dummy ${ac_tool_prefix}g++; ac_word=$2
4318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4319$as_echo_n "checking for $ac_word... " >&6; }
4320if ${ac_cv_path_CXX+:} false; then :
4321 $as_echo_n "(cached) " >&6
4322else
4323 case $CXX in
4324 [\\/]* | ?:[\\/]*)
4325 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4326 ;;
4327 *)
4328 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4329for as_dir in notfound
4330do
4331 IFS=$as_save_IFS
4332 test -z "$as_dir" && as_dir=.
4333 for ac_exec_ext in '' $ac_executable_extensions; do
4334 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4335 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4336 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4337 break 2
4338 fi
4339done
4340 done
4341IFS=$as_save_IFS
4342
4343 ;;
4344esac
4345fi
4346CXX=$ac_cv_path_CXX
4347if test -n "$CXX"; then
4348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4349$as_echo "$CXX" >&6; }
4350else
4351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4352$as_echo "no" >&6; }
4353fi
4354
4355
4356fi
4357if test -z "$ac_cv_path_CXX"; then
4358 ac_pt_CXX=$CXX
4359 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004360set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4362$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004363if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004364 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004365else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004366 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004367 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004368 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 +00004369 ;;
4370 *)
4371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4372for as_dir in notfound
4373do
4374 IFS=$as_save_IFS
4375 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004376 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004377 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004378 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004379 $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 +00004380 break 2
4381 fi
4382done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004383 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004384IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004385
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004386 ;;
4387esac
4388fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004389ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4390if test -n "$ac_pt_CXX"; then
4391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4392$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4395$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004397
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004398 if test "x$ac_pt_CXX" = x; then
4399 CXX="g++"
4400 else
4401 case $cross_compiling:$ac_tool_warned in
4402yes:)
4403{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4404$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4405ac_tool_warned=yes ;;
4406esac
4407 CXX=$ac_pt_CXX
4408 fi
4409else
4410 CXX="$ac_cv_path_CXX"
4411fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004412 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004413 cc) if test -n "$ac_tool_prefix"; then
4414 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4415set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4417$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004418if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004419 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004420else
4421 case $CXX in
4422 [\\/]* | ?:[\\/]*)
4423 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4424 ;;
4425 *)
4426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4427for as_dir in notfound
4428do
4429 IFS=$as_save_IFS
4430 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004431 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004432 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004433 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004434 $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 +00004435 break 2
4436 fi
4437done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004438 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004439IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004440
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004441 ;;
4442esac
4443fi
4444CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004445if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4447$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4450$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004452
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004453
4454fi
4455if test -z "$ac_cv_path_CXX"; then
4456 ac_pt_CXX=$CXX
4457 # Extract the first word of "c++", so it can be a program name with args.
4458set dummy c++; ac_word=$2
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4460$as_echo_n "checking for $ac_word... " >&6; }
4461if ${ac_cv_path_ac_pt_CXX+:} false; then :
4462 $as_echo_n "(cached) " >&6
4463else
4464 case $ac_pt_CXX in
4465 [\\/]* | ?:[\\/]*)
4466 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4467 ;;
4468 *)
4469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4470for as_dir in notfound
4471do
4472 IFS=$as_save_IFS
4473 test -z "$as_dir" && as_dir=.
4474 for ac_exec_ext in '' $ac_executable_extensions; do
4475 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4476 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4478 break 2
4479 fi
4480done
4481 done
4482IFS=$as_save_IFS
4483
4484 ;;
4485esac
4486fi
4487ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4488if test -n "$ac_pt_CXX"; then
4489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4490$as_echo "$ac_pt_CXX" >&6; }
4491else
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4493$as_echo "no" >&6; }
4494fi
4495
4496 if test "x$ac_pt_CXX" = x; then
4497 CXX="c++"
4498 else
4499 case $cross_compiling:$ac_tool_warned in
4500yes:)
4501{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4502$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4503ac_tool_warned=yes ;;
4504esac
4505 CXX=$ac_pt_CXX
4506 fi
4507else
4508 CXX="$ac_cv_path_CXX"
4509fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004510 ;;
4511 esac
4512 if test "$CXX" = "notfound"
4513 then
4514 CXX=""
4515 fi
4516fi
4517if test -z "$CXX"
4518then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004519 if test -n "$ac_tool_prefix"; then
4520 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4521 do
4522 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4523set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4525$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004526if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004527 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004528else
4529 if test -n "$CXX"; then
4530 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4531else
4532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4533for as_dir in $PATH
4534do
4535 IFS=$as_save_IFS
4536 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004537 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004539 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004540 $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 +00004541 break 2
4542 fi
4543done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004544 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004545IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004546
4547fi
4548fi
4549CXX=$ac_cv_prog_CXX
4550if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4552$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004553else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004556fi
4557
Martin v. Löwiseba40652007-08-30 20:10:57 +00004558
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004559 test -n "$CXX" && break
4560 done
4561fi
4562if test -z "$CXX"; then
4563 ac_ct_CXX=$CXX
4564 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4565do
4566 # Extract the first word of "$ac_prog", so it can be a program name with args.
4567set dummy $ac_prog; ac_word=$2
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4569$as_echo_n "checking for $ac_word... " >&6; }
4570if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4571 $as_echo_n "(cached) " >&6
4572else
4573 if test -n "$ac_ct_CXX"; then
4574 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4575else
4576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577for as_dir in $PATH
4578do
4579 IFS=$as_save_IFS
4580 test -z "$as_dir" && as_dir=.
4581 for ac_exec_ext in '' $ac_executable_extensions; do
4582 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4583 ac_cv_prog_ac_ct_CXX="$ac_prog"
4584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4585 break 2
4586 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004587done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004588 done
4589IFS=$as_save_IFS
4590
4591fi
4592fi
4593ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4594if test -n "$ac_ct_CXX"; then
4595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4596$as_echo "$ac_ct_CXX" >&6; }
4597else
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599$as_echo "no" >&6; }
4600fi
4601
4602
4603 test -n "$ac_ct_CXX" && break
4604done
4605
4606 if test "x$ac_ct_CXX" = x; then
4607 CXX="notfound"
4608 else
4609 case $cross_compiling:$ac_tool_warned in
4610yes:)
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4613ac_tool_warned=yes ;;
4614esac
4615 CXX=$ac_ct_CXX
4616 fi
4617fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004618
4619 if test "$CXX" = "notfound"
4620 then
4621 CXX=""
4622 fi
4623fi
4624if test "$preset_cxx" != "$CXX"
4625then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004627
4628 By default, distutils will build C++ extension modules with \"$CXX\".
4629 If this is not intended, then set CXX on the configure command line.
4630 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004631$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004632
4633 By default, distutils will build C++ extension modules with \"$CXX\".
4634 If this is not intended, then set CXX on the configure command line.
4635 " >&2;}
4636fi
4637
doko@python.org4e63fbe2013-01-25 13:08:27 +01004638MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4639
4640
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004641
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004642# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004643
4644ac_ext=c
4645ac_cpp='$CPP $CPPFLAGS'
4646ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4647ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4648ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4650$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004651# On Suns, sometimes $CPP names a directory.
4652if test -n "$CPP" && test -d "$CPP"; then
4653 CPP=
4654fi
4655if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004656 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004657 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004658else
Martin v. Löwis11437992002-04-12 09:54:03 +00004659 # Double quotes because CPP needs to be expanded
4660 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4661 do
4662 ac_preproc_ok=false
4663for ac_c_preproc_warn_flag in '' yes
4664do
4665 # Use a header file that comes with gcc, so configuring glibc
4666 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004667 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4668 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004669 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004670 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004672/* end confdefs.h. */
4673#ifdef __STDC__
4674# include <limits.h>
4675#else
4676# include <assert.h>
4677#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004678 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004680if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004681
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004682else
Martin v. Löwis11437992002-04-12 09:54:03 +00004683 # Broken: fails on valid input.
4684continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004685fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004686rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004687
Martin v. Löwiseba40652007-08-30 20:10:57 +00004688 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004689 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004692#include <ac_nonexistent.h>
4693_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004694if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004695 # Broken: success on invalid input.
4696continue
4697else
Martin v. Löwis11437992002-04-12 09:54:03 +00004698 # Passes both tests.
4699ac_preproc_ok=:
4700break
4701fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004702rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004703
4704done
4705# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004706rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004707if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004708 break
4709fi
4710
4711 done
4712 ac_cv_prog_CPP=$CPP
4713
4714fi
4715 CPP=$ac_cv_prog_CPP
4716else
4717 ac_cv_prog_CPP=$CPP
4718fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4720$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004721ac_preproc_ok=false
4722for ac_c_preproc_warn_flag in '' yes
4723do
4724 # Use a header file that comes with gcc, so configuring glibc
4725 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004726 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4727 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004728 # On the NeXT, cc -E runs the code through the compiler's parser,
4729 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004731/* end confdefs.h. */
4732#ifdef __STDC__
4733# include <limits.h>
4734#else
4735# include <assert.h>
4736#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004737 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004739if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004740
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004741else
Martin v. Löwis11437992002-04-12 09:54:03 +00004742 # Broken: fails on valid input.
4743continue
4744fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004745rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004746
Martin v. Löwiseba40652007-08-30 20:10:57 +00004747 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004748 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004751#include <ac_nonexistent.h>
4752_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004753if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004754 # Broken: success on invalid input.
4755continue
4756else
Martin v. Löwis11437992002-04-12 09:54:03 +00004757 # Passes both tests.
4758ac_preproc_ok=:
4759break
4760fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004761rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004762
4763done
4764# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004765rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004766if $ac_preproc_ok; then :
4767
Martin v. Löwis11437992002-04-12 09:54:03 +00004768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004769 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004771as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004772See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004773fi
4774
4775ac_ext=c
4776ac_cpp='$CPP $CPPFLAGS'
4777ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4778ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4779ac_compiler_gnu=$ac_cv_c_compiler_gnu
4780
4781
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4783$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004784if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004785 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004787 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004788 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004789 # Loop through the user's path and test for each of PROGNAME-LIST
4790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004791for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4792do
4793 IFS=$as_save_IFS
4794 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 for ac_prog in grep ggrep; do
4796 for ac_exec_ext in '' $ac_executable_extensions; do
4797 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004798 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004799# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004800 # Check for GNU $ac_path_GREP
4801case `"$ac_path_GREP" --version 2>&1` in
4802*GNU*)
4803 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4804*)
4805 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004806 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004807 while :
4808 do
4809 cat "conftest.in" "conftest.in" >"conftest.tmp"
4810 mv "conftest.tmp" "conftest.in"
4811 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004812 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004813 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4814 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004816 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4817 # Best one so far, save it but keep looking for a better one
4818 ac_cv_path_GREP="$ac_path_GREP"
4819 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004820 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004821 # 10*(2^10) chars as input seems more than enough
4822 test $ac_count -gt 10 && break
4823 done
4824 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4825esac
4826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004827 $ac_path_GREP_found && break 3
4828 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004829 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004830 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004831IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004833 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 +00004834 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004835else
4836 ac_cv_path_GREP=$GREP
4837fi
4838
Martin v. Löwiseba40652007-08-30 20:10:57 +00004839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4841$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842 GREP="$ac_cv_path_GREP"
4843
4844
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4846$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004847if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004848 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004849else
4850 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4851 then ac_cv_path_EGREP="$GREP -E"
4852 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004854 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004855 # Loop through the user's path and test for each of PROGNAME-LIST
4856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004857for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4858do
4859 IFS=$as_save_IFS
4860 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861 for ac_prog in egrep; do
4862 for ac_exec_ext in '' $ac_executable_extensions; do
4863 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004864 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004866 # Check for GNU $ac_path_EGREP
4867case `"$ac_path_EGREP" --version 2>&1` in
4868*GNU*)
4869 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4870*)
4871 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004873 while :
4874 do
4875 cat "conftest.in" "conftest.in" >"conftest.tmp"
4876 mv "conftest.tmp" "conftest.in"
4877 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4880 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004881 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004882 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4883 # Best one so far, save it but keep looking for a better one
4884 ac_cv_path_EGREP="$ac_path_EGREP"
4885 ac_path_EGREP_max=$ac_count
4886 fi
4887 # 10*(2^10) chars as input seems more than enough
4888 test $ac_count -gt 10 && break
4889 done
4890 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4891esac
4892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004893 $ac_path_EGREP_found && break 3
4894 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004895 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004896 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004898 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004899 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 +00004900 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004901else
4902 ac_cv_path_EGREP=$EGREP
4903fi
4904
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905 fi
4906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4908$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004909 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004910
4911
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4913$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004914if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004915 $as_echo_n "(cached) " >&6
4916else
4917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004918/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919#include <stdlib.h>
4920#include <stdarg.h>
4921#include <string.h>
4922#include <float.h>
4923
4924int
4925main ()
4926{
4927
4928 ;
4929 return 0;
4930}
4931_ACEOF
4932if ac_fn_c_try_compile "$LINENO"; then :
4933 ac_cv_header_stdc=yes
4934else
4935 ac_cv_header_stdc=no
4936fi
4937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4938
4939if test $ac_cv_header_stdc = yes; then
4940 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4942/* end confdefs.h. */
4943#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004944
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004945_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004947 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004948
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004950 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004951fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004952rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004954fi
4955
4956if test $ac_cv_header_stdc = yes; then
4957 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4959/* end confdefs.h. */
4960#include <stdlib.h>
4961
4962_ACEOF
4963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4964 $EGREP "free" >/dev/null 2>&1; then :
4965
4966else
4967 ac_cv_header_stdc=no
4968fi
4969rm -f conftest*
4970
4971fi
4972
4973if test $ac_cv_header_stdc = yes; then
4974 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4975 if test "$cross_compiling" = yes; then :
4976 :
4977else
4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979/* end confdefs.h. */
4980#include <ctype.h>
4981#include <stdlib.h>
4982#if ((' ' & 0x0FF) == 0x020)
4983# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4984# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4985#else
4986# define ISLOWER(c) \
4987 (('a' <= (c) && (c) <= 'i') \
4988 || ('j' <= (c) && (c) <= 'r') \
4989 || ('s' <= (c) && (c) <= 'z'))
4990# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4991#endif
4992
4993#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4994int
4995main ()
4996{
4997 int i;
4998 for (i = 0; i < 256; i++)
4999 if (XOR (islower (i), ISLOWER (i))
5000 || toupper (i) != TOUPPER (i))
5001 return 2;
5002 return 0;
5003}
5004_ACEOF
5005if ac_fn_c_try_run "$LINENO"; then :
5006
5007else
5008 ac_cv_header_stdc=no
5009fi
5010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5011 conftest.$ac_objext conftest.beam conftest.$ac_ext
5012fi
5013
5014fi
5015fi
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5017$as_echo "$ac_cv_header_stdc" >&6; }
5018if test $ac_cv_header_stdc = yes; then
5019
5020$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5021
5022fi
5023
5024# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5025for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5026 inttypes.h stdint.h unistd.h
5027do :
5028 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5029ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5030"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005031if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005032 cat >>confdefs.h <<_ACEOF
5033#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5034_ACEOF
5035
5036fi
5037
5038done
5039
5040
5041
5042 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 +01005043if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005044 MINIX=yes
5045else
5046 MINIX=
5047fi
5048
5049
5050 if test "$MINIX" = yes; then
5051
5052$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5053
5054
5055$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5056
5057
5058$as_echo "#define _MINIX 1" >>confdefs.h
5059
5060 fi
5061
5062
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5064$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005065if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005066 $as_echo_n "(cached) " >&6
5067else
5068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5069/* end confdefs.h. */
5070
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005071# define __EXTENSIONS__ 1
5072 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005073int
5074main ()
5075{
5076
5077 ;
5078 return 0;
5079}
5080_ACEOF
5081if ac_fn_c_try_compile "$LINENO"; then :
5082 ac_cv_safe_to_define___extensions__=yes
5083else
5084 ac_cv_safe_to_define___extensions__=no
5085fi
5086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5087fi
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5089$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5090 test $ac_cv_safe_to_define___extensions__ = yes &&
5091 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5092
5093 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5094
5095 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5096
5097 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5098
5099 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5100
5101
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005102
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005103# Check for unsupported systems
5104case $ac_sys_system/$ac_sys_release in
5105atheos*|Linux*/1*)
5106 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5107 echo See README for details.
5108 exit 1;;
5109esac
5110
5111
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5113$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005114
5115# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005116if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005117 withval=$with_suffix;
5118 case $withval in
5119 no) EXEEXT=;;
5120 yes) EXEEXT=.exe;;
5121 *) EXEEXT=$withval;;
5122 esac
5123fi
5124
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5126$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127
5128# Test whether we're running on a non-case-sensitive system, in which
5129# case we give a warning if no ext is given
5130
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5132$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005133if test ! -d CaseSensitiveTestDir; then
5134mkdir CaseSensitiveTestDir
5135fi
5136
5137if test -d casesensitivetestdir
5138then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5140$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141 BUILDEXEEXT=.exe
5142else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5144$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005145 BUILDEXEEXT=$EXEEXT
5146fi
5147rmdir CaseSensitiveTestDir
5148
5149case $MACHDEP in
5150bsdos*)
5151 case $CC in
5152 gcc) CC="$CC -D_HAVE_BSDI";;
5153 esac;;
5154esac
5155
5156case $ac_sys_system in
5157hp*|HP*)
5158 case $CC in
5159 cc|*/cc) CC="$CC -Ae";;
5160 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005161SunOS*)
5162 # Some functions have a prototype only with that define, e.g. confstr
5163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005164$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005165
5166 ;;
5167esac
5168
5169
5170
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5172$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005173if test -z "$LIBRARY"
5174then
5175 LIBRARY='libpython$(VERSION).a'
5176fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5178$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005179
5180# LDLIBRARY is the name of the library to link against (as opposed to the
5181# name of the library into which to insert object files). BLDLIBRARY is also
5182# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5183# is blank as the main program is not linked directly against LDLIBRARY.
5184# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5185# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5186# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5187# DLLLIBRARY is the shared (i.e., DLL) library.
5188#
5189# RUNSHARED is used to run shared python without installed libraries
5190#
5191# INSTSONAME is the name of the shared library that will be use to install
5192# on the system - some systems like version suffix, others don't
5193
5194
5195
5196
5197
5198
5199LDLIBRARY="$LIBRARY"
5200BLDLIBRARY='$(LDLIBRARY)'
5201INSTSONAME='$(LDLIBRARY)'
5202DLLLIBRARY=''
5203LDLIBRARYDIR=''
5204RUNSHARED=''
5205
5206# LINKCC is the command that links the python executable -- default is $(CC).
5207# If CXX is set, and if it is needed to link a main function that was
5208# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5209# python might then depend on the C++ runtime
5210# This is altered for AIX in order to build the export list before
5211# linking.
5212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5214$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005215if test -z "$LINKCC"
5216then
5217 LINKCC='$(PURIFY) $(MAINCC)'
5218 case $ac_sys_system in
5219 AIX*)
5220 exp_extra="\"\""
5221 if test $ac_sys_release -ge 5 -o \
5222 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5223 exp_extra="."
5224 fi
5225 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226 QNX*)
5227 # qcc must be used because the other compilers do not
5228 # support -N.
5229 LINKCC=qcc;;
5230 esac
5231fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5233$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005234
5235# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5236# make sure we default having it set to "no": this is used by
5237# distutils.unixccompiler to know if it should add --enable-new-dtags
5238# to linker command lines, and failing to detect GNU ld simply results
5239# in the same bahaviour as before.
5240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5242$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005243ac_prog=ld
5244if test "$GCC" = yes; then
5245 ac_prog=`$CC -print-prog-name=ld`
5246fi
5247case `"$ac_prog" -V 2>&1 < /dev/null` in
5248 *GNU*)
5249 GNULD=yes;;
5250 *)
5251 GNULD=no;;
5252esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5254$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005255
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5257$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005258# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005259if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005260 enableval=$enable_shared;
5261fi
5262
5263
5264if test -z "$enable_shared"
5265then
5266 case $ac_sys_system in
5267 CYGWIN* | atheos*)
5268 enable_shared="yes";;
5269 *)
5270 enable_shared="no";;
5271 esac
5272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5274$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5277$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005278# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005279if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005280 enableval=$enable_profiling;
5281fi
5282
5283if test "x$enable_profiling" = xyes; then
5284 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005285 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005287/* end confdefs.h. */
5288int main() { return 0; }
5289_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005290if ac_fn_c_try_link "$LINENO"; then :
5291
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005292else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005293 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005295rm -f core conftest.err conftest.$ac_objext \
5296 conftest$ac_exeext conftest.$ac_ext
5297 CC="$ac_save_cc"
5298else
5299 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005300fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5302$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005304if test "x$enable_profiling" = xyes; then
5305 BASECFLAGS="-pg $BASECFLAGS"
5306 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005307fi
5308
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5310$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311
5312# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5313# library that we build, but we do not want to link against it (we
5314# will find it with a -framework option). For this reason there is an
5315# extra variable BLDLIBRARY against which Python and the extension
5316# modules are linked, BLDLIBRARY. This is normally the same as
5317# LDLIBRARY, but empty for MacOSX framework builds.
5318if test "$enable_framework"
5319then
5320 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5321 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5322 BLDLIBRARY=''
5323else
5324 BLDLIBRARY='$(LDLIBRARY)'
5325fi
5326
5327# Other platforms follow
5328if test $enable_shared = "yes"; then
5329
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005330$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005331
5332 case $ac_sys_system in
5333 BeOS*)
5334 LDLIBRARY='libpython$(VERSION).so'
5335 ;;
5336 CYGWIN*)
5337 LDLIBRARY='libpython$(VERSION).dll.a'
5338 DLLLIBRARY='libpython$(VERSION).dll'
5339 ;;
5340 SunOS*)
5341 LDLIBRARY='libpython$(VERSION).so'
5342 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
5343 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5344 INSTSONAME="$LDLIBRARY".$SOVERSION
5345 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005346 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347 LDLIBRARY='libpython$(VERSION).so'
5348 BLDLIBRARY='-L. -lpython$(VERSION)'
5349 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5350 case $ac_sys_system in
5351 FreeBSD*)
5352 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5353 ;;
5354 esac
5355 INSTSONAME="$LDLIBRARY".$SOVERSION
5356 ;;
5357 hp*|HP*)
5358 case `uname -m` in
5359 ia64)
5360 LDLIBRARY='libpython$(VERSION).so'
5361 ;;
5362 *)
5363 LDLIBRARY='libpython$(VERSION).sl'
5364 ;;
5365 esac
5366 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
5367 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5368 ;;
5369 OSF*)
5370 LDLIBRARY='libpython$(VERSION).so'
5371 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
5372 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5373 ;;
5374 atheos*)
5375 LDLIBRARY='libpython$(VERSION).so'
5376 BLDLIBRARY='-L. -lpython$(VERSION)'
5377 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5378 ;;
5379 Darwin*)
5380 LDLIBRARY='libpython$(VERSION).dylib'
5381 BLDLIBRARY='-L. -lpython$(VERSION)'
5382 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5383 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005384 AIX*)
5385 LDLIBRARY='libpython$(VERSION).so'
5386 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5387 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005388
5389 esac
5390else # shared is disabled
5391 case $ac_sys_system in
5392 CYGWIN*)
5393 BLDLIBRARY='$(LIBRARY)'
5394 LDLIBRARY='libpython$(VERSION).dll.a'
5395 ;;
5396 esac
5397fi
5398
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005399if test "$cross_compiling" = yes; then
5400 RUNSHARED=
5401fi
5402
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5404$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005405
5406if test -n "$ac_tool_prefix"; then
5407 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5408set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5410$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005411if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005412 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413else
5414 if test -n "$RANLIB"; then
5415 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5416else
5417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5418for as_dir in $PATH
5419do
5420 IFS=$as_save_IFS
5421 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005422 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005423 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005424 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005426 break 2
5427 fi
5428done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005429 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005430IFS=$as_save_IFS
5431
5432fi
5433fi
5434RANLIB=$ac_cv_prog_RANLIB
5435if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5437$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5440$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005441fi
5442
5443
5444fi
5445if test -z "$ac_cv_prog_RANLIB"; then
5446 ac_ct_RANLIB=$RANLIB
5447 # Extract the first word of "ranlib", so it can be a program name with args.
5448set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5450$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005451if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005452 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005453else
5454 if test -n "$ac_ct_RANLIB"; then
5455 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5456else
5457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460 IFS=$as_save_IFS
5461 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005462 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005466 break 2
5467 fi
5468done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005469 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470IFS=$as_save_IFS
5471
5472fi
5473fi
5474ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5475if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5477$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5480$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481fi
5482
5483 if test "x$ac_ct_RANLIB" = x; then
5484 RANLIB=":"
5485 else
5486 case $cross_compiling:$ac_tool_warned in
5487yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005488{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5489$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005490ac_tool_warned=yes ;;
5491esac
5492 RANLIB=$ac_ct_RANLIB
5493 fi
5494else
5495 RANLIB="$ac_cv_prog_RANLIB"
5496fi
5497
5498
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005499if test -n "$ac_tool_prefix"; then
5500 for ac_prog in ar aal
5501 do
5502 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5503set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5505$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005506if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005507 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005508else
5509 if test -n "$AR"; then
5510 ac_cv_prog_AR="$AR" # Let the user override the test.
5511else
5512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5513for as_dir in $PATH
5514do
5515 IFS=$as_save_IFS
5516 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005517 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005518 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005519 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005521 break 2
5522 fi
5523done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005524 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005525IFS=$as_save_IFS
5526
5527fi
5528fi
5529AR=$ac_cv_prog_AR
5530if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5532$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5535$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005536fi
5537
5538
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005539 test -n "$AR" && break
5540 done
5541fi
5542if test -z "$AR"; then
5543 ac_ct_AR=$AR
5544 for ac_prog in ar aal
5545do
5546 # Extract the first word of "$ac_prog", so it can be a program name with args.
5547set dummy $ac_prog; ac_word=$2
5548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5549$as_echo_n "checking for $ac_word... " >&6; }
5550if ${ac_cv_prog_ac_ct_AR+:} false; then :
5551 $as_echo_n "(cached) " >&6
5552else
5553 if test -n "$ac_ct_AR"; then
5554 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5555else
5556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5557for as_dir in $PATH
5558do
5559 IFS=$as_save_IFS
5560 test -z "$as_dir" && as_dir=.
5561 for ac_exec_ext in '' $ac_executable_extensions; do
5562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5563 ac_cv_prog_ac_ct_AR="$ac_prog"
5564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5565 break 2
5566 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005567done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005568 done
5569IFS=$as_save_IFS
5570
5571fi
5572fi
5573ac_ct_AR=$ac_cv_prog_ac_ct_AR
5574if test -n "$ac_ct_AR"; then
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5576$as_echo "$ac_ct_AR" >&6; }
5577else
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5579$as_echo "no" >&6; }
5580fi
5581
5582
5583 test -n "$ac_ct_AR" && break
5584done
5585
5586 if test "x$ac_ct_AR" = x; then
5587 AR="ar"
5588 else
5589 case $cross_compiling:$ac_tool_warned in
5590yes:)
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5592$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5593ac_tool_warned=yes ;;
5594esac
5595 AR=$ac_ct_AR
5596 fi
5597fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005598
5599
5600# tweak ARFLAGS only if the user didn't set it on the command line
5601
5602if test -z "$ARFLAGS"
5603then
5604 ARFLAGS="rc"
5605fi
5606
5607
5608# Extract the first word of "svnversion", so it can be a program name with args.
5609set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5611$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005612if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005613 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005614else
5615 if test -n "$SVNVERSION"; then
5616 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5617else
5618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619for as_dir in $PATH
5620do
5621 IFS=$as_save_IFS
5622 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005623 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005625 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005627 break 2
5628 fi
5629done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005630 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005631IFS=$as_save_IFS
5632
5633 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5634fi
5635fi
5636SVNVERSION=$ac_cv_prog_SVNVERSION
5637if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5639$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5642$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005643fi
5644
5645
5646if test $SVNVERSION = found
5647then
5648 SVNVERSION="svnversion \$(srcdir)"
5649else
5650 SVNVERSION="echo Unversioned directory"
5651fi
5652
Trent Nelsond86ceec2012-10-16 09:42:45 -04005653
Trent Nelsonabf20512012-10-17 04:32:49 -04005654if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005655 # If we're building out-of-tree make sure Include (in the current dir)
5656 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5657 # and graminit.h to get picked up from the correct directory.
5658 # (A side effect of this is that these resources will automatically be
5659 # regenerated when building out-of-tree, regardless of whether or not
5660 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5661 # off.)
5662 BASECPPFLAGS="-IInclude"
5663else
5664 BASECPPFLAGS=""
5665fi
5666
Georg Brandl3a5508e2011-03-06 10:42:21 +01005667
5668
5669
5670# Extract the first word of "hg", so it can be a program name with args.
5671set dummy hg; ac_word=$2
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005674if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005675 $as_echo_n "(cached) " >&6
5676else
5677 if test -n "$HAS_HG"; then
5678 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5679else
5680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681for as_dir in $PATH
5682do
5683 IFS=$as_save_IFS
5684 test -z "$as_dir" && as_dir=.
5685 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005687 ac_cv_prog_HAS_HG="found"
5688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5689 break 2
5690 fi
5691done
5692 done
5693IFS=$as_save_IFS
5694
5695 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5696fi
5697fi
5698HAS_HG=$ac_cv_prog_HAS_HG
5699if test -n "$HAS_HG"; then
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5701$as_echo "$HAS_HG" >&6; }
5702else
5703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5704$as_echo "no" >&6; }
5705fi
5706
5707
5708if test $HAS_HG = found
5709then
5710 HGVERSION="hg id -i \$(srcdir)"
5711 HGTAG="hg id -t \$(srcdir)"
5712 HGBRANCH="hg id -b \$(srcdir)"
5713else
5714 HGVERSION=""
5715 HGTAG=""
5716 HGBRANCH=""
5717fi
5718
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005719case $MACHDEP in
5720bsdos*|hp*|HP*)
5721 # install -d does not work on BSDI or HP-UX
5722 if test -z "$INSTALL"
5723 then
5724 INSTALL="${srcdir}/install-sh -c"
5725 fi
5726esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005727# Find a good install program. We prefer a C program (faster),
5728# so one script is as good as another. But avoid the broken or
5729# incompatible versions:
5730# SysV /etc/install, /usr/sbin/install
5731# SunOS /usr/etc/install
5732# IRIX /sbin/install
5733# AIX /bin/install
5734# AmigaOS /C/install, which installs bootblocks on floppy discs
5735# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5736# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5737# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5738# OS/2's system install, which has a completely different semantic
5739# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005740# Reject install programs that cannot install multiple files.
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5742$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005743if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005744if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005745 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005746else
5747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5748for as_dir in $PATH
5749do
5750 IFS=$as_save_IFS
5751 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005752 # Account for people who put trailing slashes in PATH elements.
5753case $as_dir/ in #((
5754 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005755 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005756 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005757 /usr/ucb/* ) ;;
5758 *)
5759 # OSF1 and SCO ODT 3.0 have their own names for install.
5760 # Don't use installbsd from OSF since it installs stuff as root
5761 # by default.
5762 for ac_prog in ginstall scoinst install; do
5763 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005764 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005765 if test $ac_prog = install &&
5766 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5767 # AIX install. It has an incompatible calling convention.
5768 :
5769 elif test $ac_prog = install &&
5770 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5771 # program-specific install script used by HP pwplus--don't use.
5772 :
5773 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005774 rm -rf conftest.one conftest.two conftest.dir
5775 echo one > conftest.one
5776 echo two > conftest.two
5777 mkdir conftest.dir
5778 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5779 test -s conftest.one && test -s conftest.two &&
5780 test -s conftest.dir/conftest.one &&
5781 test -s conftest.dir/conftest.two
5782 then
5783 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5784 break 3
5785 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005786 fi
5787 fi
5788 done
5789 done
5790 ;;
5791esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005792
5793 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005794IFS=$as_save_IFS
5795
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005796rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005797
5798fi
5799 if test "${ac_cv_path_install+set}" = set; then
5800 INSTALL=$ac_cv_path_install
5801 else
5802 # As a last resort, use the slow shell script. Don't cache a
5803 # value for INSTALL within a source directory, because that will
5804 # break other packages using the cache if that directory is
5805 # removed, or if the value is a relative name.
5806 INSTALL=$ac_install_sh
5807 fi
5808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5810$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005811
5812# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5813# It thinks the first close brace ends the variable substitution.
5814test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5815
5816test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5817
5818test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5819
Trent Nelsonf6407a12012-08-30 14:56:13 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5821$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5822if test -z "$MKDIR_P"; then
5823 if ${ac_cv_path_mkdir+:} false; then :
5824 $as_echo_n "(cached) " >&6
5825else
5826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5827for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5828do
5829 IFS=$as_save_IFS
5830 test -z "$as_dir" && as_dir=.
5831 for ac_prog in mkdir gmkdir; do
5832 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005833 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005834 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5835 'mkdir (GNU coreutils) '* | \
5836 'mkdir (coreutils) '* | \
5837 'mkdir (fileutils) '4.1*)
5838 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5839 break 3;;
5840 esac
5841 done
5842 done
5843 done
5844IFS=$as_save_IFS
5845
5846fi
5847
5848 test -d ./--version && rmdir ./--version
5849 if test "${ac_cv_path_mkdir+set}" = set; then
5850 MKDIR_P="$ac_cv_path_mkdir -p"
5851 else
5852 # As a last resort, use the slow shell script. Don't cache a
5853 # value for MKDIR_P within a source directory, because that will
5854 # break other packages using the cache if that directory is
5855 # removed, or if the value is a relative name.
5856 MKDIR_P="$ac_install_sh -d"
5857 fi
5858fi
5859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5860$as_echo "$MKDIR_P" >&6; }
5861
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005862
5863# Not every filesystem supports hard links
5864
5865if test -z "$LN" ; then
5866 case $ac_sys_system in
5867 BeOS*) LN="ln -s";;
5868 CYGWIN*) LN="ln -s";;
5869 atheos*) LN="ln -s";;
5870 *) LN=ln;;
5871 esac
5872fi
5873
5874# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5876$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877
5878# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005879if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005880 withval=$with_pydebug;
5881if test "$withval" != no
5882then
5883
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005884$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5887$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005889else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5890$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005891fi
5892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005895fi
5896
5897
5898# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5899# merged with this chunk of code?
5900
5901# Optimizer/debugger flags
5902# ------------------------
5903# (The following bit of code is complicated enough - please keep things
5904# indented properly. Just pretend you're editing Python code. ;-)
5905
5906# There are two parallel sets of case statements below, one that checks to
5907# see if OPT was set and one that does BASECFLAGS setting based upon
5908# compiler and platform. BASECFLAGS tweaks need to be made even if the
5909# user set OPT.
5910
5911# tweak OPT based on compiler and platform, only if the user didn't set
5912# it on the command line
5913
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005914if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005915then
5916 case $GCC in
5917 yes)
5918 if test "$CC" != 'g++' ; then
5919 STRICT_PROTO="-Wstrict-prototypes"
5920 fi
5921 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5922 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5923 WRAP="-fwrapv"
5924 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005925
5926 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005927 case $CC in
5928 *clang*) WRAP="-fwrapv"
5929 ;;
5930 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005931
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005932 case $ac_cv_prog_cc_g in
5933 yes)
5934 if test "$Py_DEBUG" = 'true' ; then
5935 # Optimization messes up debuggers, so turn it off for
5936 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005937 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005938 else
5939 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5940 fi
5941 ;;
5942 *)
5943 OPT="-O3 -Wall $STRICT_PROTO"
5944 ;;
5945 esac
5946 case $ac_sys_system in
5947 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5948 ;;
5949 esac
5950 ;;
5951
5952 *)
5953 OPT="-O"
5954 ;;
5955 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005956fi
5957
5958
5959
5960# The -arch flags for universal builds on OSX
5961UNIVERSAL_ARCH_FLAGS=
5962
5963
5964# tweak BASECFLAGS based on compiler and platform
5965case $GCC in
5966yes)
5967 # Python violates C99 rules, by casting between incompatible
5968 # pointer types. GCC may generate bad code as a result of that,
5969 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5971$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972 ac_save_cc="$CC"
5973 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005974 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005975 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005976else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005978/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005979
5980int
5981main ()
5982{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005983
Gregory P. Smith373469a2009-11-01 21:03:38 +00005984 ;
5985 return 0;
5986}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005988if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005989 ac_cv_no_strict_aliasing_ok=yes
5990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005991 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005992fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005994fi
5995
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005996 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5998$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005999 if test $ac_cv_no_strict_aliasing_ok = yes
6000 then
6001 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6002 fi
6003
6004 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6005 # support. Without this, treatment of subnormals doesn't follow
6006 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006007 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006008 alpha*)
6009 BASECFLAGS="$BASECFLAGS -mieee"
6010 ;;
6011 esac
6012
6013 case $ac_sys_system in
6014 SCO_SV*)
6015 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6016 ;;
6017 # is there any other compiler on Darwin besides gcc?
6018 Darwin*)
6019 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6020 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006021 if test "${CC}" = gcc
6022 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6024$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006025 case "${UNIVERSALSDK}" in
6026 */MacOSX10.4u.sdk)
6027 # Build using 10.4 SDK, force usage of gcc when the
6028 # compiler is gcc, otherwise the user will get very
6029 # confusing error messages when building on OSX 10.6
6030 CC=gcc-4.0
6031 CPP=cpp-4.0
6032 ;;
6033 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6035$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006036 fi
6037
6038 # Calculate the right deployment target for this build.
6039 #
6040 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6041 if test ${cur_target} '>' 10.2; then
6042 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006043 if test ${enable_universalsdk}; then
6044 if test "${UNIVERSAL_ARCHS}" = "all"; then
6045 # Ensure that the default platform for a
6046 # 4-way universal build is OSX 10.5,
6047 # that's the first OS release where
6048 # 4-way builds make sense.
6049 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006050
6051 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6052 cur_target='10.5'
6053
6054 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6055 cur_target='10.5'
6056
6057 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6058 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006059 fi
6060 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006061 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006062 # On Intel macs default to a deployment
6063 # target of 10.4, that's the first OSX
6064 # release with Intel support.
6065 cur_target="10.4"
6066 fi
6067 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006068 fi
6069 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6070
6071 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6072 # environment with a value that is the same as what we'll use
6073 # in the Makefile to ensure that we'll get the same compiler
6074 # environment during configure and build time.
6075 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6076 export MACOSX_DEPLOYMENT_TARGET
6077 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6078
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006079 if test "${enable_universalsdk}"; then
6080 UNIVERSAL_ARCH_FLAGS=""
6081 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6082 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6083 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006084 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006085
6086 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6087 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6088 LIPO_32BIT_FLAGS=""
6089 ARCH_RUN_32BIT="true"
6090
6091 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6092 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6093 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006094 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006095
6096 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6097 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6098 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006099 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006100
6101 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6102 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6103 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006104 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006105
6106 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006107 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 +00006108
6109 fi
6110
6111
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006112 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6113 if test "${UNIVERSALSDK}" != "/"
6114 then
6115 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6116 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6117 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006118 fi
6119
6120 fi
6121
6122
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006123 ;;
6124 OSF*)
6125 BASECFLAGS="$BASECFLAGS -mieee"
6126 ;;
6127 esac
6128 ;;
6129
6130*)
6131 case $ac_sys_system in
6132 OpenUNIX*|UnixWare*)
6133 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6134 ;;
6135 OSF*)
6136 BASECFLAGS="$BASECFLAGS -ieee -std"
6137 ;;
6138 SCO_SV*)
6139 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6140 ;;
6141 esac
6142 ;;
6143esac
6144
6145if test "$Py_DEBUG" = 'true'; then
6146 :
6147else
6148 OPT="-DNDEBUG $OPT"
6149fi
6150
6151if test "$ac_arch_flags"
6152then
6153 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6154fi
6155
6156# disable check for icc since it seems to pass, but generates a warning
6157if test "$CC" = icc
6158then
6159 ac_cv_opt_olimit_ok=no
6160fi
6161
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6163$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006164if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006165 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006166else
6167 ac_save_cc="$CC"
6168CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006170/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006171
6172int
6173main ()
6174{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006175
Gregory P. Smith373469a2009-11-01 21:03:38 +00006176 ;
6177 return 0;
6178}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006180if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006181 ac_cv_opt_olimit_ok=yes
6182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006183 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006184
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006185fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006187CC="$ac_save_cc"
6188fi
6189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6191$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006192if test $ac_cv_opt_olimit_ok = yes; then
6193 case $ac_sys_system in
6194 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6195 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6196 # environment?
6197 Darwin*)
6198 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006199 # XXX thankfully this useless troublemaker of a flag has been
6200 # eradicated in the 3.x line. For now, make sure it isn't picked
6201 # up by any of our other platforms that use CC.
6202 AIX*|SunOS*|HP-UX*|IRIX*)
6203 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006204 *)
6205 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6206 ;;
6207 esac
6208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6210$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006211 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006212 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006213else
6214 ac_save_cc="$CC"
6215 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006217/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006218
6219int
6220main ()
6221{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006222
Gregory P. Smith373469a2009-11-01 21:03:38 +00006223 ;
6224 return 0;
6225}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006226_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006227if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006228 ac_cv_olimit_ok=yes
6229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006230 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006231
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006232fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006234 CC="$ac_save_cc"
6235fi
6236
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6238$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006239 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006240 case $ac_sys_system in
6241 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6242 HP-UX*)
6243 ;;
6244 *)
6245 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6246 ;;
6247 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006248 fi
6249fi
6250
6251# Check whether GCC supports PyArg_ParseTuple format
6252if test "$GCC" = "yes"
6253then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6255$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006256 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006257 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006259/* end confdefs.h. */
6260
6261 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006262int
6263main ()
6264{
6265
6266 ;
6267 return 0;
6268}
Matthias Klosec511b472010-05-08 11:01:39 +00006269
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006271if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006272
Matthias Klosec511b472010-05-08 11:01:39 +00006273
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006274$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006275
Matthias Klosec511b472010-05-08 11:01:39 +00006276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006277$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006278
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006279else
Matthias Klosec511b472010-05-08 11:01:39 +00006280
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006282$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006283
6284fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6286 CFLAGS=$save_CFLAGS
6287fi
6288
6289# On some compilers, pthreads are available without further options
6290# (e.g. MacOS X). On some of these systems, the compiler will not
6291# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6292# So we have to see first whether pthreads are available without
6293# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6295$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006296if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006297 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006298else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006300 ac_cv_pthread_is_default=no
6301else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006303/* end confdefs.h. */
6304
Stefan Krahae66ca62012-11-22 22:36:57 +01006305#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006306#include <pthread.h>
6307
6308void* routine(void* p){return NULL;}
6309
6310int main(){
6311 pthread_t p;
6312 if(pthread_create(&p,NULL,routine,NULL)!=0)
6313 return 1;
6314 (void)pthread_detach(p);
6315 return 0;
6316}
6317
6318_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006320
6321 ac_cv_pthread_is_default=yes
6322 ac_cv_kthread=no
6323 ac_cv_pthread=no
6324
6325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006327fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6329 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006330fi
6331
6332
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006333fi
6334
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6336$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006337
6338
6339if test $ac_cv_pthread_is_default = yes
6340then
6341 ac_cv_kpthread=no
6342else
6343# -Kpthread, if available, provides the right #defines
6344# and linker options to make pthread_create available
6345# Some compilers won't report that they do not support -Kpthread,
6346# so we need to run a program to see whether it really made the
6347# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6349$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006350if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006351 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006352else
6353 ac_save_cc="$CC"
6354CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006355if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006356 ac_cv_kpthread=no
6357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006359/* end confdefs.h. */
6360
Stefan Krahae66ca62012-11-22 22:36:57 +01006361#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006362#include <pthread.h>
6363
6364void* routine(void* p){return NULL;}
6365
6366int main(){
6367 pthread_t p;
6368 if(pthread_create(&p,NULL,routine,NULL)!=0)
6369 return 1;
6370 (void)pthread_detach(p);
6371 return 0;
6372}
6373
6374_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006375if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006376 ac_cv_kpthread=yes
6377else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006378 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006379fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6381 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006382fi
6383
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006384CC="$ac_save_cc"
6385fi
6386
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6388$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006389fi
6390
6391if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6392then
6393# -Kthread, if available, provides the right #defines
6394# and linker options to make pthread_create available
6395# Some compilers won't report that they do not support -Kthread,
6396# so we need to run a program to see whether it really made the
6397# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6399$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006400if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006401 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006402else
6403 ac_save_cc="$CC"
6404CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006405if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006406 ac_cv_kthread=no
6407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006409/* end confdefs.h. */
6410
Stefan Krahae66ca62012-11-22 22:36:57 +01006411#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006412#include <pthread.h>
6413
6414void* routine(void* p){return NULL;}
6415
6416int main(){
6417 pthread_t p;
6418 if(pthread_create(&p,NULL,routine,NULL)!=0)
6419 return 1;
6420 (void)pthread_detach(p);
6421 return 0;
6422}
6423
6424_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006425if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006426 ac_cv_kthread=yes
6427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006428 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006429fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6431 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006432fi
6433
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006434CC="$ac_save_cc"
6435fi
6436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6438$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006439fi
6440
6441if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6442then
6443# -pthread, if available, provides the right #defines
6444# and linker options to make pthread_create available
6445# Some compilers won't report that they do not support -pthread,
6446# so we need to run a program to see whether it really made the
6447# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6449$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006450if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006451 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006452else
6453 ac_save_cc="$CC"
6454CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006455if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006456 ac_cv_pthread=no
6457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006459/* end confdefs.h. */
6460
Stefan Krahae66ca62012-11-22 22:36:57 +01006461#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006462#include <pthread.h>
6463
6464void* routine(void* p){return NULL;}
6465
6466int main(){
6467 pthread_t p;
6468 if(pthread_create(&p,NULL,routine,NULL)!=0)
6469 return 1;
6470 (void)pthread_detach(p);
6471 return 0;
6472}
6473
6474_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006475if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006476 ac_cv_pthread=yes
6477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006478 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006479fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006482fi
6483
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006484CC="$ac_save_cc"
6485fi
6486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6488$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006489fi
6490
6491# If we have set a CC compiler flag for thread support then
6492# check if it works for CXX, too.
6493ac_cv_cxx_thread=no
6494if test ! -z "$CXX"
6495then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6497$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006498ac_save_cxx="$CXX"
6499
6500if test "$ac_cv_kpthread" = "yes"
6501then
6502 CXX="$CXX -Kpthread"
6503 ac_cv_cxx_thread=yes
6504elif test "$ac_cv_kthread" = "yes"
6505then
6506 CXX="$CXX -Kthread"
6507 ac_cv_cxx_thread=yes
6508elif test "$ac_cv_pthread" = "yes"
6509then
6510 CXX="$CXX -pthread"
6511 ac_cv_cxx_thread=yes
6512fi
6513
6514if test $ac_cv_cxx_thread = yes
6515then
6516 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6517 $CXX -c conftest.$ac_ext 2>&5
6518 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6519 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6520 then
6521 ac_cv_cxx_thread=yes
6522 else
6523 ac_cv_cxx_thread=no
6524 fi
6525 rm -fr conftest*
6526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6528$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006529fi
6530CXX="$ac_save_cxx"
6531
6532
6533# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6535$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006536if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006537 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006540/* end confdefs.h. */
6541#include <stdlib.h>
6542#include <stdarg.h>
6543#include <string.h>
6544#include <float.h>
6545
6546int
6547main ()
6548{
6549
6550 ;
6551 return 0;
6552}
6553_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006554if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006555 ac_cv_header_stdc=yes
6556else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006557 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006558fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6560
6561if test $ac_cv_header_stdc = yes; then
6562 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006564/* end confdefs.h. */
6565#include <string.h>
6566
6567_ACEOF
6568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006569 $EGREP "memchr" >/dev/null 2>&1; then :
6570
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006571else
6572 ac_cv_header_stdc=no
6573fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006574rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006575
6576fi
6577
6578if test $ac_cv_header_stdc = yes; then
6579 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006581/* end confdefs.h. */
6582#include <stdlib.h>
6583
6584_ACEOF
6585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006586 $EGREP "free" >/dev/null 2>&1; then :
6587
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006588else
6589 ac_cv_header_stdc=no
6590fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006591rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006592
6593fi
6594
6595if test $ac_cv_header_stdc = yes; then
6596 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006597 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006598 :
6599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006601/* end confdefs.h. */
6602#include <ctype.h>
6603#include <stdlib.h>
6604#if ((' ' & 0x0FF) == 0x020)
6605# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6606# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6607#else
6608# define ISLOWER(c) \
6609 (('a' <= (c) && (c) <= 'i') \
6610 || ('j' <= (c) && (c) <= 'r') \
6611 || ('s' <= (c) && (c) <= 'z'))
6612# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6613#endif
6614
6615#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6616int
6617main ()
6618{
6619 int i;
6620 for (i = 0; i < 256; i++)
6621 if (XOR (islower (i), ISLOWER (i))
6622 || toupper (i) != TOUPPER (i))
6623 return 2;
6624 return 0;
6625}
6626_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006627if ac_fn_c_try_run "$LINENO"; then :
6628
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006630 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006631fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6633 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006634fi
6635
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006636fi
6637fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6639$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006640if test $ac_cv_header_stdc = yes; then
6641
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006642$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006643
6644fi
6645
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006646for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6647fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006648ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006649shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006650unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006651sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6652sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006653sys/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 +00006654sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006655sys/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 +00006656sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006657bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006658do :
6659 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6660ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006661if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006662 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006663#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006664_ACEOF
6665
6666fi
6667
Guido van Rossum627b2d71993-12-24 10:39:16 +00006668done
6669
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006670ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006671for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006672 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6674$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006675if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006676 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006679/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006680#include <sys/types.h>
6681#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006682
Martin v. Löwis11437992002-04-12 09:54:03 +00006683int
6684main ()
6685{
6686if ((DIR *) 0)
6687return 0;
6688 ;
6689 return 0;
6690}
6691_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006693 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006695 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006698fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006699eval ac_res=\$$as_ac_Header
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6701$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006702if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006703 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006705_ACEOF
6706
6707ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006708fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006709
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006710done
6711# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6712if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6714$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006715if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006716 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006717else
Martin v. Löwis11437992002-04-12 09:54:03 +00006718 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006721
Martin v. Löwiseba40652007-08-30 20:10:57 +00006722/* Override any GCC internal prototype to avoid an error.
6723 Use char because int might match the return type of a GCC
6724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006725#ifdef __cplusplus
6726extern "C"
6727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006728char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006729int
6730main ()
6731{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006732return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006733 ;
6734 return 0;
6735}
6736_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006737for ac_lib in '' dir; do
6738 if test -z "$ac_lib"; then
6739 ac_res="none required"
6740 else
6741 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006742 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006743 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006744 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006745 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006747rm -f core conftest.err conftest.$ac_objext \
6748 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006749 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006752done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006753if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754
Martin v. Löwiseba40652007-08-30 20:10:57 +00006755else
6756 ac_cv_search_opendir=no
6757fi
6758rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006759LIBS=$ac_func_search_save_LIBS
6760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6762$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006763ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006765 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006767fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006768
Michael W. Hudson54241132001-12-07 15:38:26 +00006769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6771$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006772if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006773 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006774else
6775 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006778
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779/* Override any GCC internal prototype to avoid an error.
6780 Use char because int might match the return type of a GCC
6781 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006782#ifdef __cplusplus
6783extern "C"
6784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006785char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006786int
6787main ()
6788{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006789return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 ;
6791 return 0;
6792}
6793_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794for ac_lib in '' x; do
6795 if test -z "$ac_lib"; then
6796 ac_res="none required"
6797 else
6798 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006799 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006800 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006801 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006802 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006804rm -f core conftest.err conftest.$ac_objext \
6805 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006806 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006807 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006810if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006811
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812else
6813 ac_cv_search_opendir=no
6814fi
6815rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006816LIBS=$ac_func_search_save_LIBS
6817fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6819$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006820ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006821if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006822 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006823
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006824fi
6825
6826fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006827
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6829$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006830if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006834/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006835#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006836int
6837main ()
6838{
6839return makedev(0, 0);
6840 ;
6841 return 0;
6842}
6843_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006845 ac_cv_header_sys_types_h_makedev=yes
6846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006849rm -f core conftest.err conftest.$ac_objext \
6850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006851
6852fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6854$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006855
6856if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857ac_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 +01006858if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006861
6862fi
6863
6864
6865
6866 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006867 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 +01006868if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006869
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006871
6872fi
6873
6874
6875 fi
6876fi
6877
Michael W. Hudson54241132001-12-07 15:38:26 +00006878
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006879# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006880for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006881do :
6882 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006883#ifdef HAVE_CURSES_H
6884#include <curses.h>
6885#endif
6886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006887"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006888if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006889 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006891_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006892
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006893fi
6894
6895done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006896
6897
Martin v. Löwis11017b12006-01-14 18:12:57 +00006898# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006899for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006900do :
6901 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 +00006902#ifdef HAVE_ASM_TYPES_H
6903#include <asm/types.h>
6904#endif
6905#ifdef HAVE_SYS_SOCKET_H
6906#include <sys/socket.h>
6907#endif
6908
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006909"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006910if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006911 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006912#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006913_ACEOF
6914
6915fi
6916
6917done
6918
6919
Guido van Rossum627b2d71993-12-24 10:39:16 +00006920# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006921was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6923$as_echo_n "checking for clock_t in time.h... " >&6; }
6924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006925/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006926#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006927
6928_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006931 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006932else
Martin v. Löwis11437992002-04-12 09:54:03 +00006933
6934
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006935$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006936
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006937
Guido van Rossum627b2d71993-12-24 10:39:16 +00006938fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006939rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006940
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6942$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006943
Neal Norwitz11690112002-07-30 01:08:28 +00006944# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6946$as_echo_n "checking for makedev... " >&6; }
6947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006948/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006949
6950#if defined(MAJOR_IN_MKDEV)
6951#include <sys/mkdev.h>
6952#elif defined(MAJOR_IN_SYSMACROS)
6953#include <sys/sysmacros.h>
6954#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006955#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006956#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006957int
6958main ()
6959{
6960 makedev(0, 0)
6961 ;
6962 return 0;
6963}
6964_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006965if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006966 ac_cv_has_makedev=yes
6967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006970rm -f core conftest.err conftest.$ac_objext \
6971 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006972if test "$ac_cv_has_makedev" = "no"; then
6973 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006975/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006976
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006977#define _OSF_SOURCE 1
6978#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006979
Neal Norwitz11690112002-07-30 01:08:28 +00006980int
6981main ()
6982{
6983 makedev(0, 0)
6984 ;
6985 return 0;
6986}
6987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006988if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006989 ac_cv_has_makedev=yes
6990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006993rm -f core conftest.err conftest.$ac_objext \
6994 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006995 if test "$ac_cv_has_makedev" = "yes"; then
6996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006997$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006998
6999 fi
7000fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7002$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007003if test "$ac_cv_has_makedev" = "yes"; then
7004
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007006
7007fi
7008
Martin v. Löwis399a6892002-10-04 10:22:02 +00007009# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7010# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7011# defined, but the compiler does not support pragma redefine_extname,
7012# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7013# structures (such as rlimit64) without declaring them. As a
7014# work-around, disable LFS on such configurations
7015
7016use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7018$as_echo_n "checking Solaris LFS bug... " >&6; }
7019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007020/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007021
7022#define _LARGEFILE_SOURCE 1
7023#define _FILE_OFFSET_BITS 64
7024#include <sys/resource.h>
7025
Martin v. Löwis399a6892002-10-04 10:22:02 +00007026int
7027main ()
7028{
7029struct rlimit foo;
7030 ;
7031 return 0;
7032}
7033_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007035 sol_lfs_bug=no
7036else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007037 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7041$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007042if test "$sol_lfs_bug" = "yes"; then
7043 use_lfs=no
7044fi
7045
7046if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007047# Two defines needed to enable largefile support on various platforms
7048# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007049case $ac_sys_system/$ac_sys_release in
7050AIX*)
7051
7052$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7053
7054 ;;
7055esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007056
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007057$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007058
7059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007061
Martin v. Löwis399a6892002-10-04 10:22:02 +00007062fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007063
Guido van Rossum84e7b241996-08-19 21:59:00 +00007064# Add some code to confdefs.h so that the test for off_t works on SCO
7065cat >> confdefs.h <<\EOF
7066#if defined(SCO_DS)
7067#undef _OFF_T
7068#endif
7069EOF
7070
Guido van Rossumef2255b2000-03-10 22:30:29 +00007071# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007072ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007073if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075else
Martin v. Löwis11437992002-04-12 09:54:03 +00007076
7077cat >>confdefs.h <<_ACEOF
7078#define mode_t int
7079_ACEOF
7080
7081fi
7082
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007084if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007086else
Martin v. Löwis11437992002-04-12 09:54:03 +00007087
7088cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007090_ACEOF
7091
7092fi
7093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007094ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007095if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007097else
Martin v. Löwis11437992002-04-12 09:54:03 +00007098
7099cat >>confdefs.h <<_ACEOF
7100#define pid_t int
7101_ACEOF
7102
7103fi
7104
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007105
Martin v. Löwis11437992002-04-12 09:54:03 +00007106cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007107#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007108_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007109
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007110ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007111if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007112
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007113else
Martin v. Löwis11437992002-04-12 09:54:03 +00007114
7115cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007116#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007117_ACEOF
7118
7119fi
7120
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7122$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007123if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007127/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007128#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007129
7130_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007132 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007133 ac_cv_type_uid_t=yes
7134else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007135 ac_cv_type_uid_t=no
7136fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007137rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7141$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007142if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007143
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007144$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007145
7146
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007147$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148
7149fi
7150
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007151
7152# There are two separate checks for each of the exact-width integer types we
7153# need. First we check whether the type is available using the usual
7154# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7155# and <stdint.h> where available). We then also use the special type checks of
7156# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7157# directly, #define's uint32_t to be a suitable type.
7158
7159ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7160if test "x$ac_cv_type_uint32_t" = xyes; then :
7161
7162$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7163
7164fi
7165
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007166ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7167case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007168 no|yes) ;; #(
7169 *)
7170
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007171$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007172
7173
7174cat >>confdefs.h <<_ACEOF
7175#define uint32_t $ac_cv_c_uint32_t
7176_ACEOF
7177;;
7178 esac
7179
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007180
7181ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7182if test "x$ac_cv_type_uint64_t" = xyes; then :
7183
7184$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7185
7186fi
7187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007188ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7189case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007190 no|yes) ;; #(
7191 *)
7192
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007193$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007194
7195
7196cat >>confdefs.h <<_ACEOF
7197#define uint64_t $ac_cv_c_uint64_t
7198_ACEOF
7199;;
7200 esac
7201
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007202
7203ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7204if test "x$ac_cv_type_int32_t" = xyes; then :
7205
7206$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7207
7208fi
7209
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007210ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7211case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007212 no|yes) ;; #(
7213 *)
7214
7215cat >>confdefs.h <<_ACEOF
7216#define int32_t $ac_cv_c_int32_t
7217_ACEOF
7218;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007219esac
7220
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007221
7222ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7223if test "x$ac_cv_type_int64_t" = xyes; then :
7224
7225$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7226
7227fi
7228
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007229ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7230case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007231 no|yes) ;; #(
7232 *)
7233
7234cat >>confdefs.h <<_ACEOF
7235#define int64_t $ac_cv_c_int64_t
7236_ACEOF
7237;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007238esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007239
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007242if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007243
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007244$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007245
7246fi
7247
Jack Jansendd19cf82001-12-06 22:36:17 +00007248
Michael W. Hudson54241132001-12-07 15:38:26 +00007249# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007250# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007251# The cast to long int works around a bug in the HP C Compiler
7252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7254# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7256$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007257if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007260 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 +00007261
Martin v. Löwis11437992002-04-12 09:54:03 +00007262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007263 if test "$ac_cv_type_int" = yes; then
7264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007266as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007267See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007268 else
7269 ac_cv_sizeof_int=0
7270 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272
Martin v. Löwis11437992002-04-12 09:54:03 +00007273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7275$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007276
7277
7278
Martin v. Löwis11437992002-04-12 09:54:03 +00007279cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007280#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007281_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007282
7283
Martin v. Löwiseba40652007-08-30 20:10:57 +00007284# The cast to long int works around a bug in the HP C Compiler
7285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7287# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7289$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007290if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293 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 +00007294
Martin v. Löwis11437992002-04-12 09:54:03 +00007295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007296 if test "$ac_cv_type_long" = yes; then
7297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007299as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007300See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007301 else
7302 ac_cv_sizeof_long=0
7303 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007304fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007305
Martin v. Löwis11437992002-04-12 09:54:03 +00007306fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7308$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007309
7310
7311
Martin v. Löwis11437992002-04-12 09:54:03 +00007312cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007313#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007314_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007315
7316
Martin v. Löwiseba40652007-08-30 20:10:57 +00007317# The cast to long int works around a bug in the HP C Compiler
7318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7320# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7322$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007323if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007324 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007326 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 +00007327
Martin v. Löwis11437992002-04-12 09:54:03 +00007328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329 if test "$ac_cv_type_void_p" = yes; then
7330 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007332as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007333See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007334 else
7335 ac_cv_sizeof_void_p=0
7336 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007337fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007338
Martin v. Löwis11437992002-04-12 09:54:03 +00007339fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7341$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007342
7343
7344
Martin v. Löwis11437992002-04-12 09:54:03 +00007345cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007346#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007347_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007348
7349
Martin v. Löwiseba40652007-08-30 20:10:57 +00007350# The cast to long int works around a bug in the HP C Compiler
7351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7353# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7355$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007356if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007357 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007358else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007359 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 +00007360
Martin v. Löwis11437992002-04-12 09:54:03 +00007361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362 if test "$ac_cv_type_short" = yes; then
7363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007365as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007366See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007367 else
7368 ac_cv_sizeof_short=0
7369 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007370fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007371
Martin v. Löwis11437992002-04-12 09:54:03 +00007372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7374$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007375
7376
7377
Martin v. Löwis11437992002-04-12 09:54:03 +00007378cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007379#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007380_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007381
7382
Martin v. Löwiseba40652007-08-30 20:10:57 +00007383# The cast to long int works around a bug in the HP C Compiler
7384# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7385# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7386# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7388$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007389if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007391else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007392 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 +00007393
Martin v. Löwis11437992002-04-12 09:54:03 +00007394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007395 if test "$ac_cv_type_float" = yes; then
7396 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007398as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007399See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007400 else
7401 ac_cv_sizeof_float=0
7402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404
Martin v. Löwis11437992002-04-12 09:54:03 +00007405fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7407$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007408
7409
7410
Martin v. Löwis11437992002-04-12 09:54:03 +00007411cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007412#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007413_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007414
7415
Martin v. Löwiseba40652007-08-30 20:10:57 +00007416# The cast to long int works around a bug in the HP C Compiler
7417# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7418# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7419# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7421$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007422if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007425 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 +00007426
Martin v. Löwis11437992002-04-12 09:54:03 +00007427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007428 if test "$ac_cv_type_double" = yes; then
7429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007431as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007432See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007433 else
7434 ac_cv_sizeof_double=0
7435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007437
Martin v. Löwis11437992002-04-12 09:54:03 +00007438fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7440$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441
7442
7443
Martin v. Löwis11437992002-04-12 09:54:03 +00007444cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007445#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007446_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007447
7448
Martin v. Löwiseba40652007-08-30 20:10:57 +00007449# The cast to long int works around a bug in the HP C Compiler
7450# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7451# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7452# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7454$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007455if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007458 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 +00007459
Martin v. Löwis11437992002-04-12 09:54:03 +00007460else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461 if test "$ac_cv_type_fpos_t" = yes; then
7462 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7463$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007464as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007465See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007466 else
7467 ac_cv_sizeof_fpos_t=0
7468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007469fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007470
Martin v. Löwis11437992002-04-12 09:54:03 +00007471fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7473$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007474
7475
7476
Martin v. Löwis11437992002-04-12 09:54:03 +00007477cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007478#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007479_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007480
Michael W. Hudson54241132001-12-07 15:38:26 +00007481
Martin v. Löwiseba40652007-08-30 20:10:57 +00007482# The cast to long int works around a bug in the HP C Compiler
7483# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7484# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7485# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7487$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007488if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007489 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007491 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 +00007492
Martin v. Löwis18e16552006-02-15 17:27:45 +00007493else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007494 if test "$ac_cv_type_size_t" = yes; then
7495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007497as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007498See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007499 else
7500 ac_cv_sizeof_size_t=0
7501 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007503
Martin v. Löwis18e16552006-02-15 17:27:45 +00007504fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7506$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007507
7508
7509
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510cat >>confdefs.h <<_ACEOF
7511#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7512_ACEOF
7513
7514
Christian Heimes951cc0f2008-01-31 23:08:23 +00007515# The cast to long int works around a bug in the HP C Compiler
7516# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7517# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7518# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7520$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007521if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007524 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 +00007525
Christian Heimes951cc0f2008-01-31 23:08:23 +00007526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007527 if test "$ac_cv_type_pid_t" = yes; then
7528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007530as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007531See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007532 else
7533 ac_cv_sizeof_pid_t=0
7534 fi
7535fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007536
Christian Heimes951cc0f2008-01-31 23:08:23 +00007537fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7539$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007540
7541
7542
7543cat >>confdefs.h <<_ACEOF
7544#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7545_ACEOF
7546
7547
Michael W. Hudson54241132001-12-07 15:38:26 +00007548
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7550$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007551have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007553/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007554
Martin v. Löwis11437992002-04-12 09:54:03 +00007555int
7556main ()
7557{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007558long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007559 ;
7560 return 0;
7561}
7562_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007564
7565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007566$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007567
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007568 have_long_long=yes
7569
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7573$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007574if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007575# The cast to long int works around a bug in the HP C Compiler
7576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7578# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7580$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007581if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007584 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 +00007585
Martin v. Löwis11437992002-04-12 09:54:03 +00007586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007587 if test "$ac_cv_type_long_long" = yes; then
7588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007590as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007591See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007592 else
7593 ac_cv_sizeof_long_long=0
7594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007596
Martin v. Löwis11437992002-04-12 09:54:03 +00007597fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7599$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600
7601
7602
Martin v. Löwis11437992002-04-12 09:54:03 +00007603cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007604#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007605_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007606
Michael W. Hudson54241132001-12-07 15:38:26 +00007607
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007608fi
7609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7611$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007612have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007614/* end confdefs.h. */
7615
7616int
7617main ()
7618{
Matthias Klosec511b472010-05-08 11:01:39 +00007619long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007620 ;
7621 return 0;
7622}
7623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007624if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007625
7626
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007627$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007628
7629 have_long_double=yes
7630
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007631fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7634$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007635if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007636# The cast to long int works around a bug in the HP C Compiler
7637# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7638# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7639# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7641$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007642if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007643 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645 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 +00007646
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648 if test "$ac_cv_type_long_double" = yes; then
7649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007651as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007652See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007653 else
7654 ac_cv_sizeof_long_double=0
7655 fi
7656fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007657
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007658fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7660$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007661
7662
7663
7664cat >>confdefs.h <<_ACEOF
7665#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7666_ACEOF
7667
7668
7669fi
7670
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7672$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007673have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007675/* end confdefs.h. */
7676
7677int
7678main ()
7679{
7680_Bool x; x = (_Bool)0;
7681 ;
7682 return 0;
7683}
7684_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007685if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007686
7687
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007688$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007689
7690 have_c99_bool=yes
7691
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7695$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007696if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007697# The cast to long int works around a bug in the HP C Compiler
7698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7700# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7702$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007703if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007704 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007706 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 +00007707
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007709 if test "$ac_cv_type__Bool" = yes; then
7710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007712as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007713See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 else
7715 ac_cv_sizeof__Bool=0
7716 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007718
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007719fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7721$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007722
7723
7724
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007725cat >>confdefs.h <<_ACEOF
7726#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7727_ACEOF
7728
7729
7730fi
7731
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007732ac_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 +00007733 #include <stdint.h>
7734 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007735 #ifdef HAVE_INTTYPES_H
7736 #include <inttypes.h>
7737 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007738"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007739if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007740
7741cat >>confdefs.h <<_ACEOF
7742#define HAVE_UINTPTR_T 1
7743_ACEOF
7744
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745# The cast to long int works around a bug in the HP C Compiler
7746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7748# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7750$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007751if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007752 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007754 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 +00007755
Martin v. Löwis11437992002-04-12 09:54:03 +00007756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757 if test "$ac_cv_type_uintptr_t" = yes; then
7758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007760as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007761See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762 else
7763 ac_cv_sizeof_uintptr_t=0
7764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007765fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007766
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7769$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007770
7771
7772
Martin v. Löwis11437992002-04-12 09:54:03 +00007773cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007774#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007775_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007776
Michael W. Hudson54241132001-12-07 15:38:26 +00007777
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007778fi
7779
Martin v. Löwisebe26702006-10-02 14:55:51 +00007780
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007781# The cast to long int works around a bug in the HP C Compiler
7782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7784# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7786$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007787if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007788 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007790 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007791#ifdef HAVE_SYS_TYPES_H
7792#include <sys/types.h>
7793#endif
7794
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007795"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007796
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798 if test "$ac_cv_type_off_t" = yes; then
7799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007801as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007802See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007803 else
7804 ac_cv_sizeof_off_t=0
7805 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007807
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7810$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007811
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007812
7813
Martin v. Löwis11437992002-04-12 09:54:03 +00007814cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007815#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007816_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007817
Michael W. Hudson54241132001-12-07 15:38:26 +00007818
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007819
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7821$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007822if test "$have_long_long" = yes
7823then
7824if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007825 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007827$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007828
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7830$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7833$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007834fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7837$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007838fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007839
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007840# The cast to long int works around a bug in the HP C Compiler
7841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7843# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7845$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007846if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007847 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007849 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007850#ifdef HAVE_SYS_TYPES_H
7851#include <sys/types.h>
7852#endif
7853#ifdef HAVE_TIME_H
7854#include <time.h>
7855#endif
7856
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007858
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860 if test "$ac_cv_type_time_t" = yes; then
7861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007863as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007864See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007865 else
7866 ac_cv_sizeof_time_t=0
7867 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007869
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7872$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007874
7875
Martin v. Löwis11437992002-04-12 09:54:03 +00007876cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007877#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007878_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007879
Michael W. Hudson54241132001-12-07 15:38:26 +00007880
7881
Trent Mick635f6fb2000-08-23 21:33:05 +00007882# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007883ac_save_cc="$CC"
7884if test "$ac_cv_kpthread" = "yes"
7885then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007886elif test "$ac_cv_kthread" = "yes"
7887then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007888elif test "$ac_cv_pthread" = "yes"
7889then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7892$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007893have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007895/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007896
7897 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
Guido van Rossum12580492000-09-24 16:47:19 +00007901pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 ;
7903 return 0;
7904}
Matthias Klosec511b472010-05-08 11:01:39 +00007905
Martin v. Löwis11437992002-04-12 09:54:03 +00007906_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007908 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7912$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007913if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007915# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7916# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7917# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7919$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007920if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007921 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007924#ifdef HAVE_PTHREAD_H
7925#include <pthread.h>
7926#endif
7927
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007929
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931 if test "$ac_cv_type_pthread_t" = yes; then
7932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007934as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007935See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007936 else
7937 ac_cv_sizeof_pthread_t=0
7938 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007939fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007940
Trent Mick635f6fb2000-08-23 21:33:05 +00007941fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7943$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007944
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007945
7946
Martin v. Löwis11437992002-04-12 09:54:03 +00007947cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007948#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007949_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007950
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007951
Trent Mick635f6fb2000-08-23 21:33:05 +00007952fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007953CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007954
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7956$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007958if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007959 enableval=$enable_toolbox_glue;
7960fi
Jack Jansene578a632001-08-15 01:27:14 +00007961
7962
7963if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007964then
Jack Jansene578a632001-08-15 01:27:14 +00007965 case $ac_sys_system/$ac_sys_release in
7966 Darwin/*)
7967 enable_toolbox_glue="yes";;
7968 *)
7969 enable_toolbox_glue="no";;
7970 esac
7971fi
7972case "$enable_toolbox_glue" in
7973yes)
Jack Jansene578a632001-08-15 01:27:14 +00007974 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007975 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007978
7979 ;;
7980*)
Jack Jansene578a632001-08-15 01:27:14 +00007981 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007982 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007983 ;;
7984esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7986$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007987
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007988
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007989
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007990case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007991 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007992 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7993 ;;
7994 Darwin/*)
7995 OTHER_LIBTOOL_OPT=""
7996 ;;
7997esac
7998
7999
Ronald Oussoren25967582009-09-06 10:00:26 +00008000
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