blob: 6b8e37f0d21a16f2441c77ac00815a1b162192f5 [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
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
Brett Cannon4ff151a2015-09-18 15:09:42 -0700664LLVM_PROF_FOUND
665LLVM_PROF_ERR
666LLVM_PROF_FILE
667LLVM_PROF_MERGER
668PGO_PROF_USE_FLAG
669PGO_PROF_GEN_FLAG
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000670LTOFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000671UNIVERSAL_ARCH_FLAGS
672BASECFLAGS
673OPT
674LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000675MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000676INSTALL_DATA
677INSTALL_SCRIPT
678INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100679HAS_HG
680HGBRANCH
681HGTAG
682HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400683BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000684SVNVERSION
685ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100686ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000687AR
688RANLIB
689GNULD
690LINKCC
691RUNSHARED
692INSTSONAME
693LDLIBRARYDIR
694BLDLIBRARY
695DLLLIBRARY
696LDLIBRARY
697LIBRARY
698BUILDEXEEXT
699EGREP
700GREP
701CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100702MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100703ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000704MAINCC
705CXX
706OBJEXT
707EXEEXT
708ac_ct_CC
709CPPFLAGS
710LDFLAGS
711CFLAGS
712CC
713EXPORT_MACOSX_DEPLOYMENT_TARGET
714CONFIGURE_MACOSX_DEPLOYMENT_TARGET
715EXTRAMACHDEPPATH
716EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200717PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000718SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100719_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000720MACHDEP
721FRAMEWORKINSTALLAPPSPREFIX
722FRAMEWORKUNIXTOOLSPREFIX
723FRAMEWORKALTINSTALLLAST
724FRAMEWORKALTINSTALLFIRST
725FRAMEWORKINSTALLLAST
726FRAMEWORKINSTALLFIRST
727PYTHONFRAMEWORKINSTALLDIR
728PYTHONFRAMEWORKPREFIX
729PYTHONFRAMEWORKDIR
730PYTHONFRAMEWORKIDENTIFIER
731PYTHONFRAMEWORK
732LIPO_32BIT_FLAGS
733ARCH_RUN_32BIT
734UNIVERSALSDK
735CONFIG_ARGS
736SOVERSION
737VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100738PYTHON_FOR_BUILD
739host_os
740host_vendor
741host_cpu
742host
743build_os
744build_vendor
745build_cpu
746build
Martin Pantere9ee3172016-04-23 00:58:44 +0000747cross_compiling
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000748target_alias
749host_alias
750build_alias
751LIBS
752ECHO_T
753ECHO_N
754ECHO_C
755DEFS
756mandir
757localedir
758libdir
759psdir
760pdfdir
761dvidir
762htmldir
763infodir
764docdir
765oldincludedir
766includedir
767localstatedir
768sharedstatedir
769sysconfdir
770datadir
771datarootdir
772libexecdir
773sbindir
774bindir
775program_transform_name
776prefix
777exec_prefix
778PACKAGE_URL
779PACKAGE_BUGREPORT
780PACKAGE_STRING
781PACKAGE_VERSION
782PACKAGE_TARNAME
783PACKAGE_NAME
784PATH_SEPARATOR
785SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000786ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000787ac_user_opts='
788enable_option_checking
789enable_universalsdk
790with_universal_archs
791with_framework_name
792enable_framework
793with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600794with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000795with_cxx_main
796with_suffix
797enable_shared
798enable_profiling
799with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000800with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000801enable_toolbox_glue
802with_libs
803with_system_expat
804with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700805with_tcltk_includes
806with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000807with_dbmliborder
808with_signal_module
809with_dec_threads
810with_threads
811with_thread
812with_pth
813enable_ipv6
814with_doc_strings
815with_tsc
816with_pymalloc
817with_valgrind
818with_wctype_functions
819with_fpectl
820with_libm
821with_libc
822enable_big_digits
823enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500824with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800825with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000826'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000827 ac_precious_vars='build_alias
828host_alias
829target_alias
830CC
831CFLAGS
832LDFLAGS
833LIBS
834CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500835CPP
836PKG_CONFIG
837PKG_CONFIG_PATH
838PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000839
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000842ac_init_help=
843ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000844ac_unrecognized_opts=
845ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846# The variables have the same names as the options, with
847# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000848cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851no_recursion=
852prefix=NONE
853program_prefix=NONE
854program_suffix=NONE
855program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860x_includes=NONE
861x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863# Installation directory options.
864# These are left unexpanded so users can "make install exec_prefix=/foo"
865# and all the variables that are supposed to be based on exec_prefix
866# by default will actually change.
867# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000868# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869bindir='${exec_prefix}/bin'
870sbindir='${exec_prefix}/sbin'
871libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872datarootdir='${prefix}/share'
873datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874sysconfdir='${prefix}/etc'
875sharedstatedir='${prefix}/com'
876localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877includedir='${prefix}/include'
878oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000879docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
880infodir='${datarootdir}/info'
881htmldir='${docdir}'
882dvidir='${docdir}'
883pdfdir='${docdir}'
884psdir='${docdir}'
885libdir='${exec_prefix}/lib'
886localedir='${datarootdir}/locale'
887mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000890ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000892do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893 # If the previous option needs an argument, assign it.
894 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000895 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896 ac_prev=
897 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000898 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000901 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
902 *=) ac_optarg= ;;
903 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000904 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Accept the important Cygnus configure options, so we can diagnose typos.
907
Martin v. Löwiseba40652007-08-30 20:10:57 +0000908 case $ac_dashdash$ac_option in
909 --)
910 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -bindir | --bindir | --bindi | --bind | --bin | --bi)
913 ac_prev=bindir ;;
914 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916
917 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 -cache-file | --cache-file | --cache-fil | --cache-fi \
923 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
924 ac_prev=cache_file ;;
925 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
926 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 cache_file=$ac_optarg ;;
928
929 --config-cache | -C)
930 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931
Martin v. Löwiseba40652007-08-30 20:10:57 +0000932 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000934 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
Martin v. Löwiseba40652007-08-30 20:10:57 +0000937 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
938 | --dataroo | --dataro | --datar)
939 ac_prev=datarootdir ;;
940 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
941 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
942 datarootdir=$ac_optarg ;;
943
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000945 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000947 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000948 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000949 ac_useropt_orig=$ac_useropt
950 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
951 case $ac_user_opts in
952 *"
953"enable_$ac_useropt"
954"*) ;;
955 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
956 ac_unrecognized_sep=', ';;
957 esac
958 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000959
960 -docdir | --docdir | --docdi | --doc | --do)
961 ac_prev=docdir ;;
962 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
963 docdir=$ac_optarg ;;
964
965 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
966 ac_prev=dvidir ;;
967 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
968 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
970 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000971 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000972 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000973 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000974 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000975 ac_useropt_orig=$ac_useropt
976 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
977 case $ac_user_opts in
978 *"
979"enable_$ac_useropt"
980"*) ;;
981 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
982 ac_unrecognized_sep=', ';;
983 esac
984 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
987 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
988 | --exec | --exe | --ex)
989 ac_prev=exec_prefix ;;
990 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
991 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
992 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 # Obsolete; use --with-gas.
997 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 -help | --help | --hel | --he | -h)
1000 ac_init_help=long ;;
1001 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1002 ac_init_help=recursive ;;
1003 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1004 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Martin v. Löwiseba40652007-08-30 20:10:57 +00001011 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1012 ac_prev=htmldir ;;
1013 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1014 | --ht=*)
1015 htmldir=$ac_optarg ;;
1016
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017 -includedir | --includedir | --includedi | --included | --include \
1018 | --includ | --inclu | --incl | --inc)
1019 ac_prev=includedir ;;
1020 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1021 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -infodir | --infodir | --infodi | --infod | --info | --inf)
1025 ac_prev=infodir ;;
1026 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -libdir | --libdir | --libdi | --libd)
1030 ac_prev=libdir ;;
1031 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1035 | --libexe | --libex | --libe)
1036 ac_prev=libexecdir ;;
1037 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1038 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Martin v. Löwiseba40652007-08-30 20:10:57 +00001041 -localedir | --localedir | --localedi | --localed | --locale)
1042 ac_prev=localedir ;;
1043 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1044 localedir=$ac_optarg ;;
1045
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001047 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 ac_prev=localstatedir ;;
1049 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001050 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1054 ac_prev=mandir ;;
1055 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001059 # Obsolete; use --without-fp.
1060 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064 no_create=yes ;;
1065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001066 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1067 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1068 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1071 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1072 | --oldin | --oldi | --old | --ol | --o)
1073 ac_prev=oldincludedir ;;
1074 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1075 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1076 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1080 ac_prev=prefix ;;
1081 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1085 | --program-pre | --program-pr | --program-p)
1086 ac_prev=program_prefix ;;
1087 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1088 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1092 | --program-suf | --program-su | --program-s)
1093 ac_prev=program_suffix ;;
1094 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1095 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -program-transform-name | --program-transform-name \
1099 | --program-transform-nam | --program-transform-na \
1100 | --program-transform-n | --program-transform- \
1101 | --program-transform | --program-transfor \
1102 | --program-transfo | --program-transf \
1103 | --program-trans | --program-tran \
1104 | --progr-tra | --program-tr | --program-t)
1105 ac_prev=program_transform_name ;;
1106 -program-transform-name=* | --program-transform-name=* \
1107 | --program-transform-nam=* | --program-transform-na=* \
1108 | --program-transform-n=* | --program-transform-=* \
1109 | --program-transform=* | --program-transfor=* \
1110 | --program-transfo=* | --program-transf=* \
1111 | --program-trans=* | --program-tran=* \
1112 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
Martin v. Löwiseba40652007-08-30 20:10:57 +00001115 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1116 ac_prev=pdfdir ;;
1117 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1118 pdfdir=$ac_optarg ;;
1119
1120 -psdir | --psdir | --psdi | --psd | --ps)
1121 ac_prev=psdir ;;
1122 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1123 psdir=$ac_optarg ;;
1124
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1126 | -silent | --silent | --silen | --sile | --sil)
1127 silent=yes ;;
1128
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001129 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1130 ac_prev=sbindir ;;
1131 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1132 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001134
1135 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1136 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1137 | --sharedst | --shareds | --shared | --share | --shar \
1138 | --sha | --sh)
1139 ac_prev=sharedstatedir ;;
1140 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1141 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1142 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1143 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146 -site | --site | --sit)
1147 ac_prev=site ;;
1148 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001150
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1152 ac_prev=srcdir ;;
1153 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1157 | --syscon | --sysco | --sysc | --sys | --sy)
1158 ac_prev=sysconfdir ;;
1159 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1160 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1169 verbose=yes ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 -version | --version | --versio | --versi | --vers | -V)
1172 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
1174 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001175 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001177 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001178 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001179 ac_useropt_orig=$ac_useropt
1180 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1181 case $ac_user_opts in
1182 *"
1183"with_$ac_useropt"
1184"*) ;;
1185 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1186 ac_unrecognized_sep=', ';;
1187 esac
1188 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001191 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001193 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001194 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001195 ac_useropt_orig=$ac_useropt
1196 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197 case $ac_user_opts in
1198 *"
1199"with_$ac_useropt"
1200"*) ;;
1201 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1202 ac_unrecognized_sep=', ';;
1203 esac
1204 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 --x)
1207 # Obsolete; use --with-x.
1208 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1211 | --x-incl | --x-inc | --x-in | --x-i)
1212 ac_prev=x_includes ;;
1213 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1214 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
1217 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1218 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1219 ac_prev=x_libraries ;;
1220 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1221 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001224 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1225Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226 ;;
1227
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 *=*)
1229 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1230 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001231 case $ac_envvar in #(
1232 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001233 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001234 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001235 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 export $ac_envvar ;;
1237
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001238 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001240 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001242 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001243 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 ;;
1245
1246 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001247done
1248
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001251 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252fi
1253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001254if test -n "$ac_unrecognized_opts"; then
1255 case $enable_option_checking in
1256 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001257 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001258 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1259 esac
1260fi
1261
1262# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001263for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1264 datadir sysconfdir sharedstatedir localstatedir includedir \
1265 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1266 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001268 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001269 # Remove trailing slashes.
1270 case $ac_val in
1271 */ )
1272 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1273 eval $ac_var=\$ac_val;;
1274 esac
1275 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001277 [\\/$]* | ?:[\\/]* ) continue;;
1278 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001280 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001281done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283# There might be people who depend on the old broken behavior: `$host'
1284# used to hold the argument of --host etc.
1285# FIXME: To remove some day.
1286build=$build_alias
1287host=$host_alias
1288target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289
Martin v. Löwis11437992002-04-12 09:54:03 +00001290# FIXME: To remove some day.
1291if test "x$host_alias" != x; then
1292 if test "x$build_alias" = x; then
1293 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001294 elif test "x$build_alias" != "x$host_alias"; then
1295 cross_compiling=yes
1296 fi
1297fi
1298
1299ac_tool_prefix=
1300test -n "$host_alias" && ac_tool_prefix=$host_alias-
1301
1302test "$silent" = yes && exec 6>/dev/null
1303
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwiseba40652007-08-30 20:10:57 +00001305ac_pwd=`pwd` && test -n "$ac_pwd" &&
1306ac_ls_di=`ls -di .` &&
1307ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001308 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001309test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001310 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001311
1312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313# Find the source files, if location was not specified.
1314if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001315 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001316 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001317 ac_confdir=`$as_dirname -- "$as_myself" ||
1318$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1319 X"$as_myself" : 'X\(//\)[^/]' \| \
1320 X"$as_myself" : 'X\(//\)$' \| \
1321 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1322$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001323 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1324 s//\1/
1325 q
1326 }
1327 /^X\(\/\/\)[^/].*/{
1328 s//\1/
1329 q
1330 }
1331 /^X\(\/\/\)$/{
1332 s//\1/
1333 q
1334 }
1335 /^X\(\/\).*/{
1336 s//\1/
1337 q
1338 }
1339 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001341 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342 srcdir=..
1343 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344else
1345 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001347if test ! -r "$srcdir/$ac_unique_file"; then
1348 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001349 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001351ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1352ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001353 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001354 pwd)`
1355# When building in place, set srcdir=.
1356if test "$ac_abs_confdir" = "$ac_pwd"; then
1357 srcdir=.
1358fi
1359# Remove unnecessary trailing slashes from srcdir.
1360# Double slashes in file names in object file debugging info
1361# mess up M-x gdb in Emacs.
1362case $srcdir in
1363*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1364esac
1365for ac_var in $ac_precious_vars; do
1366 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1367 eval ac_env_${ac_var}_value=\$${ac_var}
1368 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1369 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1370done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371
Martin v. Löwis11437992002-04-12 09:54:03 +00001372#
1373# Report the --help message.
1374#
1375if test "$ac_init_help" = "long"; then
1376 # Omit some internal or obsolete options to make the list less imposing.
1377 # This message is too long to be a string in the A/UX 3.1 sh.
1378 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001379\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001380
1381Usage: $0 [OPTION]... [VAR=VALUE]...
1382
1383To assign environment variables (e.g., CC, CFLAGS...), specify them as
1384VAR=VALUE. See below for descriptions of some of the useful variables.
1385
1386Defaults for the options are specified in brackets.
1387
1388Configuration:
1389 -h, --help display this help and exit
1390 --help=short display options specific to this package
1391 --help=recursive display the short help of all the included packages
1392 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001393 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 --cache-file=FILE cache test results in FILE [disabled]
1395 -C, --config-cache alias for \`--cache-file=config.cache'
1396 -n, --no-create do not create output files
1397 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1398
Martin v. Löwis11437992002-04-12 09:54:03 +00001399Installation directories:
1400 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001401 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001403 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405By default, \`make install' will install all the files in
1406\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1407an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1408for instance \`--prefix=\$HOME'.
1409
1410For better control, use the options below.
1411
1412Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001413 --bindir=DIR user executables [EPREFIX/bin]
1414 --sbindir=DIR system admin executables [EPREFIX/sbin]
1415 --libexecdir=DIR program executables [EPREFIX/libexec]
1416 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1417 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1418 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1419 --libdir=DIR object code libraries [EPREFIX/lib]
1420 --includedir=DIR C header files [PREFIX/include]
1421 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1422 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1423 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1424 --infodir=DIR info documentation [DATAROOTDIR/info]
1425 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1426 --mandir=DIR man documentation [DATAROOTDIR/man]
1427 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1428 --htmldir=DIR html documentation [DOCDIR]
1429 --dvidir=DIR dvi documentation [DOCDIR]
1430 --pdfdir=DIR pdf documentation [DOCDIR]
1431 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432_ACEOF
1433
1434 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001435
1436System types:
1437 --build=BUILD configure for building on BUILD [guessed]
1438 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001439_ACEOF
1440fi
1441
1442if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001443 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001444 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001445 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 cat <<\_ACEOF
1447
1448Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001449 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1451 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001452 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001453 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --enable-framework[=INSTALLDIR]
1455 Build (MacOSX|Darwin) framework
1456 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001457 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1459 --enable-ipv6 Enable ipv6 (with ipv4) support
1460 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001461 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001462 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001464 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001465
1466Optional Packages:
1467 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1468 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001469 --with-universal-archs=ARCH
1470 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001471 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001472 --with-framework-name=FRAMEWORK
1473 specify an alternate name of the framework built
1474 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001476 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001477 --with-cxx-main=<compiler>
1478 compile main() and link python executable with C++
1479 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with-suffix=.exe set executable suffix
1481 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001482 --with-lto Enable Link Time Optimization in PGO builds.
1483 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001485 --with-system-expat build pyexpat module using an installed expat
1486 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001487 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001488 --with-tcltk-includes='-I...'
1489 override search for Tcl and Tk include files
1490 --with-tcltk-libs='-L...'
1491 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001492 --with-dbmliborder=db1:db2:...
1493 order to check db backends for dbm. Valid value is a
1494 colon separated string with the backend names
1495 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --with-signal-module disable/enable signal module
1497 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1498 --with(out)-threads[=DIRECTORY]
1499 disable/enable thread support
1500 --with(out)-thread[=DIRECTORY]
1501 deprecated; use --with(out)-threads
1502 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001504 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001506 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --with-fpectl enable SIGFPE catching
1509 --with-libm=STRING math library
1510 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001511 --with(out)-computed-gotos
1512 Use computed gotos in evaluation loop (enabled by
1513 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001514 --with(out)-ensurepip=[=OPTION]
1515 "install" or "upgrade" using bundled pip, default is
1516 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001517
1518Some influential environment variables:
1519 CC C compiler command
1520 CFLAGS C compiler flags
1521 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1522 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001523 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001524 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001525 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001527 PKG_CONFIG path to pkg-config utility
1528 PKG_CONFIG_PATH
1529 directories to add to pkg-config's search path
1530 PKG_CONFIG_LIBDIR
1531 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001532
1533Use these variables to override the choices made by `configure' or to help
1534it to find libraries and programs with nonstandard names/locations.
1535
Georg Brandl464432d2009-05-20 18:24:08 +00001536Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001537_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001539fi
1540
1541if test "$ac_init_help" = "recursive"; then
1542 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001544 test -d "$ac_dir" ||
1545 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1546 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 ac_builddir=.
1548
Martin v. Löwiseba40652007-08-30 20:10:57 +00001549case "$ac_dir" in
1550.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1551*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001552 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001553 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001554 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001555 case $ac_top_builddir_sub in
1556 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1557 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1558 esac ;;
1559esac
1560ac_abs_top_builddir=$ac_pwd
1561ac_abs_builddir=$ac_pwd$ac_dir_suffix
1562# for backward compatibility:
1563ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001566 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568 ac_top_srcdir=$ac_top_builddir_sub
1569 ac_abs_top_srcdir=$ac_pwd ;;
1570 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001572 ac_top_srcdir=$srcdir
1573 ac_abs_top_srcdir=$srcdir ;;
1574 *) # Relative name.
1575 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1576 ac_top_srcdir=$ac_top_build_prefix$srcdir
1577 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001578esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001579ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001580
Martin v. Löwiseba40652007-08-30 20:10:57 +00001581 cd "$ac_dir" || { ac_status=$?; continue; }
1582 # Check for guested configure.
1583 if test -f "$ac_srcdir/configure.gnu"; then
1584 echo &&
1585 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1586 elif test -f "$ac_srcdir/configure"; then
1587 echo &&
1588 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001590 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 fi || ac_status=$?
1592 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 done
1594fi
1595
Martin v. Löwiseba40652007-08-30 20:10:57 +00001596test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001597if $ac_init_version; then
1598 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001599python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001600generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001601
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001602Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603This configure script is free software; the Free Software Foundation
1604gives unlimited permission to copy, distribute and modify it.
1605_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001607fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001608
1609## ------------------------ ##
1610## Autoconf initialization. ##
1611## ------------------------ ##
1612
1613# ac_fn_c_try_compile LINENO
1614# --------------------------
1615# Try to compile conftest.$ac_ext, and return whether this succeeded.
1616ac_fn_c_try_compile ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619 rm -f conftest.$ac_objext
1620 if { { ac_try="$ac_compile"
1621case "(($ac_try" in
1622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1623 *) ac_try_echo=$ac_try;;
1624esac
1625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1626$as_echo "$ac_try_echo"; } >&5
1627 (eval "$ac_compile") 2>conftest.err
1628 ac_status=$?
1629 if test -s conftest.err; then
1630 grep -v '^ *+' conftest.err >conftest.er1
1631 cat conftest.er1 >&5
1632 mv -f conftest.er1 conftest.err
1633 fi
1634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635 test $ac_status = 0; } && {
1636 test -z "$ac_c_werror_flag" ||
1637 test ! -s conftest.err
1638 } && test -s conftest.$ac_objext; then :
1639 ac_retval=0
1640else
1641 $as_echo "$as_me: failed program was:" >&5
1642sed 's/^/| /' conftest.$ac_ext >&5
1643
1644 ac_retval=1
1645fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001646 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001647 as_fn_set_status $ac_retval
1648
1649} # ac_fn_c_try_compile
1650
1651# ac_fn_c_try_cpp LINENO
1652# ----------------------
1653# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1654ac_fn_c_try_cpp ()
1655{
1656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1657 if { { ac_try="$ac_cpp conftest.$ac_ext"
1658case "(($ac_try" in
1659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1660 *) ac_try_echo=$ac_try;;
1661esac
1662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1663$as_echo "$ac_try_echo"; } >&5
1664 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1665 ac_status=$?
1666 if test -s conftest.err; then
1667 grep -v '^ *+' conftest.err >conftest.er1
1668 cat conftest.er1 >&5
1669 mv -f conftest.er1 conftest.err
1670 fi
1671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001672 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001673 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1674 test ! -s conftest.err
1675 }; then :
1676 ac_retval=0
1677else
1678 $as_echo "$as_me: failed program was:" >&5
1679sed 's/^/| /' conftest.$ac_ext >&5
1680
1681 ac_retval=1
1682fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001683 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001684 as_fn_set_status $ac_retval
1685
1686} # ac_fn_c_try_cpp
1687
1688# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1689# -------------------------------------------------------
1690# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1691# the include files in INCLUDES and setting the cache variable VAR
1692# accordingly.
1693ac_fn_c_check_header_mongrel ()
1694{
1695 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001696 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1698$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001699if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001700 $as_echo_n "(cached) " >&6
1701fi
1702eval ac_res=\$$3
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1704$as_echo "$ac_res" >&6; }
1705else
1706 # Is the header compilable?
1707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1708$as_echo_n "checking $2 usability... " >&6; }
1709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1710/* end confdefs.h. */
1711$4
1712#include <$2>
1713_ACEOF
1714if ac_fn_c_try_compile "$LINENO"; then :
1715 ac_header_compiler=yes
1716else
1717 ac_header_compiler=no
1718fi
1719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1721$as_echo "$ac_header_compiler" >&6; }
1722
1723# Is the header present?
1724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1725$as_echo_n "checking $2 presence... " >&6; }
1726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1727/* end confdefs.h. */
1728#include <$2>
1729_ACEOF
1730if ac_fn_c_try_cpp "$LINENO"; then :
1731 ac_header_preproc=yes
1732else
1733 ac_header_preproc=no
1734fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001735rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1737$as_echo "$ac_header_preproc" >&6; }
1738
1739# So? What about this header?
1740case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1741 yes:no: )
1742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1743$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1745$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1746 ;;
1747 no:yes:* )
1748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1749$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1751$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1753$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1755$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1757$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001758( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001759## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001760## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001761 ) | sed "s/^/$as_me: WARNING: /" >&2
1762 ;;
1763esac
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1765$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001766if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001767 $as_echo_n "(cached) " >&6
1768else
1769 eval "$3=\$ac_header_compiler"
1770fi
1771eval ac_res=\$$3
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1773$as_echo "$ac_res" >&6; }
1774fi
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
1777} # ac_fn_c_check_header_mongrel
1778
1779# ac_fn_c_try_run LINENO
1780# ----------------------
1781# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1782# that executables *can* be run.
1783ac_fn_c_try_run ()
1784{
1785 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1786 if { { ac_try="$ac_link"
1787case "(($ac_try" in
1788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1789 *) ac_try_echo=$ac_try;;
1790esac
1791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1792$as_echo "$ac_try_echo"; } >&5
1793 (eval "$ac_link") 2>&5
1794 ac_status=$?
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1797 { { case "(($ac_try" in
1798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1799 *) ac_try_echo=$ac_try;;
1800esac
1801eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1802$as_echo "$ac_try_echo"; } >&5
1803 (eval "$ac_try") 2>&5
1804 ac_status=$?
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; }; }; then :
1807 ac_retval=0
1808else
1809 $as_echo "$as_me: program exited with status $ac_status" >&5
1810 $as_echo "$as_me: failed program was:" >&5
1811sed 's/^/| /' conftest.$ac_ext >&5
1812
1813 ac_retval=$ac_status
1814fi
1815 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001816 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001817 as_fn_set_status $ac_retval
1818
1819} # ac_fn_c_try_run
1820
1821# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1822# -------------------------------------------------------
1823# Tests whether HEADER exists and can be compiled using the include files in
1824# INCLUDES, setting the cache variable VAR accordingly.
1825ac_fn_c_check_header_compile ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001830if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836#include <$2>
1837_ACEOF
1838if ac_fn_c_try_compile "$LINENO"; then :
1839 eval "$3=yes"
1840else
1841 eval "$3=no"
1842fi
1843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1844fi
1845eval ac_res=\$$3
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1847$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001848 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001849
1850} # ac_fn_c_check_header_compile
1851
1852# ac_fn_c_try_link LINENO
1853# -----------------------
1854# Try to link conftest.$ac_ext, and return whether this succeeded.
1855ac_fn_c_try_link ()
1856{
1857 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858 rm -f conftest.$ac_objext conftest$ac_exeext
1859 if { { ac_try="$ac_link"
1860case "(($ac_try" in
1861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1862 *) ac_try_echo=$ac_try;;
1863esac
1864eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1865$as_echo "$ac_try_echo"; } >&5
1866 (eval "$ac_link") 2>conftest.err
1867 ac_status=$?
1868 if test -s conftest.err; then
1869 grep -v '^ *+' conftest.err >conftest.er1
1870 cat conftest.er1 >&5
1871 mv -f conftest.er1 conftest.err
1872 fi
1873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1874 test $ac_status = 0; } && {
1875 test -z "$ac_c_werror_flag" ||
1876 test ! -s conftest.err
1877 } && test -s conftest$ac_exeext && {
1878 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001879 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001880 }; then :
1881 ac_retval=0
1882else
1883 $as_echo "$as_me: failed program was:" >&5
1884sed 's/^/| /' conftest.$ac_ext >&5
1885
1886 ac_retval=1
1887fi
1888 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1889 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1890 # interfere with the next link command; also delete a directory that is
1891 # left behind by Apple's compiler. We do this before executing the actions.
1892 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001894 as_fn_set_status $ac_retval
1895
1896} # ac_fn_c_try_link
1897
1898# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1899# -------------------------------------------
1900# Tests whether TYPE exists after having included INCLUDES, setting cache
1901# variable VAR accordingly.
1902ac_fn_c_check_type ()
1903{
1904 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1906$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001907if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001908 $as_echo_n "(cached) " >&6
1909else
1910 eval "$3=no"
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914int
1915main ()
1916{
1917if (sizeof ($2))
1918 return 0;
1919 ;
1920 return 0;
1921}
1922_ACEOF
1923if ac_fn_c_try_compile "$LINENO"; then :
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927int
1928main ()
1929{
1930if (sizeof (($2)))
1931 return 0;
1932 ;
1933 return 0;
1934}
1935_ACEOF
1936if ac_fn_c_try_compile "$LINENO"; then :
1937
1938else
1939 eval "$3=yes"
1940fi
1941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1942fi
1943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1944fi
1945eval ac_res=\$$3
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1947$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001948 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001949
1950} # ac_fn_c_check_type
1951
1952# ac_fn_c_find_uintX_t LINENO BITS VAR
1953# ------------------------------------
1954# Finds an unsigned integer type with width BITS, setting cache variable VAR
1955# accordingly.
1956ac_fn_c_find_uintX_t ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1960$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001961if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001962 $as_echo_n "(cached) " >&6
1963else
1964 eval "$3=no"
1965 # Order is important - never check a type that is potentially smaller
1966 # than half of the expected target width.
1967 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1968 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1970/* end confdefs.h. */
1971$ac_includes_default
1972int
1973main ()
1974{
1975static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001976test_array [0] = 0;
1977return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001978
1979 ;
1980 return 0;
1981}
1982_ACEOF
1983if ac_fn_c_try_compile "$LINENO"; then :
1984 case $ac_type in #(
1985 uint$2_t) :
1986 eval "$3=yes" ;; #(
1987 *) :
1988 eval "$3=\$ac_type" ;;
1989esac
1990fi
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001992 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001993
1994else
1995 break
1996fi
1997 done
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002003
2004} # ac_fn_c_find_uintX_t
2005
2006# ac_fn_c_find_intX_t LINENO BITS VAR
2007# -----------------------------------
2008# Finds a signed integer type with width BITS, setting cache variable VAR
2009# accordingly.
2010ac_fn_c_find_intX_t ()
2011{
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2014$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002015if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002016 $as_echo_n "(cached) " >&6
2017else
2018 eval "$3=no"
2019 # Order is important - never check a type that is potentially smaller
2020 # than half of the expected target width.
2021 for ac_type in int$2_t 'int' 'long int' \
2022 'long long int' 'short int' 'signed char'; do
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002026 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002027int
2028main ()
2029{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002030static 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 +01002031test_array [0] = 0;
2032return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002042 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002043int
2044main ()
2045{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002046static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002047 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002048test_array [0] = 0;
2049return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056
2057else
2058 case $ac_type in #(
2059 int$2_t) :
2060 eval "$3=yes" ;; #(
2061 *) :
2062 eval "$3=\$ac_type" ;;
2063esac
2064fi
2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002068 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002069
2070else
2071 break
2072fi
2073 done
2074fi
2075eval ac_res=\$$3
2076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2077$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002078 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002079
2080} # ac_fn_c_find_intX_t
2081
2082# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2083# --------------------------------------------
2084# Tries to find the compile-time value of EXPR in a program that includes
2085# INCLUDES, setting VAR accordingly. Returns whether the value could be
2086# computed
2087ac_fn_c_compute_int ()
2088{
2089 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2090 if test "$cross_compiling" = yes; then
2091 # Depending upon the size, compute the lo and hi bounds.
2092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002099test_array [0] = 0;
2100return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_lo=0 ac_mid=0
2108 while :; do
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112int
2113main ()
2114{
2115static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002116test_array [0] = 0;
2117return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002118
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123if ac_fn_c_try_compile "$LINENO"; then :
2124 ac_hi=$ac_mid; break
2125else
2126 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2127 if test $ac_lo -le $ac_mid; then
2128 ac_lo= ac_hi=
2129 break
2130 fi
2131 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134 done
2135else
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139int
2140main ()
2141{
2142static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002143test_array [0] = 0;
2144return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_hi=-1 ac_mid=-1
2152 while :; do
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154/* end confdefs.h. */
2155$4
2156int
2157main ()
2158{
2159static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002160test_array [0] = 0;
2161return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_lo=$ac_mid; break
2169else
2170 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2171 if test $ac_mid -le $ac_hi; then
2172 ac_lo= ac_hi=
2173 break
2174 fi
2175 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178 done
2179else
2180 ac_lo= ac_hi=
2181fi
2182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2183fi
2184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2185# Binary search between lo and hi bounds.
2186while test "x$ac_lo" != "x$ac_hi"; do
2187 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
2191int
2192main ()
2193{
2194static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002195test_array [0] = 0;
2196return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002197
2198 ;
2199 return 0;
2200}
2201_ACEOF
2202if ac_fn_c_try_compile "$LINENO"; then :
2203 ac_hi=$ac_mid
2204else
2205 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208done
2209case $ac_lo in #((
2210?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2211'') ac_retval=1 ;;
2212esac
2213 else
2214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h. */
2216$4
2217static long int longval () { return $2; }
2218static unsigned long int ulongval () { return $2; }
2219#include <stdio.h>
2220#include <stdlib.h>
2221int
2222main ()
2223{
2224
2225 FILE *f = fopen ("conftest.val", "w");
2226 if (! f)
2227 return 1;
2228 if (($2) < 0)
2229 {
2230 long int i = longval ();
2231 if (i != ($2))
2232 return 1;
2233 fprintf (f, "%ld", i);
2234 }
2235 else
2236 {
2237 unsigned long int i = ulongval ();
2238 if (i != ($2))
2239 return 1;
2240 fprintf (f, "%lu", i);
2241 }
2242 /* Do not output a trailing newline, as this causes \r\n confusion
2243 on some platforms. */
2244 return ferror (f) || fclose (f) != 0;
2245
2246 ;
2247 return 0;
2248}
2249_ACEOF
2250if ac_fn_c_try_run "$LINENO"; then :
2251 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2252else
2253 ac_retval=1
2254fi
2255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2256 conftest.$ac_objext conftest.beam conftest.$ac_ext
2257rm -f conftest.val
2258
2259 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002260 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002261 as_fn_set_status $ac_retval
2262
2263} # ac_fn_c_compute_int
2264
2265# ac_fn_c_check_func LINENO FUNC VAR
2266# ----------------------------------
2267# Tests whether FUNC exists, setting the cache variable VAR accordingly
2268ac_fn_c_check_func ()
2269{
2270 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2272$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002273if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002274 $as_echo_n "(cached) " >&6
2275else
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h. */
2278/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2279 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2280#define $2 innocuous_$2
2281
2282/* System header to define __stub macros and hopefully few prototypes,
2283 which can conflict with char $2 (); below.
2284 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2285 <limits.h> exists even on freestanding compilers. */
2286
2287#ifdef __STDC__
2288# include <limits.h>
2289#else
2290# include <assert.h>
2291#endif
2292
2293#undef $2
2294
2295/* Override any GCC internal prototype to avoid an error.
2296 Use char because int might match the return type of a GCC
2297 builtin and then its argument prototype would still apply. */
2298#ifdef __cplusplus
2299extern "C"
2300#endif
2301char $2 ();
2302/* The GNU C library defines this for functions which it implements
2303 to always fail with ENOSYS. Some functions are actually named
2304 something starting with __ and the normal name is an alias. */
2305#if defined __stub_$2 || defined __stub___$2
2306choke me
2307#endif
2308
2309int
2310main ()
2311{
2312return $2 ();
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_link "$LINENO"; then :
2318 eval "$3=yes"
2319else
2320 eval "$3=no"
2321fi
2322rm -f core conftest.err conftest.$ac_objext \
2323 conftest$ac_exeext conftest.$ac_ext
2324fi
2325eval ac_res=\$$3
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2327$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002328 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002329
2330} # ac_fn_c_check_func
2331
2332# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2333# ----------------------------------------------------
2334# Tries to find if the field MEMBER exists in type AGGR, after including
2335# INCLUDES, setting cache variable VAR accordingly.
2336ac_fn_c_check_member ()
2337{
2338 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2340$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002341if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002342 $as_echo_n "(cached) " >&6
2343else
2344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2345/* end confdefs.h. */
2346$5
2347int
2348main ()
2349{
2350static $2 ac_aggr;
2351if (ac_aggr.$3)
2352return 0;
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357if ac_fn_c_try_compile "$LINENO"; then :
2358 eval "$4=yes"
2359else
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h. */
2362$5
2363int
2364main ()
2365{
2366static $2 ac_aggr;
2367if (sizeof ac_aggr.$3)
2368return 0;
2369 ;
2370 return 0;
2371}
2372_ACEOF
2373if ac_fn_c_try_compile "$LINENO"; then :
2374 eval "$4=yes"
2375else
2376 eval "$4=no"
2377fi
2378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2379fi
2380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2381fi
2382eval ac_res=\$$4
2383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2384$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002385 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002386
2387} # ac_fn_c_check_member
2388
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002389# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2390# ---------------------------------------------
2391# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2392# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002393ac_fn_c_check_decl ()
2394{
2395 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002396 as_decl_name=`echo $2|sed 's/ *(.*//'`
2397 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2399$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002400if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002401 $as_echo_n "(cached) " >&6
2402else
2403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2404/* end confdefs.h. */
2405$4
2406int
2407main ()
2408{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002409#ifndef $as_decl_name
2410#ifdef __cplusplus
2411 (void) $as_decl_use;
2412#else
2413 (void) $as_decl_name;
2414#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002415#endif
2416
2417 ;
2418 return 0;
2419}
2420_ACEOF
2421if ac_fn_c_try_compile "$LINENO"; then :
2422 eval "$3=yes"
2423else
2424 eval "$3=no"
2425fi
2426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427fi
2428eval ac_res=\$$3
2429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2430$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002431 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002432
2433} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002435This file contains any messages produced by compilers while
2436running configure, to aid debugging if configure makes a mistake.
2437
Martin v. Löwis174440b2008-10-03 08:59:41 +00002438It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002439generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441 $ $0 $@
2442
2443_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002445{
2446cat <<_ASUNAME
2447## --------- ##
2448## Platform. ##
2449## --------- ##
2450
2451hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2452uname -m = `(uname -m) 2>/dev/null || echo unknown`
2453uname -r = `(uname -r) 2>/dev/null || echo unknown`
2454uname -s = `(uname -s) 2>/dev/null || echo unknown`
2455uname -v = `(uname -v) 2>/dev/null || echo unknown`
2456
2457/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2458/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2459
2460/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2461/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2462/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002463/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002464/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2465/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2466/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2467
2468_ASUNAME
2469
2470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2471for as_dir in $PATH
2472do
2473 IFS=$as_save_IFS
2474 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002475 $as_echo "PATH: $as_dir"
2476 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002477IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002478
2479} >&5
2480
2481cat >&5 <<_ACEOF
2482
2483
2484## ----------- ##
2485## Core tests. ##
2486## ----------- ##
2487
2488_ACEOF
2489
2490
2491# Keep a trace of the command line.
2492# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002493# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002494# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002495# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002496ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002497ac_configure_args0=
2498ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002499ac_must_keep_next=false
2500for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002501do
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 for ac_arg
2503 do
2504 case $ac_arg in
2505 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2506 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2507 | -silent | --silent | --silen | --sile | --sil)
2508 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002509 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002510 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 esac
2512 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002513 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002515 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002517 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002519 case $ac_arg in
2520 *=* | --config-cache | -C | -disable-* | --disable-* \
2521 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2522 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2523 | -with-* | --with-* | -without-* | --without-* | --x)
2524 case "$ac_configure_args0 " in
2525 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2526 esac
2527 ;;
2528 -* ) ac_must_keep_next=true ;;
2529 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002531 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 ;;
2533 esac
2534 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002536{ ac_configure_args0=; unset ac_configure_args0;}
2537{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
2539# When interrupted or exit'd, cleanup temporary files, and complete
2540# config.log. We remove comments because anyway the quotes in there
2541# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002542# WARNING: Use '\'' to represent an apostrophe within the trap.
2543# 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 +00002544trap 'exit_status=$?
2545 # Save into config.log some information that might help in debugging.
2546 {
2547 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002548
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002549 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002550## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002551## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 echo
2553 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554(
2555 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2556 eval ac_val=\$$ac_var
2557 case $ac_val in #(
2558 *${as_nl}*)
2559 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002560 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2561$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562 esac
2563 case $ac_var in #(
2564 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002565 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2566 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567 esac ;;
2568 esac
2569 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2572 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002574 "s/'\''/'\''\\\\'\'''\''/g;
2575 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2576 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002577 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002578 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002579 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002580 esac |
2581 sort
2582)
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002584
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002585 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002586## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002587## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002588 echo
2589 for ac_var in $ac_subst_vars
2590 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002591 eval ac_val=\$$ac_var
2592 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002593 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002595 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002596 done | sort
2597 echo
2598
2599 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002600 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002602## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002603 echo
2604 for ac_var in $ac_subst_files
2605 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002606 eval ac_val=\$$ac_var
2607 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002608 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002610 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002611 done | sort
2612 echo
2613 fi
2614
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002616 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002617## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002618## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002620 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 echo
2622 fi
2623 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002624 $as_echo "$as_me: caught signal $ac_signal"
2625 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002627 rm -f core *.core core.conftest.* &&
2628 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002631for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002632 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002633done
2634ac_signal=0
2635
2636# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002638
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002639$as_echo "/* confdefs.h */" > confdefs.h
2640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641# Predefined preprocessor variables.
2642
2643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_NAME "$PACKAGE_NAME"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2649_ACEOF
2650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_VERSION "$PACKAGE_VERSION"
2653_ACEOF
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655cat >>confdefs.h <<_ACEOF
2656#define PACKAGE_STRING "$PACKAGE_STRING"
2657_ACEOF
2658
Martin v. Löwis11437992002-04-12 09:54:03 +00002659cat >>confdefs.h <<_ACEOF
2660#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2661_ACEOF
2662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002663cat >>confdefs.h <<_ACEOF
2664#define PACKAGE_URL "$PACKAGE_URL"
2665_ACEOF
2666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667
2668# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002669# Prefer an explicitly selected file to automatically selected ones.
2670ac_site_file1=NONE
2671ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002672if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002673 # We do not want a PATH search for config.site.
2674 case $CONFIG_SITE in #((
2675 -*) ac_site_file1=./$CONFIG_SITE;;
2676 */*) ac_site_file1=$CONFIG_SITE;;
2677 *) ac_site_file1=./$CONFIG_SITE;;
2678 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002680 ac_site_file1=$prefix/share/config.site
2681 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002683 ac_site_file1=$ac_default_prefix/share/config.site
2684 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002686for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002688 test "x$ac_site_file" = xNONE && continue
2689 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2691$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002693 . "$ac_site_file" \
2694 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2696as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002697See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698 fi
2699done
2700
2701if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002702 # Some versions of bash will fail to source /dev/null (special files
2703 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2704 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2706$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002708 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2709 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 esac
2711 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002713 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2714$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 >$cache_file
2716fi
2717
2718# Check that the precious variables saved in the cache have kept the same
2719# value.
2720ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002721for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2723 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002724 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2725 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002726 case $ac_old_set,$ac_new_set in
2727 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002728 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2729$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 +00002730 ac_cache_corrupted=: ;;
2731 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002732 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2733$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_cache_corrupted=: ;;
2735 ,);;
2736 *)
2737 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002738 # differences in whitespace do not lead to failure.
2739 ac_old_val_w=`echo x $ac_old_val`
2740 ac_new_val_w=`echo x $ac_new_val`
2741 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2743$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2744 ac_cache_corrupted=:
2745 else
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2747$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2748 eval $ac_var=\$ac_old_val
2749 fi
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2751$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2753$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 fi;;
2755 esac
2756 # Pass precious variables to config.status.
2757 if test "$ac_new_set" = set; then
2758 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002759 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 *) ac_arg=$ac_var=$ac_new_val ;;
2761 esac
2762 case " $ac_configure_args " in
2763 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002764 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 esac
2766 fi
2767done
2768if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002769 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2772$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002773 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002775## -------------------- ##
2776## Main body of script. ##
2777## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002778
Guido van Rossum7f43da71994-08-01 12:15:30 +00002779ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2783ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002784
Guido van Rossum627b2d71993-12-24 10:39:16 +00002785
Michael W. Hudson54241132001-12-07 15:38:26 +00002786
Martin v. Löwiseba40652007-08-30 20:10:57 +00002787ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002788
2789
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002790ac_aux_dir=
2791for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2792 if test -f "$ac_dir/install-sh"; then
2793 ac_aux_dir=$ac_dir
2794 ac_install_sh="$ac_aux_dir/install-sh -c"
2795 break
2796 elif test -f "$ac_dir/install.sh"; then
2797 ac_aux_dir=$ac_dir
2798 ac_install_sh="$ac_aux_dir/install.sh -c"
2799 break
2800 elif test -f "$ac_dir/shtool"; then
2801 ac_aux_dir=$ac_dir
2802 ac_install_sh="$ac_aux_dir/shtool install -c"
2803 break
2804 fi
2805done
2806if test -z "$ac_aux_dir"; then
2807 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2808fi
2809
2810# These three variables are undocumented and unsupported,
2811# and are intended to be withdrawn in a future Autoconf release.
2812# They can cause serious problems if a builder's source tree is in a directory
2813# whose full name contains unusual characters.
2814ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2815ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2816ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2817
2818
2819# Make sure we can run config.sub.
2820$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2821 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2822
2823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2824$as_echo_n "checking build system type... " >&6; }
2825if ${ac_cv_build+:} false; then :
2826 $as_echo_n "(cached) " >&6
2827else
2828 ac_build_alias=$build_alias
2829test "x$ac_build_alias" = x &&
2830 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2831test "x$ac_build_alias" = x &&
2832 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2833ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2834 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2835
2836fi
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2838$as_echo "$ac_cv_build" >&6; }
2839case $ac_cv_build in
2840*-*-*) ;;
2841*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2842esac
2843build=$ac_cv_build
2844ac_save_IFS=$IFS; IFS='-'
2845set x $ac_cv_build
2846shift
2847build_cpu=$1
2848build_vendor=$2
2849shift; shift
2850# Remember, the first character of IFS is used to create $*,
2851# except with old shells:
2852build_os=$*
2853IFS=$ac_save_IFS
2854case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2855
2856
2857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2858$as_echo_n "checking host system type... " >&6; }
2859if ${ac_cv_host+:} false; then :
2860 $as_echo_n "(cached) " >&6
2861else
2862 if test "x$host_alias" = x; then
2863 ac_cv_host=$ac_cv_build
2864else
2865 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2866 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2867fi
2868
2869fi
2870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2871$as_echo "$ac_cv_host" >&6; }
2872case $ac_cv_host in
2873*-*-*) ;;
2874*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2875esac
2876host=$ac_cv_host
2877ac_save_IFS=$IFS; IFS='-'
2878set x $ac_cv_host
2879shift
2880host_cpu=$1
2881host_vendor=$2
2882shift; shift
2883# Remember, the first character of IFS is used to create $*,
2884# except with old shells:
2885host_os=$*
2886IFS=$ac_save_IFS
2887case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2888
2889
2890
2891
2892
Ned Deily983df862014-08-22 13:30:59 -07002893# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2894rm -f pybuilddir.txt
2895
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002896if test "$cross_compiling" = yes; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2898$as_echo_n "checking for python interpreter for cross build... " >&6; }
2899 if test -z "$PYTHON_FOR_BUILD"; then
2900 for interp in python$PACKAGE_VERSION python2 python; do
2901 which $interp >/dev/null 2>&1 || continue
2902 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2903 break
2904 fi
2905 interp=
2906 done
2907 if test x$interp = x; then
2908 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2909 fi
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2911$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002912 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002913 fi
2914elif test "$cross_compiling" = maybe; then
2915 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2916else
2917 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2918fi
2919
2920
Martin v. Löwis11437992002-04-12 09:54:03 +00002921
Georg Brandlbcd64a32009-03-31 21:45:18 +00002922if test "$prefix" != "/"; then
2923 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2924fi
2925
2926
Martin v. Löwis11437992002-04-12 09:54:03 +00002927
2928
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002929# We don't use PACKAGE_ variables, and they cause conflicts
2930# with other autoconf-based packages that include Python.h
2931grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2932rm confdefs.h
2933mv confdefs.h.new confdefs.h
2934
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002935
Martin v. Löwis174440b2008-10-03 08:59:41 +00002936VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002937
Martin v. Löwis1142de32002-03-29 16:28:31 +00002938
2939SOVERSION=1.0
2940
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002941# The later defininition of _XOPEN_SOURCE disables certain features
2942# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002944$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002945
2946
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002947# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2948# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2949# them.
2950
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002951$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002952
2953
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002954# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2955# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2956# them.
2957
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002958$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002959
2960
Martin v. Löwisd6320502004-08-12 13:45:08 +00002961# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2962# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002964$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002965
2966
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002967# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2968# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2969# them.
2970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002971$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002972
2973
2974
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002975define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002976
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002977# Arguments passed to configure.
2978
2979CONFIG_ARGS="$ac_configure_args"
2980
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2982$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002983# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002984if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002985 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002986 case $enableval in
2987 yes)
2988 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002989 if test ! -d "${enableval}"
2990 then
2991 enableval=/
2992 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002993 ;;
2994 esac
2995 case $enableval in
2996 no)
2997 UNIVERSALSDK=
2998 enable_universalsdk=
2999 ;;
3000 *)
3001 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003002 if test ! -d "${UNIVERSALSDK}"
3003 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003004 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003005 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003006 ;;
3007 esac
3008
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003009
Ronald Oussoren988117f2006-04-29 11:31:35 +00003010else
3011
3012 UNIVERSALSDK=
3013 enable_universalsdk=
3014
Martin v. Löwiseba40652007-08-30 20:10:57 +00003015fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003016
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003017if test -n "${UNIVERSALSDK}"
3018then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3020$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3023$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003024fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003025
Martin v. Löwiseba40652007-08-30 20:10:57 +00003026
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003027
Ned Deily8e60f6e2013-05-30 00:14:29 -07003028ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003029
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003030UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003031
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3033$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003034
3035# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003036if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003037 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3039$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003040 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003041 if test "${enable_universalsdk}" ; then
3042 :
3043 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003044 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003045 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003046
3047else
3048
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3050$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003051
3052fi
3053
3054
3055
3056
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003057
3058# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003059if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003060 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003061 if test "${enable_framework}"; then
3062 :
3063 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003064 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003065 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003066 PYTHONFRAMEWORK=${withval}
3067 PYTHONFRAMEWORKDIR=${withval}.framework
3068 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3069
3070else
3071
3072 PYTHONFRAMEWORK=Python
3073 PYTHONFRAMEWORKDIR=Python.framework
3074 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3075
3076fi
3077
Martin v. Löwiseba40652007-08-30 20:10:57 +00003078# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003079if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003080 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003081 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003082 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003083 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003084 esac
3085 case $enableval in
3086 no)
3087 PYTHONFRAMEWORK=
3088 PYTHONFRAMEWORKDIR=no-framework
3089 PYTHONFRAMEWORKPREFIX=
3090 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003091 FRAMEWORKINSTALLFIRST=
3092 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003093 FRAMEWORKALTINSTALLFIRST=
3094 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003095 if test "x${prefix}" = "xNONE"; then
3096 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3097 else
3098 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3099 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003100 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003101 ;;
3102 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003103 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003104 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003105 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003106 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003107 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3108 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003109 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003110
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003111 if test "x${prefix}" = "xNONE" ; then
3112 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003113
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003114 else
3115 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3116 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003117
3118 case "${enableval}" in
3119 /System*)
3120 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3121 if test "${prefix}" = "NONE" ; then
3122 # See below
3123 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3124 fi
3125 ;;
3126
3127 /Library*)
3128 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3129 ;;
3130
3131 */Library/Frameworks)
3132 MDIR="`dirname "${enableval}"`"
3133 MDIR="`dirname "${MDIR}"`"
3134 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3135
3136 if test "${prefix}" = "NONE"; then
3137 # User hasn't specified the
3138 # --prefix option, but wants to install
3139 # the framework in a non-default location,
3140 # ensure that the compatibility links get
3141 # installed relative to that prefix as well
3142 # instead of in /usr/local.
3143 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3144 fi
3145 ;;
3146
3147 *)
3148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3149 ;;
3150 esac
3151
Jack Jansen127e56e2001-09-11 14:41:54 +00003152 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003153
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003154 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003155 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003156 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003157
Martin v. Löwiseba40652007-08-30 20:10:57 +00003158 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003159
Martin v. Löwiseba40652007-08-30 20:10:57 +00003160 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003161
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003162 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3163
3164 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3165
Jack Jansene578a632001-08-15 01:27:14 +00003166 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003167
Guido van Rossum563e7081996-09-10 18:20:48 +00003168else
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Jack Jansene578a632001-08-15 01:27:14 +00003170 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003171 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003172 PYTHONFRAMEWORKPREFIX=
3173 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003174 FRAMEWORKINSTALLFIRST=
3175 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003176 FRAMEWORKALTINSTALLFIRST=
3177 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003178 if test "x${prefix}" = "xNONE" ; then
3179 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3180 else
3181 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3182 fi
Jack Jansene578a632001-08-15 01:27:14 +00003183 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003184
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003185
Martin v. Löwiseba40652007-08-30 20:10:57 +00003186fi
3187
Michael W. Hudson54241132001-12-07 15:38:26 +00003188
3189
3190
3191
Jack Jansene578a632001-08-15 01:27:14 +00003192
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003193
3194
Ronald Oussoren5b787322006-06-06 19:50:24 +00003195
3196
3197
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003198
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003199
Jack Jansene578a632001-08-15 01:27:14 +00003200##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003201## AS_HELP_STRING([--with-dyld],
3202## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003203##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003204# Set name for machine-dependent library files
3205
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3207$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003208if test -z "$MACHDEP"
3209then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003210 # avoid using uname for cross builds
3211 if test "$cross_compiling" = yes; then
3212 # ac_sys_system and ac_sys_release are only used for setting
3213 # `define_xopen_source' in the case statement below. For the
3214 # current supported cross builds, this macro is not adjusted.
3215 case "$host" in
3216 *-*-linux*)
3217 ac_sys_system=Linux
3218 ;;
3219 *-*-cygwin*)
3220 ac_sys_system=Cygwin
3221 ;;
3222 *)
3223 # for now, limit cross builds to known configurations
3224 MACHDEP="unknown"
3225 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3226 esac
3227 ac_sys_release=
3228 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003229 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003230 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003231 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003232 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003233 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003234 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003235 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003236 fi
3237 ac_md_system=`echo $ac_sys_system |
3238 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3239 ac_md_release=`echo $ac_sys_release |
3240 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3241 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003242
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003243 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003244 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003245 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003246 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003247 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003248 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003249 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003250 esac
3251fi
3252
3253
3254if test "$cross_compiling" = yes; then
3255 case "$host" in
3256 *-*-linux*)
3257 case "$host_cpu" in
3258 arm*)
3259 _host_cpu=arm
3260 ;;
3261 *)
3262 _host_cpu=$host_cpu
3263 esac
3264 ;;
3265 *-*-cygwin*)
3266 _host_cpu=
3267 ;;
3268 *)
3269 # for now, limit cross builds to known configurations
3270 MACHDEP="unknown"
3271 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003273 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003274fi
Guido van Rossum91922671997-10-09 20:24:13 +00003275
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003276# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3277# disable features if it is defined, without any means to access these
3278# features as extensions. For these systems, we skip the definition of
3279# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3280# some feature, make sure there is no alternative way to access this
3281# feature. Also, when using wildcards, make sure you have verified the
3282# need for not defining _XOPEN_SOURCE on all systems matching the
3283# wildcard, and that the wildcard does not include future systems
3284# (which may remove their limitations).
3285case $ac_sys_system/$ac_sys_release in
3286 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3287 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003288 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003289 # In addition, Stefan Krah confirms that issue #1244610 exists through
3290 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003291 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003292 define_xopen_source=no
3293 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3294 # also defined. This can be overridden by defining _BSD_SOURCE
3295 # As this has a different meaning on Linux, only define it on OpenBSD
3296
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003297$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003298
3299 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003300 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003301 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3302 # also defined. This can be overridden by defining _BSD_SOURCE
3303 # As this has a different meaning on Linux, only define it on OpenBSD
3304
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003305$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003306
3307 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003308 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3309 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3310 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003311 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 +00003312 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003313 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3314 # request to enable features supported by the standard as a request
3315 # to disable features not supported by the standard. The best way
3316 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3317 # entirely and define __EXTENSIONS__ instead.
3318 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003319 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003320 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3321 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003322 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003323 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003324 define_xopen_source=no;;
3325 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003326 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003327 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003328 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003329 # On FreeBSD 4, the math functions C89 does not cover are never defined
3330 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3331 FreeBSD/4.*)
3332 define_xopen_source=no;;
3333 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3334 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3335 # identifies itself as Darwin/7.*
3336 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3337 # disables platform specific features beyond repair.
3338 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3339 # has no effect, don't bother defining them
3340 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003341 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003342 Darwin/1[0-9].*)
3343 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003344 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3345 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3346 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003347 AIX/4)
3348 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003349 AIX/5)
3350 if test `uname -r` -eq 1; then
3351 define_xopen_source=no
3352 fi
3353 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003354 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3355 # defining NI_NUMERICHOST.
3356 QNX/6.3.2)
3357 define_xopen_source=no
3358 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003359
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003360esac
3361
3362if test $define_xopen_source = yes
3363then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003366
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003367
3368 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3369 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3370 # several APIs are not declared. Since this is also needed in some
3371 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003373$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003374
3375
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003376
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003377$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003378
3379
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003380fi
3381
Guido van Rossum91922671997-10-09 20:24:13 +00003382#
3383# SGI compilers allow the specification of the both the ABI and the
3384# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003385# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003386#
3387# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3388# thus supply support for various ABI/ISA combinations. The MACHDEP
3389# variable is also adjusted.
3390#
3391
3392if test ! -z "$SGI_ABI"
3393then
3394 CC="cc $SGI_ABI"
3395 LDFLAGS="$SGI_ABI $LDFLAGS"
3396 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3397fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3399$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003400
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003401
3402PLATDIR=plat-$MACHDEP
3403
Jack Jansen83f898c2002-12-30 22:23:40 +00003404# And add extra plat-mac for darwin
3405
Jack Jansen7b59b422003-03-17 15:44:10 +00003406
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3408$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003409if test -z "$EXTRAPLATDIR"
3410then
3411 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003412 darwin)
3413 EXTRAPLATDIR="\$(PLATMACDIRS)"
3414 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3415 ;;
3416 *)
3417 EXTRAPLATDIR=""
3418 EXTRAMACHDEPPATH=""
3419 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003420 esac
3421fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3423$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003424
Jack Jansen6b08a402004-06-03 12:41:45 +00003425# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3426# it may influence the way we can build extensions, so distutils
3427# needs to check it
3428
Ronald Oussoren988117f2006-04-29 11:31:35 +00003429
Jack Jansen6b08a402004-06-03 12:41:45 +00003430CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003431EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003432
Guido van Rossum627b2d71993-12-24 10:39:16 +00003433# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003434
3435# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3436# for debug/optimization stuff. BASECFLAGS is for flags that are required
3437# just to get things to compile and link. Users are free to override OPT
3438# when running configure or make. The build should not break if they do.
3439# BASECFLAGS should generally not be messed with, however.
3440
3441# XXX shouldn't some/most/all of this code be merged with the stuff later
3442# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3444$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003445
Martin v. Löwiseba40652007-08-30 20:10:57 +00003446# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003447if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003448 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003449 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003450 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003451 without_gcc=yes;;
3452 yes) CC=gcc
3453 without_gcc=no;;
3454 *) CC=$withval
3455 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003456 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003457else
Martin v. Löwis11437992002-04-12 09:54:03 +00003458
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003459 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003460 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003461 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003462 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003463 case $BE_HOST_CPU in
3464 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003465 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003466 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003467 BASECFLAGS="$BASECFLAGS -export pragma"
3468 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003469 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003470 ;;
3471 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003472 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003473 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003474 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003475 ;;
3476 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003477 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003478 ;;
3479 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003480 AR="\$(srcdir)/Modules/ar_beos"
3481 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003482 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003483 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003484 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485fi
3486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3488$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003489
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3491$as_echo_n "checking for --with-icc... " >&6; }
3492
3493# Check whether --with-icc was given.
3494if test "${with_icc+set}" = set; then :
3495 withval=$with_icc;
3496 case $withval in
3497 no) CC=${CC:-cc}
3498 with_icc=no;;
3499 yes) CC=icc
3500 CXX=icpc
3501 with_icc=yes;;
3502 *) CC=$withval
3503 with_icc=$withval;;
3504 esac
3505else
3506
3507 with_icc=no
3508fi
3509
3510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3511$as_echo "$with_icc" >&6; }
3512
Guido van Rossum8b131c51995-03-09 14:10:13 +00003513# If the user switches compilers, we can't believe the cache
3514if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3515then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003516 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003517(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003518fi
3519
Trent Nelson15daa352012-12-13 06:46:39 +00003520if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3521 # Normally, MIPSpro CC treats #error directives as warnings, which means
3522 # a successful exit code is returned (0). This is a problem because IRIX
3523 # has a bunch of system headers with this guard at the top:
3524 #
3525 # #ifndef __c99
3526 # #error This header file is to be used only for c99 mode compilations
3527 # #else
3528 #
3529 # When autoconf tests for such a header, like stdint.h, this happens:
3530 #
3531 # configure:4619: cc -c conftest.c >&5
3532 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3533 # #error directive: This header file is to be used only for c99 mode
3534 # compilations
3535 #
3536 # #error This header file is to be used only for c99 mode compilations
3537 # ^
3538 #
3539 # configure:4619: $? = 0
3540 # configure:4619: result: yes
3541 #
3542 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3543 # warning as an error, which causes cc to return a non-zero result,
3544 # which autoconf can interpret correctly.
3545 CFLAGS="$CFLAGS -diag_error 1035"
3546 # Whilst we're here, we might as well make sure CXX defaults to something
3547 # sensible if we're not using gcc.
3548 if test -z "$CXX"; then
3549 CXX="CC"
3550 fi
3551fi
3552
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003553# If the user set CFLAGS, use this instead of the automatically
3554# determined setting
3555preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003556ac_ext=c
3557ac_cpp='$CPP $CPPFLAGS'
3558ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3559ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3560ac_compiler_gnu=$ac_cv_c_compiler_gnu
3561if test -n "$ac_tool_prefix"; then
3562 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3563set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003566if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003567 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003568else
3569 if test -n "$CC"; then
3570 ac_cv_prog_CC="$CC" # Let the user override the test.
3571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3573for as_dir in $PATH
3574do
3575 IFS=$as_save_IFS
3576 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 break 2
3582 fi
3583done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003584 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003585IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003586
Jack Jansendd19cf82001-12-06 22:36:17 +00003587fi
3588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003589CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003590if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3592$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003596fi
3597
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599fi
3600if test -z "$ac_cv_prog_CC"; then
3601 ac_ct_CC=$CC
3602 # Extract the first word of "gcc", so it can be a program name with args.
3603set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3605$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003606if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003608else
3609 if test -n "$ac_ct_CC"; then
3610 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3611else
3612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613for as_dir in $PATH
3614do
3615 IFS=$as_save_IFS
3616 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003617 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003618 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003620 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 break 2
3622 fi
3623done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003624 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003625IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003626
3627fi
3628fi
3629ac_ct_CC=$ac_cv_prog_ac_ct_CC
3630if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3632$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3635$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003636fi
3637
Martin v. Löwiseba40652007-08-30 20:10:57 +00003638 if test "x$ac_ct_CC" = x; then
3639 CC=""
3640 else
3641 case $cross_compiling:$ac_tool_warned in
3642yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003645ac_tool_warned=yes ;;
3646esac
3647 CC=$ac_ct_CC
3648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
3650 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003651fi
3652
Jack Jansendd19cf82001-12-06 22:36:17 +00003653if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003654 if test -n "$ac_tool_prefix"; then
3655 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003656set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3658$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003659if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003661else
3662 if test -n "$CC"; then
3663 ac_cv_prog_CC="$CC" # Let the user override the test.
3664else
Martin v. Löwis11437992002-04-12 09:54:03 +00003665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003674 break 2
3675 fi
3676done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003677 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003678IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003679
3680fi
3681fi
3682CC=$ac_cv_prog_CC
3683if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3685$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3688$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003689fi
3690
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693fi
3694if test -z "$CC"; then
3695 # Extract the first word of "cc", so it can be a program name with args.
3696set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003699if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003701else
3702 if test -n "$CC"; then
3703 ac_cv_prog_CC="$CC" # Let the user override the test.
3704else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003705 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3707for as_dir in $PATH
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3714 ac_prog_rejected=yes
3715 continue
3716 fi
3717 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 break 2
3720 fi
3721done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003722 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003723IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725if test $ac_prog_rejected = yes; then
3726 # We found a bogon in the path, so make sure we never use it.
3727 set dummy $ac_cv_prog_CC
3728 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730 # We chose a different compiler from the bogus one.
3731 # However, it has the same basename, so the bogon will be chosen
3732 # first if we set CC to just the basename; use the full file name.
3733 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003734 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 fi
3736fi
3737fi
3738fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003739CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3742$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746fi
3747
Martin v. Löwiseba40652007-08-30 20:10:57 +00003748
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750if test -z "$CC"; then
3751 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003752 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 do
3754 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3755set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003758if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003759 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003760else
3761 if test -n "$CC"; then
3762 ac_cv_prog_CC="$CC" # Let the user override the test.
3763else
Martin v. Löwis11437992002-04-12 09:54:03 +00003764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003775done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003776 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
3779fi
3780fi
3781CC=$ac_cv_prog_CC
3782if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3784$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003788fi
3789
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 test -n "$CC" && break
3792 done
3793fi
3794if test -z "$CC"; then
3795 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797do
3798 # Extract the first word of "$ac_prog", so it can be a program name with args.
3799set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003802if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003803 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003804else
3805 if test -n "$ac_ct_CC"; then
3806 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3807else
3808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 break 2
3818 fi
3819done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003820 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003821IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003822
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
3824fi
3825ac_ct_CC=$ac_cv_prog_ac_ct_CC
3826if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3828$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003833
Martin v. Löwiseba40652007-08-30 20:10:57 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$ac_ct_CC" && break
3836done
Michael W. Hudson54241132001-12-07 15:38:26 +00003837
Martin v. Löwiseba40652007-08-30 20:10:57 +00003838 if test "x$ac_ct_CC" = x; then
3839 CC=""
3840 else
3841 case $cross_compiling:$ac_tool_warned in
3842yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3844$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003845ac_tool_warned=yes ;;
3846esac
3847 CC=$ac_ct_CC
3848 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850
3851fi
3852
3853
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003854test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003856as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003857See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858
3859# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003860$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3861set X $ac_compile
3862ac_compiler=$2
3863for ac_option in --version -v -V -qversion; do
3864 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865case "(($ac_try" in
3866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3867 *) ac_try_echo=$ac_try;;
3868esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3870$as_echo "$ac_try_echo"; } >&5
3871 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003873 if test -s conftest.err; then
3874 sed '10a\
3875... rest of stderr output deleted ...
3876 10q' conftest.err >conftest.er1
3877 cat conftest.er1 >&5
3878 fi
3879 rm -f conftest.er1 conftest.err
3880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3881 test $ac_status = 0; }
3882done
Martin v. Löwis11437992002-04-12 09:54:03 +00003883
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003885/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003886
Martin v. Löwis11437992002-04-12 09:54:03 +00003887int
3888main ()
3889{
3890
3891 ;
3892 return 0;
3893}
3894_ACEOF
3895ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003896ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003897# Try to create an executable without -o first, disregard a.out.
3898# It will help us diagnose broken compilers, and finding out an intuition
3899# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3901$as_echo_n "checking whether the C compiler works... " >&6; }
3902ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3903
3904# The possible output files:
3905ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3906
Martin v. Löwiseba40652007-08-30 20:10:57 +00003907ac_rmfiles=
3908for ac_file in $ac_files
3909do
3910 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003911 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003912 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3913 esac
3914done
3915rm -f $ac_rmfiles
3916
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003917if { { ac_try="$ac_link_default"
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_default") 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öwiseba40652007-08-30 20:10:57 +00003928 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3929# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3930# in a Makefile. We should not override ac_cv_exeext if it was cached,
3931# so that the user can short-circuit this test for compilers unknown to
3932# Autoconf.
3933for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003934do
3935 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003938 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003939 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003940 # We found the default executable, but exeext='' is most
3941 # certainly right.
3942 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003943 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003944 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003945 then :; else
3946 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3947 fi
3948 # We set ac_cv_exeext here because the later test for it is not
3949 # safe: cross compilers may not add the suffix if given an `-o'
3950 # argument, so we may need to know it at that point already.
3951 # Even if this section looks crufty: it has the advantage of
3952 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003953 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003954 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003955 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003956 esac
3957done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003958test "$ac_cv_exeext" = no && ac_cv_exeext=
3959
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003960else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003961 ac_file=''
3962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003963if test -z "$ac_file"; then :
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3965$as_echo "no" >&6; }
3966$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003967sed 's/^/| /' conftest.$ac_ext >&5
3968
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003969{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003971as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003972See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003973else
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3975$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3978$as_echo_n "checking for C compiler default output file name... " >&6; }
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3980$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003981ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003983rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003984ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3986$as_echo_n "checking for suffix of executables... " >&6; }
3987if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003988case "(($ac_try" in
3989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3990 *) ac_try_echo=$ac_try;;
3991esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3993$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003994 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3997 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003998 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3999# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4000# work properly (i.e., refer to `conftest.exe'), while it won't with
4001# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004002for ac_file in conftest.exe conftest conftest.*; do
4003 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004004 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004005 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004006 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004007 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 * ) break;;
4009 esac
4010done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004012 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004014as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004015See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004017rm -f conftest conftest$ac_cv_exeext
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4019$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004020
4021rm -f conftest.$ac_ext
4022EXEEXT=$ac_cv_exeext
4023ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4025/* end confdefs.h. */
4026#include <stdio.h>
4027int
4028main ()
4029{
4030FILE *f = fopen ("conftest.out", "w");
4031 return ferror (f) || fclose (f) != 0;
4032
4033 ;
4034 return 0;
4035}
Skip Montanaro6dead952003-09-25 14:50:04 +00004036_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004037ac_clean_files="$ac_clean_files conftest.out"
4038# Check that the compiler produces executables we can run. If not, either
4039# the compiler is broken, or we cross compile.
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4041$as_echo_n "checking whether we are cross compiling... " >&6; }
4042if test "$cross_compiling" != yes; then
4043 { { ac_try="$ac_link"
4044case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
4048eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4049$as_echo "$ac_try_echo"; } >&5
4050 (eval "$ac_link") 2>&5
4051 ac_status=$?
4052 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4053 test $ac_status = 0; }
4054 if { ac_try='./conftest$ac_cv_exeext'
4055 { { case "(($ac_try" in
4056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4057 *) ac_try_echo=$ac_try;;
4058esac
4059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4060$as_echo "$ac_try_echo"; } >&5
4061 (eval "$ac_try") 2>&5
4062 ac_status=$?
4063 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4064 test $ac_status = 0; }; }; then
4065 cross_compiling=no
4066 else
4067 if test "$cross_compiling" = maybe; then
4068 cross_compiling=yes
4069 else
4070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004072as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004073If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004074See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004075 fi
4076 fi
4077fi
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4079$as_echo "$cross_compiling" >&6; }
4080
4081rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4082ac_clean_files=$ac_clean_files_save
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4084$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004085if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004086 $as_echo_n "(cached) " >&6
4087else
4088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004090
Martin v. Löwis11437992002-04-12 09:54:03 +00004091int
4092main ()
4093{
4094
4095 ;
4096 return 0;
4097}
4098_ACEOF
4099rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004107 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004111 for ac_file in conftest.o conftest.obj conftest.*; do
4112 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004114 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4116 break;;
4117 esac
4118done
4119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004120 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004121sed 's/^/| /' conftest.$ac_ext >&5
4122
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004123{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004125as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004126See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004127fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004128rm -f conftest.$ac_cv_objext conftest.$ac_ext
4129fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4131$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004132OBJEXT=$ac_cv_objext
4133ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4135$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004136if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004141
Martin v. Löwis11437992002-04-12 09:54:03 +00004142int
4143main ()
4144{
4145#ifndef __GNUC__
4146 choke me
4147#endif
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 ac_compiler_gnu=yes
4155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004156 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004159ac_cv_c_compiler_gnu=$ac_compiler_gnu
4160
4161fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4163$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4164if test $ac_compiler_gnu = yes; then
4165 GCC=yes
4166else
4167 GCC=
4168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004169ac_test_CFLAGS=${CFLAGS+set}
4170ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4172$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004173if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004174 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004175else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004176 ac_save_c_werror_flag=$ac_c_werror_flag
4177 ac_c_werror_flag=yes
4178 ac_cv_prog_cc_g=no
4179 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004182
Martin v. Löwis11437992002-04-12 09:54:03 +00004183int
4184main ()
4185{
4186
4187 ;
4188 return 0;
4189}
4190_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004191if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004192 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004194 CFLAGS=""
4195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004196/* end confdefs.h. */
4197
4198int
4199main ()
4200{
4201
4202 ;
4203 return 0;
4204}
4205_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004208else
4209 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004210 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004212/* end confdefs.h. */
4213
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004223 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4230 ac_c_werror_flag=$ac_save_c_werror_flag
4231fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4233$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004234if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004236elif test $ac_cv_prog_cc_g = yes; then
4237 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004238 CFLAGS="-g -O2"
4239 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004240 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241 fi
4242else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004243 if test "$GCC" = yes; then
4244 CFLAGS="-O2"
4245 else
4246 CFLAGS=
4247 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4250$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004251if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004252 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004253else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004254 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004255ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
4258#include <stdarg.h>
4259#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004260struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004261/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4262struct buf { int x; };
4263FILE * (*rcsopen) (struct buf *, struct stat *, int);
4264static char *e (p, i)
4265 char **p;
4266 int i;
4267{
4268 return p[i];
4269}
4270static char *f (char * (*g) (char **, int), char **p, ...)
4271{
4272 char *s;
4273 va_list v;
4274 va_start (v,p);
4275 s = g (p, va_arg (v,int));
4276 va_end (v);
4277 return s;
4278}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004279
4280/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4281 function prototypes and stuff, but not '\xHH' hex character constants.
4282 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4285 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004286 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4288
Martin v. Löwiseba40652007-08-30 20:10:57 +00004289/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4290 inside strings and character constants. */
4291#define FOO(x) 'x'
4292int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4293
Skip Montanaro6dead952003-09-25 14:50:04 +00004294int test (int i, double x);
4295struct s1 {int (*f) (int a);};
4296struct s2 {int (*f) (double a);};
4297int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4298int argc;
4299char **argv;
4300int
4301main ()
4302{
4303return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4304 ;
4305 return 0;
4306}
4307_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004308for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4309 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004310do
4311 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004312 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004313 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004315rm -f core conftest.err conftest.$ac_objext
4316 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004317done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004318rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004319CC=$ac_save_CC
4320
4321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004322# AC_CACHE_VAL
4323case "x$ac_cv_prog_cc_c89" in
4324 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4326$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004327 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4329$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004330 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004331 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4333$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004334esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004335if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004337fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004338
Martin v. Löwis11437992002-04-12 09:54:03 +00004339ac_ext=c
4340ac_cpp='$CPP $CPPFLAGS'
4341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4343ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004345if test ! -z "$preset_cflags"
4346then
4347 CFLAGS=$preset_cflags
4348fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004349
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004350
4351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4353$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004354
Martin v. Löwiseba40652007-08-30 20:10:57 +00004355# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004356if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004357 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004358
4359 case $withval in
4360 no) with_cxx_main=no
4361 MAINCC='$(CC)';;
4362 yes) with_cxx_main=yes
4363 MAINCC='$(CXX)';;
4364 *) with_cxx_main=yes
4365 MAINCC=$withval
4366 if test -z "$CXX"
4367 then
4368 CXX=$withval
4369 fi;;
4370 esac
4371else
4372
4373 with_cxx_main=no
4374 MAINCC='$(CC)'
4375
Martin v. Löwiseba40652007-08-30 20:10:57 +00004376fi
4377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4379$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004380
4381preset_cxx="$CXX"
4382if test -z "$CXX"
4383then
4384 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004385 gcc) if test -n "$ac_tool_prefix"; then
4386 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4387set dummy ${ac_tool_prefix}g++; ac_word=$2
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389$as_echo_n "checking for $ac_word... " >&6; }
4390if ${ac_cv_path_CXX+:} false; then :
4391 $as_echo_n "(cached) " >&6
4392else
4393 case $CXX in
4394 [\\/]* | ?:[\\/]*)
4395 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4396 ;;
4397 *)
4398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399for as_dir in notfound
4400do
4401 IFS=$as_save_IFS
4402 test -z "$as_dir" && as_dir=.
4403 for ac_exec_ext in '' $ac_executable_extensions; do
4404 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4405 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4407 break 2
4408 fi
4409done
4410 done
4411IFS=$as_save_IFS
4412
4413 ;;
4414esac
4415fi
4416CXX=$ac_cv_path_CXX
4417if test -n "$CXX"; then
4418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4419$as_echo "$CXX" >&6; }
4420else
4421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422$as_echo "no" >&6; }
4423fi
4424
4425
4426fi
4427if test -z "$ac_cv_path_CXX"; then
4428 ac_pt_CXX=$CXX
4429 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004430set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004433if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004434 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004435else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004436 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004437 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004438 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 +00004439 ;;
4440 *)
4441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in notfound
4443do
4444 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004447 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004448 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004449 $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 +00004450 break 2
4451 fi
4452done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004453 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004454IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004455
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004456 ;;
4457esac
4458fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004459ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4460if test -n "$ac_pt_CXX"; then
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4462$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004467
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004468 if test "x$ac_pt_CXX" = x; then
4469 CXX="g++"
4470 else
4471 case $cross_compiling:$ac_tool_warned in
4472yes:)
4473{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4474$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4475ac_tool_warned=yes ;;
4476esac
4477 CXX=$ac_pt_CXX
4478 fi
4479else
4480 CXX="$ac_cv_path_CXX"
4481fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004482 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004483 cc) if test -n "$ac_tool_prefix"; then
4484 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4485set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004488if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004489 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004490else
4491 case $CXX in
4492 [\\/]* | ?:[\\/]*)
4493 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4494 ;;
4495 *)
4496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in notfound
4498do
4499 IFS=$as_save_IFS
4500 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004501 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004502 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004503 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004504 $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 +00004505 break 2
4506 fi
4507done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004508 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004509IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004510
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004511 ;;
4512esac
4513fi
4514CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004515if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4517$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4520$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004522
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004523
4524fi
4525if test -z "$ac_cv_path_CXX"; then
4526 ac_pt_CXX=$CXX
4527 # Extract the first word of "c++", so it can be a program name with args.
4528set dummy c++; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
4531if ${ac_cv_path_ac_pt_CXX+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
4534 case $ac_pt_CXX in
4535 [\\/]* | ?:[\\/]*)
4536 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4537 ;;
4538 *)
4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in notfound
4541do
4542 IFS=$as_save_IFS
4543 test -z "$as_dir" && as_dir=.
4544 for ac_exec_ext in '' $ac_executable_extensions; do
4545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4546 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548 break 2
4549 fi
4550done
4551 done
4552IFS=$as_save_IFS
4553
4554 ;;
4555esac
4556fi
4557ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4558if test -n "$ac_pt_CXX"; then
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4560$as_echo "$ac_pt_CXX" >&6; }
4561else
4562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
4564fi
4565
4566 if test "x$ac_pt_CXX" = x; then
4567 CXX="c++"
4568 else
4569 case $cross_compiling:$ac_tool_warned in
4570yes:)
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4573ac_tool_warned=yes ;;
4574esac
4575 CXX=$ac_pt_CXX
4576 fi
4577else
4578 CXX="$ac_cv_path_CXX"
4579fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004580 ;;
4581 esac
4582 if test "$CXX" = "notfound"
4583 then
4584 CXX=""
4585 fi
4586fi
4587if test -z "$CXX"
4588then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004589 if test -n "$ac_tool_prefix"; then
4590 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4591 do
4592 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4593set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4595$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004596if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004597 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004598else
4599 if test -n "$CXX"; then
4600 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4601else
4602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4603for as_dir in $PATH
4604do
4605 IFS=$as_save_IFS
4606 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004607 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004609 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004610 $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 +00004611 break 2
4612 fi
4613done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004614 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004615IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004616
4617fi
4618fi
4619CXX=$ac_cv_prog_CXX
4620if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4622$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004623else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4625$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004626fi
4627
Martin v. Löwiseba40652007-08-30 20:10:57 +00004628
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004629 test -n "$CXX" && break
4630 done
4631fi
4632if test -z "$CXX"; then
4633 ac_ct_CXX=$CXX
4634 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4635do
4636 # Extract the first word of "$ac_prog", so it can be a program name with args.
4637set dummy $ac_prog; ac_word=$2
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4639$as_echo_n "checking for $ac_word... " >&6; }
4640if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4641 $as_echo_n "(cached) " >&6
4642else
4643 if test -n "$ac_ct_CXX"; then
4644 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4645else
4646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4647for as_dir in $PATH
4648do
4649 IFS=$as_save_IFS
4650 test -z "$as_dir" && as_dir=.
4651 for ac_exec_ext in '' $ac_executable_extensions; do
4652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4653 ac_cv_prog_ac_ct_CXX="$ac_prog"
4654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4655 break 2
4656 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004657done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004658 done
4659IFS=$as_save_IFS
4660
4661fi
4662fi
4663ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4664if test -n "$ac_ct_CXX"; then
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4666$as_echo "$ac_ct_CXX" >&6; }
4667else
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669$as_echo "no" >&6; }
4670fi
4671
4672
4673 test -n "$ac_ct_CXX" && break
4674done
4675
4676 if test "x$ac_ct_CXX" = x; then
4677 CXX="notfound"
4678 else
4679 case $cross_compiling:$ac_tool_warned in
4680yes:)
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4683ac_tool_warned=yes ;;
4684esac
4685 CXX=$ac_ct_CXX
4686 fi
4687fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004688
4689 if test "$CXX" = "notfound"
4690 then
4691 CXX=""
4692 fi
4693fi
4694if test "$preset_cxx" != "$CXX"
4695then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004697
4698 By default, distutils will build C++ extension modules with \"$CXX\".
4699 If this is not intended, then set CXX on the configure command line.
4700 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004701$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004702
4703 By default, distutils will build C++ extension modules with \"$CXX\".
4704 If this is not intended, then set CXX on the configure command line.
4705 " >&2;}
4706fi
4707
doko@python.org4e63fbe2013-01-25 13:08:27 +01004708MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4709
4710
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004711
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004712# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004713
4714ac_ext=c
4715ac_cpp='$CPP $CPPFLAGS'
4716ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4717ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4718ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4720$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004721# On Suns, sometimes $CPP names a directory.
4722if test -n "$CPP" && test -d "$CPP"; then
4723 CPP=
4724fi
4725if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004726 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004727 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004728else
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 # Double quotes because CPP needs to be expanded
4730 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4731 do
4732 ac_preproc_ok=false
4733for ac_c_preproc_warn_flag in '' yes
4734do
4735 # Use a header file that comes with gcc, so configuring glibc
4736 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004737 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4738 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004739 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004740 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004742/* end confdefs.h. */
4743#ifdef __STDC__
4744# include <limits.h>
4745#else
4746# include <assert.h>
4747#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004748 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004750if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004751
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004752else
Martin v. Löwis11437992002-04-12 09:54:03 +00004753 # Broken: fails on valid input.
4754continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004755fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004756rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004757
Martin v. Löwiseba40652007-08-30 20:10:57 +00004758 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004759 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004762#include <ac_nonexistent.h>
4763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004764if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004765 # Broken: success on invalid input.
4766continue
4767else
Martin v. Löwis11437992002-04-12 09:54:03 +00004768 # Passes both tests.
4769ac_preproc_ok=:
4770break
4771fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004772rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004773
4774done
4775# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004776rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004777if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004778 break
4779fi
4780
4781 done
4782 ac_cv_prog_CPP=$CPP
4783
4784fi
4785 CPP=$ac_cv_prog_CPP
4786else
4787 ac_cv_prog_CPP=$CPP
4788fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4790$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004791ac_preproc_ok=false
4792for ac_c_preproc_warn_flag in '' yes
4793do
4794 # Use a header file that comes with gcc, so configuring glibc
4795 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004796 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4797 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004798 # On the NeXT, cc -E runs the code through the compiler's parser,
4799 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004801/* end confdefs.h. */
4802#ifdef __STDC__
4803# include <limits.h>
4804#else
4805# include <assert.h>
4806#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004807 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004808_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004809if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004810
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004811else
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 # Broken: fails on valid input.
4813continue
4814fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004815rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004816
Martin v. Löwiseba40652007-08-30 20:10:57 +00004817 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004818 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004821#include <ac_nonexistent.h>
4822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004823if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004824 # Broken: success on invalid input.
4825continue
4826else
Martin v. Löwis11437992002-04-12 09:54:03 +00004827 # Passes both tests.
4828ac_preproc_ok=:
4829break
4830fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004831rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004832
4833done
4834# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004835rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004836if $ac_preproc_ok; then :
4837
Martin v. Löwis11437992002-04-12 09:54:03 +00004838else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004841as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004842See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004843fi
4844
4845ac_ext=c
4846ac_cpp='$CPP $CPPFLAGS'
4847ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4848ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4849ac_compiler_gnu=$ac_cv_c_compiler_gnu
4850
4851
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4853$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004854if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004855 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004858 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004859 # Loop through the user's path and test for each of PROGNAME-LIST
4860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4862do
4863 IFS=$as_save_IFS
4864 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865 for ac_prog in grep ggrep; do
4866 for ac_exec_ext in '' $ac_executable_extensions; do
4867 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004868 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004870 # Check for GNU $ac_path_GREP
4871case `"$ac_path_GREP" --version 2>&1` in
4872*GNU*)
4873 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4874*)
4875 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004876 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004877 while :
4878 do
4879 cat "conftest.in" "conftest.in" >"conftest.tmp"
4880 mv "conftest.tmp" "conftest.in"
4881 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004882 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004883 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4884 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004885 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004886 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4887 # Best one so far, save it but keep looking for a better one
4888 ac_cv_path_GREP="$ac_path_GREP"
4889 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004890 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004891 # 10*(2^10) chars as input seems more than enough
4892 test $ac_count -gt 10 && break
4893 done
4894 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4895esac
4896
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004897 $ac_path_GREP_found && break 3
4898 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004900 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004901IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004902 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004903 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 +00004904 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905else
4906 ac_cv_path_GREP=$GREP
4907fi
4908
Martin v. Löwiseba40652007-08-30 20:10:57 +00004909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4911$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 GREP="$ac_cv_path_GREP"
4913
4914
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4916$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004917if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004918 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004919else
4920 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4921 then ac_cv_path_EGREP="$GREP -E"
4922 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004924 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004925 # Loop through the user's path and test for each of PROGNAME-LIST
4926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4928do
4929 IFS=$as_save_IFS
4930 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004931 for ac_prog in egrep; do
4932 for ac_exec_ext in '' $ac_executable_extensions; do
4933 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004934 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004935# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004936 # Check for GNU $ac_path_EGREP
4937case `"$ac_path_EGREP" --version 2>&1` in
4938*GNU*)
4939 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4940*)
4941 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004942 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004943 while :
4944 do
4945 cat "conftest.in" "conftest.in" >"conftest.tmp"
4946 mv "conftest.tmp" "conftest.in"
4947 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004948 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004949 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4950 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004951 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004952 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4953 # Best one so far, save it but keep looking for a better one
4954 ac_cv_path_EGREP="$ac_path_EGREP"
4955 ac_path_EGREP_max=$ac_count
4956 fi
4957 # 10*(2^10) chars as input seems more than enough
4958 test $ac_count -gt 10 && break
4959 done
4960 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4961esac
4962
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004963 $ac_path_EGREP_found && break 3
4964 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004965 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004966 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004967IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004968 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004969 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 +00004970 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004971else
4972 ac_cv_path_EGREP=$EGREP
4973fi
4974
Martin v. Löwiseba40652007-08-30 20:10:57 +00004975 fi
4976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4978$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004980
4981
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4983$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004984if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985 $as_echo_n "(cached) " >&6
4986else
4987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004988/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004989#include <stdlib.h>
4990#include <stdarg.h>
4991#include <string.h>
4992#include <float.h>
4993
4994int
4995main ()
4996{
4997
4998 ;
4999 return 0;
5000}
5001_ACEOF
5002if ac_fn_c_try_compile "$LINENO"; then :
5003 ac_cv_header_stdc=yes
5004else
5005 ac_cv_header_stdc=no
5006fi
5007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5008
5009if test $ac_cv_header_stdc = yes; then
5010 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5012/* end confdefs.h. */
5013#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005014
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005015_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005017 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005018
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005020 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005021fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005022rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005023
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005024fi
5025
5026if test $ac_cv_header_stdc = yes; then
5027 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5029/* end confdefs.h. */
5030#include <stdlib.h>
5031
5032_ACEOF
5033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5034 $EGREP "free" >/dev/null 2>&1; then :
5035
5036else
5037 ac_cv_header_stdc=no
5038fi
5039rm -f conftest*
5040
5041fi
5042
5043if test $ac_cv_header_stdc = yes; then
5044 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5045 if test "$cross_compiling" = yes; then :
5046 :
5047else
5048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5049/* end confdefs.h. */
5050#include <ctype.h>
5051#include <stdlib.h>
5052#if ((' ' & 0x0FF) == 0x020)
5053# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5054# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5055#else
5056# define ISLOWER(c) \
5057 (('a' <= (c) && (c) <= 'i') \
5058 || ('j' <= (c) && (c) <= 'r') \
5059 || ('s' <= (c) && (c) <= 'z'))
5060# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5061#endif
5062
5063#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5064int
5065main ()
5066{
5067 int i;
5068 for (i = 0; i < 256; i++)
5069 if (XOR (islower (i), ISLOWER (i))
5070 || toupper (i) != TOUPPER (i))
5071 return 2;
5072 return 0;
5073}
5074_ACEOF
5075if ac_fn_c_try_run "$LINENO"; then :
5076
5077else
5078 ac_cv_header_stdc=no
5079fi
5080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5081 conftest.$ac_objext conftest.beam conftest.$ac_ext
5082fi
5083
5084fi
5085fi
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5087$as_echo "$ac_cv_header_stdc" >&6; }
5088if test $ac_cv_header_stdc = yes; then
5089
5090$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5091
5092fi
5093
5094# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5095for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5096 inttypes.h stdint.h unistd.h
5097do :
5098 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5099ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5100"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005101if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005102 cat >>confdefs.h <<_ACEOF
5103#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5104_ACEOF
5105
5106fi
5107
5108done
5109
5110
5111
5112 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 +01005113if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005114 MINIX=yes
5115else
5116 MINIX=
5117fi
5118
5119
5120 if test "$MINIX" = yes; then
5121
5122$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5123
5124
5125$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5126
5127
5128$as_echo "#define _MINIX 1" >>confdefs.h
5129
5130 fi
5131
5132
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5134$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005135if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005136 $as_echo_n "(cached) " >&6
5137else
5138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5139/* end confdefs.h. */
5140
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005141# define __EXTENSIONS__ 1
5142 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005143int
5144main ()
5145{
5146
5147 ;
5148 return 0;
5149}
5150_ACEOF
5151if ac_fn_c_try_compile "$LINENO"; then :
5152 ac_cv_safe_to_define___extensions__=yes
5153else
5154 ac_cv_safe_to_define___extensions__=no
5155fi
5156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5157fi
5158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5159$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5160 test $ac_cv_safe_to_define___extensions__ = yes &&
5161 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5162
5163 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5164
5165 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5166
5167 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5168
5169 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5170
5171
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005172
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005173# Check for unsupported systems
5174case $ac_sys_system/$ac_sys_release in
5175atheos*|Linux*/1*)
5176 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5177 echo See README for details.
5178 exit 1;;
5179esac
5180
5181
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5183$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005184
5185# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005186if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005187 withval=$with_suffix;
5188 case $withval in
5189 no) EXEEXT=;;
5190 yes) EXEEXT=.exe;;
5191 *) EXEEXT=$withval;;
5192 esac
5193fi
5194
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5196$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005197
5198# Test whether we're running on a non-case-sensitive system, in which
5199# case we give a warning if no ext is given
5200
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5202$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005203if test ! -d CaseSensitiveTestDir; then
5204mkdir CaseSensitiveTestDir
5205fi
5206
5207if test -d casesensitivetestdir
5208then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5210$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005211 BUILDEXEEXT=.exe
5212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5214$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005215 BUILDEXEEXT=$EXEEXT
5216fi
5217rmdir CaseSensitiveTestDir
5218
5219case $MACHDEP in
5220bsdos*)
5221 case $CC in
5222 gcc) CC="$CC -D_HAVE_BSDI";;
5223 esac;;
5224esac
5225
5226case $ac_sys_system in
5227hp*|HP*)
5228 case $CC in
5229 cc|*/cc) CC="$CC -Ae";;
5230 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005231SunOS*)
5232 # Some functions have a prototype only with that define, e.g. confstr
5233
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005234$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005235
5236 ;;
5237esac
5238
5239
5240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5242$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005243if test -z "$LIBRARY"
5244then
5245 LIBRARY='libpython$(VERSION).a'
5246fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5248$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005249
5250# LDLIBRARY is the name of the library to link against (as opposed to the
5251# name of the library into which to insert object files). BLDLIBRARY is also
5252# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5253# is blank as the main program is not linked directly against LDLIBRARY.
5254# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5255# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5256# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5257# DLLLIBRARY is the shared (i.e., DLL) library.
5258#
5259# RUNSHARED is used to run shared python without installed libraries
5260#
5261# INSTSONAME is the name of the shared library that will be use to install
5262# on the system - some systems like version suffix, others don't
5263
5264
5265
5266
5267
5268
5269LDLIBRARY="$LIBRARY"
5270BLDLIBRARY='$(LDLIBRARY)'
5271INSTSONAME='$(LDLIBRARY)'
5272DLLLIBRARY=''
5273LDLIBRARYDIR=''
5274RUNSHARED=''
5275
5276# LINKCC is the command that links the python executable -- default is $(CC).
5277# If CXX is set, and if it is needed to link a main function that was
5278# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5279# python might then depend on the C++ runtime
5280# This is altered for AIX in order to build the export list before
5281# linking.
5282
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5284$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005285if test -z "$LINKCC"
5286then
5287 LINKCC='$(PURIFY) $(MAINCC)'
5288 case $ac_sys_system in
5289 AIX*)
5290 exp_extra="\"\""
5291 if test $ac_sys_release -ge 5 -o \
5292 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5293 exp_extra="."
5294 fi
5295 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005296 QNX*)
5297 # qcc must be used because the other compilers do not
5298 # support -N.
5299 LINKCC=qcc;;
5300 esac
5301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5303$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005304
5305# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5306# make sure we default having it set to "no": this is used by
5307# distutils.unixccompiler to know if it should add --enable-new-dtags
5308# to linker command lines, and failing to detect GNU ld simply results
5309# in the same bahaviour as before.
5310
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5312$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005313ac_prog=ld
5314if test "$GCC" = yes; then
5315 ac_prog=`$CC -print-prog-name=ld`
5316fi
5317case `"$ac_prog" -V 2>&1 < /dev/null` in
5318 *GNU*)
5319 GNULD=yes;;
5320 *)
5321 GNULD=no;;
5322esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5324$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5327$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005329if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330 enableval=$enable_shared;
5331fi
5332
5333
5334if test -z "$enable_shared"
5335then
5336 case $ac_sys_system in
5337 CYGWIN* | atheos*)
5338 enable_shared="yes";;
5339 *)
5340 enable_shared="no";;
5341 esac
5342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5344$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005345
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5347$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005348# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005349if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005350 enableval=$enable_profiling;
5351fi
5352
5353if test "x$enable_profiling" = xyes; then
5354 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005355 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005357/* end confdefs.h. */
5358int main() { return 0; }
5359_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005360if ac_fn_c_try_link "$LINENO"; then :
5361
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005362else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005363 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005364fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005365rm -f core conftest.err conftest.$ac_objext \
5366 conftest$ac_exeext conftest.$ac_ext
5367 CC="$ac_save_cc"
5368else
5369 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5372$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005373
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005374if test "x$enable_profiling" = xyes; then
5375 BASECFLAGS="-pg $BASECFLAGS"
5376 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005377fi
5378
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5380$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005381
5382# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5383# library that we build, but we do not want to link against it (we
5384# will find it with a -framework option). For this reason there is an
5385# extra variable BLDLIBRARY against which Python and the extension
5386# modules are linked, BLDLIBRARY. This is normally the same as
5387# LDLIBRARY, but empty for MacOSX framework builds.
5388if test "$enable_framework"
5389then
5390 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005391 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005392 BLDLIBRARY=''
5393else
5394 BLDLIBRARY='$(LDLIBRARY)'
5395fi
5396
5397# Other platforms follow
5398if test $enable_shared = "yes"; then
5399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005400$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005401
5402 case $ac_sys_system in
5403 BeOS*)
5404 LDLIBRARY='libpython$(VERSION).so'
5405 ;;
5406 CYGWIN*)
5407 LDLIBRARY='libpython$(VERSION).dll.a'
5408 DLLLIBRARY='libpython$(VERSION).dll'
5409 ;;
5410 SunOS*)
5411 LDLIBRARY='libpython$(VERSION).so'
5412 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005413 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005414 INSTSONAME="$LDLIBRARY".$SOVERSION
5415 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005416 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005417 LDLIBRARY='libpython$(VERSION).so'
5418 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005419 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005420 case $ac_sys_system in
5421 FreeBSD*)
5422 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5423 ;;
5424 esac
5425 INSTSONAME="$LDLIBRARY".$SOVERSION
5426 ;;
5427 hp*|HP*)
5428 case `uname -m` in
5429 ia64)
5430 LDLIBRARY='libpython$(VERSION).so'
5431 ;;
5432 *)
5433 LDLIBRARY='libpython$(VERSION).sl'
5434 ;;
5435 esac
5436 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005437 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438 ;;
5439 OSF*)
5440 LDLIBRARY='libpython$(VERSION).so'
5441 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005442 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005443 ;;
5444 atheos*)
5445 LDLIBRARY='libpython$(VERSION).so'
5446 BLDLIBRARY='-L. -lpython$(VERSION)'
5447 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5448 ;;
5449 Darwin*)
5450 LDLIBRARY='libpython$(VERSION).dylib'
5451 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005452 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005453 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005454 AIX*)
5455 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005456 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005457 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005458
5459 esac
5460else # shared is disabled
5461 case $ac_sys_system in
5462 CYGWIN*)
5463 BLDLIBRARY='$(LIBRARY)'
5464 LDLIBRARY='libpython$(VERSION).dll.a'
5465 ;;
5466 esac
5467fi
5468
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005469if test "$cross_compiling" = yes; then
5470 RUNSHARED=
5471fi
5472
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5474$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475
5476if test -n "$ac_tool_prefix"; then
5477 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5478set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5480$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005481if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005482 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005483else
5484 if test -n "$RANLIB"; then
5485 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5486else
5487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490 IFS=$as_save_IFS
5491 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005492 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005493 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005494 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005495 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496 break 2
5497 fi
5498done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005499 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005500IFS=$as_save_IFS
5501
5502fi
5503fi
5504RANLIB=$ac_cv_prog_RANLIB
5505if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5507$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5510$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005511fi
5512
5513
5514fi
5515if test -z "$ac_cv_prog_RANLIB"; then
5516 ac_ct_RANLIB=$RANLIB
5517 # Extract the first word of "ranlib", so it can be a program name with args.
5518set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5520$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005521if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005522 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005523else
5524 if test -n "$ac_ct_RANLIB"; then
5525 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5526else
5527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5528for as_dir in $PATH
5529do
5530 IFS=$as_save_IFS
5531 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005532 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005533 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005534 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005536 break 2
5537 fi
5538done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005539 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005540IFS=$as_save_IFS
5541
5542fi
5543fi
5544ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5545if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5547$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005548else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5550$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551fi
5552
5553 if test "x$ac_ct_RANLIB" = x; then
5554 RANLIB=":"
5555 else
5556 case $cross_compiling:$ac_tool_warned in
5557yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005558{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5559$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005560ac_tool_warned=yes ;;
5561esac
5562 RANLIB=$ac_ct_RANLIB
5563 fi
5564else
5565 RANLIB="$ac_cv_prog_RANLIB"
5566fi
5567
5568
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005569if test -n "$ac_tool_prefix"; then
5570 for ac_prog in ar aal
5571 do
5572 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5573set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5575$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005576if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005577 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005578else
5579 if test -n "$AR"; then
5580 ac_cv_prog_AR="$AR" # Let the user override the test.
5581else
5582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585 IFS=$as_save_IFS
5586 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005587 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005589 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591 break 2
5592 fi
5593done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005594 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005595IFS=$as_save_IFS
5596
5597fi
5598fi
5599AR=$ac_cv_prog_AR
5600if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5602$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5605$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005606fi
5607
5608
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005609 test -n "$AR" && break
5610 done
5611fi
5612if test -z "$AR"; then
5613 ac_ct_AR=$AR
5614 for ac_prog in ar aal
5615do
5616 # Extract the first word of "$ac_prog", so it can be a program name with args.
5617set dummy $ac_prog; ac_word=$2
5618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619$as_echo_n "checking for $ac_word... " >&6; }
5620if ${ac_cv_prog_ac_ct_AR+:} false; then :
5621 $as_echo_n "(cached) " >&6
5622else
5623 if test -n "$ac_ct_AR"; then
5624 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5625else
5626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5627for as_dir in $PATH
5628do
5629 IFS=$as_save_IFS
5630 test -z "$as_dir" && as_dir=.
5631 for ac_exec_ext in '' $ac_executable_extensions; do
5632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5633 ac_cv_prog_ac_ct_AR="$ac_prog"
5634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5635 break 2
5636 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005637done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005638 done
5639IFS=$as_save_IFS
5640
5641fi
5642fi
5643ac_ct_AR=$ac_cv_prog_ac_ct_AR
5644if test -n "$ac_ct_AR"; then
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5646$as_echo "$ac_ct_AR" >&6; }
5647else
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5649$as_echo "no" >&6; }
5650fi
5651
5652
5653 test -n "$ac_ct_AR" && break
5654done
5655
5656 if test "x$ac_ct_AR" = x; then
5657 AR="ar"
5658 else
5659 case $cross_compiling:$ac_tool_warned in
5660yes:)
5661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5663ac_tool_warned=yes ;;
5664esac
5665 AR=$ac_ct_AR
5666 fi
5667fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005668
5669
5670# tweak ARFLAGS only if the user didn't set it on the command line
5671
5672if test -z "$ARFLAGS"
5673then
5674 ARFLAGS="rc"
5675fi
5676
5677
5678# Extract the first word of "svnversion", so it can be a program name with args.
5679set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5681$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005682if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005683 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005684else
5685 if test -n "$SVNVERSION"; then
5686 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5687else
5688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5689for as_dir in $PATH
5690do
5691 IFS=$as_save_IFS
5692 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005693 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005695 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005697 break 2
5698 fi
5699done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005700 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005701IFS=$as_save_IFS
5702
5703 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5704fi
5705fi
5706SVNVERSION=$ac_cv_prog_SVNVERSION
5707if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5709$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005713fi
5714
5715
5716if test $SVNVERSION = found
5717then
5718 SVNVERSION="svnversion \$(srcdir)"
5719else
5720 SVNVERSION="echo Unversioned directory"
5721fi
5722
Trent Nelsond86ceec2012-10-16 09:42:45 -04005723
Trent Nelsonabf20512012-10-17 04:32:49 -04005724if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005725 # If we're building out-of-tree make sure Include (in the current dir)
5726 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5727 # and graminit.h to get picked up from the correct directory.
5728 # (A side effect of this is that these resources will automatically be
5729 # regenerated when building out-of-tree, regardless of whether or not
5730 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5731 # off.)
5732 BASECPPFLAGS="-IInclude"
5733else
5734 BASECPPFLAGS=""
5735fi
5736
Georg Brandl3a5508e2011-03-06 10:42:21 +01005737
5738
5739
5740# Extract the first word of "hg", so it can be a program name with args.
5741set dummy hg; ac_word=$2
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5743$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005744if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005745 $as_echo_n "(cached) " >&6
5746else
5747 if test -n "$HAS_HG"; then
5748 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5749else
5750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751for as_dir in $PATH
5752do
5753 IFS=$as_save_IFS
5754 test -z "$as_dir" && as_dir=.
5755 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005757 ac_cv_prog_HAS_HG="found"
5758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5759 break 2
5760 fi
5761done
5762 done
5763IFS=$as_save_IFS
5764
5765 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5766fi
5767fi
5768HAS_HG=$ac_cv_prog_HAS_HG
5769if test -n "$HAS_HG"; then
5770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5771$as_echo "$HAS_HG" >&6; }
5772else
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5774$as_echo "no" >&6; }
5775fi
5776
5777
5778if test $HAS_HG = found
5779then
5780 HGVERSION="hg id -i \$(srcdir)"
5781 HGTAG="hg id -t \$(srcdir)"
5782 HGBRANCH="hg id -b \$(srcdir)"
5783else
5784 HGVERSION=""
5785 HGTAG=""
5786 HGBRANCH=""
5787fi
5788
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005789case $MACHDEP in
5790bsdos*|hp*|HP*)
5791 # install -d does not work on BSDI or HP-UX
5792 if test -z "$INSTALL"
5793 then
5794 INSTALL="${srcdir}/install-sh -c"
5795 fi
5796esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005797# Find a good install program. We prefer a C program (faster),
5798# so one script is as good as another. But avoid the broken or
5799# incompatible versions:
5800# SysV /etc/install, /usr/sbin/install
5801# SunOS /usr/etc/install
5802# IRIX /sbin/install
5803# AIX /bin/install
5804# AmigaOS /C/install, which installs bootblocks on floppy discs
5805# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5806# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5807# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5808# OS/2's system install, which has a completely different semantic
5809# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005810# Reject install programs that cannot install multiple files.
5811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5812$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005813if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005814if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005815 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005816else
5817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5818for as_dir in $PATH
5819do
5820 IFS=$as_save_IFS
5821 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822 # Account for people who put trailing slashes in PATH elements.
5823case $as_dir/ in #((
5824 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827 /usr/ucb/* ) ;;
5828 *)
5829 # OSF1 and SCO ODT 3.0 have their own names for install.
5830 # Don't use installbsd from OSF since it installs stuff as root
5831 # by default.
5832 for ac_prog in ginstall scoinst install; do
5833 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005834 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005835 if test $ac_prog = install &&
5836 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5837 # AIX install. It has an incompatible calling convention.
5838 :
5839 elif test $ac_prog = install &&
5840 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5841 # program-specific install script used by HP pwplus--don't use.
5842 :
5843 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005844 rm -rf conftest.one conftest.two conftest.dir
5845 echo one > conftest.one
5846 echo two > conftest.two
5847 mkdir conftest.dir
5848 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5849 test -s conftest.one && test -s conftest.two &&
5850 test -s conftest.dir/conftest.one &&
5851 test -s conftest.dir/conftest.two
5852 then
5853 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5854 break 3
5855 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005856 fi
5857 fi
5858 done
5859 done
5860 ;;
5861esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005862
5863 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005864IFS=$as_save_IFS
5865
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005866rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005867
5868fi
5869 if test "${ac_cv_path_install+set}" = set; then
5870 INSTALL=$ac_cv_path_install
5871 else
5872 # As a last resort, use the slow shell script. Don't cache a
5873 # value for INSTALL within a source directory, because that will
5874 # break other packages using the cache if that directory is
5875 # removed, or if the value is a relative name.
5876 INSTALL=$ac_install_sh
5877 fi
5878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5880$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005881
5882# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5883# It thinks the first close brace ends the variable substitution.
5884test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5885
5886test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5887
5888test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5889
Trent Nelsonf6407a12012-08-30 14:56:13 +00005890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5891$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5892if test -z "$MKDIR_P"; then
5893 if ${ac_cv_path_mkdir+:} false; then :
5894 $as_echo_n "(cached) " >&6
5895else
5896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5898do
5899 IFS=$as_save_IFS
5900 test -z "$as_dir" && as_dir=.
5901 for ac_prog in mkdir gmkdir; do
5902 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005903 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005904 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5905 'mkdir (GNU coreutils) '* | \
5906 'mkdir (coreutils) '* | \
5907 'mkdir (fileutils) '4.1*)
5908 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5909 break 3;;
5910 esac
5911 done
5912 done
5913 done
5914IFS=$as_save_IFS
5915
5916fi
5917
5918 test -d ./--version && rmdir ./--version
5919 if test "${ac_cv_path_mkdir+set}" = set; then
5920 MKDIR_P="$ac_cv_path_mkdir -p"
5921 else
5922 # As a last resort, use the slow shell script. Don't cache a
5923 # value for MKDIR_P within a source directory, because that will
5924 # break other packages using the cache if that directory is
5925 # removed, or if the value is a relative name.
5926 MKDIR_P="$ac_install_sh -d"
5927 fi
5928fi
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5930$as_echo "$MKDIR_P" >&6; }
5931
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005932
5933# Not every filesystem supports hard links
5934
5935if test -z "$LN" ; then
5936 case $ac_sys_system in
5937 BeOS*) LN="ln -s";;
5938 CYGWIN*) LN="ln -s";;
5939 atheos*) LN="ln -s";;
5940 *) LN=ln;;
5941 esac
5942fi
5943
5944# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5946$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005947
5948# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005949if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005950 withval=$with_pydebug;
5951if test "$withval" != no
5952then
5953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005954$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5957$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005958 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005959else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005961fi
5962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5964$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005965fi
5966
5967
5968# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5969# merged with this chunk of code?
5970
5971# Optimizer/debugger flags
5972# ------------------------
5973# (The following bit of code is complicated enough - please keep things
5974# indented properly. Just pretend you're editing Python code. ;-)
5975
5976# There are two parallel sets of case statements below, one that checks to
5977# see if OPT was set and one that does BASECFLAGS setting based upon
5978# compiler and platform. BASECFLAGS tweaks need to be made even if the
5979# user set OPT.
5980
5981# tweak OPT based on compiler and platform, only if the user didn't set
5982# it on the command line
5983
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005984if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005985then
5986 case $GCC in
5987 yes)
5988 if test "$CC" != 'g++' ; then
5989 STRICT_PROTO="-Wstrict-prototypes"
5990 fi
5991 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5992 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5993 WRAP="-fwrapv"
5994 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005995
5996 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005997 case $CC in
5998 *clang*) WRAP="-fwrapv"
5999 ;;
6000 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006001
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002 case $ac_cv_prog_cc_g in
6003 yes)
6004 if test "$Py_DEBUG" = 'true' ; then
6005 # Optimization messes up debuggers, so turn it off for
6006 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006007 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006008 else
6009 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6010 fi
6011 ;;
6012 *)
6013 OPT="-O3 -Wall $STRICT_PROTO"
6014 ;;
6015 esac
6016 case $ac_sys_system in
6017 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6018 ;;
6019 esac
6020 ;;
6021
6022 *)
6023 OPT="-O"
6024 ;;
6025 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006026fi
6027
6028
6029
6030# The -arch flags for universal builds on OSX
6031UNIVERSAL_ARCH_FLAGS=
6032
6033
6034# tweak BASECFLAGS based on compiler and platform
6035case $GCC in
6036yes)
6037 # Python violates C99 rules, by casting between incompatible
6038 # pointer types. GCC may generate bad code as a result of that,
6039 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6041$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006042 ac_save_cc="$CC"
6043 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006044 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006045 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006048/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006049
6050int
6051main ()
6052{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006053
Gregory P. Smith373469a2009-11-01 21:03:38 +00006054 ;
6055 return 0;
6056}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006057_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006058if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006059 ac_cv_no_strict_aliasing_ok=yes
6060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006061 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006062fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006064fi
6065
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006066 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6068$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069 if test $ac_cv_no_strict_aliasing_ok = yes
6070 then
6071 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6072 fi
6073
6074 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6075 # support. Without this, treatment of subnormals doesn't follow
6076 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006077 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006078 alpha*)
6079 BASECFLAGS="$BASECFLAGS -mieee"
6080 ;;
6081 esac
6082
6083 case $ac_sys_system in
6084 SCO_SV*)
6085 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6086 ;;
6087 # is there any other compiler on Darwin besides gcc?
6088 Darwin*)
6089 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6090 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006091 if test "${CC}" = gcc
6092 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6094$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006095 case "${UNIVERSALSDK}" in
6096 */MacOSX10.4u.sdk)
6097 # Build using 10.4 SDK, force usage of gcc when the
6098 # compiler is gcc, otherwise the user will get very
6099 # confusing error messages when building on OSX 10.6
6100 CC=gcc-4.0
6101 CPP=cpp-4.0
6102 ;;
6103 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6105$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006106 fi
6107
6108 # Calculate the right deployment target for this build.
6109 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006110 cur_target_major=`sw_vers -productVersion | \
6111 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6112 cur_target_minor=`sw_vers -productVersion | \
6113 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6114 cur_target="${cur_target_major}.${cur_target_minor}"
6115 if test ${cur_target_major} -eq 10 && \
6116 test ${cur_target_minor} -ge 3
6117 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006118 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006119 if test ${enable_universalsdk}; then
6120 if test "${UNIVERSAL_ARCHS}" = "all"; then
6121 # Ensure that the default platform for a
6122 # 4-way universal build is OSX 10.5,
6123 # that's the first OS release where
6124 # 4-way builds make sense.
6125 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006126
6127 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6128 cur_target='10.5'
6129
6130 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6131 cur_target='10.5'
6132
6133 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6134 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006135 fi
6136 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006137 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006138 # On Intel macs default to a deployment
6139 # target of 10.4, that's the first OSX
6140 # release with Intel support.
6141 cur_target="10.4"
6142 fi
6143 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006144 fi
6145 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6146
6147 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6148 # environment with a value that is the same as what we'll use
6149 # in the Makefile to ensure that we'll get the same compiler
6150 # environment during configure and build time.
6151 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6152 export MACOSX_DEPLOYMENT_TARGET
6153 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6154
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006155 if test "${enable_universalsdk}"; then
6156 UNIVERSAL_ARCH_FLAGS=""
6157 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6158 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6159 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006160 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006161
6162 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6163 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6164 LIPO_32BIT_FLAGS=""
6165 ARCH_RUN_32BIT="true"
6166
6167 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6168 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6169 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006170 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006171
6172 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6173 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6174 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006175 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006176
6177 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6178 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6179 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006180 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006181
6182 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006183 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 +00006184
6185 fi
6186
6187
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006188 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6189 if test "${UNIVERSALSDK}" != "/"
6190 then
6191 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6192 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6193 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006194 fi
6195
6196 fi
6197
6198
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006199 ;;
6200 OSF*)
6201 BASECFLAGS="$BASECFLAGS -mieee"
6202 ;;
6203 esac
6204 ;;
6205
6206*)
6207 case $ac_sys_system in
6208 OpenUNIX*|UnixWare*)
6209 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6210 ;;
6211 OSF*)
6212 BASECFLAGS="$BASECFLAGS -ieee -std"
6213 ;;
6214 SCO_SV*)
6215 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6216 ;;
6217 esac
6218 ;;
6219esac
6220
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006221# ICC needs -fp-model strict or floats behave badly
6222case "$CC" in
6223*icc*)
6224 BASECFLAGS="$BASECFLAGS -fp-model strict"
6225 ;;
6226esac
6227
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006228if test "$Py_DEBUG" = 'true'; then
6229 :
6230else
6231 OPT="-DNDEBUG $OPT"
6232fi
6233
6234if test "$ac_arch_flags"
6235then
6236 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6237fi
6238
6239# disable check for icc since it seems to pass, but generates a warning
6240if test "$CC" = icc
6241then
6242 ac_cv_opt_olimit_ok=no
6243fi
6244
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6246$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006247if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249else
6250 ac_save_cc="$CC"
6251CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006253/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006254
6255int
6256main ()
6257{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006258
Gregory P. Smith373469a2009-11-01 21:03:38 +00006259 ;
6260 return 0;
6261}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006262_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006263if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006264 ac_cv_opt_olimit_ok=yes
6265else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006266 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006267
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006268fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270CC="$ac_save_cc"
6271fi
6272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6274$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006275if test $ac_cv_opt_olimit_ok = yes; then
6276 case $ac_sys_system in
6277 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6278 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6279 # environment?
6280 Darwin*)
6281 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006282 # XXX thankfully this useless troublemaker of a flag has been
6283 # eradicated in the 3.x line. For now, make sure it isn't picked
6284 # up by any of our other platforms that use CC.
6285 AIX*|SunOS*|HP-UX*|IRIX*)
6286 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006287 *)
6288 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6289 ;;
6290 esac
6291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6293$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006294 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006295 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006296else
6297 ac_save_cc="$CC"
6298 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006300/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006301
6302int
6303main ()
6304{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006305
Gregory P. Smith373469a2009-11-01 21:03:38 +00006306 ;
6307 return 0;
6308}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006310if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006311 ac_cv_olimit_ok=yes
6312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006313 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006314
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006315fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317 CC="$ac_save_cc"
6318fi
6319
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6321$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006322 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006323 case $ac_sys_system in
6324 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6325 HP-UX*)
6326 ;;
6327 *)
6328 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6329 ;;
6330 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006331 fi
6332fi
6333
6334# Check whether GCC supports PyArg_ParseTuple format
6335if test "$GCC" = "yes"
6336then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6338$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006339 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006340 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006342/* end confdefs.h. */
6343
6344 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006345int
6346main ()
6347{
6348
6349 ;
6350 return 0;
6351}
Matthias Klosec511b472010-05-08 11:01:39 +00006352
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006353_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006354if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006355
Matthias Klosec511b472010-05-08 11:01:39 +00006356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006358
Matthias Klosec511b472010-05-08 11:01:39 +00006359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006361
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006362else
Matthias Klosec511b472010-05-08 11:01:39 +00006363
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006365$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366
6367fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6369 CFLAGS=$save_CFLAGS
6370fi
6371
Brett Cannon4ff151a2015-09-18 15:09:42 -07006372
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006373# Enable LTO flags
6374
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6376$as_echo_n "checking for --with-lto... " >&6; }
6377
6378# Check whether --with-lto was given.
6379if test "${with_lto+set}" = set; then :
6380 withval=$with_lto;
6381if test "$withval" != no
6382then
6383 Py_LTO='true'
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6385$as_echo "yes" >&6; };
6386else
6387 Py_LTO='false'
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6389$as_echo "no" >&6; };
6390fi
6391else
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393$as_echo "no" >&6; }
6394fi
6395
6396if test "$Py_LTO" = 'true' ; then
6397 case $CC in
6398 *clang*)
6399 # Any changes made here should be reflected in the GCC+Darwin case below
6400 LTOFLAGS="-flto"
6401 ;;
6402 *gcc*)
6403 case $ac_sys_system in
6404 Darwin*)
6405 LTOFLAGS="-flto"
6406 ;;
6407 *)
6408 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6409 ;;
6410 esac
6411 ;;
6412 esac
6413fi
6414
6415
Brett Cannon4ff151a2015-09-18 15:09:42 -07006416# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006417
6418
6419
6420
6421
6422
Brett Cannon4ff151a2015-09-18 15:09:42 -07006423# Extract the first word of "llvm-profdata", so it can be a program name with args.
6424set dummy llvm-profdata; ac_word=$2
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6426$as_echo_n "checking for $ac_word... " >&6; }
6427if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6428 $as_echo_n "(cached) " >&6
6429else
6430 if test -n "$LLVM_PROF_FOUND"; then
6431 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6432else
6433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434for as_dir in $PATH
6435do
6436 IFS=$as_save_IFS
6437 test -z "$as_dir" && as_dir=.
6438 for ac_exec_ext in '' $ac_executable_extensions; do
6439 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6440 ac_cv_prog_LLVM_PROF_FOUND="found"
6441 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6442 break 2
6443 fi
6444done
6445 done
6446IFS=$as_save_IFS
6447
6448 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6449fi
6450fi
6451LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6452if test -n "$LLVM_PROF_FOUND"; then
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6454$as_echo "$LLVM_PROF_FOUND" >&6; }
6455else
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459
6460
6461LLVM_PROF_ERR=no
6462case $CC in
6463 *clang*)
6464 # Any changes made here should be reflected in the GCC+Darwin case below
6465 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6466 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6467 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6468 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6469 if test $LLVM_PROF_FOUND = not-found
6470 then
6471 LLVM_PROF_ERR=yes
6472 fi
6473 ;;
6474 *gcc*)
6475 case $ac_sys_system in
6476 Darwin*)
6477 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6478 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6479 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6480 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6481 if test $LLVM_PROF_FOUND = not-found
6482 then
6483 LLVM_PROF_ERR=yes
6484 fi
6485 ;;
6486 *)
6487 PGO_PROF_GEN_FLAG="-fprofile-generate"
6488 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6489 LLVM_PROF_MERGER="true"
6490 LLVM_PROF_FILE=""
6491 ;;
6492 esac
6493 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006494 *icc*)
6495 PGO_PROF_GEN_FLAG="-prof-gen"
6496 PGO_PROF_USE_FLAG="-prof-use"
6497 LLVM_PROF_MERGER="true"
6498 LLVM_PROF_FILE=""
6499 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006500esac
6501
6502
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006503# On some compilers, pthreads are available without further options
6504# (e.g. MacOS X). On some of these systems, the compiler will not
6505# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6506# So we have to see first whether pthreads are available without
6507# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6509$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006510if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006511 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006512else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006513 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006514 ac_cv_pthread_is_default=no
6515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006517/* end confdefs.h. */
6518
Stefan Krahae66ca62012-11-22 22:36:57 +01006519#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006520#include <pthread.h>
6521
6522void* routine(void* p){return NULL;}
6523
6524int main(){
6525 pthread_t p;
6526 if(pthread_create(&p,NULL,routine,NULL)!=0)
6527 return 1;
6528 (void)pthread_detach(p);
6529 return 0;
6530}
6531
6532_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006533if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006534
6535 ac_cv_pthread_is_default=yes
6536 ac_cv_kthread=no
6537 ac_cv_pthread=no
6538
6539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006540 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006541fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6543 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006544fi
6545
6546
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006547fi
6548
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6550$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006551
6552
6553if test $ac_cv_pthread_is_default = yes
6554then
6555 ac_cv_kpthread=no
6556else
6557# -Kpthread, if available, provides the right #defines
6558# and linker options to make pthread_create available
6559# Some compilers won't report that they do not support -Kpthread,
6560# so we need to run a program to see whether it really made the
6561# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6563$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006564if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006565 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006566else
6567 ac_save_cc="$CC"
6568CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006569if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006570 ac_cv_kpthread=no
6571else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006573/* end confdefs.h. */
6574
Stefan Krahae66ca62012-11-22 22:36:57 +01006575#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006576#include <pthread.h>
6577
6578void* routine(void* p){return NULL;}
6579
6580int main(){
6581 pthread_t p;
6582 if(pthread_create(&p,NULL,routine,NULL)!=0)
6583 return 1;
6584 (void)pthread_detach(p);
6585 return 0;
6586}
6587
6588_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006589if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006590 ac_cv_kpthread=yes
6591else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006592 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006593fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6595 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006596fi
6597
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006598CC="$ac_save_cc"
6599fi
6600
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6602$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006603fi
6604
6605if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6606then
6607# -Kthread, if available, provides the right #defines
6608# and linker options to make pthread_create available
6609# Some compilers won't report that they do not support -Kthread,
6610# so we need to run a program to see whether it really made the
6611# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6613$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006614if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006615 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006616else
6617 ac_save_cc="$CC"
6618CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006619if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006620 ac_cv_kthread=no
6621else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006623/* end confdefs.h. */
6624
Stefan Krahae66ca62012-11-22 22:36:57 +01006625#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006626#include <pthread.h>
6627
6628void* routine(void* p){return NULL;}
6629
6630int main(){
6631 pthread_t p;
6632 if(pthread_create(&p,NULL,routine,NULL)!=0)
6633 return 1;
6634 (void)pthread_detach(p);
6635 return 0;
6636}
6637
6638_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006639if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006640 ac_cv_kthread=yes
6641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006642 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006643fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6645 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006646fi
6647
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006648CC="$ac_save_cc"
6649fi
6650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6652$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006653fi
6654
6655if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6656then
6657# -pthread, if available, provides the right #defines
6658# and linker options to make pthread_create available
6659# Some compilers won't report that they do not support -pthread,
6660# so we need to run a program to see whether it really made the
6661# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6663$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006664if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006665 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006666else
6667 ac_save_cc="$CC"
6668CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006669if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006670 ac_cv_pthread=no
6671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006673/* end confdefs.h. */
6674
Stefan Krahae66ca62012-11-22 22:36:57 +01006675#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006676#include <pthread.h>
6677
6678void* routine(void* p){return NULL;}
6679
6680int main(){
6681 pthread_t p;
6682 if(pthread_create(&p,NULL,routine,NULL)!=0)
6683 return 1;
6684 (void)pthread_detach(p);
6685 return 0;
6686}
6687
6688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006689if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006690 ac_cv_pthread=yes
6691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006692 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6695 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006696fi
6697
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006698CC="$ac_save_cc"
6699fi
6700
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6702$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006703fi
6704
6705# If we have set a CC compiler flag for thread support then
6706# check if it works for CXX, too.
6707ac_cv_cxx_thread=no
6708if test ! -z "$CXX"
6709then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6711$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006712ac_save_cxx="$CXX"
6713
6714if test "$ac_cv_kpthread" = "yes"
6715then
6716 CXX="$CXX -Kpthread"
6717 ac_cv_cxx_thread=yes
6718elif test "$ac_cv_kthread" = "yes"
6719then
6720 CXX="$CXX -Kthread"
6721 ac_cv_cxx_thread=yes
6722elif test "$ac_cv_pthread" = "yes"
6723then
6724 CXX="$CXX -pthread"
6725 ac_cv_cxx_thread=yes
6726fi
6727
6728if test $ac_cv_cxx_thread = yes
6729then
6730 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6731 $CXX -c conftest.$ac_ext 2>&5
6732 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6733 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6734 then
6735 ac_cv_cxx_thread=yes
6736 else
6737 ac_cv_cxx_thread=no
6738 fi
6739 rm -fr conftest*
6740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6742$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006743fi
6744CXX="$ac_save_cxx"
6745
6746
6747# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6749$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006750if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006751 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006754/* end confdefs.h. */
6755#include <stdlib.h>
6756#include <stdarg.h>
6757#include <string.h>
6758#include <float.h>
6759
6760int
6761main ()
6762{
6763
6764 ;
6765 return 0;
6766}
6767_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006768if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006769 ac_cv_header_stdc=yes
6770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006771 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006772fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6774
6775if test $ac_cv_header_stdc = yes; then
6776 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006778/* end confdefs.h. */
6779#include <string.h>
6780
6781_ACEOF
6782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006783 $EGREP "memchr" >/dev/null 2>&1; then :
6784
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006785else
6786 ac_cv_header_stdc=no
6787fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006788rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006789
6790fi
6791
6792if test $ac_cv_header_stdc = yes; then
6793 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006795/* end confdefs.h. */
6796#include <stdlib.h>
6797
6798_ACEOF
6799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800 $EGREP "free" >/dev/null 2>&1; then :
6801
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006802else
6803 ac_cv_header_stdc=no
6804fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006805rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006806
6807fi
6808
6809if test $ac_cv_header_stdc = yes; then
6810 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006811 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006812 :
6813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006815/* end confdefs.h. */
6816#include <ctype.h>
6817#include <stdlib.h>
6818#if ((' ' & 0x0FF) == 0x020)
6819# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6820# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6821#else
6822# define ISLOWER(c) \
6823 (('a' <= (c) && (c) <= 'i') \
6824 || ('j' <= (c) && (c) <= 'r') \
6825 || ('s' <= (c) && (c) <= 'z'))
6826# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6827#endif
6828
6829#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6830int
6831main ()
6832{
6833 int i;
6834 for (i = 0; i < 256; i++)
6835 if (XOR (islower (i), ISLOWER (i))
6836 || toupper (i) != TOUPPER (i))
6837 return 2;
6838 return 0;
6839}
6840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006841if ac_fn_c_try_run "$LINENO"; then :
6842
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006844 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006845fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006848fi
6849
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006850fi
6851fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6853$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006854if test $ac_cv_header_stdc = yes; then
6855
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006857
6858fi
6859
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006860for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006861fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006862ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006863shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006864unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006865sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6866sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006867sys/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 +00006868sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006869sys/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 +00006870sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006871bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006872do :
6873 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6874ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006875if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006877#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006878_ACEOF
6879
6880fi
6881
Guido van Rossum627b2d71993-12-24 10:39:16 +00006882done
6883
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006884ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006885for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006886 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6888$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006889if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006893/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006894#include <sys/types.h>
6895#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006896
Martin v. Löwis11437992002-04-12 09:54:03 +00006897int
6898main ()
6899{
6900if ((DIR *) 0)
6901return 0;
6902 ;
6903 return 0;
6904}
6905_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006906if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006907 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006909 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006913eval ac_res=\$$as_ac_Header
6914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6915$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006916if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006917 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006918#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006919_ACEOF
6920
6921ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006922fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006923
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006924done
6925# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6926if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6928$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006929if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006931else
Martin v. Löwis11437992002-04-12 09:54:03 +00006932 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006935
Martin v. Löwiseba40652007-08-30 20:10:57 +00006936/* Override any GCC internal prototype to avoid an error.
6937 Use char because int might match the return type of a GCC
6938 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006939#ifdef __cplusplus
6940extern "C"
6941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006942char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006943int
6944main ()
6945{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006946return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006947 ;
6948 return 0;
6949}
6950_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006951for ac_lib in '' dir; do
6952 if test -z "$ac_lib"; then
6953 ac_res="none required"
6954 else
6955 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006957 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006958 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006961rm -f core conftest.err conftest.$ac_objext \
6962 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006963 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006964 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006967if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969else
6970 ac_cv_search_opendir=no
6971fi
6972rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006973LIBS=$ac_func_search_save_LIBS
6974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6976$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006977ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006979 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006982
Michael W. Hudson54241132001-12-07 15:38:26 +00006983else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6985$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006986if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006987 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006988else
6989 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006992
Martin v. Löwiseba40652007-08-30 20:10:57 +00006993/* Override any GCC internal prototype to avoid an error.
6994 Use char because int might match the return type of a GCC
6995 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006996#ifdef __cplusplus
6997extern "C"
6998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006999char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007000int
7001main ()
7002{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007003return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007004 ;
7005 return 0;
7006}
7007_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008for ac_lib in '' x; do
7009 if test -z "$ac_lib"; then
7010 ac_res="none required"
7011 else
7012 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007013 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007014 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007015 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007016 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007018rm -f core conftest.err conftest.$ac_objext \
7019 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007020 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007021 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007023done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007024if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007025
Martin v. Löwiseba40652007-08-30 20:10:57 +00007026else
7027 ac_cv_search_opendir=no
7028fi
7029rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007030LIBS=$ac_func_search_save_LIBS
7031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7033$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007034ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007035if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007036 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007038fi
7039
7040fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7043$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007044if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007045 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007048/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007049#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007050int
7051main ()
7052{
7053return makedev(0, 0);
7054 ;
7055 return 0;
7056}
7057_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007058if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007059 ac_cv_header_sys_types_h_makedev=yes
7060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007061 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007062fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007063rm -f core conftest.err conftest.$ac_objext \
7064 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007065
7066fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7068$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007069
7070if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007071ac_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 +01007072if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007073
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007075
7076fi
7077
7078
7079
7080 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081 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 +01007082if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007083
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007084$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007085
7086fi
7087
7088
7089 fi
7090fi
7091
Michael W. Hudson54241132001-12-07 15:38:26 +00007092
Martin v. Löwis11017b12006-01-14 18:12:57 +00007093# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007094for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007095do :
7096 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 +00007097#ifdef HAVE_ASM_TYPES_H
7098#include <asm/types.h>
7099#endif
7100#ifdef HAVE_SYS_SOCKET_H
7101#include <sys/socket.h>
7102#endif
7103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007105if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007106 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007107#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007108_ACEOF
7109
7110fi
7111
7112done
7113
7114
Guido van Rossum627b2d71993-12-24 10:39:16 +00007115# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007116was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7118$as_echo_n "checking for clock_t in time.h... " >&6; }
7119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007120/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007121#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007122
7123_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007125 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007126 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007127else
Martin v. Löwis11437992002-04-12 09:54:03 +00007128
7129
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007130$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007131
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007132
Guido van Rossum627b2d71993-12-24 10:39:16 +00007133fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007134rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7137$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007138
Neal Norwitz11690112002-07-30 01:08:28 +00007139# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7141$as_echo_n "checking for makedev... " >&6; }
7142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007143/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007144
7145#if defined(MAJOR_IN_MKDEV)
7146#include <sys/mkdev.h>
7147#elif defined(MAJOR_IN_SYSMACROS)
7148#include <sys/sysmacros.h>
7149#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007150#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007151#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007152int
7153main ()
7154{
7155 makedev(0, 0)
7156 ;
7157 return 0;
7158}
7159_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007160if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007161 ac_cv_has_makedev=yes
7162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007163 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007164fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165rm -f core conftest.err conftest.$ac_objext \
7166 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007167if test "$ac_cv_has_makedev" = "no"; then
7168 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007170/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007171
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007172#define _OSF_SOURCE 1
7173#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007174
Neal Norwitz11690112002-07-30 01:08:28 +00007175int
7176main ()
7177{
7178 makedev(0, 0)
7179 ;
7180 return 0;
7181}
7182_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007183if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007184 ac_cv_has_makedev=yes
7185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007186 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007188rm -f core conftest.err conftest.$ac_objext \
7189 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007190 if test "$ac_cv_has_makedev" = "yes"; then
7191
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007192$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007193
7194 fi
7195fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7197$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007198if test "$ac_cv_has_makedev" = "yes"; then
7199
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007200$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007201
7202fi
7203
Martin v. Löwis399a6892002-10-04 10:22:02 +00007204# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7205# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7206# defined, but the compiler does not support pragma redefine_extname,
7207# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7208# structures (such as rlimit64) without declaring them. As a
7209# work-around, disable LFS on such configurations
7210
7211use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7213$as_echo_n "checking Solaris LFS bug... " >&6; }
7214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007215/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007216
7217#define _LARGEFILE_SOURCE 1
7218#define _FILE_OFFSET_BITS 64
7219#include <sys/resource.h>
7220
Martin v. Löwis399a6892002-10-04 10:22:02 +00007221int
7222main ()
7223{
7224struct rlimit foo;
7225 ;
7226 return 0;
7227}
7228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007229if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007230 sol_lfs_bug=no
7231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007232 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7236$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007237if test "$sol_lfs_bug" = "yes"; then
7238 use_lfs=no
7239fi
7240
7241if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007242# Two defines needed to enable largefile support on various platforms
7243# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007244case $ac_sys_system/$ac_sys_release in
7245AIX*)
7246
7247$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7248
7249 ;;
7250esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
7254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007255$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007256
Martin v. Löwis399a6892002-10-04 10:22:02 +00007257fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007258
Guido van Rossum84e7b241996-08-19 21:59:00 +00007259# Add some code to confdefs.h so that the test for off_t works on SCO
7260cat >> confdefs.h <<\EOF
7261#if defined(SCO_DS)
7262#undef _OFF_T
7263#endif
7264EOF
7265
Guido van Rossumef2255b2000-03-10 22:30:29 +00007266# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007267ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007268if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007269
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007270else
Martin v. Löwis11437992002-04-12 09:54:03 +00007271
7272cat >>confdefs.h <<_ACEOF
7273#define mode_t int
7274_ACEOF
7275
7276fi
7277
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007278ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007279if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007280
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007281else
Martin v. Löwis11437992002-04-12 09:54:03 +00007282
7283cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007284#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007285_ACEOF
7286
7287fi
7288
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007289ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007290if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007291
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007292else
Martin v. Löwis11437992002-04-12 09:54:03 +00007293
7294cat >>confdefs.h <<_ACEOF
7295#define pid_t int
7296_ACEOF
7297
7298fi
7299
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007300
Martin v. Löwis11437992002-04-12 09:54:03 +00007301cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007302#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007303_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007304
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007305ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007306if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007307
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007308else
Martin v. Löwis11437992002-04-12 09:54:03 +00007309
7310cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007311#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007312_ACEOF
7313
7314fi
7315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7317$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007318if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007319 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007322/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007323#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007324
7325_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007326if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007327 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007328 ac_cv_type_uid_t=yes
7329else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007330 ac_cv_type_uid_t=no
7331fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007332rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007333
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007334fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7336$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007337if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007338
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007339$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007340
7341
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007342$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007343
7344fi
7345
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007346
7347# There are two separate checks for each of the exact-width integer types we
7348# need. First we check whether the type is available using the usual
7349# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7350# and <stdint.h> where available). We then also use the special type checks of
7351# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7352# directly, #define's uint32_t to be a suitable type.
7353
7354ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7355if test "x$ac_cv_type_uint32_t" = xyes; then :
7356
7357$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7358
7359fi
7360
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007361ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7362case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007363 no|yes) ;; #(
7364 *)
7365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007366$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007367
7368
7369cat >>confdefs.h <<_ACEOF
7370#define uint32_t $ac_cv_c_uint32_t
7371_ACEOF
7372;;
7373 esac
7374
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007375
7376ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7377if test "x$ac_cv_type_uint64_t" = xyes; then :
7378
7379$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7380
7381fi
7382
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007383ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7384case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007385 no|yes) ;; #(
7386 *)
7387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007388$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007389
7390
7391cat >>confdefs.h <<_ACEOF
7392#define uint64_t $ac_cv_c_uint64_t
7393_ACEOF
7394;;
7395 esac
7396
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007397
7398ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7399if test "x$ac_cv_type_int32_t" = xyes; then :
7400
7401$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7402
7403fi
7404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007405ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7406case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007407 no|yes) ;; #(
7408 *)
7409
7410cat >>confdefs.h <<_ACEOF
7411#define int32_t $ac_cv_c_int32_t
7412_ACEOF
7413;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007414esac
7415
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007416
7417ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7418if test "x$ac_cv_type_int64_t" = xyes; then :
7419
7420$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7421
7422fi
7423
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007424ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7425case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007426 no|yes) ;; #(
7427 *)
7428
7429cat >>confdefs.h <<_ACEOF
7430#define int64_t $ac_cv_c_int64_t
7431_ACEOF
7432;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007433esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007434
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007435
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007436ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007437if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007438
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007439$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007440
7441fi
7442
Jack Jansendd19cf82001-12-06 22:36:17 +00007443
Michael W. Hudson54241132001-12-07 15:38:26 +00007444# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007445# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007446# The cast to long int works around a bug in the HP C Compiler
7447# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7448# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7449# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7451$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007452if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007454else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007455 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 +00007456
Martin v. Löwis11437992002-04-12 09:54:03 +00007457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007458 if test "$ac_cv_type_int" = yes; then
7459 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7460$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007461as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007462See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007463 else
7464 ac_cv_sizeof_int=0
7465 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007466fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007467
Martin v. Löwis11437992002-04-12 09:54:03 +00007468fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7470$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007471
7472
7473
Martin v. Löwis11437992002-04-12 09:54:03 +00007474cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007475#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007476_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007477
7478
Martin v. Löwiseba40652007-08-30 20:10:57 +00007479# The cast to long int works around a bug in the HP C Compiler
7480# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7481# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7482# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7484$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007485if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007487else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007488 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 +00007489
Martin v. Löwis11437992002-04-12 09:54:03 +00007490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007491 if test "$ac_cv_type_long" = yes; then
7492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7493$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007494as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007495See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007496 else
7497 ac_cv_sizeof_long=0
7498 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007499fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007500
Martin v. Löwis11437992002-04-12 09:54:03 +00007501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7503$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007504
7505
7506
Martin v. Löwis11437992002-04-12 09:54:03 +00007507cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007508#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007509_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007510
7511
Martin v. Löwiseba40652007-08-30 20:10:57 +00007512# The cast to long int works around a bug in the HP C Compiler
7513# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7514# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7515# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7517$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007518if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007519 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007520else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007521 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 +00007522
Martin v. Löwis11437992002-04-12 09:54:03 +00007523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007524 if test "$ac_cv_type_void_p" = yes; then
7525 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7526$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007527as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007528See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007529 else
7530 ac_cv_sizeof_void_p=0
7531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007533
Martin v. Löwis11437992002-04-12 09:54:03 +00007534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7536$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007537
7538
7539
Martin v. Löwis11437992002-04-12 09:54:03 +00007540cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007541#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007542_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007543
7544
Martin v. Löwiseba40652007-08-30 20:10:57 +00007545# The cast to long int works around a bug in the HP C Compiler
7546# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7547# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7548# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7550$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007551if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007552 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007553else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007554 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 +00007555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007557 if test "$ac_cv_type_short" = yes; then
7558 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7559$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007560as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007561See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007562 else
7563 ac_cv_sizeof_short=0
7564 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007565fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007566
Martin v. Löwis11437992002-04-12 09:54:03 +00007567fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7569$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570
7571
7572
Martin v. Löwis11437992002-04-12 09:54:03 +00007573cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007574#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007575_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007576
7577
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578# The cast to long int works around a bug in the HP C Compiler
7579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7581# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7583$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007584if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007587 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 +00007588
Martin v. Löwis11437992002-04-12 09:54:03 +00007589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007590 if test "$ac_cv_type_float" = yes; then
7591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007593as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007594See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595 else
7596 ac_cv_sizeof_float=0
7597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007598fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007599
Martin v. Löwis11437992002-04-12 09:54:03 +00007600fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7602$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007603
7604
7605
Martin v. Löwis11437992002-04-12 09:54:03 +00007606cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007607#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007608_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007609
7610
Martin v. Löwiseba40652007-08-30 20:10:57 +00007611# The cast to long int works around a bug in the HP C Compiler
7612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7614# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7616$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007617if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007618 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007620 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 +00007621
Martin v. Löwis11437992002-04-12 09:54:03 +00007622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007623 if test "$ac_cv_type_double" = yes; then
7624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007626as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007627See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628 else
7629 ac_cv_sizeof_double=0
7630 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007631fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007632
Martin v. Löwis11437992002-04-12 09:54:03 +00007633fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7635$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007636
7637
7638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007640#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007641_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007642
7643
Martin v. Löwiseba40652007-08-30 20:10:57 +00007644# The cast to long int works around a bug in the HP C Compiler
7645# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7646# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7647# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7649$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007650if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007652else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007653 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 +00007654
Martin v. Löwis11437992002-04-12 09:54:03 +00007655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007656 if test "$ac_cv_type_fpos_t" = yes; then
7657 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007659as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007660See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661 else
7662 ac_cv_sizeof_fpos_t=0
7663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007664fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007665
Martin v. Löwis11437992002-04-12 09:54:03 +00007666fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7668$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669
7670
7671
Martin v. Löwis11437992002-04-12 09:54:03 +00007672cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007673#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007674_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007675
Michael W. Hudson54241132001-12-07 15:38:26 +00007676
Martin v. Löwiseba40652007-08-30 20:10:57 +00007677# The cast to long int works around a bug in the HP C Compiler
7678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7680# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7682$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007683if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007684 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007686 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 +00007687
Martin v. Löwis18e16552006-02-15 17:27:45 +00007688else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007689 if test "$ac_cv_type_size_t" = yes; then
7690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007692as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007693See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007694 else
7695 ac_cv_sizeof_size_t=0
7696 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007698
Martin v. Löwis18e16552006-02-15 17:27:45 +00007699fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7701$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702
7703
7704
Martin v. Löwis18e16552006-02-15 17:27:45 +00007705cat >>confdefs.h <<_ACEOF
7706#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7707_ACEOF
7708
7709
Christian Heimes951cc0f2008-01-31 23:08:23 +00007710# The cast to long int works around a bug in the HP C Compiler
7711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7713# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7715$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007716if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007717 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719 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 +00007720
Christian Heimes951cc0f2008-01-31 23:08:23 +00007721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007722 if test "$ac_cv_type_pid_t" = yes; then
7723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007725as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007726See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007727 else
7728 ac_cv_sizeof_pid_t=0
7729 fi
7730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007731
Christian Heimes951cc0f2008-01-31 23:08:23 +00007732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7734$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007735
7736
7737
7738cat >>confdefs.h <<_ACEOF
7739#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7740_ACEOF
7741
7742
Michael W. Hudson54241132001-12-07 15:38:26 +00007743
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7745$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007746have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007748/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007749
Martin v. Löwis11437992002-04-12 09:54:03 +00007750int
7751main ()
7752{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007753long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ;
7755 return 0;
7756}
7757_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007758if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007759
7760
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007761$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007762
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007763 have_long_long=yes
7764
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7768$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007769if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007770# The cast to long int works around a bug in the HP C Compiler
7771# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7772# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7773# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7775$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007776if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007779 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 +00007780
Martin v. Löwis11437992002-04-12 09:54:03 +00007781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007782 if test "$ac_cv_type_long_long" = yes; then
7783 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007785as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007786See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787 else
7788 ac_cv_sizeof_long_long=0
7789 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7794$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007795
7796
7797
Martin v. Löwis11437992002-04-12 09:54:03 +00007798cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007799#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007800_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007801
Michael W. Hudson54241132001-12-07 15:38:26 +00007802
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007803fi
7804
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7806$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007807have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007809/* end confdefs.h. */
7810
7811int
7812main ()
7813{
Matthias Klosec511b472010-05-08 11:01:39 +00007814long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007815 ;
7816 return 0;
7817}
7818_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007819if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007820
7821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007822$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007823
7824 have_long_double=yes
7825
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007826fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7829$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007830if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007831# The cast to long int works around a bug in the HP C Compiler
7832# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7833# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7834# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7836$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007837if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007838 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007840 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 +00007841
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007843 if test "$ac_cv_type_long_double" = yes; then
7844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007846as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007847See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007848 else
7849 ac_cv_sizeof_long_double=0
7850 fi
7851fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007852
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7855$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007856
7857
7858
7859cat >>confdefs.h <<_ACEOF
7860#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7861_ACEOF
7862
7863
7864fi
7865
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7867$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007868have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007870/* end confdefs.h. */
7871
7872int
7873main ()
7874{
7875_Bool x; x = (_Bool)0;
7876 ;
7877 return 0;
7878}
7879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007880if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007881
7882
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007883$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007884
7885 have_c99_bool=yes
7886
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7890$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007891if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892# The cast to long int works around a bug in the HP C Compiler
7893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7895# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7897$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007898if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007899 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007901 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 +00007902
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007904 if test "$ac_cv_type__Bool" = yes; then
7905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007907as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007908See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909 else
7910 ac_cv_sizeof__Bool=0
7911 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007913
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7916$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007917
7918
7919
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007920cat >>confdefs.h <<_ACEOF
7921#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7922_ACEOF
7923
7924
7925fi
7926
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007927ac_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 +00007928 #include <stdint.h>
7929 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007930 #ifdef HAVE_INTTYPES_H
7931 #include <inttypes.h>
7932 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007933"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007934if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007935
7936cat >>confdefs.h <<_ACEOF
7937#define HAVE_UINTPTR_T 1
7938_ACEOF
7939
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940# The cast to long int works around a bug in the HP C Compiler
7941# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7942# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7943# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7945$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007946if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007947 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007949 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 +00007950
Martin v. Löwis11437992002-04-12 09:54:03 +00007951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007952 if test "$ac_cv_type_uintptr_t" = yes; then
7953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007955as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007956See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957 else
7958 ac_cv_sizeof_uintptr_t=0
7959 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007961
Martin v. Löwis11437992002-04-12 09:54:03 +00007962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7964$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965
7966
7967
Martin v. Löwis11437992002-04-12 09:54:03 +00007968cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007969#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007970_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007971
Michael W. Hudson54241132001-12-07 15:38:26 +00007972
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007973fi
7974
Martin v. Löwisebe26702006-10-02 14:55:51 +00007975
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007976# The cast to long int works around a bug in the HP C Compiler
7977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7979# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7981$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007982if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007985 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007986#ifdef HAVE_SYS_TYPES_H
7987#include <sys/types.h>
7988#endif
7989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007990"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007991
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007993 if test "$ac_cv_type_off_t" = yes; then
7994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007996as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007997See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007998 else
7999 ac_cv_sizeof_off_t=0
8000 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008001fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008002
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8005$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008006
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008007
8008
Martin v. Löwis11437992002-04-12 09:54:03 +00008009cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008010#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008011_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008012
Michael W. Hudson54241132001-12-07 15:38:26 +00008013
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008014
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8016$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008017if test "$have_long_long" = yes
8018then
8019if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008020 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008021
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008022$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008023
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8025$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008026else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8028$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008029fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8032$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008033fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008034
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008035# The cast to long int works around a bug in the HP C Compiler
8036# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8037# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8038# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8040$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008041if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008042 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008045#ifdef HAVE_SYS_TYPES_H
8046#include <sys/types.h>
8047#endif
8048#ifdef HAVE_TIME_H
8049#include <time.h>
8050#endif
8051
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008052"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008053
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008055 if test "$ac_cv_type_time_t" = yes; then
8056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008058as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008059See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008060 else
8061 ac_cv_sizeof_time_t=0
8062 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008063fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008064
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008065fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8067$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008068
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008069
8070
Martin v. Löwis11437992002-04-12 09:54:03 +00008071cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008072#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008073_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008074
Michael W. Hudson54241132001-12-07 15:38:26 +00008075
8076
Trent Mick635f6fb2000-08-23 21:33:05 +00008077# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008078ac_save_cc="$CC"
8079if test "$ac_cv_kpthread" = "yes"
8080then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008081elif test "$ac_cv_kthread" = "yes"
8082then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008083elif test "$ac_cv_pthread" = "yes"
8084then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8087$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008088have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008090/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008091
8092 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008093int
8094main ()
8095{
Guido van Rossum12580492000-09-24 16:47:19 +00008096pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ;
8098 return 0;
8099}
Matthias Klosec511b472010-05-08 11:01:39 +00008100
Martin v. Löwis11437992002-04-12 09:54:03 +00008101_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008102if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008103 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8107$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008108if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008109 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008110# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8111# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8112# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8114$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008115if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008116 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008118 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008119#ifdef HAVE_PTHREAD_H
8120#include <pthread.h>
8121#endif
8122
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008123"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008124
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008126 if test "$ac_cv_type_pthread_t" = yes; then
8127 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8128$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008129as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008130See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008131 else
8132 ac_cv_sizeof_pthread_t=0
8133 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008135
Trent Mick635f6fb2000-08-23 21:33:05 +00008136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8138$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008139
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008140
8141
Martin v. Löwis11437992002-04-12 09:54:03 +00008142cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008143#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008144_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008145
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008146
Trent Mick635f6fb2000-08-23 21:33:05 +00008147fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008148CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008149
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8151$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008152# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008153if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008154 enableval=$enable_toolbox_glue;
8155fi
Jack Jansene578a632001-08-15 01:27:14 +00008156
8157
8158if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008159then
Jack Jansene578a632001-08-15 01:27:14 +00008160 case $ac_sys_system/$ac_sys_release in
8161 Darwin/*)
8162 enable_toolbox_glue="yes";;
8163 *)
8164 enable_toolbox_glue="no";;
8165 esac
8166fi
8167case "$enable_toolbox_glue" in
8168yes)
Jack Jansene578a632001-08-15 01:27:14 +00008169 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008170 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008172$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008173
8174 ;;
8175*)
Jack Jansene578a632001-08-15 01:27:14 +00008176 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008177 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008178 ;;
8179esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8181$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008182
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008183
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008184
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008185case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008186 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008187 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8188 ;;
8189 Darwin/*)
8190 OTHER_LIBTOOL_OPT=""
8191 ;;
8192esac
8193
8194
Ronald Oussoren25967582009-09-06 10:00:26 +00008195
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008196case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008197 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008198 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8199 if test "${enable_universalsdk}"; then
8200 :
8201 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008202 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008203 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008204 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008205 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008206 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008207 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008208 if test ${gcc_version} '<' 4.0
8209 then
8210 LIBTOOL_CRUFT="-lcc_dynamic"
8211 else
8212 LIBTOOL_CRUFT=""
8213 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008214 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008215 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008218/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008219
Ronald Oussoren25967582009-09-06 10:00:26 +00008220 #include <unistd.h>
8221 int main(int argc, char*argv[])
8222 {
8223 if (sizeof(long) == 4) {
8224 return 0;
8225 } else {
8226 return 1;
8227 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008228 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008229
Ronald Oussoren25967582009-09-06 10:00:26 +00008230_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008231if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008232 ac_osx_32bit=yes
8233else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008234 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008235fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008238fi
8239
8240
Ronald Oussoren25967582009-09-06 10:00:26 +00008241 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008242 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008243 i386)
8244 MACOSX_DEFAULT_ARCH="i386"
8245 ;;
8246 ppc)
8247 MACOSX_DEFAULT_ARCH="ppc"
8248 ;;
8249 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008250 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008251 ;;
8252 esac
8253 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008254 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008255 i386)
8256 MACOSX_DEFAULT_ARCH="x86_64"
8257 ;;
8258 ppc)
8259 MACOSX_DEFAULT_ARCH="ppc64"
8260 ;;
8261 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008262 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008263 ;;
8264 esac
8265
8266 #ARCH_RUN_32BIT="true"
8267 fi
8268
8269 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008270 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008271 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008272esac
8273
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8275$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008276if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008277then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008278 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008279 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008280 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008282$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008283
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8285$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008286 if test $enable_shared = "yes"
8287 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008288 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 +00008289 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8292$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008293fi
8294
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8296$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008297case $ac_sys_system/$ac_sys_release in
8298 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008301
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8303$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008304 ;;
8305 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8307$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008308 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008309esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008310
Guido van Rossum0a516c91994-09-12 10:58:40 +00008311# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008312
Michael W. Hudson54241132001-12-07 15:38:26 +00008313
8314
8315
8316
Ronald Oussoren75912852010-04-08 08:13:31 +00008317
Guido van Rossum0a516c91994-09-12 10:58:40 +00008318# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008319# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8321$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008322if test -z "$SO"
8323then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008325 hp*|HP*)
8326 case `uname -m` in
8327 ia64) SO=.so;;
8328 *) SO=.sl;;
8329 esac
8330 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008331 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008332 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008333 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008334else
8335 # this might also be a termcap variable, see #610332
8336 echo
8337 echo '====================================================================='
8338 echo '+ +'
8339 echo '+ WARNING: You have set SO in your environment. +'
8340 echo '+ Do you really mean to change the extension for shared libraries? +'
8341 echo '+ Continuing in 10 seconds to let you to ponder. +'
8342 echo '+ +'
8343 echo '====================================================================='
8344 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008345fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8347$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008348
Ronald Oussoren79f90492009-01-02 10:44:46 +00008349
Neal Norwitz58e28882006-05-19 07:00:58 +00008350cat >>confdefs.h <<_ACEOF
8351#define SHLIB_EXT "$SO"
8352_ACEOF
8353
Guido van Rossum0a516c91994-09-12 10:58:40 +00008354# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008355# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008356# (Shared libraries in this instance are shared modules to be loaded into
8357# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8359$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008360if test -z "$LDSHARED"
8361then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008362 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008363 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008364 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008365 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008366 ;;
8367 BeOS*)
8368 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008369 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008370 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008371 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008372 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008374 if test "$GCC" = "yes" ; then
8375 LDSHARED='$(CC) -shared'
8376 LDCXXSHARED='$(CXX) -shared'
8377 else
8378 LDSHARED='$(CC) -G'
8379 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008380 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008381 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008382 if test "$GCC" = "yes" ; then
8383 LDSHARED='$(CC) -shared'
8384 LDCXXSHARED='$(CXX) -shared'
8385 else
8386 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008387 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008388 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008389 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008390 LDSHARED='$(CC) -bundle'
8391 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008392 if test "$enable_framework" ; then
8393 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008394 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8395 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008396 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008397 else
8398 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008399 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008400 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008401 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008402 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008403 LDSHARED='$(CC) -bundle'
8404 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008405 if test "$enable_framework" ; then
8406 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008407 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8408 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008409 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008410 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008411 # No framework, use the Python app as bundle-loader
8412 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008413 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008414 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008415 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008416 Darwin/*)
8417 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8418 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008419
Ned Deilyc40b9032014-06-25 13:48:46 -07008420 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8421 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8422 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8423 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8424 if test ${dep_target_major} -eq 10 && \
8425 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008426 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008427 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008428 LDSHARED='$(CC) -bundle'
8429 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008430 if test "$enable_framework" ; then
8431 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008432 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8433 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008434 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008435 else
8436 # No framework, use the Python app as bundle-loader
8437 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8438 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008439 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008440 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008441 else
8442 # building for OS X 10.3 and later
8443 if test "${enable_universalsdk}"; then
8444 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8445 fi
8446 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8447 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8448 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008449 fi
8450 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008451 Linux*|GNU*|QNX*)
8452 LDSHARED='$(CC) -shared'
8453 LDCXXSHARED='$(CXX) -shared';;
8454 BSD/OS*/4*)
8455 LDSHARED="gcc -shared"
8456 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008457 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008458 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008459 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008460 LDSHARED='$(CC) -shared'
8461 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008462 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008463 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008464 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008465 OpenBSD*)
8466 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8467 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008468 LDSHARED='$(CC) -shared $(CCSHARED)'
8469 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008470 else
8471 case `uname -r` in
8472 [01].* | 2.[0-7] | 2.[0-7].*)
8473 LDSHARED="ld -Bshareable ${LDFLAGS}"
8474 ;;
8475 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008476 LDSHARED='$(CC) -shared $(CCSHARED)'
8477 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008478 ;;
8479 esac
8480 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008481 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008482 LDSHARED='$(CC) -shared'
8483 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008484 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008485 if test "$GCC" = "yes" ; then
8486 LDSHARED='$(CC) -shared'
8487 LDCXXSHARED='$(CXX) -shared'
8488 else
8489 LDSHARED='$(CC) -G'
8490 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008491 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008492 SCO_SV*)
8493 LDSHARED='$(CC) -Wl,-G,-Bexport'
8494 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8495 CYGWIN*)
8496 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8497 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8498 atheos*)
8499 LDSHARED="gcc -shared"
8500 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008501 *) LDSHARED="ld";;
8502 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008503fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8505$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008506LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008507BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008508# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008509# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8511$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008512if test -z "$CCSHARED"
8513then
Guido van Rossum07397971997-04-29 21:49:50 +00008514 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008515 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008516 then CCSHARED="-fPIC";
8517 elif test `uname -p` = sparc;
8518 then CCSHARED="-xcode=pic32";
8519 else CCSHARED="-Kpic";
8520 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008521 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008522 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008523 else CCSHARED="+z";
8524 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008525 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008526 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008527 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008528 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008529 if test "$GCC" = "yes"
8530 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008531 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008532 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008533 SCO_SV*)
8534 if test "$GCC" = "yes"
8535 then CCSHARED="-fPIC"
8536 else CCSHARED="-Kpic -belf"
8537 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008538 IRIX*/6*) case $CC in
8539 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008540 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008541 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008542 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008543 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008544fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8546$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008547# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008548# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8550$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008551if test -z "$LINKFORSHARED"
8552then
Guido van Rossum07397971997-04-29 21:49:50 +00008553 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008554 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008555 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008556 LINKFORSHARED="-Wl,-E -Wl,+s";;
8557# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008558 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008559 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008560 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008562 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8563 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008564 # not used by the core itself but which needs to be in the core so
8565 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008566 # -prebind is no longer used, because it actually seems to give a
8567 # slowdown in stead of a speedup, maybe due to the large number of
8568 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008569
8570 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008571 if test "$enable_framework"
8572 then
Jack Jansenda49e192005-01-07 13:08:22 +00008573 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008574 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008575 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008576 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008577 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008578 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008579 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008580 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8581 then
8582 LINKFORSHARED="-Wl,--export-dynamic"
8583 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008584 SunOS/5*) case $CC in
8585 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008586 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008587 then
8588 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008589 fi;;
8590 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008591 CYGWIN*)
8592 if test $enable_shared = "no"
8593 then
8594 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8595 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008596 QNX*)
8597 # -Wl,-E causes the symbols to be added to the dynamic
8598 # symbol table so that they can be found when a module
8599 # is loaded. -N 2048K causes the stack size to be set
8600 # to 2048 kilobytes so that the stack doesn't overflow
8601 # when running test_compile.py.
8602 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008603 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008604fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8606$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008607
Michael W. Hudson54241132001-12-07 15:38:26 +00008608
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8611$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008612if test ! "$LIBRARY" = "$LDLIBRARY"
8613then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008614 case $ac_sys_system in
8615 CYGWIN*)
8616 # Cygwin needs CCSHARED when building extension DLLs
8617 # but not when building the interpreter DLL.
8618 CFLAGSFORSHARED='';;
8619 *)
8620 CFLAGSFORSHARED='$(CCSHARED)'
8621 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008622fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8624$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008625
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008626# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8627# library (with --enable-shared).
8628# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008629# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8630# if it is not required, since it creates a dependency of the shared library
8631# to LIBS. This, in turn, means that applications linking the shared libpython
8632# don't need to link LIBS explicitly. The default should be only changed
8633# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008634
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8636$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008637case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008638 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008639 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008640esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8642$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008643
8644
Guido van Rossum627b2d71993-12-24 10:39:16 +00008645# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8647$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008648if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008649 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008650else
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008652LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008655
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656/* Override any GCC internal prototype to avoid an error.
8657 Use char because int might match the return type of a GCC
8658 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008659#ifdef __cplusplus
8660extern "C"
8661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008662char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008663int
8664main ()
8665{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ;
8668 return 0;
8669}
8670_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008671if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008674 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008675fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008676rm -f core conftest.err conftest.$ac_objext \
8677 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008678LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8681$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008682if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 cat >>confdefs.h <<_ACEOF
8684#define HAVE_LIBDL 1
8685_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008686
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008687 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008688
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008689fi
8690 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8692$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008693if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008694 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008695else
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008697LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008700
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701/* Override any GCC internal prototype to avoid an error.
8702 Use char because int might match the return type of a GCC
8703 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008704#ifdef __cplusplus
8705extern "C"
8706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008707char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008708int
8709main ()
8710{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008711return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008712 ;
8713 return 0;
8714}
8715_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008716if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008717 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008719 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008720fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008721rm -f core conftest.err conftest.$ac_objext \
8722 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008723LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8726$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008727if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 cat >>confdefs.h <<_ACEOF
8729#define HAVE_LIBDLD 1
8730_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008731
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008732 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008733
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008734fi
8735 # Dynamic linking for HP-UX
Victor Stinner7c906672015-01-06 13:53:37 +01008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8737$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8738if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8739 $as_echo_n "(cached) " >&6
8740else
8741 ac_check_lib_save_LIBS=$LIBS
8742LIBS="-lcrypto $LIBS"
8743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8744/* end confdefs.h. */
8745
8746/* Override any GCC internal prototype to avoid an error.
8747 Use char because int might match the return type of a GCC
8748 builtin and then its argument prototype would still apply. */
8749#ifdef __cplusplus
8750extern "C"
8751#endif
8752char RAND_egd ();
8753int
8754main ()
8755{
8756return RAND_egd ();
8757 ;
8758 return 0;
8759}
8760_ACEOF
8761if ac_fn_c_try_link "$LINENO"; then :
8762 ac_cv_lib_crypto_RAND_egd=yes
8763else
8764 ac_cv_lib_crypto_RAND_egd=no
8765fi
8766rm -f core conftest.err conftest.$ac_objext \
8767 conftest$ac_exeext conftest.$ac_ext
8768LIBS=$ac_check_lib_save_LIBS
8769fi
8770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8771$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8772if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8773
8774$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8775
8776fi
8777
Martin v. Löwis519adae2003-09-20 10:47:47 +00008778
Ronald Oussoren79f90492009-01-02 10:44:46 +00008779# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008780if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8782$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008783if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008784 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008785else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008786 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008789
Martin v. Löwiseba40652007-08-30 20:10:57 +00008790/* Override any GCC internal prototype to avoid an error.
8791 Use char because int might match the return type of a GCC
8792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008793#ifdef __cplusplus
8794extern "C"
8795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008796char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008797int
8798main ()
8799{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008800return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 ;
8802 return 0;
8803}
8804_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805for ac_lib in '' pthread rt posix4; do
8806 if test -z "$ac_lib"; then
8807 ac_res="none required"
8808 else
8809 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008810 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008811 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008812 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008813 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008815rm -f core conftest.err conftest.$ac_objext \
8816 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008817 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008820done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008821if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008822
Martin v. Löwiseba40652007-08-30 20:10:57 +00008823else
8824 ac_cv_search_sem_init=no
8825fi
8826rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008827LIBS=$ac_func_search_save_LIBS
8828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8830$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008834
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008835fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008836 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008837 # posix4 on Solaris 2.6
8838 # pthread (first!) on Linux
8839fi
8840
Martin v. Löwis19d17342003-06-14 21:03:05 +00008841# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8843$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008844if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008845 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008846else
8847 ac_check_lib_save_LIBS=$LIBS
8848LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008850/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008851
Martin v. Löwiseba40652007-08-30 20:10:57 +00008852/* Override any GCC internal prototype to avoid an error.
8853 Use char because int might match the return type of a GCC
8854 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008855#ifdef __cplusplus
8856extern "C"
8857#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008858char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008859int
8860main ()
8861{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008863 ;
8864 return 0;
8865}
8866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008868 ac_cv_lib_intl_textdomain=yes
8869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008870 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008872rm -f core conftest.err conftest.$ac_objext \
8873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008874LIBS=$ac_check_lib_save_LIBS
8875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8877$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008878if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008879
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008880$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008881
8882fi
8883
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008884
8885# checks for system dependent C++ extensions support
8886case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008887 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8888$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008891
Georg Brandl94800df2011-02-25 11:09:02 +00008892 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008893int
8894main ()
8895{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008896loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 ;
8898 return 0;
8899}
Matthias Klosec511b472010-05-08 11:01:39 +00008900
Martin v. Löwis11437992002-04-12 09:54:03 +00008901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008902if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008903
Matthias Klosec511b472010-05-08 11:01:39 +00008904
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008905$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008906
Matthias Klosec511b472010-05-08 11:01:39 +00008907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008908$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008909
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008910else
Matthias Klosec511b472010-05-08 11:01:39 +00008911
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008913$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008914
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008916rm -f core conftest.err conftest.$ac_objext \
8917 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008918 *) ;;
8919esac
8920
Guido van Rossum70c7f481998-03-26 18:44:10 +00008921# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008922# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8924$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008925if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008926 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008927else
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008929LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008932
Martin v. Löwiseba40652007-08-30 20:10:57 +00008933/* Override any GCC internal prototype to avoid an error.
8934 Use char because int might match the return type of a GCC
8935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008936#ifdef __cplusplus
8937extern "C"
8938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008939char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008940int
8941main ()
8942{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008943return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 ;
8945 return 0;
8946}
8947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008951 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008953rm -f core conftest.err conftest.$ac_objext \
8954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008955LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8958$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008959if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008960 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008961fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008962 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8964$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008965if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008966 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008967else
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008969LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008972
Martin v. Löwiseba40652007-08-30 20:10:57 +00008973/* Override any GCC internal prototype to avoid an error.
8974 Use char because int might match the return type of a GCC
8975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008976#ifdef __cplusplus
8977extern "C"
8978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008979char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008980int
8981main ()
8982{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ;
8985 return 0;
8986}
8987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008991 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008993rm -f core conftest.err conftest.$ac_objext \
8994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008995LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8998$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008999if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009000 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009001fi
9002 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009003
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009004case "$ac_sys_system" in
9005BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9007$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009008if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009009 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009010else
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009012LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016/* Override any GCC internal prototype to avoid an error.
9017 Use char because int might match the return type of a GCC
9018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009019#ifdef __cplusplus
9020extern "C"
9021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009022char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009023int
9024main ()
9025{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009026return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 ;
9028 return 0;
9029}
9030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009034 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009036rm -f core conftest.err conftest.$ac_objext \
9037 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009038LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9041$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009042if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009043 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009044fi
9045 # BeOS
9046;;
9047esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009048
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9050$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009051
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009053if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009054 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9056$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009057LIBS="$withval $LIBS"
9058
9059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9061$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009062fi
9063
Guido van Rossum7f43da71994-08-01 12:15:30 +00009064
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009065
9066
9067
9068
9069
9070
9071
9072if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9073 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009074 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9075set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9077$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009078if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009079 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009080else
9081 case $PKG_CONFIG in
9082 [\\/]* | ?:[\\/]*)
9083 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9084 ;;
9085 *)
9086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9087for as_dir in $PATH
9088do
9089 IFS=$as_save_IFS
9090 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009091 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009093 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009095 break 2
9096 fi
9097done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009098 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009099IFS=$as_save_IFS
9100
9101 ;;
9102esac
9103fi
9104PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9105if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9107$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9110$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009111fi
9112
9113
9114fi
9115if test -z "$ac_cv_path_PKG_CONFIG"; then
9116 ac_pt_PKG_CONFIG=$PKG_CONFIG
9117 # Extract the first word of "pkg-config", so it can be a program name with args.
9118set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009121if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009122 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009123else
9124 case $ac_pt_PKG_CONFIG in
9125 [\\/]* | ?:[\\/]*)
9126 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9127 ;;
9128 *)
9129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132 IFS=$as_save_IFS
9133 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009134 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009136 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009138 break 2
9139 fi
9140done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009141 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009142IFS=$as_save_IFS
9143
9144 ;;
9145esac
9146fi
9147ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9148if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9150$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009154fi
9155
9156 if test "x$ac_pt_PKG_CONFIG" = x; then
9157 PKG_CONFIG=""
9158 else
9159 case $cross_compiling:$ac_tool_warned in
9160yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009163ac_tool_warned=yes ;;
9164esac
9165 PKG_CONFIG=$ac_pt_PKG_CONFIG
9166 fi
9167else
9168 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9169fi
9170
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009171fi
9172if test -n "$PKG_CONFIG"; then
9173 _pkg_min_version=0.9.0
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9175$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9176 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9178$as_echo "yes" >&6; }
9179 else
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9181$as_echo "no" >&6; }
9182 PKG_CONFIG=""
9183 fi
9184fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009185
9186# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9188$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009189
9190# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009192 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009193else
9194 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009195fi
9196
9197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9199$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009200
9201# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9203$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009204
9205# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009206if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009207 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009208else
9209 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009210fi
9211
9212
9213if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009214 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9215else
9216 LIBFFI_INCLUDEDIR=""
9217fi
9218
9219
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9221$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009222
Ned Deilya2a9f572013-10-25 00:30:10 -07009223# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9224
9225
9226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9227$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9228
9229# Check whether --with-tcltk-includes was given.
9230if test "${with_tcltk_includes+set}" = set; then :
9231 withval=$with_tcltk_includes;
9232else
9233 with_tcltk_includes="default"
9234fi
9235
9236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9237$as_echo "$with_tcltk_includes" >&6; }
9238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9239$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9240
9241# Check whether --with-tcltk-libs was given.
9242if test "${with_tcltk_libs+set}" = set; then :
9243 withval=$with_tcltk_libs;
9244else
9245 with_tcltk_libs="default"
9246fi
9247
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9249$as_echo "$with_tcltk_libs" >&6; }
9250if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9251then
9252 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9253 then
9254 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9255 fi
9256 TCLTK_INCLUDES=""
9257 TCLTK_LIBS=""
9258else
9259 TCLTK_INCLUDES="$with_tcltk_includes"
9260 TCLTK_LIBS="$with_tcltk_libs"
9261fi
9262
Benjamin Peterson867475c2009-04-29 20:36:25 +00009263# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9265$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009266
9267# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009269 withval=$with_dbmliborder;
9270if test x$with_dbmliborder = xyes
9271then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009272as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009273else
9274 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9275 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9276 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009277 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009278 fi
9279 done
9280fi
9281fi
9282
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9284$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009285
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009286# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009287
9288
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9290$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009291
Martin v. Löwiseba40652007-08-30 20:10:57 +00009292# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009293if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009294 withval=$with_signal_module;
9295fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009296
9297
9298if test -z "$with_signal_module"
9299then with_signal_module="yes"
9300fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9302$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009303
9304if test "${with_signal_module}" = "yes"; then
9305 USE_SIGNAL_MODULE=""
9306 SIGNAL_OBJS=""
9307else
9308 USE_SIGNAL_MODULE="#"
9309 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9310fi
9311
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009312# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009313
Barry Warsawc0d24d82000-06-29 16:12:00 +00009314USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9317$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009318
Guido van Rossumec2f0731997-01-22 20:54:01 +00009319
Martin v. Löwiseba40652007-08-30 20:10:57 +00009320# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009321if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009322 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9324$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009325LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009326if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009327 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009328fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009329else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9331$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009332fi
9333
Martin v. Löwis11437992002-04-12 09:54:03 +00009334
9335# Templates for things AC_DEFINEd more than once.
9336# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009337
9338
Martin v. Löwis11437992002-04-12 09:54:03 +00009339
9340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9342$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009343
Martin v. Löwiseba40652007-08-30 20:10:57 +00009344# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346 withval=$with_threads;
9347fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009348
9349
Barry Warsawc0d24d82000-06-29 16:12:00 +00009350# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009351
Martin v. Löwiseba40652007-08-30 20:10:57 +00009352# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009353if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009354 withval=$with_thread; with_threads=$with_thread
9355fi
9356
Barry Warsawc0d24d82000-06-29 16:12:00 +00009357
9358if test -z "$with_threads"
9359then with_threads="yes"
9360fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9362$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009363
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009364
Barry Warsawc0d24d82000-06-29 16:12:00 +00009365if test "$with_threads" = "no"
9366then
9367 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009368elif test "$ac_cv_pthread_is_default" = yes
9369then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009370 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009371
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009372 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009374
9375 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009377elif test "$ac_cv_kpthread" = "yes"
9378then
9379 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009380 if test "$ac_cv_cxx_thread" = "yes"; then
9381 CXX="$CXX -Kpthread"
9382 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009383 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009385 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009386 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009387elif test "$ac_cv_kthread" = "yes"
9388then
9389 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009390 if test "$ac_cv_cxx_thread" = "yes"; then
9391 CXX="$CXX -Kthread"
9392 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009393 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009394
9395 posix_threads=yes
9396 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009397elif test "$ac_cv_pthread" = "yes"
9398then
9399 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009400 if test "$ac_cv_cxx_thread" = "yes"; then
9401 CXX="$CXX -pthread"
9402 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009404
9405 posix_threads=yes
9406 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009407else
9408 if test ! -z "$with_threads" -a -d "$with_threads"
9409 then LDFLAGS="$LDFLAGS -L$with_threads"
9410 fi
9411 if test ! -z "$withval" -a -d "$withval"
9412 then LDFLAGS="$LDFLAGS -L$withval"
9413 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009414
9415 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009416 # define _POSIX_THREADS in unistd.h. Some apparently don't
9417 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9419$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009421/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009422
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009423#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009424#ifdef _POSIX_THREADS
9425yes
9426#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009427
9428_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009430 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009431 unistd_defines_pthreads=yes
9432else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009433 unistd_defines_pthreads=no
9434fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009435rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9438$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009439
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009440 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009443if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009444 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009445
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009446 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009447
Martin v. Löwis11437992002-04-12 09:54:03 +00009448
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009449$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009450
9451 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009452 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009453else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009454
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009455 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 +01009456if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009457 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009458
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009459 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009460
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009462$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009463
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009464 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009465else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009466
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9468$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009469
Martin v. Löwiseba40652007-08-30 20:10:57 +00009470# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009471if test "${with_pth+set}" = set; then :
9472 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9473$as_echo "$withval" >&6; }
9474 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009475
9476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009477$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009478
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009479 LIBS="-lpth $LIBS"
9480 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009481else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009484
9485 # Just looking for pthread_create in libpthread is not enough:
9486 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9487 # So we really have to include pthread.h, and then link.
9488 _libs=$LIBS
9489 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9491$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009493/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009494
9495#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009496#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009497
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009498void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009499int
9500main ()
9501{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009502
9503pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ;
9505 return 0;
9506}
9507_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009509
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9511$as_echo "yes" >&6; }
9512 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009513
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009514 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009515 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009516else
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009518 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009519 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009520if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009522
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009523 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009524 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009525else
Guido van Rossumad678af1998-10-02 14:42:15 +00009526
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009527 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 +01009528if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009530
9531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009533
9534 THREADOBJ="Python/thread.o"
9535else
9536
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009537 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 +01009538if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009540
9541
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009542$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009543
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009544 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009545else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009546
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9548$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009549if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009550 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009551else
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009553LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009556
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557/* Override any GCC internal prototype to avoid an error.
9558 Use char because int might match the return type of a GCC
9559 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009560#ifdef __cplusplus
9561extern "C"
9562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009563char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009564int
9565main ()
9566{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009567return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 ;
9569 return 0;
9570}
9571_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009575 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009576fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009577rm -f core conftest.err conftest.$ac_objext \
9578 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009579LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009580fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9582$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009583if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009584 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009585
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009586 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009587 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009588 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009589else
Greg Steinadf63d62000-07-05 10:38:09 +00009590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9592$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009593if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009595else
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009597LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009600
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601/* Override any GCC internal prototype to avoid an error.
9602 Use char because int might match the return type of a GCC
9603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604#ifdef __cplusplus
9605extern "C"
9606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009607char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009608int
9609main ()
9610{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009611return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 ;
9613 return 0;
9614}
9615_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009619 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621rm -f core conftest.err conftest.$ac_objext \
9622 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009623LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009624fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9626$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009627if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009628 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009629
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009630 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009631 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009632 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009633else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009634
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9636$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009637if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009639else
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009641LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009644
Martin v. Löwiseba40652007-08-30 20:10:57 +00009645/* Override any GCC internal prototype to avoid an error.
9646 Use char because int might match the return type of a GCC
9647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009648#ifdef __cplusplus
9649extern "C"
9650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009651char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009652int
9653main ()
9654{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009655return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009656 ;
9657 return 0;
9658}
9659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009660if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009663 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009664fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009665rm -f core conftest.err conftest.$ac_objext \
9666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009667LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009668fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9670$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009671if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009672 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009673
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009674 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009675 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009676 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009677else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009678
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9680$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009681if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009682 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009683else
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009685LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009688
Martin v. Löwiseba40652007-08-30 20:10:57 +00009689/* Override any GCC internal prototype to avoid an error.
9690 Use char because int might match the return type of a GCC
9691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009692#ifdef __cplusplus
9693extern "C"
9694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009695char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009696int
9697main ()
9698{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009699return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009700 ;
9701 return 0;
9702}
9703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009707 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009708fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009709rm -f core conftest.err conftest.$ac_objext \
9710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009711LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9714$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009715if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009717
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009718 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009719 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009720 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009721else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009722
Martin v. Löwis130fb172001-07-19 11:00:41 +00009723 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009724fi
9725
Guido van Rossum627b2d71993-12-24 10:39:16 +00009726
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009727fi
9728
Guido van Rossum0be3e491997-05-22 20:33:33 +00009729fi
9730
Guido van Rossum49545951997-12-02 19:28:29 +00009731fi
9732
Guido van Rossumb93a8621998-05-07 13:27:32 +00009733fi
9734
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009735
Michael W. Hudson54241132001-12-07 15:38:26 +00009736fi
9737
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009738
9739fi
9740
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742rm -f core conftest.err conftest.$ac_objext \
9743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744fi
9745
Martin v. Löwis11437992002-04-12 09:54:03 +00009746fi
9747
9748
9749fi
9750
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009751
Michael W. Hudson54241132001-12-07 15:38:26 +00009752
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9754$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009755if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009757else
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009759LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009762
Martin v. Löwiseba40652007-08-30 20:10:57 +00009763/* Override any GCC internal prototype to avoid an error.
9764 Use char because int might match the return type of a GCC
9765 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009766#ifdef __cplusplus
9767extern "C"
9768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009769char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009770int
9771main ()
9772{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 ;
9775 return 0;
9776}
9777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009778if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009781 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009783rm -f core conftest.err conftest.$ac_objext \
9784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009785LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9788$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009789if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009790 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009791
Martin v. Löwis130fb172001-07-19 11:00:41 +00009792 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009793 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009794 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009795fi
9796
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009797
Neal Norwitza978ab02002-11-02 16:58:05 +00009798 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9800$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009801if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009802 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009805LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808
Martin v. Löwiseba40652007-08-30 20:10:57 +00009809/* Override any GCC internal prototype to avoid an error.
9810 Use char because int might match the return type of a GCC
9811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009812#ifdef __cplusplus
9813extern "C"
9814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009815char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009816int
9817main ()
9818{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009819return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 ;
9821 return 0;
9822}
9823_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009824if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009827 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009829rm -f core conftest.err conftest.$ac_objext \
9830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009831LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009832fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9834$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009835if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009836 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009837
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009838 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009839 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009840 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009841fi
9842
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009843 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009844
Martin v. Löwis130fb172001-07-19 11:00:41 +00009845 if test "$USE_THREAD_MODULE" != "#"
9846 then
9847 # If the above checks didn't disable threads, (at least) OSF1
9848 # needs this '-threads' argument during linking.
9849 case $ac_sys_system in
9850 OSF1) LDLAST=-threads;;
9851 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009852 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009853fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009854
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009855if test "$posix_threads" = "yes"; then
9856 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009857
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009858$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009859
9860 fi
9861
9862 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9863 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009864 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009865$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009866
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009867 ;;
9868 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009869$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009870
9871 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009872 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009873$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009874
9875 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009876 esac
9877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9879$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009880 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009881 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009883 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009884 ac_cv_pthread_system_supported=no
9885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009887/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009888
9889 #include <stdio.h>
9890 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009891 void *foo(void *parm) {
9892 return NULL;
9893 }
9894 main() {
9895 pthread_attr_t attr;
9896 pthread_t id;
9897 if (pthread_attr_init(&attr)) exit(-1);
9898 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9899 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9900 exit(0);
9901 }
9902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009903if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009904 ac_cv_pthread_system_supported=yes
9905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009906 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009910fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009911
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912
Guido van Rossum627b2d71993-12-24 10:39:16 +00009913fi
9914
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9916$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009917 if test "$ac_cv_pthread_system_supported" = "yes"; then
9918
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009920
9921 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009922 for ac_func in pthread_sigmask
9923do :
9924 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009925if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009926 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009927#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009928_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009929 case $ac_sys_system in
9930 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009931
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009932$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009933
9934 ;;
9935 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009936fi
9937done
9938
Christian Heimes0d604cf2013-08-21 13:26:05 +02009939 for ac_func in pthread_atfork
9940do :
9941 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9942if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9943 cat >>confdefs.h <<_ACEOF
9944#define HAVE_PTHREAD_ATFORK 1
9945_ACEOF
9946
9947fi
9948done
9949
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009950fi
9951
9952
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009953# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009954
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9956$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009958if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009959 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009960 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9962$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009963 ipv6=no
9964 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009965 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9966$as_echo "yes" >&6; }
9967 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009968
9969 ipv6=yes
9970 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009972else
Martin v. Löwis11437992002-04-12 09:54:03 +00009973
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009975/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009976 /* AF_INET6 available check */
9977#include <sys/types.h>
9978#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009979int
9980main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009981{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009982int domain = AF_INET6;
9983 ;
9984 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009985}
Martin v. Löwis11437992002-04-12 09:54:03 +00009986_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009987if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009988
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9990$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009991 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009992
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009993else
Matthias Klosec511b472010-05-08 11:01:39 +00009994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9996$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009997 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009999fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010002if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10004$as_echo_n "checking if RFC2553 API is available... " >&6; }
10005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010006/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010007
10008 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010009#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010010int
10011main ()
10012{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010013struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010014 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 ;
10016 return 0;
10017}
Matthias Klosec511b472010-05-08 11:01:39 +000010018
Martin v. Löwis11437992002-04-12 09:54:03 +000010019_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010020if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010021
10022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010023$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010024 ipv6=yes
10025
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010026else
Matthias Klosec511b472010-05-08 11:01:39 +000010027
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010029$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010030 ipv6=no
10031
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010034fi
10035
10036if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010037 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010038
10039fi
10040
Martin v. Löwiseba40652007-08-30 20:10:57 +000010041fi
10042
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010043
10044ipv6type=unknown
10045ipv6lib=none
10046ipv6trylibc=no
10047
10048if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10050$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010051 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10052 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010053 case $i in
10054 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010056/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010057
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010058#include <netinet/in.h>
10059#ifdef IPV6_INRIA_VERSION
10060yes
10061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010062_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010064 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010065 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010066fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010067rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010068
10069 ;;
10070 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010072/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010073
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010074#include <netinet/in.h>
10075#ifdef __KAME__
10076yes
10077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010078_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010080 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010081 ipv6type=$i;
10082 ipv6lib=inet6
10083 ipv6libdir=/usr/local/v6/lib
10084 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010085fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010086rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010087
10088 ;;
10089 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010091/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010092
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010093#include <features.h>
10094#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10095yes
10096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010097_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010099 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010100 ipv6type=$i;
10101 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010102fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010103rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010104
10105 ;;
10106 linux-inet6)
10107 if test -d /usr/inet6; then
10108 ipv6type=$i
10109 ipv6lib=inet6
10110 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010111 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010112 fi
10113 ;;
10114 solaris)
10115 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010116 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010117 ipv6type=$i
10118 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010119 fi
10120 fi
10121 ;;
10122 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010124/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010125
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126#include <sys/param.h>
10127#ifdef _TOSHIBA_INET6
10128yes
10129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010130_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010132 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010133 ipv6type=$i;
10134 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010135 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010136fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010137rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010138
10139 ;;
10140 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010143
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010144#include </usr/local/v6/include/sys/v6config.h>
10145#ifdef __V6D__
10146yes
10147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010148_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010150 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010151 ipv6type=$i;
10152 ipv6lib=v6;
10153 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010154 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010155fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010156rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010157
10158 ;;
10159 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010161/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010162
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010163#include <sys/param.h>
10164#ifdef _ZETA_MINAMI_INET6
10165yes
10166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010167_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010169 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010170 ipv6type=$i;
10171 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010172 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010173fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010174rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010175
10176 ;;
10177 esac
10178 if test "$ipv6type" != "unknown"; then
10179 break
10180 fi
10181 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10183$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010184fi
10185
10186if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10187 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10188 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10189 echo "using lib$ipv6lib"
10190 else
10191 if test $ipv6trylibc = "yes"; then
10192 echo "using libc"
10193 else
10194 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10195 echo "You need to fetch lib$ipv6lib.a from appropriate"
10196 echo 'ipv6 kit and compile beforehand.'
10197 exit 1
10198 fi
10199 fi
10200fi
10201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10203$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010205/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010206
10207 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010208int
10209main ()
10210{
10211FSIORefNum fRef = 0
10212 ;
10213 return 0;
10214}
Mark Dickinson0712b562010-05-08 19:13:21 +000010215
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010216_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010217if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010218
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010220$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10223$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010224
Mark Dickinson0712b562010-05-08 19:13:21 +000010225else
10226
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10228$as_echo "no" >&6; }
10229
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010230fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10232
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010233# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10235$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010236
Martin v. Löwiseba40652007-08-30 20:10:57 +000010237# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010238if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010239 withval=$with_doc_strings;
10240fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010241
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010242
10243if test -z "$with_doc_strings"
10244then with_doc_strings="yes"
10245fi
10246if test "$with_doc_strings" != "no"
10247then
10248
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010249$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010250
10251fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10253$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010254
Neil Schemenauera35c6882001-02-27 04:45:05 +000010255# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10257$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010258
Martin v. Löwiseba40652007-08-30 20:10:57 +000010259# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010260if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010261 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010262if test "$withval" != no
10263then
10264
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010265$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10268$as_echo "yes" >&6; }
10269else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010271fi
10272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010275fi
10276
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010277
10278# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10280$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010281
Martin v. Löwiseba40652007-08-30 20:10:57 +000010282# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010283if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010284 withval=$with_pymalloc;
10285fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010286
Neil Schemenauera35c6882001-02-27 04:45:05 +000010287
Neil Schemenauer16c22972002-03-22 15:34:49 +000010288if test -z "$with_pymalloc"
10289then with_pymalloc="yes"
10290fi
10291if test "$with_pymalloc" != "no"
10292then
Martin v. Löwis11437992002-04-12 09:54:03 +000010293
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010294$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010295
10296fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10298$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010299
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010300# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10302$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010303
10304# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010306 withval=$with_valgrind;
10307else
10308 with_valgrind=no
10309fi
10310
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10312$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010313if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314 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 +010010315if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010318
10319else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010320 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010321
10322fi
10323
10324
10325fi
10326
Barry Warsawef82cd72000-06-30 16:21:01 +000010327# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10329$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010330
Martin v. Löwiseba40652007-08-30 20:10:57 +000010331# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010334if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010335then
10336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010338
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10340$as_echo "yes" >&6; }
10341else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10342$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010343fi
10344else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10346$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010347fi
10348
Barry Warsawef82cd72000-06-30 16:21:01 +000010349
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010350# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010351
Guido van Rossum98935bf2001-09-05 19:13:16 +000010352DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010353
Guido van Rossume97ee181999-12-20 21:27:22 +000010354# the dlopen() function means we might want to use dynload_shlib.o. some
10355# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010356for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357do :
10358 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010359if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010361#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010362_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010363
Guido van Rossume97ee181999-12-20 21:27:22 +000010364fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010365done
Guido van Rossume97ee181999-12-20 21:27:22 +000010366
Michael W. Hudson54241132001-12-07 15:38:26 +000010367
Guido van Rossume97ee181999-12-20 21:27:22 +000010368# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10369# loading of modules.
10370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10372$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010373if test -z "$DYNLOADFILE"
10374then
10375 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010376 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10377 if test "$ac_cv_func_dlopen" = yes
10378 then DYNLOADFILE="dynload_shlib.o"
10379 else DYNLOADFILE="dynload_aix.o"
10380 fi
10381 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010382 BeOS*) DYNLOADFILE="dynload_beos.o";;
10383 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010384 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10385 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010386 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010387 *)
10388 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10389 # out any dynamic loading
10390 if test "$ac_cv_func_dlopen" = yes
10391 then DYNLOADFILE="dynload_shlib.o"
10392 else DYNLOADFILE="dynload_stub.o"
10393 fi
10394 ;;
10395 esac
10396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10398$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010399if test "$DYNLOADFILE" != "dynload_stub.o"
10400then
Martin v. Löwis11437992002-04-12 09:54:03 +000010401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010403
10404fi
10405
Neil Schemenauer4e425612001-06-19 15:44:15 +000010406# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10407
Michael W. Hudson54241132001-12-07 15:38:26 +000010408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10410$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010411if test -z "$MACHDEP_OBJS"
10412then
Jack Jansene578a632001-08-15 01:27:14 +000010413 MACHDEP_OBJS=$extra_machdep_objs
10414else
10415 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10418$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010419
Guido van Rossum627b2d71993-12-24 10:39:16 +000010420# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010421for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10422 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010423 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10424 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010425 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010426 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010427 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010428 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010429 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10430 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010431 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010432 setlocale setregid setreuid setresuid setresgid \
10433 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010434 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010435 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010436 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437do :
10438 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10439ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010440if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010443_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010444
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010445fi
10446done
10447
Michael W. Hudson54241132001-12-07 15:38:26 +000010448
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010449# For some functions, having a definition is not sufficient, since
10450# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10452$as_echo_n "checking for chroot... " >&6; }
10453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010454/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010455#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010456int
10457main ()
10458{
10459void *x=chroot
10460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010466$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010467
Matthias Klosec511b472010-05-08 11:01:39 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010469$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010473
10474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10477$as_echo_n "checking for link... " >&6; }
10478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010479/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010480#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010481int
10482main ()
10483{
10484void *x=link
10485 ;
10486 return 0;
10487}
10488_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010492
Matthias Klosec511b472010-05-08 11:01:39 +000010493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010494$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010495else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010498
10499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10502$as_echo_n "checking for symlink... " >&6; }
10503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010504/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010505#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010506int
10507main ()
10508{
10509void *x=symlink
10510 ;
10511 return 0;
10512}
10513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010516$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010517
Matthias Klosec511b472010-05-08 11:01:39 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010520else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10522$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010523
10524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10527$as_echo_n "checking for fchdir... " >&6; }
10528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010529/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010530#include <unistd.h>
10531int
10532main ()
10533{
10534void *x=fchdir
10535 ;
10536 return 0;
10537}
10538_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010541$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010542
Matthias Klosec511b472010-05-08 11:01:39 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010544$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010548
10549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10552$as_echo_n "checking for fsync... " >&6; }
10553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010554/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010555#include <unistd.h>
10556int
10557main ()
10558{
10559void *x=fsync
10560 ;
10561 return 0;
10562}
10563_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010567
Matthias Klosec511b472010-05-08 11:01:39 +000010568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010569$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010573
10574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10577$as_echo_n "checking for fdatasync... " >&6; }
10578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010579/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010580#include <unistd.h>
10581int
10582main ()
10583{
10584void *x=fdatasync
10585 ;
10586 return 0;
10587}
10588_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010592
Matthias Klosec511b472010-05-08 11:01:39 +000010593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010594$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010595else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10597$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010598
10599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10602$as_echo_n "checking for epoll... " >&6; }
10603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010604/* end confdefs.h. */
10605#include <sys/epoll.h>
10606int
10607main ()
10608{
10609void *x=epoll_create
10610 ;
10611 return 0;
10612}
10613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010615
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010617
Matthias Klosec511b472010-05-08 11:01:39 +000010618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010619$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010620else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010623
10624fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10627$as_echo_n "checking for kqueue... " >&6; }
10628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010629/* end confdefs.h. */
10630
10631#include <sys/types.h>
10632#include <sys/event.h>
10633
10634int
10635main ()
10636{
10637int x=kqueue()
10638 ;
10639 return 0;
10640}
10641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010642if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010644$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010645
Matthias Klosec511b472010-05-08 11:01:39 +000010646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010647$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10650$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010651
10652fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010654# On some systems (eg. FreeBSD 5), we would find a definition of the
10655# functions ctermid_r, setgroups in the library, but no prototype
10656# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10657# address to avoid compiler warnings and potential miscompilations
10658# because of the missing prototypes.
10659
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10661$as_echo_n "checking for ctermid_r... " >&6; }
10662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010663/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010664
Martin v. Löwisd5843682002-11-21 20:41:28 +000010665#include <stdio.h>
10666
Martin v. Löwisd5843682002-11-21 20:41:28 +000010667int
10668main ()
10669{
10670void* p = ctermid_r
10671 ;
10672 return 0;
10673}
10674_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010675if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010677$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010678
Matthias Klosec511b472010-05-08 11:01:39 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10683$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010684
10685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10687
Antoine Pitroub170f172010-09-10 18:47:36 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10689$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010690if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010691 $as_echo_n "(cached) " >&6
10692else
10693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010695#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010696int
10697main ()
10698{
10699void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010700
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010701 ;
10702 return 0;
10703}
10704_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010706 ac_cv_flock_decl=yes
10707else
10708 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010709
10710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010712
Antoine Pitroub170f172010-09-10 18:47:36 +000010713fi
10714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10715$as_echo "$ac_cv_flock_decl" >&6; }
10716if test "x${ac_cv_flock_decl}" = xyes; then
10717 for ac_func in flock
10718do :
10719 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010720if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010721 cat >>confdefs.h <<_ACEOF
10722#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010723_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010724
Antoine Pitrou85729812010-09-07 14:55:24 +000010725else
Antoine Pitroub170f172010-09-10 18:47:36 +000010726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010727$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010728if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010729 $as_echo_n "(cached) " >&6
10730else
10731 ac_check_lib_save_LIBS=$LIBS
10732LIBS="-lbsd $LIBS"
10733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10734/* end confdefs.h. */
10735
10736/* Override any GCC internal prototype to avoid an error.
10737 Use char because int might match the return type of a GCC
10738 builtin and then its argument prototype would still apply. */
10739#ifdef __cplusplus
10740extern "C"
10741#endif
10742char flock ();
10743int
10744main ()
10745{
10746return flock ();
10747 ;
10748 return 0;
10749}
10750_ACEOF
10751if ac_fn_c_try_link "$LINENO"; then :
10752 ac_cv_lib_bsd_flock=yes
10753else
10754 ac_cv_lib_bsd_flock=no
10755fi
10756rm -f core conftest.err conftest.$ac_objext \
10757 conftest$ac_exeext conftest.$ac_ext
10758LIBS=$ac_check_lib_save_LIBS
10759fi
10760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10761$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010762if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010763 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010764
10765
10766$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10767
10768
10769fi
10770
10771
10772fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010773done
10774
Antoine Pitrou85729812010-09-07 14:55:24 +000010775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10778$as_echo_n "checking for getpagesize... " >&6; }
10779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010780/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010781
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010782#include <unistd.h>
10783
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010784int
10785main ()
10786{
10787void* p = getpagesize
10788 ;
10789 return 0;
10790}
10791_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010795
Matthias Klosec511b472010-05-08 11:01:39 +000010796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010797$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10800$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010801
10802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010804
Charles-François Natali93a11752011-11-27 13:01:35 +010010805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10806$as_echo_n "checking for broken unsetenv... " >&6; }
10807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10808/* end confdefs.h. */
10809
10810#include <stdlib.h>
10811
10812int
10813main ()
10814{
10815int res = unsetenv("DUMMY")
10816 ;
10817 return 0;
10818}
10819_ACEOF
10820if ac_fn_c_try_compile "$LINENO"; then :
10821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822$as_echo "no" >&6; }
10823else
10824
10825$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10826
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10828$as_echo "yes" >&6; }
10829
10830fi
10831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10832
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010833for ac_prog in true
10834do
10835 # Extract the first word of "$ac_prog", so it can be a program name with args.
10836set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10838$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010839if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010840 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010841else
10842 if test -n "$TRUE"; then
10843 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10844else
10845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10846for as_dir in $PATH
10847do
10848 IFS=$as_save_IFS
10849 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010850 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010853 $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 +000010854 break 2
10855 fi
10856done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010857 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010858IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859
10860fi
10861fi
10862TRUE=$ac_cv_prog_TRUE
10863if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10865$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10868$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010869fi
10870
Martin v. Löwiseba40652007-08-30 20:10:57 +000010871
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010872 test -n "$TRUE" && break
10873done
10874test -n "$TRUE" || TRUE="/bin/true"
10875
10876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10878$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010879if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010880 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010881else
10882 ac_check_lib_save_LIBS=$LIBS
10883LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010885/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010886
Martin v. Löwiseba40652007-08-30 20:10:57 +000010887/* Override any GCC internal prototype to avoid an error.
10888 Use char because int might match the return type of a GCC
10889 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010890#ifdef __cplusplus
10891extern "C"
10892#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010893char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010894int
10895main ()
10896{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010897return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010898 ;
10899 return 0;
10900}
10901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010903 ac_cv_lib_c_inet_aton=yes
10904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010905 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010907rm -f core conftest.err conftest.$ac_objext \
10908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010909LIBS=$ac_check_lib_save_LIBS
10910fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10912$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010913if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010914 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10917$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010918if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010919 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010920else
10921 ac_check_lib_save_LIBS=$LIBS
10922LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010924/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010925
Martin v. Löwiseba40652007-08-30 20:10:57 +000010926/* Override any GCC internal prototype to avoid an error.
10927 Use char because int might match the return type of a GCC
10928 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010929#ifdef __cplusplus
10930extern "C"
10931#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010932char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010933int
10934main ()
10935{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010936return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010937 ;
10938 return 0;
10939}
10940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010942 ac_cv_lib_resolv_inet_aton=yes
10943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010944 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946rm -f core conftest.err conftest.$ac_objext \
10947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010948LIBS=$ac_check_lib_save_LIBS
10949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10951$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010952if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010953 cat >>confdefs.h <<_ACEOF
10954#define HAVE_LIBRESOLV 1
10955_ACEOF
10956
10957 LIBS="-lresolv $LIBS"
10958
10959fi
10960
10961
10962fi
10963
10964
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010965# On Tru64, chflags seems to be present, but calling it will
10966# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10968$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010969if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010973 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010976/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010977
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010978#include <sys/stat.h>
10979#include <unistd.h>
10980int main(int argc, char*argv[])
10981{
10982 if(chflags(argv[0], 0) != 0)
10983 return 1;
10984 return 0;
10985}
Ned Deily43e10542011-06-27 23:41:53 -070010986
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010988if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010989 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010991 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010995fi
10996
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010997
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11000$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011001if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011002 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011003if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011004 ac_cv_have_chflags="yes"
11005else
11006 ac_cv_have_chflags="no"
11007fi
11008
11009fi
11010if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011011
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011012$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011013
11014fi
11015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11017$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011018if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011019 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011021 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011022 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011023else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011025/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011026
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011027#include <sys/stat.h>
11028#include <unistd.h>
11029int main(int argc, char*argv[])
11030{
11031 if(lchflags(argv[0], 0) != 0)
11032 return 1;
11033 return 0;
11034}
Ned Deily43e10542011-06-27 23:41:53 -070011035
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011036_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011037if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011038 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011040 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011041fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011044fi
11045
11046
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011047fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11049$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011050if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011051 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011052if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011053 ac_cv_have_lchflags="yes"
11054else
11055 ac_cv_have_lchflags="no"
11056fi
11057
11058fi
11059if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011061$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011062
11063fi
11064
Ronald Oussorenf8752642006-07-06 10:13:35 +000011065case $ac_sys_system/$ac_sys_release in
11066Darwin/*)
11067 _CUR_CFLAGS="${CFLAGS}"
11068 _CUR_LDFLAGS="${LDFLAGS}"
11069 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11070 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11071 ;;
11072esac
11073
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11075$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011076if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011078else
11079 ac_check_lib_save_LIBS=$LIBS
11080LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011082/* end confdefs.h. */
11083
Martin v. Löwiseba40652007-08-30 20:10:57 +000011084/* Override any GCC internal prototype to avoid an error.
11085 Use char because int might match the return type of a GCC
11086 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011087#ifdef __cplusplus
11088extern "C"
11089#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011090char inflateCopy ();
11091int
11092main ()
11093{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011094return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011095 ;
11096 return 0;
11097}
11098_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011099if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011100 ac_cv_lib_z_inflateCopy=yes
11101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011102 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011104rm -f core conftest.err conftest.$ac_objext \
11105 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011106LIBS=$ac_check_lib_save_LIBS
11107fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11109$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011110if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011113
11114fi
11115
11116
Ronald Oussorenf8752642006-07-06 10:13:35 +000011117case $ac_sys_system/$ac_sys_release in
11118Darwin/*)
11119 CFLAGS="${_CUR_CFLAGS}"
11120 LDFLAGS="${_CUR_LDFLAGS}"
11121 ;;
11122esac
11123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11125$as_echo_n "checking for hstrerror... " >&6; }
11126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011127/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011128
Martin v. Löwise9416172003-05-03 10:12:45 +000011129#include <netdb.h>
11130
Martin v. Löwise9416172003-05-03 10:12:45 +000011131int
11132main ()
11133{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011134void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011135 ;
11136 return 0;
11137}
11138_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011139if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011141$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011142
Matthias Klosec511b472010-05-08 11:01:39 +000011143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011144$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11147$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011148
11149fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011150rm -f core conftest.err conftest.$ac_objext \
11151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11154$as_echo_n "checking for inet_aton... " >&6; }
11155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011156/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011157
Martin v. Löwis86d66262006-02-17 08:40:11 +000011158#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011159#include <sys/socket.h>
11160#include <netinet/in.h>
11161#include <arpa/inet.h>
11162
Martin v. Löwise9416172003-05-03 10:12:45 +000011163int
11164main ()
11165{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011166void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011167 ;
11168 return 0;
11169}
11170_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011174
Matthias Klosec511b472010-05-08 11:01:39 +000011175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011176$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11179$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011180
11181fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182rm -f core conftest.err conftest.$ac_objext \
11183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11186$as_echo_n "checking for inet_pton... " >&6; }
11187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011188/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011189
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011190#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011191#include <sys/socket.h>
11192#include <netinet/in.h>
11193#include <arpa/inet.h>
11194
Martin v. Löwise9416172003-05-03 10:12:45 +000011195int
11196main ()
11197{
11198void* p = inet_pton
11199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011205$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011206
Matthias Klosec511b472010-05-08 11:01:39 +000011207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011208$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011212
11213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011215
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011216# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11218$as_echo_n "checking for setgroups... " >&6; }
11219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011221
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011222#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011223#ifdef HAVE_GRP_H
11224#include <grp.h>
11225#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011226
Martin v. Löwisd5843682002-11-21 20:41:28 +000011227int
11228main ()
11229{
11230void* p = setgroups
11231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011238
Matthias Klosec511b472010-05-08 11:01:39 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011244
11245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011247
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011248# check for openpty and forkpty
11249
11250for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251do :
11252 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011253if test "x$ac_cv_func_openpty" = 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_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011256_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011257
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11260$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011261if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011262 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011263else
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011265LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011268
Martin v. Löwiseba40652007-08-30 20:10:57 +000011269/* Override any GCC internal prototype to avoid an error.
11270 Use char because int might match the return type of a GCC
11271 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011272#ifdef __cplusplus
11273extern "C"
11274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011275char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011276int
11277main ()
11278{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011279return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 ;
11281 return 0;
11282}
11283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011287 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011288fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011289rm -f core conftest.err conftest.$ac_objext \
11290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011291LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011292fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11294$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011295if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011296 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011297 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011298else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11300$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011301if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011302 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011303else
11304 ac_check_lib_save_LIBS=$LIBS
11305LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011307/* end confdefs.h. */
11308
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309/* Override any GCC internal prototype to avoid an error.
11310 Use char because int might match the return type of a GCC
11311 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011312#ifdef __cplusplus
11313extern "C"
11314#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011315char openpty ();
11316int
11317main ()
11318{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011319return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011320 ;
11321 return 0;
11322}
11323_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011324if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011325 ac_cv_lib_bsd_openpty=yes
11326else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011327 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011328fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011329rm -f core conftest.err conftest.$ac_objext \
11330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011331LIBS=$ac_check_lib_save_LIBS
11332fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11334$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011335if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011336 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011337 LIBS="$LIBS -lbsd"
11338fi
11339
11340
11341fi
11342
Fred Drake8cef4cf2000-06-28 16:40:38 +000011343
11344fi
11345done
11346
11347for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348do :
11349 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011350if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011352#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011353_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011354
Fred Drake8cef4cf2000-06-28 16:40:38 +000011355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11357$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011358if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011359 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011360else
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011362LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
Martin v. Löwiseba40652007-08-30 20:10:57 +000011366/* Override any GCC internal prototype to avoid an error.
11367 Use char because int might match the return type of a GCC
11368 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011369#ifdef __cplusplus
11370extern "C"
11371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011372char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011373int
11374main ()
11375{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 ;
11378 return 0;
11379}
11380_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011381if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011383else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011384 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011386rm -f core conftest.err conftest.$ac_objext \
11387 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011388LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011389fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11391$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011392if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011393 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011394 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011395else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11397$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011398if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011399 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011400else
11401 ac_check_lib_save_LIBS=$LIBS
11402LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011404/* end confdefs.h. */
11405
Martin v. Löwiseba40652007-08-30 20:10:57 +000011406/* Override any GCC internal prototype to avoid an error.
11407 Use char because int might match the return type of a GCC
11408 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011409#ifdef __cplusplus
11410extern "C"
11411#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011412char forkpty ();
11413int
11414main ()
11415{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011417 ;
11418 return 0;
11419}
11420_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011422 ac_cv_lib_bsd_forkpty=yes
11423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011424 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011426rm -f core conftest.err conftest.$ac_objext \
11427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011428LIBS=$ac_check_lib_save_LIBS
11429fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11431$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011432if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011433 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011434 LIBS="$LIBS -lbsd"
11435fi
11436
11437
11438fi
11439
Fred Drake8cef4cf2000-06-28 16:40:38 +000011440
11441fi
11442done
11443
Jack Jansendd19cf82001-12-06 22:36:17 +000011444
Brett Cannonaa5778d2008-03-18 04:09:00 +000011445# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011446for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011447do :
11448 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011449if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011450 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011451#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011452_ACEOF
11453
11454fi
11455done
11456
11457
Michael W. Hudson54241132001-12-07 15:38:26 +000011458# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011459for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011460do :
11461 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11462ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011463if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011465#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011466_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011467
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011468fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011469done
11470
Michael W. Hudson54241132001-12-07 15:38:26 +000011471
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011472ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011473if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011474 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011475
Martin v. Löwis1142de32002-03-29 16:28:31 +000011476else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011477 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011478 *" dup2.$ac_objext "* ) ;;
11479 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011480 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011481esac
11482
Martin v. Löwis1142de32002-03-29 16:28:31 +000011483fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011484
11485ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011486if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011487 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11488
11489else
11490 case " $LIBOBJS " in
11491 *" getcwd.$ac_objext "* ) ;;
11492 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11493 ;;
11494esac
11495
11496fi
11497
11498ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011499if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011500 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11501
11502else
11503 case " $LIBOBJS " in
11504 *" strdup.$ac_objext "* ) ;;
11505 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11506 ;;
11507esac
11508
11509fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011510
11511
11512for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011513do :
11514 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011515if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011517#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011518_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011520/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011521#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011522int
11523main ()
11524{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011525getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 ;
11527 return 0;
11528}
11529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011532$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011533
Guido van Rossum627b2d71993-12-24 10:39:16 +000011534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011536
Guido van Rossum627b2d71993-12-24 10:39:16 +000011537fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011538done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011539
Jack Jansen150753c2003-03-29 22:07:47 +000011540for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011541do :
11542 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011543if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011544 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011545#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011546_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011548/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011549#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011550int
11551main ()
11552{
11553setpgrp(0,0);
11554 ;
11555 return 0;
11556}
11557_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011561
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011564
11565fi
11566done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011567
Thomas Wouters3a584202000-08-05 23:28:51 +000011568for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011569do :
11570 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011571if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011573#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011574_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011576/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011577#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011578int
11579main ()
11580{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011581gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 ;
11583 return 0;
11584}
11585_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011586if ac_fn_c_try_compile "$LINENO"; then :
11587
Guido van Rossum627b2d71993-12-24 10:39:16 +000011588else
Skip Montanaro6dead952003-09-25 14:50:04 +000011589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011590$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011591
Martin v. Löwis11437992002-04-12 09:54:03 +000011592
Guido van Rossum627b2d71993-12-24 10:39:16 +000011593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011595
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011596fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011597done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011598
Michael W. Hudson54241132001-12-07 15:38:26 +000011599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11601$as_echo_n "checking for major... " >&6; }
11602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011603/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011604
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011605#if defined(MAJOR_IN_MKDEV)
11606#include <sys/mkdev.h>
11607#elif defined(MAJOR_IN_SYSMACROS)
11608#include <sys/sysmacros.h>
11609#else
11610#include <sys/types.h>
11611#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011612
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011613int
11614main ()
11615{
11616
11617 makedev(major(0),minor(0));
11618
11619 ;
11620 return 0;
11621}
11622_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011624
11625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011626$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011627
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11629$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011630
11631else
Skip Montanaro6dead952003-09-25 14:50:04 +000011632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11634$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011635
11636fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011637rm -f core conftest.err conftest.$ac_objext \
11638 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011639
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011640# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011641# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11643$as_echo_n "checking for getaddrinfo... " >&6; }
11644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011645/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011646
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011647#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011648#include <sys/socket.h>
11649#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011650#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011651
Martin v. Löwis11437992002-04-12 09:54:03 +000011652int
11653main ()
11654{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011655getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 ;
11657 return 0;
11658}
11659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011660if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011661 have_getaddrinfo=yes
11662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011663 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011664fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011665rm -f core conftest.err conftest.$ac_objext \
11666 conftest$ac_exeext conftest.$ac_ext
11667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11668$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011669if test $have_getaddrinfo = yes
11670then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11672$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011673 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011674 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011675else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011676 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011677
11678if test "${enable_ipv6+set}" = set; then
11679 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11680else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011681 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011682fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011685/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011686
Stefan Krah0afe4e42012-11-22 23:56:51 +010011687#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011688#include <sys/types.h>
11689#include <netdb.h>
11690#include <string.h>
11691#include <sys/socket.h>
11692#include <netinet/in.h>
11693
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011694int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011695{
11696 int passive, gaierr, inet4 = 0, inet6 = 0;
11697 struct addrinfo hints, *ai, *aitop;
11698 char straddr[INET6_ADDRSTRLEN], strport[16];
11699
11700 for (passive = 0; passive <= 1; passive++) {
11701 memset(&hints, 0, sizeof(hints));
11702 hints.ai_family = AF_UNSPEC;
11703 hints.ai_flags = passive ? AI_PASSIVE : 0;
11704 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011705 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011706 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11707 (void)gai_strerror(gaierr);
11708 goto bad;
11709 }
11710 for (ai = aitop; ai; ai = ai->ai_next) {
11711 if (ai->ai_addr == NULL ||
11712 ai->ai_addrlen == 0 ||
11713 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11714 straddr, sizeof(straddr), strport, sizeof(strport),
11715 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11716 goto bad;
11717 }
11718 switch (ai->ai_family) {
11719 case AF_INET:
11720 if (strcmp(strport, "54321") != 0) {
11721 goto bad;
11722 }
11723 if (passive) {
11724 if (strcmp(straddr, "0.0.0.0") != 0) {
11725 goto bad;
11726 }
11727 } else {
11728 if (strcmp(straddr, "127.0.0.1") != 0) {
11729 goto bad;
11730 }
11731 }
11732 inet4++;
11733 break;
11734 case AF_INET6:
11735 if (strcmp(strport, "54321") != 0) {
11736 goto bad;
11737 }
11738 if (passive) {
11739 if (strcmp(straddr, "::") != 0) {
11740 goto bad;
11741 }
11742 } else {
11743 if (strcmp(straddr, "::1") != 0) {
11744 goto bad;
11745 }
11746 }
11747 inet6++;
11748 break;
11749 case AF_UNSPEC:
11750 goto bad;
11751 break;
11752 default:
11753 /* another family support? */
11754 break;
11755 }
11756 }
11757 }
11758
11759 if (!(inet4 == 0 || inet4 == 2))
11760 goto bad;
11761 if (!(inet6 == 0 || inet6 == 2))
11762 goto bad;
11763
11764 if (aitop)
11765 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011766 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011767
11768 bad:
11769 if (aitop)
11770 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011771 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011772}
11773
Martin v. Löwis11437992002-04-12 09:54:03 +000011774_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011775if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011776 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011778 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011779fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011783
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011784fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011785
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011787
Benjamin Peterson75fed812010-11-01 01:47:19 +000011788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11789$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11790
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011791if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011792then
11793 if test $ipv6 = yes
11794 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011795 echo 'Fatal: You must get working getaddrinfo() function.'
11796 echo ' or you can specify "--disable-ipv6"'.
11797 exit 1
11798 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011799else
Martin v. Löwis11437992002-04-12 09:54:03 +000011800
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011801$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011802
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011803fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011804
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011805for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011806do :
11807 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011808if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011809 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011810#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011811_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011812
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011813fi
11814done
11815
Michael W. Hudson54241132001-12-07 15:38:26 +000011816
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011817# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11819$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011820if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011821 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011822else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011824/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011825#include <sys/types.h>
11826#include <sys/time.h>
11827#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011828
Martin v. Löwis11437992002-04-12 09:54:03 +000011829int
11830main ()
11831{
11832if ((struct tm *) 0)
11833return 0;
11834 ;
11835 return 0;
11836}
11837_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011838if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011839 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011841 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11846$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011847if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011849$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011850
11851fi
11852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11854$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011855if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011859/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011860#include <sys/types.h>
11861#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011862
Martin v. Löwis11437992002-04-12 09:54:03 +000011863int
11864main ()
11865{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011866struct tm tm;
11867 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011868 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011869 ;
11870 return 0;
11871}
11872_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011873if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011874 ac_cv_struct_tm=time.h
11875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011876 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11881$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011882if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011883
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011884$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011885
11886fi
11887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011888ac_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 +000011889#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011891"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011892if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011893
11894cat >>confdefs.h <<_ACEOF
11895#define HAVE_STRUCT_TM_TM_ZONE 1
11896_ACEOF
11897
11898
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011899fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011900
Martin v. Löwis11437992002-04-12 09:54:03 +000011901if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11902
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011903$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011904
11905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011906 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11907"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011908if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011909 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011910else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011911 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011912fi
11913
Martin v. Löwiseba40652007-08-30 20:10:57 +000011914cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011916_ACEOF
11917
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11919$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011920if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011921 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011924/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011925#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011926#if !HAVE_DECL_TZNAME
11927extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011929
Martin v. Löwis11437992002-04-12 09:54:03 +000011930int
11931main ()
11932{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011933return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011934 ;
11935 return 0;
11936}
11937_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011938if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011939 ac_cv_var_tzname=yes
11940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011941 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011942fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011943rm -f core conftest.err conftest.$ac_objext \
11944 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11947$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011948 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011949
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011950$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011951
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011952 fi
11953fi
11954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011955ac_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 +010011956if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011957
11958cat >>confdefs.h <<_ACEOF
11959#define HAVE_STRUCT_STAT_ST_RDEV 1
11960_ACEOF
11961
11962
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011963fi
11964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011965ac_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 +010011966if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011967
Martin v. Löwis11437992002-04-12 09:54:03 +000011968cat >>confdefs.h <<_ACEOF
11969#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11970_ACEOF
11971
11972
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011973fi
11974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011975ac_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 +010011976if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011977
11978cat >>confdefs.h <<_ACEOF
11979#define HAVE_STRUCT_STAT_ST_FLAGS 1
11980_ACEOF
11981
11982
11983fi
11984
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011985ac_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 +010011986if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011987
11988cat >>confdefs.h <<_ACEOF
11989#define HAVE_STRUCT_STAT_ST_GEN 1
11990_ACEOF
11991
11992
11993fi
11994
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995ac_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 +010011996if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011997
11998cat >>confdefs.h <<_ACEOF
11999#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12000_ACEOF
12001
12002
12003fi
12004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012005ac_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 +010012006if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012007
Martin v. Löwis11437992002-04-12 09:54:03 +000012008cat >>confdefs.h <<_ACEOF
12009#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12010_ACEOF
12011
12012
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012013fi
12014
Michael W. Hudson54241132001-12-07 15:38:26 +000012015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12017$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012018if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012019 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020else
Matthias Klosec511b472010-05-08 11:01:39 +000012021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012023/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012024#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012025int
12026main ()
12027{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012033if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012034 ac_cv_header_time_altzone=yes
12035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012036 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012039
Martin v. Löwiseba40652007-08-30 20:10:57 +000012040fi
12041
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12043$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012044if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012046$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012047
12048fi
12049
Guido van Rossumda88dad1995-01-26 00:46:29 +000012050was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12052$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012054/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012055
12056#include <sys/types.h>
12057#include <sys/select.h>
12058#include <sys/time.h>
12059
Martin v. Löwis11437992002-04-12 09:54:03 +000012060int
12061main ()
12062{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012063;
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 ;
12065 return 0;
12066}
12067_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012069
12070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012072
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012073 was_it_defined=yes
12074
Martin v. Löwiseba40652007-08-30 20:10:57 +000012075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12078$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012079
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12081$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012082if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012086/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012087#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012088int
12089main ()
12090{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012091struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012092 ;
12093 return 0;
12094}
12095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012097 ac_cv_struct_addrinfo=yes
12098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012099 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12102fi
12103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12105$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012106if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012108$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012109
12110fi
12111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12113$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012114if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012115 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012118/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012119
12120# include <sys/types.h>
12121# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012122int
12123main ()
12124{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012125struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012126 ;
12127 return 0;
12128}
12129_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012131 ac_cv_struct_sockaddr_storage=yes
12132else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12136fi
12137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12139$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012140if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012141
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012142$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012143
12144fi
12145
Guido van Rossum627b2d71993-12-24 10:39:16 +000012146# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12149$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012150if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012155$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012156int
12157main ()
12158{
12159static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012160test_array [0] = 0;
12161return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
12163 ;
12164 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012165}
Martin v. Löwis11437992002-04-12 09:54:03 +000012166_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012167if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012168 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012170 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012173fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12175$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012176if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012178
12179fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12182$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012183if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012187/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188
Martin v. Löwis11437992002-04-12 09:54:03 +000012189int
12190main ()
12191{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012192
Martin v. Löwis11437992002-04-12 09:54:03 +000012193#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012194 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012196 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012198 char const *const *pcpcc;
12199 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 /* NEC SVR4.0.2 mips cc rejects this. */
12201 struct point {int x, y;};
12202 static struct point const zero = {0,0};
12203 /* AIX XL C 1.02.0.0 rejects this.
12204 It does not let you subtract one const X* pointer from another in
12205 an arm of an if-expression whose if-part is not a constant
12206 expression */
12207 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012208 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012210 ++pcpcc;
12211 ppc = (char**) pcpcc;
12212 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012213 { /* SCO 3.2v4 cc rejects this sort of thing. */
12214 char tx;
12215 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012217
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012219 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 }
12221 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12222 int x[] = {25, 17};
12223 const int *foo = &x[0];
12224 ++foo;
12225 }
12226 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12227 typedef const int *iptr;
12228 iptr p = 0;
12229 ++p;
12230 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012231 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012232 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012233 struct s { int j; const int *ap[3]; } bx;
12234 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 }
12236 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12237 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012239 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012240 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012241#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012242
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 ;
12244 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012245}
Martin v. Löwis11437992002-04-12 09:54:03 +000012246_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012247if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248 ac_cv_c_const=yes
12249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012253fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12255$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012258$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012259
12260fi
12261
Michael W. Hudson54241132001-12-07 15:38:26 +000012262
Guido van Rossumda88dad1995-01-26 00:46:29 +000012263works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12265$as_echo_n "checking for working volatile... " >&6; }
12266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012267/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012268
Martin v. Löwis11437992002-04-12 09:54:03 +000012269int
12270main ()
12271{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012272volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 ;
12274 return 0;
12275}
12276_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012277if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012278 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012279else
Skip Montanaro6dead952003-09-25 14:50:04 +000012280
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012281$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012282
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012283
Guido van Rossum627b2d71993-12-24 10:39:16 +000012284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12287$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012288
Guido van Rossumda88dad1995-01-26 00:46:29 +000012289works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12291$as_echo_n "checking for working signed char... " >&6; }
12292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012293/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012294
Martin v. Löwis11437992002-04-12 09:54:03 +000012295int
12296main ()
12297{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012298signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 ;
12300 return 0;
12301}
12302_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012304 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012305else
Skip Montanaro6dead952003-09-25 14:50:04 +000012306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012308
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012309
Guido van Rossum7f43da71994-08-01 12:15:30 +000012310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12313$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012314
Guido van Rossumda88dad1995-01-26 00:46:29 +000012315have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12317$as_echo_n "checking for prototypes... " >&6; }
12318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012320int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012321int
12322main ()
12323{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012324return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012331$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Matthias Klosec511b472010-05-08 11:01:39 +000012333 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12337$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338
Guido van Rossumda88dad1995-01-26 00:46:29 +000012339works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12341$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012344
12345#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012346int foo(int x, ...) {
12347 va_list va;
12348 va_start(va, x);
12349 va_arg(va, int);
12350 va_arg(va, char *);
12351 va_arg(va, double);
12352 return 0;
12353}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012354
Martin v. Löwis11437992002-04-12 09:54:03 +000012355int
12356main ()
12357{
Guido van Rossum90eea071996-08-30 20:58:57 +000012358return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 ;
12360 return 0;
12361}
12362_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
12365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012366$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012367
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012368 works=yes
12369
Guido van Rossum627b2d71993-12-24 10:39:16 +000012370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12373$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012374
Martin v. Löwisd6320502004-08-12 13:45:08 +000012375# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12377$as_echo_n "checking for socketpair... " >&6; }
12378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012379/* end confdefs.h. */
12380
12381#include <sys/types.h>
12382#include <sys/socket.h>
12383
12384int
12385main ()
12386{
12387void *x=socketpair
12388 ;
12389 return 0;
12390}
12391_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012393
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012394$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012395
Matthias Klosec511b472010-05-08 11:01:39 +000012396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012397$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12400$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012401
12402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012404
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012405# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12407$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012409/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012410#include <sys/types.h>
12411#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012412int
12413main ()
12414{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012415struct sockaddr x;
12416x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 ;
12418 return 0;
12419}
12420_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012421if ac_fn_c_try_compile "$LINENO"; then :
12422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12423$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012424
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012425$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012426
12427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12429$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012430
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012433
Guido van Rossumda88dad1995-01-26 00:46:29 +000012434va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12436$as_echo_n "checking whether va_list is an array... " >&6; }
12437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012438/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012439
12440#ifdef HAVE_STDARG_PROTOTYPES
12441#include <stdarg.h>
12442#else
12443#include <varargs.h>
12444#endif
12445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446int
12447main ()
12448{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 ;
12451 return 0;
12452}
12453_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454if ac_fn_c_try_compile "$LINENO"; then :
12455
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012456else
Skip Montanaro6dead952003-09-25 14:50:04 +000012457
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012459$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Guido van Rossumda88dad1995-01-26 00:46:29 +000012461 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012462
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12466$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012468# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
12470
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012471ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012472if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012473
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012474 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12477$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012478 OLD_CFLAGS=$CFLAGS
12479 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012481/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012482
12483# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Martin v. Löwis11437992002-04-12 09:54:03 +000012485int
12486main ()
12487{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012488
12489 char *name;
12490 struct hostent *he, *res;
12491 char buffer[2048];
12492 int buflen = 2048;
12493 int h_errnop;
12494
12495 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
12497 ;
12498 return 0;
12499}
12500_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012503 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012504
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012506$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12509$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012511else
Skip Montanaro6dead952003-09-25 14:50:04 +000012512
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12514$as_echo "no" >&6; }
12515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12516$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012518/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012520# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
Martin v. Löwis11437992002-04-12 09:54:03 +000012522int
12523main ()
12524{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012525
12526 char *name;
12527 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012528 char buffer[2048];
12529 int buflen = 2048;
12530 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012531
Matthias Klosec511b472010-05-08 11:01:39 +000012532 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
12534 ;
12535 return 0;
12536}
12537_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012541
Martin v. Löwis11437992002-04-12 09:54:03 +000012542
Matthias Klosec511b472010-05-08 11:01:39 +000012543$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12546$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012548else
Skip Montanaro6dead952003-09-25 14:50:04 +000012549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12551$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12553$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12555/* end confdefs.h. */
12556
12557# include <netdb.h>
12558
12559int
12560main ()
12561{
12562
12563 char *name;
12564 struct hostent *he;
12565 struct hostent_data data;
12566
12567 (void) gethostbyname_r(name, he, &data);
12568
12569 ;
12570 return 0;
12571}
12572_ACEOF
12573if ac_fn_c_try_compile "$LINENO"; then :
12574
12575 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12576
12577
12578$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12579
12580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12581$as_echo "yes" >&6; }
12582
12583else
12584
12585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12586$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012587
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012590
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012596 CFLAGS=$OLD_CFLAGS
12597
12598else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012600 for ac_func in gethostbyname
12601do :
12602 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012603if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012605#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012606_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012608fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012609done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012610
Michael W. Hudson54241132001-12-07 15:38:26 +000012611
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012612fi
12613
Michael W. Hudson54241132001-12-07 15:38:26 +000012614
12615
12616
12617
12618
12619
Guido van Rossum627b2d71993-12-24 10:39:16 +000012620# checks for system services
12621# (none yet)
12622
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012624ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012625if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012626
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12629$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012630if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012632else
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012634LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Martin v. Löwiseba40652007-08-30 20:10:57 +000012638/* Override any GCC internal prototype to avoid an error.
12639 Use char because int might match the return type of a GCC
12640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012641#ifdef __cplusplus
12642extern "C"
12643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012644char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012645int
12646main ()
12647{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012648return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 ;
12650 return 0;
12651}
12652_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012656 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658rm -f core conftest.err conftest.$ac_objext \
12659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012660LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12663$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012664if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 cat >>confdefs.h <<_ACEOF
12666#define HAVE_LIBIEEE 1
12667_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012668
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012669 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012670
Guido van Rossum627b2d71993-12-24 10:39:16 +000012671fi
12672
Michael W. Hudson54241132001-12-07 15:38:26 +000012673
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012674fi
12675
Michael W. Hudson54241132001-12-07 15:38:26 +000012676
Guido van Rossum7f253911997-05-09 02:42:48 +000012677# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12679$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Martin v. Löwiseba40652007-08-30 20:10:57 +000012681# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012682if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012683 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012684if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012685then
12686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012687$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012688
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12690$as_echo "yes" >&6; }
12691else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12692$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012693fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12696$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012697fi
12698
Guido van Rossum7f253911997-05-09 02:42:48 +000012699
Guido van Rossum7f43da71994-08-01 12:15:30 +000012700# check for --with-libm=...
12701
Guido van Rossum563e7081996-09-10 18:20:48 +000012702case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012703Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012704BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012705*) LIBM=-lm
12706esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12708$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
Martin v. Löwiseba40652007-08-30 20:10:57 +000012710# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012711if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012712 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012713if test "$withval" = no
12714then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12716$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012717elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012718then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12720$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012721else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012722fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12725$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012726fi
12727
Guido van Rossum7f43da71994-08-01 12:15:30 +000012728
12729# check for --with-libc=...
12730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12732$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012733
Martin v. Löwiseba40652007-08-30 20:10:57 +000012734# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012735if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012737if test "$withval" = no
12738then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12740$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012741elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012742then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12744$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012745else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012746fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12749$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012750fi
12751
Guido van Rossum7f43da71994-08-01 12:15:30 +000012752
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012753# **************************************************
12754# * Check for various properties of floating point *
12755# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12758$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012759if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012760 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012761else
12762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012763if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012764 ac_cv_little_endian_double=no
12765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012767/* end confdefs.h. */
12768
12769#include <string.h>
12770int main() {
12771 double x = 9006104071832581.0;
12772 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12773 return 0;
12774 else
12775 return 1;
12776}
12777
12778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012780 ac_cv_little_endian_double=yes
12781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012782 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012786fi
12787
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012788fi
12789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12791$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012792if test "$ac_cv_little_endian_double" = yes
12793then
12794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012796
12797fi
12798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12800$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012801if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012802 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012803else
12804
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012805if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012806 ac_cv_big_endian_double=no
12807else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012809/* end confdefs.h. */
12810
12811#include <string.h>
12812int main() {
12813 double x = 9006104071832581.0;
12814 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12815 return 0;
12816 else
12817 return 1;
12818}
12819
12820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012822 ac_cv_big_endian_double=yes
12823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012828fi
12829
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012830fi
12831
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12833$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012834if test "$ac_cv_big_endian_double" = yes
12835then
12836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012837$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012838
12839fi
12840
12841# Some ARM platforms use a mixed-endian representation for doubles.
12842# While Python doesn't currently have full support for these platforms
12843# (see e.g., issue 1762561), we can at least make sure that float <-> string
12844# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12846$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012847if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012849else
12850
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012851if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012852 ac_cv_mixed_endian_double=no
12853else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012855/* end confdefs.h. */
12856
12857#include <string.h>
12858int main() {
12859 double x = 9006104071832581.0;
12860 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12861 return 0;
12862 else
12863 return 1;
12864}
12865
12866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012867if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012868 ac_cv_mixed_endian_double=yes
12869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012870 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012874fi
12875
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012876fi
12877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12879$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012880if test "$ac_cv_mixed_endian_double" = yes
12881then
12882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012884
12885fi
12886
12887# The short float repr introduced in Python 3.1 requires the
12888# correctly-rounded string <-> double conversion functions from
12889# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12890# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012891# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012892# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012893
12894# This inline assembler syntax may also work for suncc and icc,
12895# so we try it on all platforms.
12896
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12898$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012900/* end confdefs.h. */
12901
12902int
12903main ()
12904{
12905
Mark Dickinsona548dee2009-11-15 13:12:43 +000012906 unsigned short cw;
12907 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12908 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012909
12910 ;
12911 return 0;
12912}
12913_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020012914if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012915 have_gcc_asm_for_x87=yes
12916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012917 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012918fi
Stefan Krah99e36b92015-07-03 15:30:54 +020012919rm -f core conftest.err conftest.$ac_objext \
12920 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12922$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012923if test "$have_gcc_asm_for_x87" = yes
12924then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012926$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012927
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012928fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012929
Mark Dickinson04b27232009-01-04 12:29:36 +000012930# Detect whether system arithmetic is subject to x87-style double
12931# rounding issues. The result of this test has little meaning on non
12932# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12933# mode is round-to-nearest and double rounding issues are present, and
12934# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12936$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012937# $BASECFLAGS may affect the result
12938ac_save_cc="$CC"
12939CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012941 ac_cv_x87_double_rounding=no
12942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012944/* end confdefs.h. */
12945
12946#include <stdlib.h>
12947#include <math.h>
12948int main() {
12949 volatile double x, y, z;
12950 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12951 x = 0.99999999999999989; /* 1-2**-53 */
12952 y = 1./x;
12953 if (y != 1.)
12954 exit(0);
12955 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12956 x = 1e16;
12957 y = 2.99999;
12958 z = x + y;
12959 if (z != 1e16+4.)
12960 exit(0);
12961 /* both tests show evidence of double rounding */
12962 exit(1);
12963}
12964
12965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012966if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012967 ac_cv_x87_double_rounding=no
12968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012973fi
12974
Mark Dickinson99abd142009-10-24 13:44:16 +000012975CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12977$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012978if test "$ac_cv_x87_double_rounding" = yes
12979then
12980
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012981$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012982
12983fi
12984
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012985# ************************************
12986# * Check for mathematical functions *
12987# ************************************
12988
12989LIBS_SAVE=$LIBS
12990LIBS="$LIBS $LIBM"
12991
Mark Dickinson265d7382008-04-21 22:32:24 +000012992# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12993# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12995$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012996if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012998else
12999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013000if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013001 ac_cv_tanh_preserves_zero_sign=no
13002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013004/* end confdefs.h. */
13005
13006#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013007#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013008int main() {
13009 /* return 0 if either negative zeros don't exist
13010 on this platform or if negative zeros exist
13011 and tanh(-0.) == -0. */
13012 if (atan2(0., -1.) == atan2(-0., -1.) ||
13013 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13014 else exit(1);
13015}
13016
13017_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013019 ac_cv_tanh_preserves_zero_sign=yes
13020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13024 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013025fi
13026
Mark Dickinson265d7382008-04-21 22:32:24 +000013027fi
13028
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13030$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013031if test "$ac_cv_tanh_preserves_zero_sign" = yes
13032then
13033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013034$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013035
13036fi
13037
Mark Dickinson65898e02009-09-05 10:27:00 +000013038for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013039do :
13040 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13041ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013042if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013043 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013044#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013045_ACEOF
13046
13047fi
13048done
13049
Mark Dickinson65898e02009-09-05 10:27:00 +000013050for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051do :
13052 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13053ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013054if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013055 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013056#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013057_ACEOF
13058
13059fi
13060done
13061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013062ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13063"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013064if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013065 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013067 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013068fi
13069
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013070cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013071#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013072_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013073ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13074"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013075if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013076 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013079fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013080
13081cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013082#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013084ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13085"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013086if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013087 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013090fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013091
13092cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013094_ACEOF
13095
13096
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013097LIBS=$LIBS_SAVE
13098
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013099# For multiprocessing module, check that sem_open
13100# actually works. For FreeBSD versions <= 7.2,
13101# the kernel module that provides POSIX semaphores
13102# isn't loaded by default, so an attempt to call
13103# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13105$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013106if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013107 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013110 ac_cv_posix_semaphores_enabled=yes
13111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013113/* end confdefs.h. */
13114
13115#include <unistd.h>
13116#include <fcntl.h>
13117#include <stdio.h>
13118#include <semaphore.h>
13119#include <sys/stat.h>
13120
13121int main(void) {
13122 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13123 if (a == SEM_FAILED) {
13124 perror("sem_open");
13125 return 1;
13126 }
13127 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013128 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013129 return 0;
13130}
13131
13132_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013134 ac_cv_posix_semaphores_enabled=yes
13135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013140fi
13141
13142
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013143fi
13144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13146$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013147if test $ac_cv_posix_semaphores_enabled = no
13148then
13149
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013150$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013151
13152fi
13153
13154# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13156$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013157if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013158 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013161 ac_cv_broken_sem_getvalue=yes
13162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013164/* end confdefs.h. */
13165
13166#include <unistd.h>
13167#include <fcntl.h>
13168#include <stdio.h>
13169#include <semaphore.h>
13170#include <sys/stat.h>
13171
13172int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013173 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013174 int count;
13175 int res;
13176 if(a==SEM_FAILED){
13177 perror("sem_open");
13178 return 1;
13179
13180 }
13181 res = sem_getvalue(a, &count);
13182 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013183 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013184 return res==-1 ? 1 : 0;
13185}
13186
13187_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013189 ac_cv_broken_sem_getvalue=no
13190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013191 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13194 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013195fi
13196
13197
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013198fi
13199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13201$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013202if test $ac_cv_broken_sem_getvalue = yes
13203then
13204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013205$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013206
13207fi
13208
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013209# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13211$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013212# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013213if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013214 enableval=$enable_big_digits; case $enable_big_digits in
13215yes)
13216 enable_big_digits=30 ;;
13217no)
13218 enable_big_digits=15 ;;
1321915|30)
13220 ;;
13221*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013222 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 +000013223esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13225$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013226
13227cat >>confdefs.h <<_ACEOF
13228#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13229_ACEOF
13230
13231
13232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13234$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013235fi
13236
13237
Guido van Rossumef2255b2000-03-10 22:30:29 +000013238# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013240if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013241
13242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013243$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013245 wchar_h="yes"
13246
Guido van Rossumef2255b2000-03-10 22:30:29 +000013247else
Martin v. Löwis11437992002-04-12 09:54:03 +000013248 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013249
13250fi
13251
Michael W. Hudson54241132001-12-07 15:38:26 +000013252
Martin v. Löwis11437992002-04-12 09:54:03 +000013253
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013254# determine wchar_t size
13255if test "$wchar_h" = yes
13256then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013258# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13259# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13260# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13262$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013263if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013264 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013265else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013266 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13267"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013268
Martin v. Löwis11437992002-04-12 09:54:03 +000013269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270 if test "$ac_cv_type_wchar_t" = yes; then
13271 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013273as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013274See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013275 else
13276 ac_cv_sizeof_wchar_t=0
13277 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013278fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013279
Martin v. Löwis11437992002-04-12 09:54:03 +000013280fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13282$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013283
13284
13285
Martin v. Löwis11437992002-04-12 09:54:03 +000013286cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013287#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013288_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013289
Michael W. Hudson54241132001-12-07 15:38:26 +000013290
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013291fi
13292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13294$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013295have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013297/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013298
13299#include <tcl.h>
13300#if TCL_UTF_MAX != 6
13301# error "NOT UCS4_TCL"
13302#endif
13303int
13304main ()
13305{
13306
13307 ;
13308 return 0;
13309}
13310_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013312
13313
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013314$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013315
13316 have_ucs4_tcl=yes
13317
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13321$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013322
Skip Montanaro6dead952003-09-25 14:50:04 +000013323# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013324if test "$wchar_h" = yes
13325then
13326 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13328$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013329 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013330 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013331else
13332
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013333 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013334 ac_cv_wchar_t_signed=yes
13335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013337/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013338
13339 #include <wchar.h>
13340 int main()
13341 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013342 /* Success: exit code 0 */
13343 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013344 }
13345
13346_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013347if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013348 ac_cv_wchar_t_signed=yes
13349else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013350 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013351fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13353 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013354fi
13355
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013356fi
13357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13359$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013360fi
13361
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13363$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013364# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013365if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013366 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013367else
13368 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013369fi
13370
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013371
13372if test $enable_unicode = yes
13373then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013374 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013375 case "$have_ucs4_tcl" in
13376 yes) enable_unicode="ucs4"
13377 ;;
13378 *) enable_unicode="ucs2"
13379 ;;
13380 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013381fi
13382
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013383
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013384case "$enable_unicode" in
13385ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013386 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013387
13388 ;;
13389ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013391
13392 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013393no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013394*) 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 +000013395esac
13396
Michael W. Hudson54241132001-12-07 15:38:26 +000013397
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
13399
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013400if test "$enable_unicode" = "no"
13401then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013402 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13404$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013405else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013406 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013409
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013410
13411 # wchar_t is only usable if it maps to an unsigned type
13412 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013413 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013414 then
13415 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013420
13421 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13422 then
13423 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013424 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013425
13426 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13427 then
13428 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013430
13431 else
13432 PY_UNICODE_TYPE="no type found"
13433 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13435$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013436fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013437
13438# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13440$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013441if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013442 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013443else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013444 ac_cv_c_bigendian=unknown
13445 # See if we're dealing with a universal compiler.
13446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13447/* end confdefs.h. */
13448#ifndef __APPLE_CC__
13449 not a universal capable compiler
13450 #endif
13451 typedef int dummy;
13452
Skip Montanaro6dead952003-09-25 14:50:04 +000013453_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013454if ac_fn_c_try_compile "$LINENO"; then :
13455
13456 # Check for potential -arch flags. It is not universal unless
13457 # there are at least two -arch flags with different values.
13458 ac_arch=
13459 ac_prev=
13460 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13461 if test -n "$ac_prev"; then
13462 case $ac_word in
13463 i?86 | x86_64 | ppc | ppc64)
13464 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13465 ac_arch=$ac_word
13466 else
13467 ac_cv_c_bigendian=universal
13468 break
13469 fi
13470 ;;
13471 esac
13472 ac_prev=
13473 elif test "x$ac_word" = "x-arch"; then
13474 ac_prev=arch
13475 fi
13476 done
13477fi
13478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13479 if test $ac_cv_c_bigendian = unknown; then
13480 # See if sys/param.h defines the BYTE_ORDER macro.
13481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013482/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013483#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013484 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013485
Martin v. Löwis11437992002-04-12 09:54:03 +000013486int
13487main ()
13488{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013489#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13490 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13491 && LITTLE_ENDIAN)
13492 bogus endian macros
13493 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
13495 ;
13496 return 0;
13497}
13498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013500 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013502/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013503#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013504 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013505
Martin v. Löwis11437992002-04-12 09:54:03 +000013506int
13507main ()
13508{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013509#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013510 not big endian
13511 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013512
13513 ;
13514 return 0;
13515}
13516_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013517if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013518 ac_cv_c_bigendian=yes
13519else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013520 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013523fi
13524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13525 fi
13526 if test $ac_cv_c_bigendian = unknown; then
13527 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013529/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530#include <limits.h>
13531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532int
13533main ()
13534{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013535#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13536 bogus endian macros
13537 #endif
13538
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 ;
13540 return 0;
13541}
13542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013543if ac_fn_c_try_compile "$LINENO"; then :
13544 # It does; now see whether it defined to _BIG_ENDIAN or not.
13545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13546/* end confdefs.h. */
13547#include <limits.h>
13548
13549int
13550main ()
13551{
13552#ifndef _BIG_ENDIAN
13553 not big endian
13554 #endif
13555
13556 ;
13557 return 0;
13558}
13559_ACEOF
13560if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013563 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013564fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13566fi
13567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13568 fi
13569 if test $ac_cv_c_bigendian = unknown; then
13570 # Compile a test program.
13571 if test "$cross_compiling" = yes; then :
13572 # Try to guess by grepping values from an object file.
13573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13574/* end confdefs.h. */
13575short int ascii_mm[] =
13576 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13577 short int ascii_ii[] =
13578 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13579 int use_ascii (int i) {
13580 return ascii_mm[i] + ascii_ii[i];
13581 }
13582 short int ebcdic_ii[] =
13583 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13584 short int ebcdic_mm[] =
13585 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13586 int use_ebcdic (int i) {
13587 return ebcdic_mm[i] + ebcdic_ii[i];
13588 }
13589 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013591int
13592main ()
13593{
13594return use_ascii (foo) == use_ebcdic (foo);
13595 ;
13596 return 0;
13597}
13598_ACEOF
13599if ac_fn_c_try_compile "$LINENO"; then :
13600 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13601 ac_cv_c_bigendian=yes
13602 fi
13603 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13604 if test "$ac_cv_c_bigendian" = unknown; then
13605 ac_cv_c_bigendian=no
13606 else
13607 # finding both strings is unlikely to happen, but who knows?
13608 ac_cv_c_bigendian=unknown
13609 fi
13610 fi
13611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013613else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013615/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013616$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013617int
13618main ()
13619{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013620
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013621 /* Are we little or big endian? From Harbison&Steele. */
13622 union
13623 {
13624 long int l;
13625 char c[sizeof (long int)];
13626 } u;
13627 u.l = 1;
13628 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013629
13630 ;
13631 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013632}
Martin v. Löwis11437992002-04-12 09:54:03 +000013633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013635 ac_cv_c_bigendian=no
13636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013638fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13640 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013642
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013643 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013644fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13646$as_echo "$ac_cv_c_bigendian" >&6; }
13647 case $ac_cv_c_bigendian in #(
13648 yes)
13649 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13650;; #(
13651 no)
13652 ;; #(
13653 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013654
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013655$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013657 ;; #(
13658 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013659 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013660 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013662
Michael W. Hudson54241132001-12-07 15:38:26 +000013663
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013664# Check whether right shifting a negative integer extends the sign bit
13665# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13667$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013668if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013670else
Martin v. Löwis11437992002-04-12 09:54:03 +000013671
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013672if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013673 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013674else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013676/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013677
13678int main()
13679{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013680 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013681}
13682
Martin v. Löwis11437992002-04-12 09:54:03 +000013683_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013684if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013685 ac_cv_rshift_extends_sign=yes
13686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013687 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013688fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013691fi
13692
Martin v. Löwiseba40652007-08-30 20:10:57 +000013693fi
13694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13696$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013697if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013698then
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013700$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013701
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013702fi
13703
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013704# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13706$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013707if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013709else
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013712/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013713#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013714int
13715main ()
13716{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013717
13718 FILE *f = fopen("/dev/null", "r");
13719 flockfile(f);
13720 getc_unlocked(f);
13721 funlockfile(f);
13722
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 ;
13724 return 0;
13725}
13726_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013728 ac_cv_have_getc_unlocked=yes
13729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013730 ac_cv_have_getc_unlocked=no
13731fi
13732rm -f core conftest.err conftest.$ac_objext \
13733 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13737$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013738if test "$ac_cv_have_getc_unlocked" = yes
13739then
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013741$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013742
13743fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013744
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013745# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013746# save the value of LIBS so we don't actually link Python with readline
13747LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013748
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013749# On some systems we need to link readline to a termcap compatible
13750# library. NOTE: Keep the precedence of listed libraries synchronised
13751# with setup.py.
13752py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13754$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013755for py_libtermcap in "" ncursesw ncurses curses termcap; do
13756 if test -z "$py_libtermcap"; then
13757 READLINE_LIBS="-lreadline"
13758 else
13759 READLINE_LIBS="-lreadline -l$py_libtermcap"
13760 fi
13761 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013763/* end confdefs.h. */
13764
Martin v. Löwiseba40652007-08-30 20:10:57 +000013765/* Override any GCC internal prototype to avoid an error.
13766 Use char because int might match the return type of a GCC
13767 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013768#ifdef __cplusplus
13769extern "C"
13770#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013771char readline ();
13772int
13773main ()
13774{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013775return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013776 ;
13777 return 0;
13778}
13779_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013780if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013781 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013783rm -f core conftest.err conftest.$ac_objext \
13784 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013785 if test $py_cv_lib_readline = yes; then
13786 break
13787 fi
13788done
13789# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13790#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013791if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13793$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13796$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013798$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013799
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013800fi
13801
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013802# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13804$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013805if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013806 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013807else
13808 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013809LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013811/* end confdefs.h. */
13812
Martin v. Löwiseba40652007-08-30 20:10:57 +000013813/* Override any GCC internal prototype to avoid an error.
13814 Use char because int might match the return type of a GCC
13815 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013816#ifdef __cplusplus
13817extern "C"
13818#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013819char rl_callback_handler_install ();
13820int
13821main ()
13822{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013823return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013824 ;
13825 return 0;
13826}
13827_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013828if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013829 ac_cv_lib_readline_rl_callback_handler_install=yes
13830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013831 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013832fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013833rm -f core conftest.err conftest.$ac_objext \
13834 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013835LIBS=$ac_check_lib_save_LIBS
13836fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13838$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013839if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013841$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013842
13843fi
13844
13845
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013846# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013848/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013849#include <readline/readline.h>
13850_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013851if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013852 have_readline=yes
13853else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013854 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013855
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013856fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013857rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013858if test $have_readline = yes
13859then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013861/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013862#include <readline/readline.h>
13863
13864_ACEOF
13865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013866 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013867
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013868$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013869
13870fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013871rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013874/* end confdefs.h. */
13875#include <readline/readline.h>
13876
13877_ACEOF
13878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013880
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013881$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013882
13883fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013884rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013885
13886fi
13887
Martin v. Löwis0daad592001-09-30 21:09:59 +000013888# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13890$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013891if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013892 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013893else
Martin v. Löwis11437992002-04-12 09:54:03 +000013894 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013895LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899/* Override any GCC internal prototype to avoid an error.
13900 Use char because int might match the return type of a GCC
13901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013902#ifdef __cplusplus
13903extern "C"
13904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013905char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013906int
13907main ()
13908{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 ;
13911 return 0;
13912}
13913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013917 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013919rm -f core conftest.err conftest.$ac_objext \
13920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013921LIBS=$ac_check_lib_save_LIBS
13922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13924$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013925if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013926
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013927$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013928
Martin v. Löwis0daad592001-09-30 21:09:59 +000013929fi
13930
Michael W. Hudson54241132001-12-07 15:38:26 +000013931
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013932# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13934$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013935if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013937else
13938 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013939LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013941/* end confdefs.h. */
13942
13943/* Override any GCC internal prototype to avoid an error.
13944 Use char because int might match the return type of a GCC
13945 builtin and then its argument prototype would still apply. */
13946#ifdef __cplusplus
13947extern "C"
13948#endif
13949char rl_completion_display_matches_hook ();
13950int
13951main ()
13952{
13953return rl_completion_display_matches_hook ();
13954 ;
13955 return 0;
13956}
13957_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013958if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013959 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013961 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013963rm -f core conftest.err conftest.$ac_objext \
13964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013965LIBS=$ac_check_lib_save_LIBS
13966fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13968$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013969if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013971$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013972
13973fi
13974
13975
Martin Pantera70c3232016-04-03 02:54:58 +000013976# also in 4.0, but not in editline
13977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
13978$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
13979if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
13980 $as_echo_n "(cached) " >&6
13981else
13982 ac_check_lib_save_LIBS=$LIBS
13983LIBS="-lreadline $READLINE_LIBS $LIBS"
13984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13985/* end confdefs.h. */
13986
13987/* Override any GCC internal prototype to avoid an error.
13988 Use char because int might match the return type of a GCC
13989 builtin and then its argument prototype would still apply. */
13990#ifdef __cplusplus
13991extern "C"
13992#endif
13993char rl_resize_terminal ();
13994int
13995main ()
13996{
13997return rl_resize_terminal ();
13998 ;
13999 return 0;
14000}
14001_ACEOF
14002if ac_fn_c_try_link "$LINENO"; then :
14003 ac_cv_lib_readline_rl_resize_terminal=yes
14004else
14005 ac_cv_lib_readline_rl_resize_terminal=no
14006fi
14007rm -f core conftest.err conftest.$ac_objext \
14008 conftest$ac_exeext conftest.$ac_ext
14009LIBS=$ac_check_lib_save_LIBS
14010fi
14011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14012$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14013if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14014
14015$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14016
14017fi
14018
14019
Martin v. Löwis0daad592001-09-30 21:09:59 +000014020# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14022$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014023if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014024 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014025else
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014027LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014030
Martin v. Löwiseba40652007-08-30 20:10:57 +000014031/* Override any GCC internal prototype to avoid an error.
14032 Use char because int might match the return type of a GCC
14033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014034#ifdef __cplusplus
14035extern "C"
14036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014037char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014038int
14039main ()
14040{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014041return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 ;
14043 return 0;
14044}
14045_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014047 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014049 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014050fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014051rm -f core conftest.err conftest.$ac_objext \
14052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014053LIBS=$ac_check_lib_save_LIBS
14054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14056$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014057if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014059$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014060
Guido van Rossum353ae582001-07-10 16:45:32 +000014061fi
14062
Jack Jansendd19cf82001-12-06 22:36:17 +000014063
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014064# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014066/* end confdefs.h. */
14067#include <readline/readline.h>
14068_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014069if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014070 have_readline=yes
14071else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014072 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014073
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014074fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014075rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014076if test $have_readline = yes
14077then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014079/* end confdefs.h. */
14080#include <readline/readline.h>
14081
14082_ACEOF
14083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014084 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014086$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014087
14088fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014089rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014090
14091fi
14092
Martin v. Löwis82bca632006-02-10 20:49:30 +000014093# End of readline checks: restore LIBS
14094LIBS=$LIBS_no_readline
14095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14097$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014098if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014100else
Martin v. Löwis11437992002-04-12 09:54:03 +000014101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014102if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014103 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014104else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014106/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014107
14108int main()
14109{
14110 int val1 = nice(1);
14111 if (val1 != -1 && val1 == nice(2))
14112 exit(0);
14113 exit(1);
14114}
14115
Martin v. Löwis11437992002-04-12 09:54:03 +000014116_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014117if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014118 ac_cv_broken_nice=yes
14119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014120 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014121fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14123 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014124fi
14125
Martin v. Löwiseba40652007-08-30 20:10:57 +000014126fi
14127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14129$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014130if test "$ac_cv_broken_nice" = yes
14131then
Martin v. Löwis11437992002-04-12 09:54:03 +000014132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014133$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014134
14135fi
14136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14138$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014139if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014140 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014142 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014143 ac_cv_broken_poll=no
14144else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014146/* end confdefs.h. */
14147
14148#include <poll.h>
14149
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014150int main()
14151{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014152 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014153 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014154
14155 close (42);
14156
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014157 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014158 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014159 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014160 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014161 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014162 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014163 return 1;
14164}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014165
14166_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014167if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014168 ac_cv_broken_poll=yes
14169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014170 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14173 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014175
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014176fi
14177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14179$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014180if test "$ac_cv_broken_poll" = yes
14181then
14182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014183$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014184
14185fi
14186
Brett Cannon43802422005-02-10 20:48:03 +000014187# 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 +000014188# (which is not required by ISO C or UNIX spec) and/or if we support
14189# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014190ac_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 +000014191#include <$ac_cv_struct_tm>
14192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014194if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014195
14196cat >>confdefs.h <<_ACEOF
14197#define HAVE_STRUCT_TM_TM_ZONE 1
14198_ACEOF
14199
14200
14201fi
14202
14203if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014205$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014206
14207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014208 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14209"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014210if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014211 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014213 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214fi
14215
Martin v. Löwiseba40652007-08-30 20:10:57 +000014216cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014218_ACEOF
14219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14221$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014222if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014226/* end confdefs.h. */
14227#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014228#if !HAVE_DECL_TZNAME
14229extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014230#endif
14231
14232int
14233main ()
14234{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014235return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014236 ;
14237 return 0;
14238}
14239_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014240if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014241 ac_cv_var_tzname=yes
14242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014243 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014245rm -f core conftest.err conftest.$ac_objext \
14246 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014247fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14249$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014250 if test $ac_cv_var_tzname = yes; then
14251
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014252$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014253
14254 fi
14255fi
14256
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014257
Martin v. Löwis1d459062005-03-14 21:23:33 +000014258# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14260$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014261if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014262 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014263else
14264
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014265if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014266 ac_cv_working_tzset=no
14267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014269/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014270
14271#include <stdlib.h>
14272#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014273#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014274
14275#if HAVE_TZNAME
14276extern char *tzname[];
14277#endif
14278
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014279int main()
14280{
Brett Cannon18367812003-09-19 00:59:16 +000014281 /* Note that we need to ensure that not only does tzset(3)
14282 do 'something' with localtime, but it works as documented
14283 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014284 This includes making sure that tzname is set properly if
14285 tm->tm_zone does not exist since it is the alternative way
14286 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014287
14288 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014289 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014290 */
14291
Martin v. Löwis1d459062005-03-14 21:23:33 +000014292 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014293 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14294
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014295 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014296 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014297 if (localtime(&groundhogday)->tm_hour != 0)
14298 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014299#if HAVE_TZNAME
14300 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14301 if (strcmp(tzname[0], "UTC") ||
14302 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14303 exit(1);
14304#endif
Brett Cannon18367812003-09-19 00:59:16 +000014305
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014306 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014307 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014308 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014309 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014310#if HAVE_TZNAME
14311 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14312 exit(1);
14313#endif
Brett Cannon18367812003-09-19 00:59:16 +000014314
14315 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14316 tzset();
14317 if (localtime(&groundhogday)->tm_hour != 11)
14318 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014319#if HAVE_TZNAME
14320 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14321 exit(1);
14322#endif
14323
14324#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014325 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14326 exit(1);
14327 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14328 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014329#endif
Brett Cannon18367812003-09-19 00:59:16 +000014330
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014331 exit(0);
14332}
14333
14334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014335if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014336 ac_cv_working_tzset=yes
14337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014338 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014339fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014342fi
14343
Martin v. Löwiseba40652007-08-30 20:10:57 +000014344fi
14345
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14347$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014348if test "$ac_cv_working_tzset" = yes
14349then
14350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014351$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014352
14353fi
14354
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014355# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14357$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014358if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014360else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014362/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014363#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014364int
14365main ()
14366{
14367
14368struct stat st;
14369st.st_mtim.tv_nsec = 1;
14370
14371 ;
14372 return 0;
14373}
14374_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014376 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014377else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14381fi
14382
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14384$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014385if test "$ac_cv_stat_tv_nsec" = yes
14386then
14387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014388$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014389
14390fi
14391
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014392# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14394$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014395if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014399/* end confdefs.h. */
14400#include <sys/stat.h>
14401int
14402main ()
14403{
14404
14405struct stat st;
14406st.st_mtimespec.tv_nsec = 1;
14407
14408 ;
14409 return 0;
14410}
14411_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014413 ac_cv_stat_tv_nsec2=yes
14414else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014415 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14418fi
14419
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14421$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014422if test "$ac_cv_stat_tv_nsec2" = yes
14423then
14424
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014425$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014426
14427fi
14428
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014429# first curses configure check
14430ac_save_cppflags="$CPPFLAGS"
14431CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14432
14433for ac_header in curses.h ncurses.h
14434do :
14435 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14436ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14437if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14438 cat >>confdefs.h <<_ACEOF
14439#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14440_ACEOF
14441
14442fi
14443
14444done
14445
14446
14447# On Solaris, term.h requires curses.h
14448for ac_header in term.h
14449do :
14450 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14451#ifdef HAVE_CURSES_H
14452#include <curses.h>
14453#endif
14454
14455"
14456if test "x$ac_cv_header_term_h" = xyes; then :
14457 cat >>confdefs.h <<_ACEOF
14458#define HAVE_TERM_H 1
14459_ACEOF
14460
14461fi
14462
14463done
14464
14465
Jack Jansen666b1e72001-10-31 12:11:48 +000014466# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14468$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014469if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014470 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014473/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014474#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014475int
14476main ()
14477{
Jack Jansen666b1e72001-10-31 12:11:48 +000014478
14479 int rtn;
14480 rtn = mvwdelch(0,0,0);
14481
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 ;
14483 return 0;
14484}
14485_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014486if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014487 ac_cv_mvwdelch_is_expression=yes
14488else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014489 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14492fi
14493
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14495$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014496
14497if test "$ac_cv_mvwdelch_is_expression" = yes
14498then
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014500$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014501
14502fi
14503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14505$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014506if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014507 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014510/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014511#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014512int
14513main ()
14514{
Jack Jansen666b1e72001-10-31 12:11:48 +000014515
14516 WINDOW *w;
14517 w->_flags = 0;
14518
Martin v. Löwis11437992002-04-12 09:54:03 +000014519 ;
14520 return 0;
14521}
14522_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014523if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014524 ac_cv_window_has_flags=yes
14525else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14529fi
14530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14532$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014533
Jack Jansen666b1e72001-10-31 12:11:48 +000014534
14535if test "$ac_cv_window_has_flags" = yes
14536then
Martin v. Löwis11437992002-04-12 09:54:03 +000014537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014538$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014539
14540fi
14541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14543$as_echo_n "checking for is_term_resized... " >&6; }
14544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014545/* end confdefs.h. */
14546#include <curses.h>
14547int
14548main ()
14549{
14550void *x=is_term_resized
14551 ;
14552 return 0;
14553}
14554_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014555if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014556
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014557$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014558
Matthias Klosec511b472010-05-08 11:01:39 +000014559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014560$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014561else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14563$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014564
14565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14569$as_echo_n "checking for resize_term... " >&6; }
14570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014571/* end confdefs.h. */
14572#include <curses.h>
14573int
14574main ()
14575{
14576void *x=resize_term
14577 ;
14578 return 0;
14579}
14580_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014581if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014583$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014584
Matthias Klosec511b472010-05-08 11:01:39 +000014585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014586$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014587else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14589$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014590
14591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14593
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14595$as_echo_n "checking for resizeterm... " >&6; }
14596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014597/* end confdefs.h. */
14598#include <curses.h>
14599int
14600main ()
14601{
14602void *x=resizeterm
14603 ;
14604 return 0;
14605}
14606_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014607if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014609$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014610
Matthias Klosec511b472010-05-08 11:01:39 +000014611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014612$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014613else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14615$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014616
14617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014619# last curses configure check
14620CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014621
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14623$as_echo "$as_me: checking for device files" >&6;}
14624
14625if test "x$cross_compiling" = xyes; then
14626 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14628$as_echo_n "checking for /dev/ptmx... " >&6; }
14629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14630$as_echo "not set" >&6; }
14631 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14632 fi
14633 if test "${ac_cv_file__dev_ptc+set}" != set; then
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14635$as_echo_n "checking for /dev/ptc... " >&6; }
14636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14637$as_echo "not set" >&6; }
14638 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14639 fi
14640fi
14641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14643$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014644if ${ac_cv_file__dev_ptmx+:} false; then :
14645 $as_echo_n "(cached) " >&6
14646else
14647 test "$cross_compiling" = yes &&
14648 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14649if test -r "/dev/ptmx"; then
14650 ac_cv_file__dev_ptmx=yes
14651else
14652 ac_cv_file__dev_ptmx=no
14653fi
14654fi
14655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14656$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14657if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014658
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014659fi
14660
14661if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014662
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014663$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014664
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014665fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14667$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014668if ${ac_cv_file__dev_ptc+:} false; then :
14669 $as_echo_n "(cached) " >&6
14670else
14671 test "$cross_compiling" = yes &&
14672 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14673if test -r "/dev/ptc"; then
14674 ac_cv_file__dev_ptc=yes
14675else
14676 ac_cv_file__dev_ptc=no
14677fi
14678fi
14679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14680$as_echo "$ac_cv_file__dev_ptc" >&6; }
14681if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014682
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014683fi
14684
14685if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014687$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014688
Neal Norwitz865400f2003-03-21 01:42:58 +000014689fi
14690
Mark Dickinson82864d12009-11-15 16:18:58 +000014691if test "$have_long_long" = yes
14692then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14694$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014695 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014696 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014698 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014699 ac_cv_have_long_long_format="cross -- assuming no"
14700 if test x$GCC = xyes; then
14701 save_CFLAGS=$CFLAGS
14702 CFLAGS="$CFLAGS -Werror -Wformat"
14703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14704/* end confdefs.h. */
14705
14706 #include <stdio.h>
14707 #include <stddef.h>
14708
14709int
14710main ()
14711{
14712
14713 char *buffer;
14714 sprintf(buffer, "%lld", (long long)123);
14715 sprintf(buffer, "%lld", (long long)-123);
14716 sprintf(buffer, "%llu", (unsigned long long)123);
14717
14718 ;
14719 return 0;
14720}
14721_ACEOF
14722if ac_fn_c_try_compile "$LINENO"; then :
14723 ac_cv_have_long_long_format=yes
14724
14725fi
14726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14727 CFLAGS=$save_CFLAGS
14728 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014731/* end confdefs.h. */
14732
14733 #include <stdio.h>
14734 #include <stddef.h>
14735 #include <string.h>
14736
14737 #ifdef HAVE_SYS_TYPES_H
14738 #include <sys/types.h>
14739 #endif
14740
14741 int main()
14742 {
14743 char buffer[256];
14744
14745 if (sprintf(buffer, "%lld", (long long)123) < 0)
14746 return 1;
14747 if (strcmp(buffer, "123"))
14748 return 1;
14749
14750 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14751 return 1;
14752 if (strcmp(buffer, "-123"))
14753 return 1;
14754
14755 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14756 return 1;
14757 if (strcmp(buffer, "123"))
14758 return 1;
14759
14760 return 0;
14761 }
14762
14763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014764if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014765 ac_cv_have_long_long_format=yes
14766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014767 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014771fi
14772
14773
Mark Dickinson82864d12009-11-15 16:18:58 +000014774fi
14775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14777$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014778fi
14779
Mark Dickinson5ce84742009-12-31 20:48:04 +000014780if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014781then
14782
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014783$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014784
14785fi
14786
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014787if test $ac_sys_system = Darwin
14788then
14789 LIBS="$LIBS -framework CoreFoundation"
14790fi
14791
Mark Dickinson82864d12009-11-15 16:18:58 +000014792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14794$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014795if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014796 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014798 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014799 ac_cv_have_size_t_format="cross -- assuming yes"
14800
Brett Cannon09d12362006-05-11 05:11:33 +000014801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014803/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014804
Brett Cannon09d12362006-05-11 05:11:33 +000014805#include <stdio.h>
14806#include <stddef.h>
14807#include <string.h>
14808
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014809#ifdef HAVE_SYS_TYPES_H
14810#include <sys/types.h>
14811#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014812
14813#ifdef HAVE_SSIZE_T
14814typedef ssize_t Py_ssize_t;
14815#elif SIZEOF_VOID_P == SIZEOF_LONG
14816typedef long Py_ssize_t;
14817#else
14818typedef int Py_ssize_t;
14819#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014820
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014821int main()
14822{
14823 char buffer[256];
14824
Brett Cannon09d12362006-05-11 05:11:33 +000014825 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14826 return 1;
14827
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014828 if (strcmp(buffer, "123"))
14829 return 1;
14830
14831 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14832 return 1;
14833
14834 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014835 return 1;
14836
14837 return 0;
14838}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014839
Brett Cannon09d12362006-05-11 05:11:33 +000014840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014841if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014842 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014844 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014845fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014848fi
14849
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14852$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014853if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014855$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014856
14857fi
14858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014859ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014860#ifdef HAVE_SYS_TYPES_H
14861#include <sys/types.h>
14862#endif
14863#ifdef HAVE_SYS_SOCKET_H
14864#include <sys/socket.h>
14865#endif
14866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014867"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014868if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014869
Martin v. Löwis11437992002-04-12 09:54:03 +000014870else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014871
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014872$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014873
14874fi
14875
Michael W. Hudson54241132001-12-07 15:38:26 +000014876
Benjamin Peterson7497e912010-10-16 00:53:39 +000014877case $ac_sys_system in
14878AIX*)
14879
14880$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14881 ;;
14882esac
14883
14884
Michael W. Hudson54241132001-12-07 15:38:26 +000014885
14886
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014887for h in `(cd $srcdir;echo Python/thread_*.h)`
14888do
14889 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14890done
14891
Michael W. Hudson54241132001-12-07 15:38:26 +000014892
Neal Norwitzd24499d2005-12-18 21:36:39 +000014893SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14895$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014896for dir in $SRCDIRS; do
14897 if test ! -d $dir; then
14898 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014899 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014900done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014901
14902# BEGIN_COMPUTED_GOTO
14903# Check for --with-computed-gotos
14904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14905$as_echo_n "checking for --with-computed-gotos... " >&6; }
14906
14907# Check whether --with-computed-gotos was given.
14908if test "${with_computed_gotos+set}" = set; then :
14909 withval=$with_computed_gotos;
14910if test "$withval" = yes
14911then
14912
14913$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
14914
14915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14916$as_echo "yes" >&6; }
14917fi
14918if test "$withval" = no
14919then
14920
14921$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14922
14923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14924$as_echo "no" >&6; }
14925fi
14926
14927else
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14929$as_echo "no value specified" >&6; }
14930fi
14931
14932
14933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14934$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14935if ${ac_cv_computed_gotos+:} false; then :
14936 $as_echo_n "(cached) " >&6
14937else
14938 if test "$cross_compiling" = yes; then :
14939 if test "${with_computed_gotos+set}" = set; then
14940 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14941 else
14942 ac_cv_computed_gotos=no
14943 fi
14944else
14945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14946/* end confdefs.h. */
14947
14948int main(int argc, char **argv)
14949{
14950 static void *targets[1] = { &&LABEL1 };
14951 goto LABEL2;
14952LABEL1:
14953 return 0;
14954LABEL2:
14955 goto *targets[0];
14956 return 1;
14957}
14958
14959_ACEOF
14960if ac_fn_c_try_run "$LINENO"; then :
14961 ac_cv_computed_gotos=yes
14962else
14963 ac_cv_computed_gotos=no
14964fi
14965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14966 conftest.$ac_objext conftest.beam conftest.$ac_ext
14967fi
14968
14969fi
14970
14971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14972$as_echo "$ac_cv_computed_gotos" >&6; }
14973case "$ac_cv_computed_gotos" in yes*)
14974
14975$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14976
14977esac
14978# END_COMPUTED_GOTO
14979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14981$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014982
Ned Deily3f1d0b32014-11-20 02:11:03 -080014983# ensurepip option
14984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14985$as_echo_n "checking for ensurepip... " >&6; }
14986
14987# Check whether --with-ensurepip was given.
14988if test "${with_ensurepip+set}" = set; then :
14989 withval=$with_ensurepip;
14990else
14991 with_ensurepip=no
14992fi
14993
14994case $with_ensurepip in #(
14995 yes|upgrade) :
14996 ENSUREPIP=upgrade ;; #(
14997 install) :
14998 ENSUREPIP=install ;; #(
14999 no) :
15000 ENSUREPIP=no ;; #(
15001 *) :
15002 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15003esac
15004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15005$as_echo "$ENSUREPIP" >&6; }
15006
15007
Guido van Rossum627b2d71993-12-24 10:39:16 +000015008# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015009ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015010
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015011ac_config_files="$ac_config_files Modules/ld_so_aix"
15012
Martin v. Löwis11437992002-04-12 09:54:03 +000015013cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015014# This file is a shell script that caches the results of configure
15015# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015016# scripts and configure runs, see configure's option --config-cache.
15017# It is not useful on other systems. If it contains results you don't
15018# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015019#
Martin v. Löwis11437992002-04-12 09:54:03 +000015020# config.status only pays attention to the cache file if you give it
15021# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015022#
Skip Montanaro6dead952003-09-25 14:50:04 +000015023# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015024# loading this file, other *unset* `ac_cv_foo' will be assigned the
15025# following values.
15026
15027_ACEOF
15028
Guido van Rossumf78abae1997-01-21 22:02:36 +000015029# The following way of writing the cache mishandles newlines in values,
15030# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015031# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015032# Ultrix sh set writes to stderr and can't be redirected directly,
15033# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015034(
15035 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15036 eval ac_val=\$$ac_var
15037 case $ac_val in #(
15038 *${as_nl}*)
15039 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015040 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15041$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042 esac
15043 case $ac_var in #(
15044 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015045 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15046 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015047 esac ;;
15048 esac
15049 done
15050
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015052 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15053 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015054 # `set' does not quote correctly, so add quotes: double-quote
15055 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015057 "s/'/'\\\\''/g;
15058 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015059 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 *)
15061 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015062 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015064 esac |
15065 sort
15066) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15072 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15074 :end' >>confcache
15075if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15076 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015077 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015078 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15079$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015080 if test ! -f "$cache_file" || test -h "$cache_file"; then
15081 cat confcache >"$cache_file"
15082 else
15083 case $cache_file in #(
15084 */* | ?:*)
15085 mv -f confcache "$cache_file"$$ &&
15086 mv -f "$cache_file"$$ "$cache_file" ;; #(
15087 *)
15088 mv -f confcache "$cache_file" ;;
15089 esac
15090 fi
15091 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015092 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015093 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15094$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015095 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015096fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015097rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015098
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015099test "x$prefix" = xNONE && prefix=$ac_default_prefix
15100# Let make expand exec_prefix.
15101test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015103DEFS=-DHAVE_CONFIG_H
15104
Skip Montanaro6dead952003-09-25 14:50:04 +000015105ac_libobjs=
15106ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015107U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015108for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15109 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015110 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015111 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015112 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15113 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015114 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15115 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015116done
15117LIBOBJS=$ac_libobjs
15118
15119LTLIBOBJS=$ac_ltlibobjs
15120
15121
Martin v. Löwis11437992002-04-12 09:54:03 +000015122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015123
Matthias Klose3cef2a92012-03-14 23:39:33 +010015124: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015125ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015126ac_clean_files_save=$ac_clean_files
15127ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015128{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15129$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15130as_write_fail=0
15131cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015132#! $SHELL
15133# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015134# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015135# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015136# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015137
Martin v. Löwis11437992002-04-12 09:54:03 +000015138debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015139ac_cs_recheck=false
15140ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015141
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015142SHELL=\${CONFIG_SHELL-$SHELL}
15143export SHELL
15144_ASEOF
15145cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15146## -------------------- ##
15147## M4sh Initialization. ##
15148## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015149
Martin v. Löwiseba40652007-08-30 20:10:57 +000015150# Be more Bourne compatible
15151DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015152if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 emulate sh
15154 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015155 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015156 # is contrary to our usage. Disable this feature.
15157 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015158 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015160 case `(set -o) 2>/dev/null` in #(
15161 *posix*) :
15162 set -o posix ;; #(
15163 *) :
15164 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015165esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015166fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015167
Skip Montanaro6dead952003-09-25 14:50:04 +000015168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015169as_nl='
15170'
15171export as_nl
15172# Printing a long string crashes Solaris 7 /usr/bin/printf.
15173as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15174as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15175as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15176# Prefer a ksh shell builtin over an external printf program on Solaris,
15177# but without wasting forks for bash or zsh.
15178if test -z "$BASH_VERSION$ZSH_VERSION" \
15179 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15180 as_echo='print -r --'
15181 as_echo_n='print -rn --'
15182elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15183 as_echo='printf %s\n'
15184 as_echo_n='printf %s'
15185else
15186 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15187 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15188 as_echo_n='/usr/ucb/echo -n'
15189 else
15190 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15191 as_echo_n_body='eval
15192 arg=$1;
15193 case $arg in #(
15194 *"$as_nl"*)
15195 expr "X$arg" : "X\\(.*\\)$as_nl";
15196 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15197 esac;
15198 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15199 '
15200 export as_echo_n_body
15201 as_echo_n='sh -c $as_echo_n_body as_echo'
15202 fi
15203 export as_echo_body
15204 as_echo='sh -c $as_echo_body as_echo'
15205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015206
15207# The user is always right.
15208if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015209 PATH_SEPARATOR=:
15210 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15211 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15212 PATH_SEPARATOR=';'
15213 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015215
Martin v. Löwiseba40652007-08-30 20:10:57 +000015216
15217# IFS
15218# We need space, tab and new line, in precisely that order. Quoting is
15219# there to prevent editors from complaining about space-tab.
15220# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15221# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015222IFS=" "" $as_nl"
15223
15224# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015225as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015226case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227 *[\\/]* ) as_myself=$0 ;;
15228 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015229for as_dir in $PATH
15230do
15231 IFS=$as_save_IFS
15232 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015233 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15234 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015235IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237 ;;
15238esac
15239# We did not find ourselves, most probably we were run as `sh COMMAND'
15240# in which case we are not to be found in the path.
15241if test "x$as_myself" = x; then
15242 as_myself=$0
15243fi
15244if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015245 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15246 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015247fi
15248
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015249# Unset variables that we do not need and which cause bugs (e.g. in
15250# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15251# suppresses any "Segmentation fault" message there. '((' could
15252# trigger a bug in pdksh 5.2.14.
15253for as_var in BASH_ENV ENV MAIL MAILPATH
15254do eval test x\${$as_var+set} = xset \
15255 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256done
15257PS1='$ '
15258PS2='> '
15259PS4='+ '
15260
15261# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015262LC_ALL=C
15263export LC_ALL
15264LANGUAGE=C
15265export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015267# CDPATH.
15268(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15269
15270
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015271# as_fn_error STATUS ERROR [LINENO LOG_FD]
15272# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015273# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15274# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015275# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015276as_fn_error ()
15277{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015278 as_status=$1; test $as_status -eq 0 && as_status=1
15279 if test "$4"; then
15280 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15281 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015282 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015283 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015284 as_fn_exit $as_status
15285} # as_fn_error
15286
15287
15288# as_fn_set_status STATUS
15289# -----------------------
15290# Set $? to STATUS, without forking.
15291as_fn_set_status ()
15292{
15293 return $1
15294} # as_fn_set_status
15295
15296# as_fn_exit STATUS
15297# -----------------
15298# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15299as_fn_exit ()
15300{
15301 set +e
15302 as_fn_set_status $1
15303 exit $1
15304} # as_fn_exit
15305
15306# as_fn_unset VAR
15307# ---------------
15308# Portably unset VAR.
15309as_fn_unset ()
15310{
15311 { eval $1=; unset $1;}
15312}
15313as_unset=as_fn_unset
15314# as_fn_append VAR VALUE
15315# ----------------------
15316# Append the text in VALUE to the end of the definition contained in VAR. Take
15317# advantage of any shell optimizations that allow amortized linear growth over
15318# repeated appends, instead of the typical quadratic growth present in naive
15319# implementations.
15320if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15321 eval 'as_fn_append ()
15322 {
15323 eval $1+=\$2
15324 }'
15325else
15326 as_fn_append ()
15327 {
15328 eval $1=\$$1\$2
15329 }
15330fi # as_fn_append
15331
15332# as_fn_arith ARG...
15333# ------------------
15334# Perform arithmetic evaluation on the ARGs, and store the result in the
15335# global $as_val. Take advantage of shells that can avoid forks. The arguments
15336# must be portable across $(()) and expr.
15337if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15338 eval 'as_fn_arith ()
15339 {
15340 as_val=$(( $* ))
15341 }'
15342else
15343 as_fn_arith ()
15344 {
15345 as_val=`expr "$@" || test $? -eq 1`
15346 }
15347fi # as_fn_arith
15348
15349
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350if expr a : '\(a\)' >/dev/null 2>&1 &&
15351 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15352 as_expr=expr
15353else
15354 as_expr=false
15355fi
15356
15357if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15358 as_basename=basename
15359else
15360 as_basename=false
15361fi
15362
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015363if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15364 as_dirname=dirname
15365else
15366 as_dirname=false
15367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368
Martin v. Löwiseba40652007-08-30 20:10:57 +000015369as_me=`$as_basename -- "$0" ||
15370$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15371 X"$0" : 'X\(//\)$' \| \
15372 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015373$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015374 sed '/^.*\/\([^/][^/]*\)\/*$/{
15375 s//\1/
15376 q
15377 }
15378 /^X\/\(\/\/\)$/{
15379 s//\1/
15380 q
15381 }
15382 /^X\/\(\/\).*/{
15383 s//\1/
15384 q
15385 }
15386 s/.*/./; q'`
15387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015388# Avoid depending upon Character Ranges.
15389as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15390as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15391as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15392as_cr_digits='0123456789'
15393as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394
15395ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015396case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015398 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015399 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015400 xy) ECHO_C='\c';;
15401 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15402 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403 esac;;
15404*)
15405 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015407
Martin v. Löwis11437992002-04-12 09:54:03 +000015408rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409if test -d conf$$.dir; then
15410 rm -f conf$$.dir/conf$$.file
15411else
15412 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015413 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015415if (echo >conf$$.file) 2>/dev/null; then
15416 if ln -s conf$$.file conf$$ 2>/dev/null; then
15417 as_ln_s='ln -s'
15418 # ... but there are two gotchas:
15419 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15420 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015421 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015422 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015423 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015424 elif ln conf$$.file conf$$ 2>/dev/null; then
15425 as_ln_s=ln
15426 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015427 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015428 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015429else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015430 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15433rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015434
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015435
15436# as_fn_mkdir_p
15437# -------------
15438# Create "$as_dir" as a directory, including parents if necessary.
15439as_fn_mkdir_p ()
15440{
15441
15442 case $as_dir in #(
15443 -*) as_dir=./$as_dir;;
15444 esac
15445 test -d "$as_dir" || eval $as_mkdir_p || {
15446 as_dirs=
15447 while :; do
15448 case $as_dir in #(
15449 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15450 *) as_qdir=$as_dir;;
15451 esac
15452 as_dirs="'$as_qdir' $as_dirs"
15453 as_dir=`$as_dirname -- "$as_dir" ||
15454$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15455 X"$as_dir" : 'X\(//\)[^/]' \| \
15456 X"$as_dir" : 'X\(//\)$' \| \
15457 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15458$as_echo X"$as_dir" |
15459 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15460 s//\1/
15461 q
15462 }
15463 /^X\(\/\/\)[^/].*/{
15464 s//\1/
15465 q
15466 }
15467 /^X\(\/\/\)$/{
15468 s//\1/
15469 q
15470 }
15471 /^X\(\/\).*/{
15472 s//\1/
15473 q
15474 }
15475 s/.*/./; q'`
15476 test -d "$as_dir" && break
15477 done
15478 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015479 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015480
15481
15482} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015483if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015484 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015485else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015486 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015487 as_mkdir_p=false
15488fi
15489
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015490
15491# as_fn_executable_p FILE
15492# -----------------------
15493# Test if FILE is an executable regular file.
15494as_fn_executable_p ()
15495{
15496 test -f "$1" && test -x "$1"
15497} # as_fn_executable_p
15498as_test_x='test -x'
15499as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015500
15501# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015502as_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 +000015503
15504# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015505as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015506
15507
Martin v. Löwis11437992002-04-12 09:54:03 +000015508exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015509## ----------------------------------- ##
15510## Main body of $CONFIG_STATUS script. ##
15511## ----------------------------------- ##
15512_ASEOF
15513test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015514
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15516# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015517# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015518# values after options handling.
15519ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015520This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015521generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015522
15523 CONFIG_FILES = $CONFIG_FILES
15524 CONFIG_HEADERS = $CONFIG_HEADERS
15525 CONFIG_LINKS = $CONFIG_LINKS
15526 CONFIG_COMMANDS = $CONFIG_COMMANDS
15527 $ $0 $@
15528
Martin v. Löwiseba40652007-08-30 20:10:57 +000015529on `(hostname || uname -n) 2>/dev/null | sed 1q`
15530"
15531
Martin v. Löwis11437992002-04-12 09:54:03 +000015532_ACEOF
15533
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015534case $ac_config_files in *"
15535"*) set x $ac_config_files; shift; ac_config_files=$*;;
15536esac
15537
15538case $ac_config_headers in *"
15539"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15540esac
15541
15542
15543cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015544# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015545config_files="$ac_config_files"
15546config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
Martin v. Löwiseba40652007-08-30 20:10:57 +000015548_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015550cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015551ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015552\`$as_me' instantiates files and other configuration actions
15553from templates according to the current configuration. Unless the files
15554and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015556Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015557
15558 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015559 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015560 --config print configuration, then exit
15561 -q, --quiet, --silent
15562 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 -d, --debug don't remove temporary files
15564 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015565 --file=FILE[:TEMPLATE]
15566 instantiate the configuration file FILE
15567 --header=FILE[:TEMPLATE]
15568 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015569
15570Configuration files:
15571$config_files
15572
15573Configuration headers:
15574$config_headers
15575
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015576Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015577
Martin v. Löwiseba40652007-08-30 20:10:57 +000015578_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015579cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15580ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015581ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015582python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015583configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015584 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015585
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015586Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015587This config.status script is free software; the Free Software Foundation
15588gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589
15590ac_pwd='$ac_pwd'
15591srcdir='$srcdir'
15592INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015593MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015594test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015595_ACEOF
15596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015597cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15598# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015599ac_need_defaults=:
15600while test $# != 0
15601do
15602 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015603 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015604 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15605 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015606 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015607 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015608 --*=)
15609 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15610 ac_optarg=
15611 ac_shift=:
15612 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015613 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015614 ac_option=$1
15615 ac_optarg=$2
15616 ac_shift=shift
15617 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 esac
15619
Skip Montanaro6dead952003-09-25 14:50:04 +000015620 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015622 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15623 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015624 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015625 $as_echo "$ac_cs_version"; exit ;;
15626 --config | --confi | --conf | --con | --co | --c )
15627 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015629 debug=: ;;
15630 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015631 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015632 case $ac_optarg in
15633 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015634 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015635 esac
15636 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015637 ac_need_defaults=false;;
15638 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015639 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015640 case $ac_optarg in
15641 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15642 esac
15643 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015644 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015645 --he | --h)
15646 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015647 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015648Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015649 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015650 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015651 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15652 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15653 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015654
15655 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015656 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015657Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015659 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015660 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015661
15662 esac
15663 shift
15664done
15665
Skip Montanaro6dead952003-09-25 14:50:04 +000015666ac_configure_extra_args=
15667
15668if $ac_cs_silent; then
15669 exec 6>/dev/null
15670 ac_configure_extra_args="$ac_configure_extra_args --silent"
15671fi
15672
15673_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015674cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015675if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015676 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015677 shift
15678 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15679 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015680 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015681 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015682fi
15683
Martin v. Löwis11437992002-04-12 09:54:03 +000015684_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015685cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686exec 5>>config.log
15687{
15688 echo
15689 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15690## Running $as_me. ##
15691_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015692 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015693} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015696cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015698
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015699cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015700
15701# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015702for ac_config_target in $ac_config_targets
15703do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015704 case $ac_config_target in
15705 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15706 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15707 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15708 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015709 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15710 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015711 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15712 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015713 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015714 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715
Matthias Klose3cef2a92012-03-14 23:39:33 +010015716 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015717 esac
15718done
15719
Martin v. Löwiseba40652007-08-30 20:10:57 +000015720
Martin v. Löwis11437992002-04-12 09:54:03 +000015721# If the user did not use the arguments to specify the items to instantiate,
15722# then the envvar interface is used. Set only those that are not.
15723# We use the long form for the default assignment because of an extremely
15724# bizarre bug on SunOS 4.1.3.
15725if $ac_need_defaults; then
15726 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15727 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15728fi
15729
Skip Montanaro6dead952003-09-25 14:50:04 +000015730# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015731# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015732# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015733# Hook for its removal unless debugging.
15734# Note that there is a small window in which the directory will not be cleaned:
15735# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015736$debug ||
15737{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015738 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015739 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015740 : "${ac_tmp:=$tmp}"
15741 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015743 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015744}
Martin v. Löwis11437992002-04-12 09:54:03 +000015745# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015746
Martin v. Löwis11437992002-04-12 09:54:03 +000015747{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015749 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015750} ||
15751{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015752 tmp=./conf$$-$RANDOM
15753 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015754} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015755ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015757# Set up the scripts for CONFIG_FILES section.
15758# No need to generate them if there are no CONFIG_FILES.
15759# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015760if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015761
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015762
15763ac_cr=`echo X | tr X '\015'`
15764# On cygwin, bash can eat \r inside `` if the user requested igncr.
15765# But we know of no other shell where ac_cr would be empty at this
15766# point, so we can use a bashism as a fallback.
15767if test "x$ac_cr" = x; then
15768 eval ac_cr=\$\'\\r\'
15769fi
15770ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15771if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015772 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015773else
15774 ac_cs_awk_cr=$ac_cr
15775fi
15776
Matthias Klose3cef2a92012-03-14 23:39:33 +010015777echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015778_ACEOF
15779
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015781{
15782 echo "cat >conf$$subs.awk <<_ACEOF" &&
15783 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15784 echo "_ACEOF"
15785} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015786 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15787ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015788ac_delim='%!_!# '
15789for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015790 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015791 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015793 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15794 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795 break
15796 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015797 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015798 else
15799 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015800 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015802rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015803
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015804cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015805cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015806_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015807sed -n '
15808h
15809s/^/S["/; s/!.*/"]=/
15810p
15811g
15812s/^[^!]*!//
15813:repl
15814t repl
15815s/'"$ac_delim"'$//
15816t delim
15817:nl
15818h
15819s/\(.\{148\}\)..*/\1/
15820t more1
15821s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15822p
15823n
15824b repl
15825:more1
15826s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15827p
15828g
15829s/.\{148\}//
15830t nl
15831:delim
15832h
15833s/\(.\{148\}\)..*/\1/
15834t more2
15835s/["\\]/\\&/g; s/^/"/; s/$/"/
15836p
15837b
15838:more2
15839s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15840p
15841g
15842s/.\{148\}//
15843t delim
15844' <conf$$subs.awk | sed '
15845/^[^""]/{
15846 N
15847 s/\n//
15848}
15849' >>$CONFIG_STATUS || ac_write_fail=1
15850rm -f conf$$subs.awk
15851cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15852_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015853cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015854 for (key in S) S_is_set[key] = 1
15855 FS = ""
15856
15857}
15858{
15859 line = $ 0
15860 nfields = split(line, field, "@")
15861 substed = 0
15862 len = length(field[1])
15863 for (i = 2; i < nfields; i++) {
15864 key = field[i]
15865 keylen = length(key)
15866 if (S_is_set[key]) {
15867 value = S[key]
15868 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15869 len += length(value) + length(field[++i])
15870 substed = 1
15871 } else
15872 len += 1 + keylen
15873 }
15874
15875 print line
15876}
15877
15878_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15881if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15882 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15883else
15884 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015885fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015886 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015887_ACEOF
15888
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015889# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15890# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015891# trailing colons and then remove the whole line if VPATH becomes empty
15892# (actually we leave an empty line to preserve line numbers).
15893if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015894 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15895h
15896s///
15897s/^/:/
15898s/[ ]*$/:/
15899s/:\$(srcdir):/:/g
15900s/:\${srcdir}:/:/g
15901s/:@srcdir@:/:/g
15902s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015903s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015904x
15905s/\(=[ ]*\).*/\1/
15906G
15907s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015908s/^[^=]*=[ ]*$//
15909}'
15910fi
15911
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015912cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015913fi # test -n "$CONFIG_FILES"
15914
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015915# Set up the scripts for CONFIG_HEADERS section.
15916# No need to generate them if there are no CONFIG_HEADERS.
15917# This happens for instance with `./config.status Makefile'.
15918if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015919cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015920BEGIN {
15921_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015923# Transform confdefs.h into an awk script `defines.awk', embedded as
15924# here-document in config.status, that substitutes the proper values into
15925# config.h.in to produce config.h.
15926
15927# Create a delimiter string that does not exist in confdefs.h, to ease
15928# handling of long lines.
15929ac_delim='%!_!# '
15930for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015931 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15932 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015933 break
15934 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015935 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015936 else
15937 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15938 fi
15939done
15940
15941# For the awk script, D is an array of macro values keyed by name,
15942# likewise P contains macro parameters if any. Preserve backslash
15943# newline sequences.
15944
15945ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15946sed -n '
15947s/.\{148\}/&'"$ac_delim"'/g
15948t rset
15949:rset
15950s/^[ ]*#[ ]*define[ ][ ]*/ /
15951t def
15952d
15953:def
15954s/\\$//
15955t bsnl
15956s/["\\]/\\&/g
15957s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15958D["\1"]=" \3"/p
15959s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15960d
15961:bsnl
15962s/["\\]/\\&/g
15963s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15964D["\1"]=" \3\\\\\\n"\\/p
15965t cont
15966s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15967t cont
15968d
15969:cont
15970n
15971s/.\{148\}/&'"$ac_delim"'/g
15972t clear
15973:clear
15974s/\\$//
15975t bsnlc
15976s/["\\]/\\&/g; s/^/"/; s/$/"/p
15977d
15978:bsnlc
15979s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15980b cont
15981' <confdefs.h | sed '
15982s/'"$ac_delim"'/"\\\
15983"/g' >>$CONFIG_STATUS || ac_write_fail=1
15984
15985cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15986 for (key in D) D_is_set[key] = 1
15987 FS = ""
15988}
15989/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15990 line = \$ 0
15991 split(line, arg, " ")
15992 if (arg[1] == "#") {
15993 defundef = arg[2]
15994 mac1 = arg[3]
15995 } else {
15996 defundef = substr(arg[1], 2)
15997 mac1 = arg[2]
15998 }
15999 split(mac1, mac2, "(") #)
16000 macro = mac2[1]
16001 prefix = substr(line, 1, index(line, defundef) - 1)
16002 if (D_is_set[macro]) {
16003 # Preserve the white space surrounding the "#".
16004 print prefix "define", macro P[macro] D[macro]
16005 next
16006 } else {
16007 # Replace #undef with comments. This is necessary, for example,
16008 # in the case of _POSIX_SOURCE, which is predefined and required
16009 # on some systems where configure will not decide to define it.
16010 if (defundef == "undef") {
16011 print "/*", prefix defundef, macro, "*/"
16012 next
16013 }
16014 }
16015}
16016{ print }
16017_ACAWK
16018_ACEOF
16019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016020 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016021fi # test -n "$CONFIG_HEADERS"
16022
16023
16024eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16025shift
16026for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016027do
16028 case $ac_tag in
16029 :[FHLC]) ac_mode=$ac_tag; continue;;
16030 esac
16031 case $ac_mode$ac_tag in
16032 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016033 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016034 :[FH]-) ac_tag=-:-;;
16035 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16036 esac
16037 ac_save_IFS=$IFS
16038 IFS=:
16039 set x $ac_tag
16040 IFS=$ac_save_IFS
16041 shift
16042 ac_file=$1
16043 shift
16044
16045 case $ac_mode in
16046 :L) ac_source=$1;;
16047 :[FH])
16048 ac_file_inputs=
16049 for ac_f
16050 do
16051 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016052 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016053 *) # Look for the file first in the build tree, then in the source tree
16054 # (if the path is not absolute). The absolute path cannot be DOS-style,
16055 # because $ac_f cannot contain `:'.
16056 test -f "$ac_f" ||
16057 case $ac_f in
16058 [\\/$]*) false;;
16059 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16060 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016061 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016062 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016063 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16064 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016065 done
16066
16067 # Let's still pretend it is `configure' which instantiates (i.e., don't
16068 # use $as_me), people would be surprised to read:
16069 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016070 configure_input='Generated from '`
16071 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16072 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016073 if test x"$ac_file" != x-; then
16074 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016075 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16076$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016077 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016078 # Neutralize special characters interpreted by sed in replacement strings.
16079 case $configure_input in #(
16080 *\&* | *\|* | *\\* )
16081 ac_sed_conf_input=`$as_echo "$configure_input" |
16082 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16083 *) ac_sed_conf_input=$configure_input;;
16084 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016085
16086 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016087 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16088 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016089 esac
16090 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016091 esac
16092
Martin v. Löwiseba40652007-08-30 20:10:57 +000016093 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016094$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016095 X"$ac_file" : 'X\(//\)[^/]' \| \
16096 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016097 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016098$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016099 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16100 s//\1/
16101 q
16102 }
16103 /^X\(\/\/\)[^/].*/{
16104 s//\1/
16105 q
16106 }
16107 /^X\(\/\/\)$/{
16108 s//\1/
16109 q
16110 }
16111 /^X\(\/\).*/{
16112 s//\1/
16113 q
16114 }
16115 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016116 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 ac_builddir=.
16118
Martin v. Löwiseba40652007-08-30 20:10:57 +000016119case "$ac_dir" in
16120.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16121*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016122 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016124 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016125 case $ac_top_builddir_sub in
16126 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16127 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16128 esac ;;
16129esac
16130ac_abs_top_builddir=$ac_pwd
16131ac_abs_builddir=$ac_pwd$ac_dir_suffix
16132# for backward compatibility:
16133ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016134
16135case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016136 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016138 ac_top_srcdir=$ac_top_builddir_sub
16139 ac_abs_top_srcdir=$ac_pwd ;;
16140 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016142 ac_top_srcdir=$srcdir
16143 ac_abs_top_srcdir=$srcdir ;;
16144 *) # Relative name.
16145 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16146 ac_top_srcdir=$ac_top_build_prefix$srcdir
16147 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016148esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016149ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016150
Martin v. Löwis11437992002-04-12 09:54:03 +000016151
Martin v. Löwiseba40652007-08-30 20:10:57 +000016152 case $ac_mode in
16153 :F)
16154 #
16155 # CONFIG_FILE
16156 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016157
16158 case $INSTALL in
16159 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016161 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016162 ac_MKDIR_P=$MKDIR_P
16163 case $MKDIR_P in
16164 [\\/$]* | ?:[\\/]* ) ;;
16165 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16166 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016167_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016169cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016170# If the template does not know about datarootdir, expand it.
16171# FIXME: This hack should be removed a few years after 2.60.
16172ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016173ac_sed_dataroot='
16174/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016175 p
16176 q
16177}
16178/@datadir@/p
16179/@docdir@/p
16180/@infodir@/p
16181/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016182/@mandir@/p'
16183case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184*datarootdir*) ac_datarootdir_seen=yes;;
16185*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16187$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016188_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016189cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016190 ac_datarootdir_hack='
16191 s&@datadir@&$datadir&g
16192 s&@docdir@&$docdir&g
16193 s&@infodir@&$infodir&g
16194 s&@localedir@&$localedir&g
16195 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016196 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016197esac
16198_ACEOF
16199
16200# Neutralize VPATH when `$srcdir' = `.'.
16201# Shell code in configure.ac might set extrasub.
16202# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016203cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16204ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016205$extrasub
16206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016208:t
16209/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016210s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016211s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016212s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016213s&@srcdir@&$ac_srcdir&;t t
16214s&@abs_srcdir@&$ac_abs_srcdir&;t t
16215s&@top_srcdir@&$ac_top_srcdir&;t t
16216s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16217s&@builddir@&$ac_builddir&;t t
16218s&@abs_builddir@&$ac_abs_builddir&;t t
16219s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16220s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016221s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016222$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016223"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016224eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16225 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016226
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016228 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16229 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16230 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016232which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016233$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016234which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016235
Matthias Klose3cef2a92012-03-14 23:39:33 +010016236 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016238 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16239 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016240 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016241 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242 ;;
16243 :H)
16244 #
16245 # CONFIG_HEADER
16246 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016248 {
16249 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016250 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16251 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016252 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016253 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016254 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16255$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016256 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016257 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016258 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016259 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016260 fi
16261 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016262 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016263 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016264 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016267
Martin v. Löwiseba40652007-08-30 20:10:57 +000016268
16269 esac
16270
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016271
16272 case $ac_file$ac_mode in
16273 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16274
16275 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276done # for ac_tag
16277
Guido van Rossum627b2d71993-12-24 10:39:16 +000016278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016279as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016280_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016281ac_clean_files=$ac_clean_files_save
16282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016283test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016284 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016285
Martin v. Löwis11437992002-04-12 09:54:03 +000016286
16287# configure is writing to config.log, and then calls config.status.
16288# config.status does its own redirection, appending to config.log.
16289# Unfortunately, on DOS this fails, as config.log is still kept open
16290# by configure, so config.status won't be able to write to it; its
16291# output is simply discarded. So we exec the FD to /dev/null,
16292# effectively closing config.log, so it can be properly (re)opened and
16293# appended to by config.status. When coming back to configure, we
16294# need to make the FD available again.
16295if test "$no_create" != yes; then
16296 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016297 ac_config_status_args=
16298 test "$silent" = yes &&
16299 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016301 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 exec 5>>config.log
16303 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16304 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016305 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016306fi
16307if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16309$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016310fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016311
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016312
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016313echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016314if test ! -f Modules/Setup
16315then
16316 cp $srcdir/Modules/Setup.dist Modules/Setup
16317fi
16318
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016319echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016320if test ! -f Modules/Setup.local
16321then
16322 echo "# Edit this file for local setup changes" >Modules/Setup.local
16323fi
16324
16325echo "creating Makefile"
16326$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16327 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016328 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016329
16330case $ac_sys_system in
16331BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016332 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016333
16334 Support for BeOS is deprecated as of Python 2.6.
16335 See PEP 11 for the gory details.
16336 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016337$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016338
16339 Support for BeOS is deprecated as of Python 2.6.
16340 See PEP 11 for the gory details.
16341 " >&2;}
16342 ;;
16343*) ;;
16344esac
16345
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016346mv config.c Modules