blob: 897f0a244f25f56f41d3af43ccf7b939d1872624 [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
Benjamin Peterson42e10292016-07-07 00:02:31 -0700767runstatedir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000768localstatedir
769sharedstatedir
770sysconfdir
771datadir
772datarootdir
773libexecdir
774sbindir
775bindir
776program_transform_name
777prefix
778exec_prefix
779PACKAGE_URL
780PACKAGE_BUGREPORT
781PACKAGE_STRING
782PACKAGE_VERSION
783PACKAGE_TARNAME
784PACKAGE_NAME
785PATH_SEPARATOR
786SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000787ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000788ac_user_opts='
789enable_option_checking
790enable_universalsdk
791with_universal_archs
792with_framework_name
793enable_framework
794with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600795with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000796with_cxx_main
797with_suffix
798enable_shared
799enable_profiling
800with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000801with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000802enable_toolbox_glue
803with_libs
804with_system_expat
805with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700806with_tcltk_includes
807with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000808with_dbmliborder
809with_signal_module
810with_dec_threads
811with_threads
812with_thread
813with_pth
814enable_ipv6
815with_doc_strings
816with_tsc
817with_pymalloc
818with_valgrind
819with_wctype_functions
820with_fpectl
821with_libm
822with_libc
823enable_big_digits
824enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500825with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800826with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000827'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000828 ac_precious_vars='build_alias
829host_alias
830target_alias
831CC
832CFLAGS
833LDFLAGS
834LIBS
835CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500836CPP
837PKG_CONFIG
838PKG_CONFIG_PATH
839PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000843ac_init_help=
844ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000845ac_unrecognized_opts=
846ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847# The variables have the same names as the options, with
848# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000849cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852no_recursion=
853prefix=NONE
854program_prefix=NONE
855program_suffix=NONE
856program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861x_includes=NONE
862x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000863
864# Installation directory options.
865# These are left unexpanded so users can "make install exec_prefix=/foo"
866# and all the variables that are supposed to be based on exec_prefix
867# by default will actually change.
868# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870bindir='${exec_prefix}/bin'
871sbindir='${exec_prefix}/sbin'
872libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000873datarootdir='${prefix}/share'
874datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875sysconfdir='${prefix}/etc'
876sharedstatedir='${prefix}/com'
877localstatedir='${prefix}/var'
Benjamin Peterson42e10292016-07-07 00:02:31 -0700878runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879includedir='${prefix}/include'
880oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000881docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
882infodir='${datarootdir}/info'
883htmldir='${docdir}'
884dvidir='${docdir}'
885pdfdir='${docdir}'
886psdir='${docdir}'
887libdir='${exec_prefix}/lib'
888localedir='${datarootdir}/locale'
889mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000892ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895 # If the previous option needs an argument, assign it.
896 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000897 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 ac_prev=
899 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000900 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Martin v. Löwiseba40652007-08-30 20:10:57 +0000902 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000903 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
904 *=) ac_optarg= ;;
905 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000906 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908 # Accept the important Cygnus configure options, so we can diagnose typos.
909
Martin v. Löwiseba40652007-08-30 20:10:57 +0000910 case $ac_dashdash$ac_option in
911 --)
912 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -bindir | --bindir | --bindi | --bind | --bin | --bi)
915 ac_prev=bindir ;;
916 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 -cache-file | --cache-file | --cache-fil | --cache-fi \
925 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
926 ac_prev=cache_file ;;
927 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
928 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 cache_file=$ac_optarg ;;
930
931 --config-cache | -C)
932 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933
Martin v. Löwiseba40652007-08-30 20:10:57 +0000934 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
940 | --dataroo | --dataro | --datar)
941 ac_prev=datarootdir ;;
942 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
943 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
944 datarootdir=$ac_optarg ;;
945
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000947 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000949 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000950 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000951 ac_useropt_orig=$ac_useropt
952 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
953 case $ac_user_opts in
954 *"
955"enable_$ac_useropt"
956"*) ;;
957 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
958 ac_unrecognized_sep=', ';;
959 esac
960 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000961
962 -docdir | --docdir | --docdi | --doc | --do)
963 ac_prev=docdir ;;
964 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
965 docdir=$ac_optarg ;;
966
967 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
968 ac_prev=dvidir ;;
969 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
970 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971
972 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000973 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000974 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000975 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000976 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000977 ac_useropt_orig=$ac_useropt
978 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
979 case $ac_user_opts in
980 *"
981"enable_$ac_useropt"
982"*) ;;
983 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
984 ac_unrecognized_sep=', ';;
985 esac
986 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
989 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
990 | --exec | --exe | --ex)
991 ac_prev=exec_prefix ;;
992 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
993 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
994 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 # Obsolete; use --with-gas.
999 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 -help | --help | --hel | --he | -h)
1002 ac_init_help=long ;;
1003 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1004 ac_init_help=recursive ;;
1005 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1006 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Martin v. Löwiseba40652007-08-30 20:10:57 +00001013 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1014 ac_prev=htmldir ;;
1015 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1016 | --ht=*)
1017 htmldir=$ac_optarg ;;
1018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -includedir | --includedir | --includedi | --included | --include \
1020 | --includ | --inclu | --incl | --inc)
1021 ac_prev=includedir ;;
1022 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1023 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -infodir | --infodir | --infodi | --infod | --info | --inf)
1027 ac_prev=infodir ;;
1028 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
1031 -libdir | --libdir | --libdi | --libd)
1032 ac_prev=libdir ;;
1033 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1037 | --libexe | --libex | --libe)
1038 ac_prev=libexecdir ;;
1039 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1040 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
Martin v. Löwiseba40652007-08-30 20:10:57 +00001043 -localedir | --localedir | --localedi | --localed | --locale)
1044 ac_prev=localedir ;;
1045 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1046 localedir=$ac_optarg ;;
1047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001049 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 ac_prev=localstatedir ;;
1051 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001052 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1056 ac_prev=mandir ;;
1057 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061 # Obsolete; use --without-fp.
1062 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066 no_create=yes ;;
1067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1069 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1070 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1073 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1074 | --oldin | --oldi | --old | --ol | --o)
1075 ac_prev=oldincludedir ;;
1076 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1077 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1078 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1082 ac_prev=prefix ;;
1083 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1087 | --program-pre | --program-pr | --program-p)
1088 ac_prev=program_prefix ;;
1089 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1090 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1094 | --program-suf | --program-su | --program-s)
1095 ac_prev=program_suffix ;;
1096 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1097 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-transform-name | --program-transform-name \
1101 | --program-transform-nam | --program-transform-na \
1102 | --program-transform-n | --program-transform- \
1103 | --program-transform | --program-transfor \
1104 | --program-transfo | --program-transf \
1105 | --program-trans | --program-tran \
1106 | --progr-tra | --program-tr | --program-t)
1107 ac_prev=program_transform_name ;;
1108 -program-transform-name=* | --program-transform-name=* \
1109 | --program-transform-nam=* | --program-transform-na=* \
1110 | --program-transform-n=* | --program-transform-=* \
1111 | --program-transform=* | --program-transfor=* \
1112 | --program-transfo=* | --program-transf=* \
1113 | --program-trans=* | --program-tran=* \
1114 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
Martin v. Löwiseba40652007-08-30 20:10:57 +00001117 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1118 ac_prev=pdfdir ;;
1119 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1120 pdfdir=$ac_optarg ;;
1121
1122 -psdir | --psdir | --psdi | --psd | --ps)
1123 ac_prev=psdir ;;
1124 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1125 psdir=$ac_optarg ;;
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1128 | -silent | --silent | --silen | --sile | --sil)
1129 silent=yes ;;
1130
Benjamin Peterson42e10292016-07-07 00:02:31 -07001131 -runstatedir | --runstatedir | --runstatedi | --runstated \
1132 | --runstate | --runstat | --runsta | --runst | --runs \
1133 | --run | --ru | --r)
1134 ac_prev=runstatedir ;;
1135 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1136 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1137 | --run=* | --ru=* | --r=*)
1138 runstatedir=$ac_optarg ;;
1139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1141 ac_prev=sbindir ;;
1142 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1143 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
1146 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1147 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1148 | --sharedst | --shareds | --shared | --share | --shar \
1149 | --sha | --sh)
1150 ac_prev=sharedstatedir ;;
1151 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1152 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1153 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1154 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 -site | --site | --sit)
1158 ac_prev=site ;;
1159 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1163 ac_prev=srcdir ;;
1164 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1168 | --syscon | --sysco | --sysc | --sys | --sy)
1169 ac_prev=sysconfdir ;;
1170 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1171 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
1179 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1180 verbose=yes ;;
1181
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 -version | --version | --versio | --versi | --vers | -V)
1183 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001186 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001189 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 --x)
1218 # Obsolete; use --with-x.
1219 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1222 | --x-incl | --x-inc | --x-in | --x-i)
1223 ac_prev=x_includes ;;
1224 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1225 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
1228 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1229 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1230 ac_prev=x_libraries ;;
1231 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1232 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001235 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1236Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 ;;
1238
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 *=*)
1240 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1241 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001242 case $ac_envvar in #(
1243 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001244 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001245 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001246 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 export $ac_envvar ;;
1248
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001249 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001251 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001253 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001254 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ;;
1256
1257 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258done
1259
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001262 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263fi
1264
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001265if test -n "$ac_unrecognized_opts"; then
1266 case $enable_option_checking in
1267 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001268 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001269 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1270 esac
1271fi
1272
1273# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001274for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1275 datadir sysconfdir sharedstatedir localstatedir includedir \
1276 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson42e10292016-07-07 00:02:31 -07001277 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001279 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001280 # Remove trailing slashes.
1281 case $ac_val in
1282 */ )
1283 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1284 eval $ac_var=\$ac_val;;
1285 esac
1286 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001288 [\\/$]* | ?:[\\/]* ) continue;;
1289 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001290 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001291 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001292done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
Martin v. Löwis11437992002-04-12 09:54:03 +00001294# There might be people who depend on the old broken behavior: `$host'
1295# used to hold the argument of --host etc.
1296# FIXME: To remove some day.
1297build=$build_alias
1298host=$host_alias
1299target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301# FIXME: To remove some day.
1302if test "x$host_alias" != x; then
1303 if test "x$build_alias" = x; then
1304 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001305 elif test "x$build_alias" != "x$host_alias"; then
1306 cross_compiling=yes
1307 fi
1308fi
1309
1310ac_tool_prefix=
1311test -n "$host_alias" && ac_tool_prefix=$host_alias-
1312
1313test "$silent" = yes && exec 6>/dev/null
1314
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwiseba40652007-08-30 20:10:57 +00001316ac_pwd=`pwd` && test -n "$ac_pwd" &&
1317ac_ls_di=`ls -di .` &&
1318ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001319 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001320test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001321 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001322
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324# Find the source files, if location was not specified.
1325if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001327 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001328 ac_confdir=`$as_dirname -- "$as_myself" ||
1329$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1330 X"$as_myself" : 'X\(//\)[^/]' \| \
1331 X"$as_myself" : 'X\(//\)$' \| \
1332 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1333$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001334 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1335 s//\1/
1336 q
1337 }
1338 /^X\(\/\/\)[^/].*/{
1339 s//\1/
1340 q
1341 }
1342 /^X\(\/\/\)$/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\).*/{
1347 s//\1/
1348 q
1349 }
1350 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001351 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001352 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353 srcdir=..
1354 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355else
1356 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001358if test ! -r "$srcdir/$ac_unique_file"; then
1359 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001360 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001362ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1363ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001364 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001365 pwd)`
1366# When building in place, set srcdir=.
1367if test "$ac_abs_confdir" = "$ac_pwd"; then
1368 srcdir=.
1369fi
1370# Remove unnecessary trailing slashes from srcdir.
1371# Double slashes in file names in object file debugging info
1372# mess up M-x gdb in Emacs.
1373case $srcdir in
1374*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1375esac
1376for ac_var in $ac_precious_vars; do
1377 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1378 eval ac_env_${ac_var}_value=\$${ac_var}
1379 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1380 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1381done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001382
Martin v. Löwis11437992002-04-12 09:54:03 +00001383#
1384# Report the --help message.
1385#
1386if test "$ac_init_help" = "long"; then
1387 # Omit some internal or obsolete options to make the list less imposing.
1388 # This message is too long to be a string in the A/UX 3.1 sh.
1389 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001390\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001391
1392Usage: $0 [OPTION]... [VAR=VALUE]...
1393
1394To assign environment variables (e.g., CC, CFLAGS...), specify them as
1395VAR=VALUE. See below for descriptions of some of the useful variables.
1396
1397Defaults for the options are specified in brackets.
1398
1399Configuration:
1400 -h, --help display this help and exit
1401 --help=short display options specific to this package
1402 --help=recursive display the short help of all the included packages
1403 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001404 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 --cache-file=FILE cache test results in FILE [disabled]
1406 -C, --config-cache alias for \`--cache-file=config.cache'
1407 -n, --no-create do not create output files
1408 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1409
Martin v. Löwis11437992002-04-12 09:54:03 +00001410Installation directories:
1411 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001412 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001414 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001415
1416By default, \`make install' will install all the files in
1417\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1418an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1419for instance \`--prefix=\$HOME'.
1420
1421For better control, use the options below.
1422
1423Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001424 --bindir=DIR user executables [EPREFIX/bin]
1425 --sbindir=DIR system admin executables [EPREFIX/sbin]
1426 --libexecdir=DIR program executables [EPREFIX/libexec]
1427 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1428 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1429 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson42e10292016-07-07 00:02:31 -07001430 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001431 --libdir=DIR object code libraries [EPREFIX/lib]
1432 --includedir=DIR C header files [PREFIX/include]
1433 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1434 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1435 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1436 --infodir=DIR info documentation [DATAROOTDIR/info]
1437 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1438 --mandir=DIR man documentation [DATAROOTDIR/man]
1439 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1440 --htmldir=DIR html documentation [DOCDIR]
1441 --dvidir=DIR dvi documentation [DOCDIR]
1442 --pdfdir=DIR pdf documentation [DOCDIR]
1443 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001444_ACEOF
1445
1446 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001447
1448System types:
1449 --build=BUILD configure for building on BUILD [guessed]
1450 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
1452fi
1453
1454if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001455 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001456 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001457 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 cat <<\_ACEOF
1459
1460Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001461 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1463 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001464 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001465 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --enable-framework[=INSTALLDIR]
1467 Build (MacOSX|Darwin) framework
1468 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001469 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1471 --enable-ipv6 Enable ipv6 (with ipv4) support
1472 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001473 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001474 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001476 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001477
1478Optional Packages:
1479 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1480 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001481 --with-universal-archs=ARCH
1482 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001483 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001484 --with-framework-name=FRAMEWORK
1485 specify an alternate name of the framework built
1486 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001488 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001489 --with-cxx-main=<compiler>
1490 compile main() and link python executable with C++
1491 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-suffix=.exe set executable suffix
1493 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001494 --with-lto Enable Link Time Optimization in PGO builds.
1495 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001497 --with-system-expat build pyexpat module using an installed expat
1498 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001499 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001500 --with-tcltk-includes='-I...'
1501 override search for Tcl and Tk include files
1502 --with-tcltk-libs='-L...'
1503 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001504 --with-dbmliborder=db1:db2:...
1505 order to check db backends for dbm. Valid value is a
1506 colon separated string with the backend names
1507 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --with-signal-module disable/enable signal module
1509 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1510 --with(out)-threads[=DIRECTORY]
1511 disable/enable thread support
1512 --with(out)-thread[=DIRECTORY]
1513 deprecated; use --with(out)-threads
1514 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001516 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001518 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with-fpectl enable SIGFPE catching
1521 --with-libm=STRING math library
1522 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001523 --with(out)-computed-gotos
1524 Use computed gotos in evaluation loop (enabled by
1525 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001526 --with(out)-ensurepip=[=OPTION]
1527 "install" or "upgrade" using bundled pip, default is
1528 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
1530Some influential environment variables:
1531 CC C compiler command
1532 CFLAGS C compiler flags
1533 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1534 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001536 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001537 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001539 PKG_CONFIG path to pkg-config utility
1540 PKG_CONFIG_PATH
1541 directories to add to pkg-config's search path
1542 PKG_CONFIG_LIBDIR
1543 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001544
1545Use these variables to override the choices made by `configure' or to help
1546it to find libraries and programs with nonstandard names/locations.
1547
Georg Brandl464432d2009-05-20 18:24:08 +00001548Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001549_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001550ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001551fi
1552
1553if test "$ac_init_help" = "recursive"; then
1554 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001556 test -d "$ac_dir" ||
1557 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1558 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 ac_builddir=.
1560
Martin v. Löwiseba40652007-08-30 20:10:57 +00001561case "$ac_dir" in
1562.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1563*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001564 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001565 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001566 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001567 case $ac_top_builddir_sub in
1568 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1569 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1570 esac ;;
1571esac
1572ac_abs_top_builddir=$ac_pwd
1573ac_abs_builddir=$ac_pwd$ac_dir_suffix
1574# for backward compatibility:
1575ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001576
1577case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001580 ac_top_srcdir=$ac_top_builddir_sub
1581 ac_abs_top_srcdir=$ac_pwd ;;
1582 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 ac_top_srcdir=$srcdir
1585 ac_abs_top_srcdir=$srcdir ;;
1586 *) # Relative name.
1587 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1588 ac_top_srcdir=$ac_top_build_prefix$srcdir
1589 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001590esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001592
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 cd "$ac_dir" || { ac_status=$?; continue; }
1594 # Check for guested configure.
1595 if test -f "$ac_srcdir/configure.gnu"; then
1596 echo &&
1597 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1598 elif test -f "$ac_srcdir/configure"; then
1599 echo &&
1600 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001602 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001603 fi || ac_status=$?
1604 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001605 done
1606fi
1607
Martin v. Löwiseba40652007-08-30 20:10:57 +00001608test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001609if $ac_init_version; then
1610 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001611python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001612generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001613
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001614Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615This configure script is free software; the Free Software Foundation
1616gives unlimited permission to copy, distribute and modify it.
1617_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001619fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001620
1621## ------------------------ ##
1622## Autoconf initialization. ##
1623## ------------------------ ##
1624
1625# ac_fn_c_try_compile LINENO
1626# --------------------------
1627# Try to compile conftest.$ac_ext, and return whether this succeeded.
1628ac_fn_c_try_compile ()
1629{
1630 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1631 rm -f conftest.$ac_objext
1632 if { { ac_try="$ac_compile"
1633case "(($ac_try" in
1634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1635 *) ac_try_echo=$ac_try;;
1636esac
1637eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1638$as_echo "$ac_try_echo"; } >&5
1639 (eval "$ac_compile") 2>conftest.err
1640 ac_status=$?
1641 if test -s conftest.err; then
1642 grep -v '^ *+' conftest.err >conftest.er1
1643 cat conftest.er1 >&5
1644 mv -f conftest.er1 conftest.err
1645 fi
1646 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1647 test $ac_status = 0; } && {
1648 test -z "$ac_c_werror_flag" ||
1649 test ! -s conftest.err
1650 } && test -s conftest.$ac_objext; then :
1651 ac_retval=0
1652else
1653 $as_echo "$as_me: failed program was:" >&5
1654sed 's/^/| /' conftest.$ac_ext >&5
1655
1656 ac_retval=1
1657fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001658 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001659 as_fn_set_status $ac_retval
1660
1661} # ac_fn_c_try_compile
1662
1663# ac_fn_c_try_cpp LINENO
1664# ----------------------
1665# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1666ac_fn_c_try_cpp ()
1667{
1668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1669 if { { ac_try="$ac_cpp conftest.$ac_ext"
1670case "(($ac_try" in
1671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1672 *) ac_try_echo=$ac_try;;
1673esac
1674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1675$as_echo "$ac_try_echo"; } >&5
1676 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1677 ac_status=$?
1678 if test -s conftest.err; then
1679 grep -v '^ *+' conftest.err >conftest.er1
1680 cat conftest.er1 >&5
1681 mv -f conftest.er1 conftest.err
1682 fi
1683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001684 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001685 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1686 test ! -s conftest.err
1687 }; then :
1688 ac_retval=0
1689else
1690 $as_echo "$as_me: failed program was:" >&5
1691sed 's/^/| /' conftest.$ac_ext >&5
1692
1693 ac_retval=1
1694fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001695 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001696 as_fn_set_status $ac_retval
1697
1698} # ac_fn_c_try_cpp
1699
1700# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1701# -------------------------------------------------------
1702# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1703# the include files in INCLUDES and setting the cache variable VAR
1704# accordingly.
1705ac_fn_c_check_header_mongrel ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001708 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1710$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001711if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001712 $as_echo_n "(cached) " >&6
1713fi
1714eval ac_res=\$$3
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1716$as_echo "$ac_res" >&6; }
1717else
1718 # Is the header compilable?
1719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1720$as_echo_n "checking $2 usability... " >&6; }
1721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1722/* end confdefs.h. */
1723$4
1724#include <$2>
1725_ACEOF
1726if ac_fn_c_try_compile "$LINENO"; then :
1727 ac_header_compiler=yes
1728else
1729 ac_header_compiler=no
1730fi
1731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1733$as_echo "$ac_header_compiler" >&6; }
1734
1735# Is the header present?
1736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1737$as_echo_n "checking $2 presence... " >&6; }
1738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1739/* end confdefs.h. */
1740#include <$2>
1741_ACEOF
1742if ac_fn_c_try_cpp "$LINENO"; then :
1743 ac_header_preproc=yes
1744else
1745 ac_header_preproc=no
1746fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001747rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1749$as_echo "$ac_header_preproc" >&6; }
1750
1751# So? What about this header?
1752case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1753 yes:no: )
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1755$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1757$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1758 ;;
1759 no:yes:* )
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1761$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1763$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1765$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1767$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1769$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001770( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001771## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001772## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001773 ) | sed "s/^/$as_me: WARNING: /" >&2
1774 ;;
1775esac
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1777$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001778if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001779 $as_echo_n "(cached) " >&6
1780else
1781 eval "$3=\$ac_header_compiler"
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001787 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001788
1789} # ac_fn_c_check_header_mongrel
1790
1791# ac_fn_c_try_run LINENO
1792# ----------------------
1793# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1794# that executables *can* be run.
1795ac_fn_c_try_run ()
1796{
1797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1798 if { { ac_try="$ac_link"
1799case "(($ac_try" in
1800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1801 *) ac_try_echo=$ac_try;;
1802esac
1803eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1804$as_echo "$ac_try_echo"; } >&5
1805 (eval "$ac_link") 2>&5
1806 ac_status=$?
1807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1808 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1809 { { case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_try") 2>&5
1816 ac_status=$?
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; }; }; then :
1819 ac_retval=0
1820else
1821 $as_echo "$as_me: program exited with status $ac_status" >&5
1822 $as_echo "$as_me: failed program was:" >&5
1823sed 's/^/| /' conftest.$ac_ext >&5
1824
1825 ac_retval=$ac_status
1826fi
1827 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001828 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001829 as_fn_set_status $ac_retval
1830
1831} # ac_fn_c_try_run
1832
1833# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1834# -------------------------------------------------------
1835# Tests whether HEADER exists and can be compiled using the include files in
1836# INCLUDES, setting the cache variable VAR accordingly.
1837ac_fn_c_check_header_compile ()
1838{
1839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001842if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001843 $as_echo_n "(cached) " >&6
1844else
1845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846/* end confdefs.h. */
1847$4
1848#include <$2>
1849_ACEOF
1850if ac_fn_c_try_compile "$LINENO"; then :
1851 eval "$3=yes"
1852else
1853 eval "$3=no"
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857eval ac_res=\$$3
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001861
1862} # ac_fn_c_check_header_compile
1863
1864# ac_fn_c_try_link LINENO
1865# -----------------------
1866# Try to link conftest.$ac_ext, and return whether this succeeded.
1867ac_fn_c_try_link ()
1868{
1869 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870 rm -f conftest.$ac_objext conftest$ac_exeext
1871 if { { ac_try="$ac_link"
1872case "(($ac_try" in
1873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1874 *) ac_try_echo=$ac_try;;
1875esac
1876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1877$as_echo "$ac_try_echo"; } >&5
1878 (eval "$ac_link") 2>conftest.err
1879 ac_status=$?
1880 if test -s conftest.err; then
1881 grep -v '^ *+' conftest.err >conftest.er1
1882 cat conftest.er1 >&5
1883 mv -f conftest.er1 conftest.err
1884 fi
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; } && {
1887 test -z "$ac_c_werror_flag" ||
1888 test ! -s conftest.err
1889 } && test -s conftest$ac_exeext && {
1890 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001891 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001892 }; then :
1893 ac_retval=0
1894else
1895 $as_echo "$as_me: failed program was:" >&5
1896sed 's/^/| /' conftest.$ac_ext >&5
1897
1898 ac_retval=1
1899fi
1900 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1901 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1902 # interfere with the next link command; also delete a directory that is
1903 # left behind by Apple's compiler. We do this before executing the actions.
1904 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001905 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001906 as_fn_set_status $ac_retval
1907
1908} # ac_fn_c_try_link
1909
1910# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1911# -------------------------------------------
1912# Tests whether TYPE exists after having included INCLUDES, setting cache
1913# variable VAR accordingly.
1914ac_fn_c_check_type ()
1915{
1916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1918$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001919if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001920 $as_echo_n "(cached) " >&6
1921else
1922 eval "$3=no"
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h. */
1925$4
1926int
1927main ()
1928{
1929if (sizeof ($2))
1930 return 0;
1931 ;
1932 return 0;
1933}
1934_ACEOF
1935if ac_fn_c_try_compile "$LINENO"; then :
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof (($2)))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949
1950else
1951 eval "$3=yes"
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954fi
1955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1956fi
1957eval ac_res=\$$3
1958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1959$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001960 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001961
1962} # ac_fn_c_check_type
1963
1964# ac_fn_c_find_uintX_t LINENO BITS VAR
1965# ------------------------------------
1966# Finds an unsigned integer type with width BITS, setting cache variable VAR
1967# accordingly.
1968ac_fn_c_find_uintX_t ()
1969{
1970 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1972$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001973if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001974 $as_echo_n "(cached) " >&6
1975else
1976 eval "$3=no"
1977 # Order is important - never check a type that is potentially smaller
1978 # than half of the expected target width.
1979 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1980 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982/* end confdefs.h. */
1983$ac_includes_default
1984int
1985main ()
1986{
1987static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001988test_array [0] = 0;
1989return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001990
1991 ;
1992 return 0;
1993}
1994_ACEOF
1995if ac_fn_c_try_compile "$LINENO"; then :
1996 case $ac_type in #(
1997 uint$2_t) :
1998 eval "$3=yes" ;; #(
1999 *) :
2000 eval "$3=\$ac_type" ;;
2001esac
2002fi
2003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002004 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002005
2006else
2007 break
2008fi
2009 done
2010fi
2011eval ac_res=\$$3
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2013$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002014 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002015
2016} # ac_fn_c_find_uintX_t
2017
2018# ac_fn_c_find_intX_t LINENO BITS VAR
2019# -----------------------------------
2020# Finds a signed integer type with width BITS, setting cache variable VAR
2021# accordingly.
2022ac_fn_c_find_intX_t ()
2023{
2024 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2026$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002027if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002028 $as_echo_n "(cached) " >&6
2029else
2030 eval "$3=no"
2031 # Order is important - never check a type that is potentially smaller
2032 # than half of the expected target width.
2033 for ac_type in int$2_t 'int' 'long int' \
2034 'long long int' 'short int' 'signed char'; do
2035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036/* end confdefs.h. */
2037$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002038 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002039int
2040main ()
2041{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002042static 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 +01002043test_array [0] = 0;
2044return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002054 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002055int
2056main ()
2057{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002058static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002059 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002060test_array [0] = 0;
2061return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068
2069else
2070 case $ac_type in #(
2071 int$2_t) :
2072 eval "$3=yes" ;; #(
2073 *) :
2074 eval "$3=\$ac_type" ;;
2075esac
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002080 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002081
2082else
2083 break
2084fi
2085 done
2086fi
2087eval ac_res=\$$3
2088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2089$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002090 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002091
2092} # ac_fn_c_find_intX_t
2093
2094# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2095# --------------------------------------------
2096# Tries to find the compile-time value of EXPR in a program that includes
2097# INCLUDES, setting VAR accordingly. Returns whether the value could be
2098# computed
2099ac_fn_c_compute_int ()
2100{
2101 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2102 if test "$cross_compiling" = yes; then
2103 # Depending upon the size, compute the lo and hi bounds.
2104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002111test_array [0] = 0;
2112return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_lo=0 ac_mid=0
2120 while :; do
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002128test_array [0] = 0;
2129return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002130
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=$ac_mid; break
2137else
2138 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2139 if test $ac_lo -le $ac_mid; then
2140 ac_lo= ac_hi=
2141 break
2142 fi
2143 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146 done
2147else
2148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2149/* end confdefs.h. */
2150$4
2151int
2152main ()
2153{
2154static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002155test_array [0] = 0;
2156return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_compile "$LINENO"; then :
2163 ac_hi=-1 ac_mid=-1
2164 while :; do
2165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166/* end confdefs.h. */
2167$4
2168int
2169main ()
2170{
2171static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002172test_array [0] = 0;
2173return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002174
2175 ;
2176 return 0;
2177}
2178_ACEOF
2179if ac_fn_c_try_compile "$LINENO"; then :
2180 ac_lo=$ac_mid; break
2181else
2182 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2183 if test $ac_mid -le $ac_hi; then
2184 ac_lo= ac_hi=
2185 break
2186 fi
2187 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2188fi
2189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190 done
2191else
2192 ac_lo= ac_hi=
2193fi
2194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197# Binary search between lo and hi bounds.
2198while test "x$ac_lo" != "x$ac_hi"; do
2199 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201/* end confdefs.h. */
2202$4
2203int
2204main ()
2205{
2206static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002207test_array [0] = 0;
2208return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002209
2210 ;
2211 return 0;
2212}
2213_ACEOF
2214if ac_fn_c_try_compile "$LINENO"; then :
2215 ac_hi=$ac_mid
2216else
2217 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2218fi
2219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2220done
2221case $ac_lo in #((
2222?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2223'') ac_retval=1 ;;
2224esac
2225 else
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228$4
2229static long int longval () { return $2; }
2230static unsigned long int ulongval () { return $2; }
2231#include <stdio.h>
2232#include <stdlib.h>
2233int
2234main ()
2235{
2236
2237 FILE *f = fopen ("conftest.val", "w");
2238 if (! f)
2239 return 1;
2240 if (($2) < 0)
2241 {
2242 long int i = longval ();
2243 if (i != ($2))
2244 return 1;
2245 fprintf (f, "%ld", i);
2246 }
2247 else
2248 {
2249 unsigned long int i = ulongval ();
2250 if (i != ($2))
2251 return 1;
2252 fprintf (f, "%lu", i);
2253 }
2254 /* Do not output a trailing newline, as this causes \r\n confusion
2255 on some platforms. */
2256 return ferror (f) || fclose (f) != 0;
2257
2258 ;
2259 return 0;
2260}
2261_ACEOF
2262if ac_fn_c_try_run "$LINENO"; then :
2263 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2264else
2265 ac_retval=1
2266fi
2267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2268 conftest.$ac_objext conftest.beam conftest.$ac_ext
2269rm -f conftest.val
2270
2271 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002272 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002273 as_fn_set_status $ac_retval
2274
2275} # ac_fn_c_compute_int
2276
2277# ac_fn_c_check_func LINENO FUNC VAR
2278# ----------------------------------
2279# Tests whether FUNC exists, setting the cache variable VAR accordingly
2280ac_fn_c_check_func ()
2281{
2282 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2284$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002285if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002286 $as_echo_n "(cached) " >&6
2287else
2288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h. */
2290/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2292#define $2 innocuous_$2
2293
2294/* System header to define __stub macros and hopefully few prototypes,
2295 which can conflict with char $2 (); below.
2296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2297 <limits.h> exists even on freestanding compilers. */
2298
2299#ifdef __STDC__
2300# include <limits.h>
2301#else
2302# include <assert.h>
2303#endif
2304
2305#undef $2
2306
2307/* Override any GCC internal prototype to avoid an error.
2308 Use char because int might match the return type of a GCC
2309 builtin and then its argument prototype would still apply. */
2310#ifdef __cplusplus
2311extern "C"
2312#endif
2313char $2 ();
2314/* The GNU C library defines this for functions which it implements
2315 to always fail with ENOSYS. Some functions are actually named
2316 something starting with __ and the normal name is an alias. */
2317#if defined __stub_$2 || defined __stub___$2
2318choke me
2319#endif
2320
2321int
2322main ()
2323{
2324return $2 ();
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_link "$LINENO"; then :
2330 eval "$3=yes"
2331else
2332 eval "$3=no"
2333fi
2334rm -f core conftest.err conftest.$ac_objext \
2335 conftest$ac_exeext conftest.$ac_ext
2336fi
2337eval ac_res=\$$3
2338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2339$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002340 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002341
2342} # ac_fn_c_check_func
2343
2344# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2345# ----------------------------------------------------
2346# Tries to find if the field MEMBER exists in type AGGR, after including
2347# INCLUDES, setting cache variable VAR accordingly.
2348ac_fn_c_check_member ()
2349{
2350 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2352$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002353if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002354 $as_echo_n "(cached) " >&6
2355else
2356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357/* end confdefs.h. */
2358$5
2359int
2360main ()
2361{
2362static $2 ac_aggr;
2363if (ac_aggr.$3)
2364return 0;
2365 ;
2366 return 0;
2367}
2368_ACEOF
2369if ac_fn_c_try_compile "$LINENO"; then :
2370 eval "$4=yes"
2371else
2372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h. */
2374$5
2375int
2376main ()
2377{
2378static $2 ac_aggr;
2379if (sizeof ac_aggr.$3)
2380return 0;
2381 ;
2382 return 0;
2383}
2384_ACEOF
2385if ac_fn_c_try_compile "$LINENO"; then :
2386 eval "$4=yes"
2387else
2388 eval "$4=no"
2389fi
2390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394eval ac_res=\$$4
2395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2396$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002397 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002398
2399} # ac_fn_c_check_member
2400
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002401# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2402# ---------------------------------------------
2403# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2404# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002405ac_fn_c_check_decl ()
2406{
2407 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002408 as_decl_name=`echo $2|sed 's/ *(.*//'`
2409 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2411$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002412if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002413 $as_echo_n "(cached) " >&6
2414else
2415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h. */
2417$4
2418int
2419main ()
2420{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002421#ifndef $as_decl_name
2422#ifdef __cplusplus
2423 (void) $as_decl_use;
2424#else
2425 (void) $as_decl_name;
2426#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002427#endif
2428
2429 ;
2430 return 0;
2431}
2432_ACEOF
2433if ac_fn_c_try_compile "$LINENO"; then :
2434 eval "$3=yes"
2435else
2436 eval "$3=no"
2437fi
2438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439fi
2440eval ac_res=\$$3
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2442$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002443 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002444
2445} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002446cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002447This file contains any messages produced by compilers while
2448running configure, to aid debugging if configure makes a mistake.
2449
Martin v. Löwis174440b2008-10-03 08:59:41 +00002450It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002451generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453 $ $0 $@
2454
2455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002456exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002457{
2458cat <<_ASUNAME
2459## --------- ##
2460## Platform. ##
2461## --------- ##
2462
2463hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2464uname -m = `(uname -m) 2>/dev/null || echo unknown`
2465uname -r = `(uname -r) 2>/dev/null || echo unknown`
2466uname -s = `(uname -s) 2>/dev/null || echo unknown`
2467uname -v = `(uname -v) 2>/dev/null || echo unknown`
2468
2469/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2470/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2471
2472/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2473/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2474/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002475/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002476/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2477/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2478/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2479
2480_ASUNAME
2481
2482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2483for as_dir in $PATH
2484do
2485 IFS=$as_save_IFS
2486 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002487 $as_echo "PATH: $as_dir"
2488 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002490
2491} >&5
2492
2493cat >&5 <<_ACEOF
2494
2495
2496## ----------- ##
2497## Core tests. ##
2498## ----------- ##
2499
2500_ACEOF
2501
2502
2503# Keep a trace of the command line.
2504# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002505# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002506# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002507# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002508ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002509ac_configure_args0=
2510ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002511ac_must_keep_next=false
2512for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002513do
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 for ac_arg
2515 do
2516 case $ac_arg in
2517 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2519 | -silent | --silent | --silen | --sile | --sil)
2520 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002522 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 esac
2524 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002525 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002527 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002529 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002531 case $ac_arg in
2532 *=* | --config-cache | -C | -disable-* | --disable-* \
2533 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2534 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2535 | -with-* | --with-* | -without-* | --without-* | --x)
2536 case "$ac_configure_args0 " in
2537 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2538 esac
2539 ;;
2540 -* ) ac_must_keep_next=true ;;
2541 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002543 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002544 ;;
2545 esac
2546 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002548{ ac_configure_args0=; unset ac_configure_args0;}
2549{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
2551# When interrupted or exit'd, cleanup temporary files, and complete
2552# config.log. We remove comments because anyway the quotes in there
2553# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554# WARNING: Use '\'' to represent an apostrophe within the trap.
2555# 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 +00002556trap 'exit_status=$?
2557 # Save into config.log some information that might help in debugging.
2558 {
2559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002560
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002561 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002562## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002563## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 echo
2565 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002566(
2567 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2568 eval ac_val=\$$ac_var
2569 case $ac_val in #(
2570 *${as_nl}*)
2571 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002572 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2573$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002574 esac
2575 case $ac_var in #(
2576 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002577 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2578 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579 esac ;;
2580 esac
2581 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2584 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002585 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002586 "s/'\''/'\''\\\\'\'''\''/g;
2587 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2588 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002589 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002591 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592 esac |
2593 sort
2594)
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002596
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002597 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002598## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002599## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002600 echo
2601 for ac_var in $ac_subst_vars
2602 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002603 eval ac_val=\$$ac_var
2604 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002605 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002606 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002607 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002608 done | sort
2609 echo
2610
2611 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002612 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002613## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002614## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002615 echo
2616 for ac_var in $ac_subst_files
2617 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002618 eval ac_val=\$$ac_var
2619 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002620 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002621 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002622 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002623 done | sort
2624 echo
2625 fi
2626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002628 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002629## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002630## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002632 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 echo
2634 fi
2635 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002636 $as_echo "$as_me: caught signal $ac_signal"
2637 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639 rm -f core *.core core.conftest.* &&
2640 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002642' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002643for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002644 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002645done
2646ac_signal=0
2647
2648# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002651$as_echo "/* confdefs.h */" > confdefs.h
2652
Martin v. Löwis11437992002-04-12 09:54:03 +00002653# Predefined preprocessor variables.
2654
2655cat >>confdefs.h <<_ACEOF
2656#define PACKAGE_NAME "$PACKAGE_NAME"
2657_ACEOF
2658
Martin v. Löwis11437992002-04-12 09:54:03 +00002659cat >>confdefs.h <<_ACEOF
2660#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2661_ACEOF
2662
Martin v. Löwis11437992002-04-12 09:54:03 +00002663cat >>confdefs.h <<_ACEOF
2664#define PACKAGE_VERSION "$PACKAGE_VERSION"
2665_ACEOF
2666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667cat >>confdefs.h <<_ACEOF
2668#define PACKAGE_STRING "$PACKAGE_STRING"
2669_ACEOF
2670
Martin v. Löwis11437992002-04-12 09:54:03 +00002671cat >>confdefs.h <<_ACEOF
2672#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2673_ACEOF
2674
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002675cat >>confdefs.h <<_ACEOF
2676#define PACKAGE_URL "$PACKAGE_URL"
2677_ACEOF
2678
Martin v. Löwis11437992002-04-12 09:54:03 +00002679
2680# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002681# Prefer an explicitly selected file to automatically selected ones.
2682ac_site_file1=NONE
2683ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002684if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002685 # We do not want a PATH search for config.site.
2686 case $CONFIG_SITE in #((
2687 -*) ac_site_file1=./$CONFIG_SITE;;
2688 */*) ac_site_file1=$CONFIG_SITE;;
2689 *) ac_site_file1=./$CONFIG_SITE;;
2690 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002691elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002692 ac_site_file1=$prefix/share/config.site
2693 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695 ac_site_file1=$ac_default_prefix/share/config.site
2696 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002698for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002699do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002700 test "x$ac_site_file" = xNONE && continue
2701 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2703$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002705 . "$ac_site_file" \
2706 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2708as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002709See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710 fi
2711done
2712
2713if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002714 # Some versions of bash will fail to source /dev/null (special files
2715 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2716 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2718$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002720 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2721 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 esac
2723 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002725 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2726$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 >$cache_file
2728fi
2729
2730# Check that the precious variables saved in the cache have kept the same
2731# value.
2732ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002733for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2735 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002736 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2737 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 case $ac_old_set,$ac_new_set in
2739 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2741$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 +00002742 ac_cache_corrupted=: ;;
2743 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002744 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2745$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002746 ac_cache_corrupted=: ;;
2747 ,);;
2748 *)
2749 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002750 # differences in whitespace do not lead to failure.
2751 ac_old_val_w=`echo x $ac_old_val`
2752 ac_new_val_w=`echo x $ac_new_val`
2753 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2755$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2756 ac_cache_corrupted=:
2757 else
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2759$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2760 eval $ac_var=\$ac_old_val
2761 fi
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2763$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2765$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 fi;;
2767 esac
2768 # Pass precious variables to config.status.
2769 if test "$ac_new_set" = set; then
2770 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002771 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 *) ac_arg=$ac_var=$ac_new_val ;;
2773 esac
2774 case " $ac_configure_args " in
2775 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002776 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 esac
2778 fi
2779done
2780if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002781 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2784$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002785 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002787## -------------------- ##
2788## Main body of script. ##
2789## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002790
Guido van Rossum7f43da71994-08-01 12:15:30 +00002791ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002792ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2795ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002796
Guido van Rossum627b2d71993-12-24 10:39:16 +00002797
Michael W. Hudson54241132001-12-07 15:38:26 +00002798
Martin v. Löwiseba40652007-08-30 20:10:57 +00002799ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002800
2801
Benjamin Peterson42e10292016-07-07 00:02:31 -07002802
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002803ac_aux_dir=
2804for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2805 if test -f "$ac_dir/install-sh"; then
2806 ac_aux_dir=$ac_dir
2807 ac_install_sh="$ac_aux_dir/install-sh -c"
2808 break
2809 elif test -f "$ac_dir/install.sh"; then
2810 ac_aux_dir=$ac_dir
2811 ac_install_sh="$ac_aux_dir/install.sh -c"
2812 break
2813 elif test -f "$ac_dir/shtool"; then
2814 ac_aux_dir=$ac_dir
2815 ac_install_sh="$ac_aux_dir/shtool install -c"
2816 break
2817 fi
2818done
2819if test -z "$ac_aux_dir"; then
2820 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2821fi
2822
2823# These three variables are undocumented and unsupported,
2824# and are intended to be withdrawn in a future Autoconf release.
2825# They can cause serious problems if a builder's source tree is in a directory
2826# whose full name contains unusual characters.
2827ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2828ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2829ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2830
2831
2832# Make sure we can run config.sub.
2833$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2834 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2835
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2837$as_echo_n "checking build system type... " >&6; }
2838if ${ac_cv_build+:} false; then :
2839 $as_echo_n "(cached) " >&6
2840else
2841 ac_build_alias=$build_alias
2842test "x$ac_build_alias" = x &&
2843 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2844test "x$ac_build_alias" = x &&
2845 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2846ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2847 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2848
2849fi
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2851$as_echo "$ac_cv_build" >&6; }
2852case $ac_cv_build in
2853*-*-*) ;;
2854*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2855esac
2856build=$ac_cv_build
2857ac_save_IFS=$IFS; IFS='-'
2858set x $ac_cv_build
2859shift
2860build_cpu=$1
2861build_vendor=$2
2862shift; shift
2863# Remember, the first character of IFS is used to create $*,
2864# except with old shells:
2865build_os=$*
2866IFS=$ac_save_IFS
2867case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2868
2869
2870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2871$as_echo_n "checking host system type... " >&6; }
2872if ${ac_cv_host+:} false; then :
2873 $as_echo_n "(cached) " >&6
2874else
2875 if test "x$host_alias" = x; then
2876 ac_cv_host=$ac_cv_build
2877else
2878 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2879 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2880fi
2881
2882fi
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2884$as_echo "$ac_cv_host" >&6; }
2885case $ac_cv_host in
2886*-*-*) ;;
2887*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2888esac
2889host=$ac_cv_host
2890ac_save_IFS=$IFS; IFS='-'
2891set x $ac_cv_host
2892shift
2893host_cpu=$1
2894host_vendor=$2
2895shift; shift
2896# Remember, the first character of IFS is used to create $*,
2897# except with old shells:
2898host_os=$*
2899IFS=$ac_save_IFS
2900case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2901
2902
2903
2904
2905
Ned Deily983df862014-08-22 13:30:59 -07002906# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2907rm -f pybuilddir.txt
2908
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002909if test "$cross_compiling" = yes; then
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2911$as_echo_n "checking for python interpreter for cross build... " >&6; }
2912 if test -z "$PYTHON_FOR_BUILD"; then
2913 for interp in python$PACKAGE_VERSION python2 python; do
2914 which $interp >/dev/null 2>&1 || continue
2915 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2916 break
2917 fi
2918 interp=
2919 done
2920 if test x$interp = x; then
2921 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2922 fi
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2924$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002925 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 +01002926 fi
2927elif test "$cross_compiling" = maybe; then
2928 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2929else
2930 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2931fi
2932
2933
Martin v. Löwis11437992002-04-12 09:54:03 +00002934
Georg Brandlbcd64a32009-03-31 21:45:18 +00002935if test "$prefix" != "/"; then
2936 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2937fi
2938
2939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
2941
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002942# We don't use PACKAGE_ variables, and they cause conflicts
2943# with other autoconf-based packages that include Python.h
2944grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2945rm confdefs.h
2946mv confdefs.h.new confdefs.h
2947
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002948
Martin v. Löwis174440b2008-10-03 08:59:41 +00002949VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002950
Martin v. Löwis1142de32002-03-29 16:28:31 +00002951
2952SOVERSION=1.0
2953
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002954# The later defininition of _XOPEN_SOURCE disables certain features
2955# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2956
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002957$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002958
2959
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002960# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2961# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2962# them.
2963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002964$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002965
2966
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002967# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2968# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2969# them.
2970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002971$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002972
2973
Martin v. Löwisd6320502004-08-12 13:45:08 +00002974# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2975# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002977$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002978
2979
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2982# them.
2983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002984$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002985
2986
2987
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002988define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002989
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002990# Arguments passed to configure.
2991
2992CONFIG_ARGS="$ac_configure_args"
2993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2995$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002996# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002997if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002998 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002999 case $enableval in
3000 yes)
3001 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003002 if test ! -d "${enableval}"
3003 then
3004 enableval=/
3005 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003006 ;;
3007 esac
3008 case $enableval in
3009 no)
3010 UNIVERSALSDK=
3011 enable_universalsdk=
3012 ;;
3013 *)
3014 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003015 if test ! -d "${UNIVERSALSDK}"
3016 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003017 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003018 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003019 ;;
3020 esac
3021
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003022
Ronald Oussoren988117f2006-04-29 11:31:35 +00003023else
3024
3025 UNIVERSALSDK=
3026 enable_universalsdk=
3027
Martin v. Löwiseba40652007-08-30 20:10:57 +00003028fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003029
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003030if test -n "${UNIVERSALSDK}"
3031then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3033$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3036$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003037fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003038
Martin v. Löwiseba40652007-08-30 20:10:57 +00003039
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003040
Ned Deily8e60f6e2013-05-30 00:14:29 -07003041ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003042
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003043UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003044
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3046$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003047
3048# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003049if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003050 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3052$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003053 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003054 if test "${enable_universalsdk}" ; then
3055 :
3056 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003057 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003058 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003059
3060else
3061
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3063$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003064
3065fi
3066
3067
3068
3069
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003070
3071# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003072if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003073 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003074 if test "${enable_framework}"; then
3075 :
3076 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003077 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003078 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003079 PYTHONFRAMEWORK=${withval}
3080 PYTHONFRAMEWORKDIR=${withval}.framework
3081 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3082
3083else
3084
3085 PYTHONFRAMEWORK=Python
3086 PYTHONFRAMEWORKDIR=Python.framework
3087 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3088
3089fi
3090
Martin v. Löwiseba40652007-08-30 20:10:57 +00003091# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003092if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003094 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003095 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003096 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003097 esac
3098 case $enableval in
3099 no)
3100 PYTHONFRAMEWORK=
3101 PYTHONFRAMEWORKDIR=no-framework
3102 PYTHONFRAMEWORKPREFIX=
3103 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003104 FRAMEWORKINSTALLFIRST=
3105 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003106 FRAMEWORKALTINSTALLFIRST=
3107 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003108 if test "x${prefix}" = "xNONE"; then
3109 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3110 else
3111 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3112 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003113 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003114 ;;
3115 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003116 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003118 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003119 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003120 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3121 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003122 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003123
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003124 if test "x${prefix}" = "xNONE" ; then
3125 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003126
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003127 else
3128 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3129 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003130
3131 case "${enableval}" in
3132 /System*)
3133 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3134 if test "${prefix}" = "NONE" ; then
3135 # See below
3136 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3137 fi
3138 ;;
3139
3140 /Library*)
3141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3142 ;;
3143
3144 */Library/Frameworks)
3145 MDIR="`dirname "${enableval}"`"
3146 MDIR="`dirname "${MDIR}"`"
3147 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3148
3149 if test "${prefix}" = "NONE"; then
3150 # User hasn't specified the
3151 # --prefix option, but wants to install
3152 # the framework in a non-default location,
3153 # ensure that the compatibility links get
3154 # installed relative to that prefix as well
3155 # instead of in /usr/local.
3156 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3157 fi
3158 ;;
3159
3160 *)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 ;;
3163 esac
3164
Jack Jansen127e56e2001-09-11 14:41:54 +00003165 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003166
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003167 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003168 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003169 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003170
Martin v. Löwiseba40652007-08-30 20:10:57 +00003171 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003172
Martin v. Löwiseba40652007-08-30 20:10:57 +00003173 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003174
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003175 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3176
3177 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3178
Jack Jansene578a632001-08-15 01:27:14 +00003179 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003180
Guido van Rossum563e7081996-09-10 18:20:48 +00003181else
Martin v. Löwis11437992002-04-12 09:54:03 +00003182
Jack Jansene578a632001-08-15 01:27:14 +00003183 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003185 PYTHONFRAMEWORKPREFIX=
3186 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003187 FRAMEWORKINSTALLFIRST=
3188 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003189 FRAMEWORKALTINSTALLFIRST=
3190 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003191 if test "x${prefix}" = "xNONE" ; then
3192 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3193 else
3194 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3195 fi
Jack Jansene578a632001-08-15 01:27:14 +00003196 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003197
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003198
Martin v. Löwiseba40652007-08-30 20:10:57 +00003199fi
3200
Michael W. Hudson54241132001-12-07 15:38:26 +00003201
3202
3203
3204
Jack Jansene578a632001-08-15 01:27:14 +00003205
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003206
3207
Ronald Oussoren5b787322006-06-06 19:50:24 +00003208
3209
3210
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003211
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003212
Jack Jansene578a632001-08-15 01:27:14 +00003213##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003214## AS_HELP_STRING([--with-dyld],
3215## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003216##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217# Set name for machine-dependent library files
3218
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3220$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003221if test -z "$MACHDEP"
3222then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003223 # avoid using uname for cross builds
3224 if test "$cross_compiling" = yes; then
3225 # ac_sys_system and ac_sys_release are only used for setting
3226 # `define_xopen_source' in the case statement below. For the
3227 # current supported cross builds, this macro is not adjusted.
3228 case "$host" in
3229 *-*-linux*)
3230 ac_sys_system=Linux
3231 ;;
3232 *-*-cygwin*)
3233 ac_sys_system=Cygwin
3234 ;;
3235 *)
3236 # for now, limit cross builds to known configurations
3237 MACHDEP="unknown"
3238 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3239 esac
3240 ac_sys_release=
3241 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003242 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003243 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003244 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003245 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003247 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003249 fi
3250 ac_md_system=`echo $ac_sys_system |
3251 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3252 ac_md_release=`echo $ac_sys_release |
3253 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3254 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003255
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003256 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003257 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003258 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003259 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003260 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003261 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003262 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003263 esac
3264fi
3265
3266
3267if test "$cross_compiling" = yes; then
3268 case "$host" in
3269 *-*-linux*)
3270 case "$host_cpu" in
3271 arm*)
3272 _host_cpu=arm
3273 ;;
3274 *)
3275 _host_cpu=$host_cpu
3276 esac
3277 ;;
3278 *-*-cygwin*)
3279 _host_cpu=
3280 ;;
3281 *)
3282 # for now, limit cross builds to known configurations
3283 MACHDEP="unknown"
3284 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003286 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003289# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3290# disable features if it is defined, without any means to access these
3291# features as extensions. For these systems, we skip the definition of
3292# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3293# some feature, make sure there is no alternative way to access this
3294# feature. Also, when using wildcards, make sure you have verified the
3295# need for not defining _XOPEN_SOURCE on all systems matching the
3296# wildcard, and that the wildcard does not include future systems
3297# (which may remove their limitations).
3298case $ac_sys_system/$ac_sys_release in
3299 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3300 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003301 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003302 # In addition, Stefan Krah confirms that issue #1244610 exists through
3303 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003304 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003305 define_xopen_source=no
3306 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3307 # also defined. This can be overridden by defining _BSD_SOURCE
3308 # As this has a different meaning on Linux, only define it on OpenBSD
3309
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003310$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003311
3312 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003313 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003314 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3315 # also defined. This can be overridden by defining _BSD_SOURCE
3316 # As this has a different meaning on Linux, only define it on OpenBSD
3317
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003318$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003319
3320 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003321 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3322 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3323 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003324 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 +00003325 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003326 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3327 # request to enable features supported by the standard as a request
3328 # to disable features not supported by the standard. The best way
3329 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3330 # entirely and define __EXTENSIONS__ instead.
3331 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003332 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003333 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3334 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003335 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003336 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003337 define_xopen_source=no;;
3338 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003339 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003340 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003341 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003342 # On FreeBSD 4, the math functions C89 does not cover are never defined
3343 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3344 FreeBSD/4.*)
3345 define_xopen_source=no;;
3346 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3347 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3348 # identifies itself as Darwin/7.*
3349 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3350 # disables platform specific features beyond repair.
3351 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3352 # has no effect, don't bother defining them
3353 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003354 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003355 Darwin/1[0-9].*)
3356 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003357 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3358 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3359 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003360 AIX/4)
3361 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003362 AIX/5)
3363 if test `uname -r` -eq 1; then
3364 define_xopen_source=no
3365 fi
3366 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003367 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3368 # defining NI_NUMERICHOST.
3369 QNX/6.3.2)
3370 define_xopen_source=no
3371 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003372
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003373esac
3374
3375if test $define_xopen_source = yes
3376then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003378$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003379
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003380
3381 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3382 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3383 # several APIs are not declared. Since this is also needed in some
3384 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003385
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003386$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003387
3388
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003390$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003391
3392
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393fi
3394
Guido van Rossum91922671997-10-09 20:24:13 +00003395#
3396# SGI compilers allow the specification of the both the ABI and the
3397# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003398# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003399#
3400# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3401# thus supply support for various ABI/ISA combinations. The MACHDEP
3402# variable is also adjusted.
3403#
3404
3405if test ! -z "$SGI_ABI"
3406then
3407 CC="cc $SGI_ABI"
3408 LDFLAGS="$SGI_ABI $LDFLAGS"
3409 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3412$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003413
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003414
3415PLATDIR=plat-$MACHDEP
3416
Jack Jansen83f898c2002-12-30 22:23:40 +00003417# And add extra plat-mac for darwin
3418
Jack Jansen7b59b422003-03-17 15:44:10 +00003419
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3421$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003422if test -z "$EXTRAPLATDIR"
3423then
3424 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003425 darwin)
3426 EXTRAPLATDIR="\$(PLATMACDIRS)"
3427 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3428 ;;
3429 *)
3430 EXTRAPLATDIR=""
3431 EXTRAMACHDEPPATH=""
3432 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003433 esac
3434fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3436$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003437
Jack Jansen6b08a402004-06-03 12:41:45 +00003438# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3439# it may influence the way we can build extensions, so distutils
3440# needs to check it
3441
Ronald Oussoren988117f2006-04-29 11:31:35 +00003442
Jack Jansen6b08a402004-06-03 12:41:45 +00003443CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003444EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003445
Guido van Rossum627b2d71993-12-24 10:39:16 +00003446# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003447
3448# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3449# for debug/optimization stuff. BASECFLAGS is for flags that are required
3450# just to get things to compile and link. Users are free to override OPT
3451# when running configure or make. The build should not break if they do.
3452# BASECFLAGS should generally not be messed with, however.
3453
3454# XXX shouldn't some/most/all of this code be merged with the stuff later
3455# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3457$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003458
Martin v. Löwiseba40652007-08-30 20:10:57 +00003459# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003460if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003461 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003462 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003463 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003464 without_gcc=yes;;
3465 yes) CC=gcc
3466 without_gcc=no;;
3467 *) CC=$withval
3468 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003469 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003470else
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003472 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003473 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003474 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003475 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003476 case $BE_HOST_CPU in
3477 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003478 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003479 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003480 BASECFLAGS="$BASECFLAGS -export pragma"
3481 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003482 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003483 ;;
3484 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003485 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003486 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003487 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003488 ;;
3489 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003490 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003491 ;;
3492 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003493 AR="\$(srcdir)/Modules/ar_beos"
3494 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003495 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003496 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003497 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003498fi
3499
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3501$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003502
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3504$as_echo_n "checking for --with-icc... " >&6; }
3505
3506# Check whether --with-icc was given.
3507if test "${with_icc+set}" = set; then :
3508 withval=$with_icc;
3509 case $withval in
3510 no) CC=${CC:-cc}
3511 with_icc=no;;
3512 yes) CC=icc
3513 CXX=icpc
3514 with_icc=yes;;
3515 *) CC=$withval
3516 with_icc=$withval;;
3517 esac
3518else
3519
3520 with_icc=no
3521fi
3522
3523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3524$as_echo "$with_icc" >&6; }
3525
Guido van Rossum8b131c51995-03-09 14:10:13 +00003526# If the user switches compilers, we can't believe the cache
3527if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3528then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003529 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003530(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003531fi
3532
Trent Nelson15daa352012-12-13 06:46:39 +00003533if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3534 # Normally, MIPSpro CC treats #error directives as warnings, which means
3535 # a successful exit code is returned (0). This is a problem because IRIX
3536 # has a bunch of system headers with this guard at the top:
3537 #
3538 # #ifndef __c99
3539 # #error This header file is to be used only for c99 mode compilations
3540 # #else
3541 #
3542 # When autoconf tests for such a header, like stdint.h, this happens:
3543 #
3544 # configure:4619: cc -c conftest.c >&5
3545 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3546 # #error directive: This header file is to be used only for c99 mode
3547 # compilations
3548 #
3549 # #error This header file is to be used only for c99 mode compilations
3550 # ^
3551 #
3552 # configure:4619: $? = 0
3553 # configure:4619: result: yes
3554 #
3555 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3556 # warning as an error, which causes cc to return a non-zero result,
3557 # which autoconf can interpret correctly.
3558 CFLAGS="$CFLAGS -diag_error 1035"
3559 # Whilst we're here, we might as well make sure CXX defaults to something
3560 # sensible if we're not using gcc.
3561 if test -z "$CXX"; then
3562 CXX="CC"
3563 fi
3564fi
3565
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003566# If the user set CFLAGS, use this instead of the automatically
3567# determined setting
3568preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003569ac_ext=c
3570ac_cpp='$CPP $CPPFLAGS'
3571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3573ac_compiler_gnu=$ac_cv_c_compiler_gnu
3574if test -n "$ac_tool_prefix"; then
3575 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3576set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003579if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003580 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003581else
3582 if test -n "$CC"; then
3583 ac_cv_prog_CC="$CC" # Let the user override the test.
3584else
Martin v. Löwis11437992002-04-12 09:54:03 +00003585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003593 $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 +00003594 break 2
3595 fi
3596done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003597 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003599
Jack Jansendd19cf82001-12-06 22:36:17 +00003600fi
3601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003602CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003603if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3605$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003606else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003609fi
3610
Martin v. Löwiseba40652007-08-30 20:10:57 +00003611
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613if test -z "$ac_cv_prog_CC"; then
3614 ac_ct_CC=$CC
3615 # Extract the first word of "gcc", so it can be a program name with args.
3616set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3618$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003619if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003620 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003621else
3622 if test -n "$ac_ct_CC"; then
3623 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3624else
3625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3626for as_dir in $PATH
3627do
3628 IFS=$as_save_IFS
3629 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 $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 +00003634 break 2
3635 fi
3636done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003637 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003638IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003639
3640fi
3641fi
3642ac_ct_CC=$ac_cv_prog_ac_ct_CC
3643if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3645$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3648$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651 if test "x$ac_ct_CC" = x; then
3652 CC=""
3653 else
3654 case $cross_compiling:$ac_tool_warned in
3655yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003658ac_tool_warned=yes ;;
3659esac
3660 CC=$ac_ct_CC
3661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
3663 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003664fi
3665
Jack Jansendd19cf82001-12-06 22:36:17 +00003666if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003667 if test -n "$ac_tool_prefix"; then
3668 # 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 +00003669set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3671$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003672if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003674else
3675 if test -n "$CC"; then
3676 ac_cv_prog_CC="$CC" # Let the user override the test.
3677else
Martin v. Löwis11437992002-04-12 09:54:03 +00003678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003683 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686 $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 +00003687 break 2
3688 fi
3689done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003690 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003692
3693fi
3694fi
3695CC=$ac_cv_prog_CC
3696if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3698$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3701$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702fi
3703
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706fi
3707if test -z "$CC"; then
3708 # Extract the first word of "cc", so it can be a program name with args.
3709set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3711$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003712if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
3715 if test -n "$CC"; then
3716 ac_cv_prog_CC="$CC" # Let the user override the test.
3717else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3727 ac_prog_rejected=yes
3728 continue
3729 fi
3730 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003731 $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 +00003732 break 2
3733 fi
3734done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003735 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003736IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003737
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738if test $ac_prog_rejected = yes; then
3739 # We found a bogon in the path, so make sure we never use it.
3740 set dummy $ac_cv_prog_CC
3741 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743 # We chose a different compiler from the bogus one.
3744 # However, it has the same basename, so the bogon will be chosen
3745 # first if we set CC to just the basename; use the full file name.
3746 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003747 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748 fi
3749fi
3750fi
3751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003752CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3755$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3758$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759fi
3760
Martin v. Löwiseba40652007-08-30 20:10:57 +00003761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
3763if test -z "$CC"; then
3764 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003765 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 do
3767 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3770$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003771if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003773else
3774 if test -n "$CC"; then
3775 ac_cv_prog_CC="$CC" # Let the user override the test.
3776else
Martin v. Löwis11437992002-04-12 09:54:03 +00003777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3778for as_dir in $PATH
3779do
3780 IFS=$as_save_IFS
3781 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003782 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003785 $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 +00003786 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003787 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003788done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003789 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003791
3792fi
3793fi
3794CC=$ac_cv_prog_CC
3795if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3797$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3800$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003801fi
3802
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 test -n "$CC" && break
3805 done
3806fi
3807if test -z "$CC"; then
3808 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003809 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003810do
3811 # Extract the first word of "$ac_prog", so it can be a program name with args.
3812set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3814$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003815if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003816 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003817else
3818 if test -n "$ac_ct_CC"; then
3819 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3820else
3821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3822for as_dir in $PATH
3823do
3824 IFS=$as_save_IFS
3825 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003829 $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 +00003830 break 2
3831 fi
3832done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003833 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003834IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836fi
3837fi
3838ac_ct_CC=$ac_cv_prog_ac_ct_CC
3839if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3841$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3844$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003846
Martin v. Löwiseba40652007-08-30 20:10:57 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 test -n "$ac_ct_CC" && break
3849done
Michael W. Hudson54241132001-12-07 15:38:26 +00003850
Martin v. Löwiseba40652007-08-30 20:10:57 +00003851 if test "x$ac_ct_CC" = x; then
3852 CC=""
3853 else
3854 case $cross_compiling:$ac_tool_warned in
3855yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858ac_tool_warned=yes ;;
3859esac
3860 CC=$ac_ct_CC
3861 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863
3864fi
3865
3866
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003869as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003870See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003871
3872# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003873$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3874set X $ac_compile
3875ac_compiler=$2
3876for ac_option in --version -v -V -qversion; do
3877 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003878case "(($ac_try" in
3879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3880 *) ac_try_echo=$ac_try;;
3881esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3883$as_echo "$ac_try_echo"; } >&5
3884 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886 if test -s conftest.err; then
3887 sed '10a\
3888... rest of stderr output deleted ...
3889 10q' conftest.err >conftest.er1
3890 cat conftest.er1 >&5
3891 fi
3892 rm -f conftest.er1 conftest.err
3893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3894 test $ac_status = 0; }
3895done
Martin v. Löwis11437992002-04-12 09:54:03 +00003896
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003898/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900int
3901main ()
3902{
3903
3904 ;
3905 return 0;
3906}
3907_ACEOF
3908ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003909ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003910# Try to create an executable without -o first, disregard a.out.
3911# It will help us diagnose broken compilers, and finding out an intuition
3912# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3914$as_echo_n "checking whether the C compiler works... " >&6; }
3915ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3916
3917# The possible output files:
3918ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3919
Martin v. Löwiseba40652007-08-30 20:10:57 +00003920ac_rmfiles=
3921for ac_file in $ac_files
3922do
3923 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003924 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003925 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3926 esac
3927done
3928rm -f $ac_rmfiles
3929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003930if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003931case "(($ac_try" in
3932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3933 *) ac_try_echo=$ac_try;;
3934esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3936$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003938 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3940 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003941 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3942# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3943# in a Makefile. We should not override ac_cv_exeext if it was cached,
3944# so that the user can short-circuit this test for compilers unknown to
3945# Autoconf.
3946for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003947do
3948 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003950 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003951 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003952 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003953 # We found the default executable, but exeext='' is most
3954 # certainly right.
3955 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003956 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003957 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003958 then :; else
3959 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3960 fi
3961 # We set ac_cv_exeext here because the later test for it is not
3962 # safe: cross compilers may not add the suffix if given an `-o'
3963 # argument, so we may need to know it at that point already.
3964 # Even if this section looks crufty: it has the advantage of
3965 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003967 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003968 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 esac
3970done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971test "$ac_cv_exeext" = no && ac_cv_exeext=
3972
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003973else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003974 ac_file=''
3975fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003976if test -z "$ac_file"; then :
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3978$as_echo "no" >&6; }
3979$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003980sed 's/^/| /' conftest.$ac_ext >&5
3981
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003982{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003984as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003985See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003986else
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3988$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003989fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3991$as_echo_n "checking for C compiler default output file name... " >&6; }
3992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3993$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003994ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003996rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003997ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3999$as_echo_n "checking for suffix of executables... " >&6; }
4000if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001case "(($ac_try" in
4002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003 *) ac_try_echo=$ac_try;;
4004esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4006$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004007 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004011 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4012# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4013# work properly (i.e., refer to `conftest.exe'), while it won't with
4014# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004015for ac_file in conftest.exe conftest conftest.*; do
4016 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004017 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004018 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004020 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 * ) break;;
4022 esac
4023done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004027as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004028See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004030rm -f conftest conftest$ac_cv_exeext
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4032$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004033
4034rm -f conftest.$ac_ext
4035EXEEXT=$ac_cv_exeext
4036ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4038/* end confdefs.h. */
4039#include <stdio.h>
4040int
4041main ()
4042{
4043FILE *f = fopen ("conftest.out", "w");
4044 return ferror (f) || fclose (f) != 0;
4045
4046 ;
4047 return 0;
4048}
Skip Montanaro6dead952003-09-25 14:50:04 +00004049_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050ac_clean_files="$ac_clean_files conftest.out"
4051# Check that the compiler produces executables we can run. If not, either
4052# the compiler is broken, or we cross compile.
4053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4054$as_echo_n "checking whether we are cross compiling... " >&6; }
4055if test "$cross_compiling" != yes; then
4056 { { ac_try="$ac_link"
4057case "(($ac_try" in
4058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059 *) ac_try_echo=$ac_try;;
4060esac
4061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062$as_echo "$ac_try_echo"; } >&5
4063 (eval "$ac_link") 2>&5
4064 ac_status=$?
4065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066 test $ac_status = 0; }
4067 if { ac_try='./conftest$ac_cv_exeext'
4068 { { case "(($ac_try" in
4069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070 *) ac_try_echo=$ac_try;;
4071esac
4072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073$as_echo "$ac_try_echo"; } >&5
4074 (eval "$ac_try") 2>&5
4075 ac_status=$?
4076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077 test $ac_status = 0; }; }; then
4078 cross_compiling=no
4079 else
4080 if test "$cross_compiling" = maybe; then
4081 cross_compiling=yes
4082 else
4083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004085as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004086If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004087See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004088 fi
4089 fi
4090fi
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4092$as_echo "$cross_compiling" >&6; }
4093
4094rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4095ac_clean_files=$ac_clean_files_save
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4097$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004098if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004099 $as_echo_n "(cached) " >&6
4100else
4101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004103
Martin v. Löwis11437992002-04-12 09:54:03 +00004104int
4105main ()
4106{
4107
4108 ;
4109 return 0;
4110}
4111_ACEOF
4112rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004113if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004114case "(($ac_try" in
4115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4116 *) ac_try_echo=$ac_try;;
4117esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004118eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4119$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004120 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4123 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124 for ac_file in conftest.o conftest.obj conftest.*; do
4125 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004127 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4129 break;;
4130 esac
4131done
4132else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004133 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004134sed 's/^/| /' conftest.$ac_ext >&5
4135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004138as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004139See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004141rm -f conftest.$ac_cv_objext conftest.$ac_ext
4142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4144$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145OBJEXT=$ac_cv_objext
4146ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4148$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004149if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155int
4156main ()
4157{
4158#ifndef __GNUC__
4159 choke me
4160#endif
4161
4162 ;
4163 return 0;
4164}
4165_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004167 ac_compiler_gnu=yes
4168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004169 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004172ac_cv_c_compiler_gnu=$ac_compiler_gnu
4173
4174fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4176$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4177if test $ac_compiler_gnu = yes; then
4178 GCC=yes
4179else
4180 GCC=
4181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004182ac_test_CFLAGS=${CFLAGS+set}
4183ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4185$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004186if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004187 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004188else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189 ac_save_c_werror_flag=$ac_c_werror_flag
4190 ac_c_werror_flag=yes
4191 ac_cv_prog_cc_g=no
4192 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Martin v. Löwis11437992002-04-12 09:54:03 +00004196int
4197main ()
4198{
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004204if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004205 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207 CFLAGS=""
4208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004209/* end confdefs.h. */
4210
4211int
4212main ()
4213{
4214
4215 ;
4216 return 0;
4217}
4218_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004221else
4222 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004223 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225/* end confdefs.h. */
4226
4227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004236 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243 ac_c_werror_flag=$ac_save_c_werror_flag
4244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4246$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004247if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249elif test $ac_cv_prog_cc_g = yes; then
4250 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004251 CFLAGS="-g -O2"
4252 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254 fi
4255else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256 if test "$GCC" = yes; then
4257 CFLAGS="-O2"
4258 else
4259 CFLAGS=
4260 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004261fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4263$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004264if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004266else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004267 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004268ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004270/* end confdefs.h. */
4271#include <stdarg.h>
4272#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004273struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4275struct buf { int x; };
4276FILE * (*rcsopen) (struct buf *, struct stat *, int);
4277static char *e (p, i)
4278 char **p;
4279 int i;
4280{
4281 return p[i];
4282}
4283static char *f (char * (*g) (char **, int), char **p, ...)
4284{
4285 char *s;
4286 va_list v;
4287 va_start (v,p);
4288 s = g (p, va_arg (v,int));
4289 va_end (v);
4290 return s;
4291}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292
4293/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4294 function prototypes and stuff, but not '\xHH' hex character constants.
4295 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004296 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4298 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004299 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4301
Martin v. Löwiseba40652007-08-30 20:10:57 +00004302/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4303 inside strings and character constants. */
4304#define FOO(x) 'x'
4305int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4306
Skip Montanaro6dead952003-09-25 14:50:04 +00004307int test (int i, double x);
4308struct s1 {int (*f) (int a);};
4309struct s2 {int (*f) (double a);};
4310int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4311int argc;
4312char **argv;
4313int
4314main ()
4315{
4316return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4317 ;
4318 return 0;
4319}
4320_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004321for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4322 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004323do
4324 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004325 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004326 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004328rm -f core conftest.err conftest.$ac_objext
4329 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004330done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004331rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004332CC=$ac_save_CC
4333
4334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335# AC_CACHE_VAL
4336case "x$ac_cv_prog_cc_c89" in
4337 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4339$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004340 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4342$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004343 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004344 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4346$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004347esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004348if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004349
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004350fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004351
Martin v. Löwis11437992002-04-12 09:54:03 +00004352ac_ext=c
4353ac_cpp='$CPP $CPPFLAGS'
4354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4356ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004358if test ! -z "$preset_cflags"
4359then
4360 CFLAGS=$preset_cflags
4361fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004362
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004363
4364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4366$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004367
Martin v. Löwiseba40652007-08-30 20:10:57 +00004368# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004369if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004370 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004371
4372 case $withval in
4373 no) with_cxx_main=no
4374 MAINCC='$(CC)';;
4375 yes) with_cxx_main=yes
4376 MAINCC='$(CXX)';;
4377 *) with_cxx_main=yes
4378 MAINCC=$withval
4379 if test -z "$CXX"
4380 then
4381 CXX=$withval
4382 fi;;
4383 esac
4384else
4385
4386 with_cxx_main=no
4387 MAINCC='$(CC)'
4388
Martin v. Löwiseba40652007-08-30 20:10:57 +00004389fi
4390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4392$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004393
4394preset_cxx="$CXX"
4395if test -z "$CXX"
4396then
4397 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004398 gcc) if test -n "$ac_tool_prefix"; then
4399 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4400set dummy ${ac_tool_prefix}g++; ac_word=$2
4401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4402$as_echo_n "checking for $ac_word... " >&6; }
4403if ${ac_cv_path_CXX+:} false; then :
4404 $as_echo_n "(cached) " >&6
4405else
4406 case $CXX in
4407 [\\/]* | ?:[\\/]*)
4408 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4409 ;;
4410 *)
4411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4412for as_dir in notfound
4413do
4414 IFS=$as_save_IFS
4415 test -z "$as_dir" && as_dir=.
4416 for ac_exec_ext in '' $ac_executable_extensions; do
4417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4418 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4420 break 2
4421 fi
4422done
4423 done
4424IFS=$as_save_IFS
4425
4426 ;;
4427esac
4428fi
4429CXX=$ac_cv_path_CXX
4430if test -n "$CXX"; then
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4432$as_echo "$CXX" >&6; }
4433else
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4435$as_echo "no" >&6; }
4436fi
4437
4438
4439fi
4440if test -z "$ac_cv_path_CXX"; then
4441 ac_pt_CXX=$CXX
4442 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004443set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4445$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004446if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004447 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004448else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004449 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004450 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004451 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 +00004452 ;;
4453 *)
4454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455for as_dir in notfound
4456do
4457 IFS=$as_save_IFS
4458 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004459 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004460 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004461 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004462 $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 +00004463 break 2
4464 fi
4465done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004466 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004467IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004468
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004469 ;;
4470esac
4471fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004472ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4473if test -n "$ac_pt_CXX"; then
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4475$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4478$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004481 if test "x$ac_pt_CXX" = x; then
4482 CXX="g++"
4483 else
4484 case $cross_compiling:$ac_tool_warned in
4485yes:)
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4487$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4488ac_tool_warned=yes ;;
4489esac
4490 CXX=$ac_pt_CXX
4491 fi
4492else
4493 CXX="$ac_cv_path_CXX"
4494fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004495 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004496 cc) if test -n "$ac_tool_prefix"; then
4497 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4498set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004501if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004502 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004503else
4504 case $CXX in
4505 [\\/]* | ?:[\\/]*)
4506 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4507 ;;
4508 *)
4509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510for as_dir in notfound
4511do
4512 IFS=$as_save_IFS
4513 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004514 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004516 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004517 $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 +00004518 break 2
4519 fi
4520done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004521 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004522IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004523
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004524 ;;
4525esac
4526fi
4527CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004528if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4530$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004535
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004536
4537fi
4538if test -z "$ac_cv_path_CXX"; then
4539 ac_pt_CXX=$CXX
4540 # Extract the first word of "c++", so it can be a program name with args.
4541set dummy c++; ac_word=$2
4542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4543$as_echo_n "checking for $ac_word... " >&6; }
4544if ${ac_cv_path_ac_pt_CXX+:} false; then :
4545 $as_echo_n "(cached) " >&6
4546else
4547 case $ac_pt_CXX in
4548 [\\/]* | ?:[\\/]*)
4549 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4550 ;;
4551 *)
4552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4553for as_dir in notfound
4554do
4555 IFS=$as_save_IFS
4556 test -z "$as_dir" && as_dir=.
4557 for ac_exec_ext in '' $ac_executable_extensions; do
4558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4559 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4561 break 2
4562 fi
4563done
4564 done
4565IFS=$as_save_IFS
4566
4567 ;;
4568esac
4569fi
4570ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4571if test -n "$ac_pt_CXX"; then
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4573$as_echo "$ac_pt_CXX" >&6; }
4574else
4575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4576$as_echo "no" >&6; }
4577fi
4578
4579 if test "x$ac_pt_CXX" = x; then
4580 CXX="c++"
4581 else
4582 case $cross_compiling:$ac_tool_warned in
4583yes:)
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4586ac_tool_warned=yes ;;
4587esac
4588 CXX=$ac_pt_CXX
4589 fi
4590else
4591 CXX="$ac_cv_path_CXX"
4592fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004593 ;;
4594 esac
4595 if test "$CXX" = "notfound"
4596 then
4597 CXX=""
4598 fi
4599fi
4600if test -z "$CXX"
4601then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004602 if test -n "$ac_tool_prefix"; then
4603 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4604 do
4605 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4606set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4608$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004609if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004610 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004611else
4612 if test -n "$CXX"; then
4613 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4614else
4615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4616for as_dir in $PATH
4617do
4618 IFS=$as_save_IFS
4619 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004620 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004622 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004623 $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 +00004624 break 2
4625 fi
4626done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004627 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004628IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004629
4630fi
4631fi
4632CXX=$ac_cv_prog_CXX
4633if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4635$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4638$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004639fi
4640
Martin v. Löwiseba40652007-08-30 20:10:57 +00004641
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004642 test -n "$CXX" && break
4643 done
4644fi
4645if test -z "$CXX"; then
4646 ac_ct_CXX=$CXX
4647 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4648do
4649 # Extract the first word of "$ac_prog", so it can be a program name with args.
4650set dummy $ac_prog; ac_word=$2
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4652$as_echo_n "checking for $ac_word... " >&6; }
4653if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4654 $as_echo_n "(cached) " >&6
4655else
4656 if test -n "$ac_ct_CXX"; then
4657 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4658else
4659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4660for as_dir in $PATH
4661do
4662 IFS=$as_save_IFS
4663 test -z "$as_dir" && as_dir=.
4664 for ac_exec_ext in '' $ac_executable_extensions; do
4665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4666 ac_cv_prog_ac_ct_CXX="$ac_prog"
4667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4668 break 2
4669 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004670done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004671 done
4672IFS=$as_save_IFS
4673
4674fi
4675fi
4676ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4677if test -n "$ac_ct_CXX"; then
4678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4679$as_echo "$ac_ct_CXX" >&6; }
4680else
4681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4682$as_echo "no" >&6; }
4683fi
4684
4685
4686 test -n "$ac_ct_CXX" && break
4687done
4688
4689 if test "x$ac_ct_CXX" = x; then
4690 CXX="notfound"
4691 else
4692 case $cross_compiling:$ac_tool_warned in
4693yes:)
4694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4696ac_tool_warned=yes ;;
4697esac
4698 CXX=$ac_ct_CXX
4699 fi
4700fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004701
4702 if test "$CXX" = "notfound"
4703 then
4704 CXX=""
4705 fi
4706fi
4707if test "$preset_cxx" != "$CXX"
4708then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004710
4711 By default, distutils will build C++ extension modules with \"$CXX\".
4712 If this is not intended, then set CXX on the configure command line.
4713 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004714$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004715
4716 By default, distutils will build C++ extension modules with \"$CXX\".
4717 If this is not intended, then set CXX on the configure command line.
4718 " >&2;}
4719fi
4720
doko@python.org4e63fbe2013-01-25 13:08:27 +01004721MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4722
4723
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004724
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004725# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004726
4727ac_ext=c
4728ac_cpp='$CPP $CPPFLAGS'
4729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4731ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4733$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004734# On Suns, sometimes $CPP names a directory.
4735if test -n "$CPP" && test -d "$CPP"; then
4736 CPP=
4737fi
4738if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004739 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004740 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004741else
Martin v. Löwis11437992002-04-12 09:54:03 +00004742 # Double quotes because CPP needs to be expanded
4743 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4744 do
4745 ac_preproc_ok=false
4746for ac_c_preproc_warn_flag in '' yes
4747do
4748 # Use a header file that comes with gcc, so configuring glibc
4749 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004750 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4751 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004752 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004753 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004755/* end confdefs.h. */
4756#ifdef __STDC__
4757# include <limits.h>
4758#else
4759# include <assert.h>
4760#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004761 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004762_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004763if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004764
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004765else
Martin v. Löwis11437992002-04-12 09:54:03 +00004766 # Broken: fails on valid input.
4767continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004768fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004769rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004770
Martin v. Löwiseba40652007-08-30 20:10:57 +00004771 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004772 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004775#include <ac_nonexistent.h>
4776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004777if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004778 # Broken: success on invalid input.
4779continue
4780else
Martin v. Löwis11437992002-04-12 09:54:03 +00004781 # Passes both tests.
4782ac_preproc_ok=:
4783break
4784fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004785rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004786
4787done
4788# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004789rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004790if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004791 break
4792fi
4793
4794 done
4795 ac_cv_prog_CPP=$CPP
4796
4797fi
4798 CPP=$ac_cv_prog_CPP
4799else
4800 ac_cv_prog_CPP=$CPP
4801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4803$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004804ac_preproc_ok=false
4805for ac_c_preproc_warn_flag in '' yes
4806do
4807 # Use a header file that comes with gcc, so configuring glibc
4808 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004809 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4810 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004811 # On the NeXT, cc -E runs the code through the compiler's parser,
4812 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004814/* end confdefs.h. */
4815#ifdef __STDC__
4816# include <limits.h>
4817#else
4818# include <assert.h>
4819#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004820 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004822if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004823
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004824else
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 # Broken: fails on valid input.
4826continue
4827fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004828rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004829
Martin v. Löwiseba40652007-08-30 20:10:57 +00004830 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004831 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004834#include <ac_nonexistent.h>
4835_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004836if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004837 # Broken: success on invalid input.
4838continue
4839else
Martin v. Löwis11437992002-04-12 09:54:03 +00004840 # Passes both tests.
4841ac_preproc_ok=:
4842break
4843fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004844rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004845
4846done
4847# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004848rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004849if $ac_preproc_ok; then :
4850
Martin v. Löwis11437992002-04-12 09:54:03 +00004851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004854as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004855See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004856fi
4857
4858ac_ext=c
4859ac_cpp='$CPP $CPPFLAGS'
4860ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4861ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4862ac_compiler_gnu=$ac_cv_c_compiler_gnu
4863
4864
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4866$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004867if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004868 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004870 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004871 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872 # Loop through the user's path and test for each of PROGNAME-LIST
4873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004874for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4875do
4876 IFS=$as_save_IFS
4877 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878 for ac_prog in grep ggrep; do
4879 for ac_exec_ext in '' $ac_executable_extensions; do
4880 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004881 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004882# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004883 # Check for GNU $ac_path_GREP
4884case `"$ac_path_GREP" --version 2>&1` in
4885*GNU*)
4886 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4887*)
4888 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004889 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004890 while :
4891 do
4892 cat "conftest.in" "conftest.in" >"conftest.tmp"
4893 mv "conftest.tmp" "conftest.in"
4894 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004896 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4897 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004898 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4900 # Best one so far, save it but keep looking for a better one
4901 ac_cv_path_GREP="$ac_path_GREP"
4902 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004903 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004904 # 10*(2^10) chars as input seems more than enough
4905 test $ac_count -gt 10 && break
4906 done
4907 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4908esac
4909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004910 $ac_path_GREP_found && break 3
4911 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004913 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004914IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004915 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004916 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 +00004917 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918else
4919 ac_cv_path_GREP=$GREP
4920fi
4921
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4924$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004925 GREP="$ac_cv_path_GREP"
4926
4927
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4929$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004930if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004931 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004932else
4933 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4934 then ac_cv_path_EGREP="$GREP -E"
4935 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004936 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004938 # Loop through the user's path and test for each of PROGNAME-LIST
4939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004940for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4941do
4942 IFS=$as_save_IFS
4943 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004944 for ac_prog in egrep; do
4945 for ac_exec_ext in '' $ac_executable_extensions; do
4946 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004947 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004948# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004949 # Check for GNU $ac_path_EGREP
4950case `"$ac_path_EGREP" --version 2>&1` in
4951*GNU*)
4952 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4953*)
4954 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004955 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004956 while :
4957 do
4958 cat "conftest.in" "conftest.in" >"conftest.tmp"
4959 mv "conftest.tmp" "conftest.in"
4960 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004961 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004962 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4963 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004964 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004965 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4966 # Best one so far, save it but keep looking for a better one
4967 ac_cv_path_EGREP="$ac_path_EGREP"
4968 ac_path_EGREP_max=$ac_count
4969 fi
4970 # 10*(2^10) chars as input seems more than enough
4971 test $ac_count -gt 10 && break
4972 done
4973 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4974esac
4975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004976 $ac_path_EGREP_found && break 3
4977 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004978 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004979 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004981 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004982 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 +00004983 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004984else
4985 ac_cv_path_EGREP=$EGREP
4986fi
4987
Martin v. Löwiseba40652007-08-30 20:10:57 +00004988 fi
4989fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4991$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004992 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004993
4994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4996$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004997if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004998 $as_echo_n "(cached) " >&6
4999else
5000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005001/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005002#include <stdlib.h>
5003#include <stdarg.h>
5004#include <string.h>
5005#include <float.h>
5006
5007int
5008main ()
5009{
5010
5011 ;
5012 return 0;
5013}
5014_ACEOF
5015if ac_fn_c_try_compile "$LINENO"; then :
5016 ac_cv_header_stdc=yes
5017else
5018 ac_cv_header_stdc=no
5019fi
5020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5021
5022if test $ac_cv_header_stdc = yes; then
5023 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5025/* end confdefs.h. */
5026#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005027
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005028_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005030 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005032else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005033 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005034fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005035rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005037fi
5038
5039if test $ac_cv_header_stdc = yes; then
5040 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5042/* end confdefs.h. */
5043#include <stdlib.h>
5044
5045_ACEOF
5046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5047 $EGREP "free" >/dev/null 2>&1; then :
5048
5049else
5050 ac_cv_header_stdc=no
5051fi
5052rm -f conftest*
5053
5054fi
5055
5056if test $ac_cv_header_stdc = yes; then
5057 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5058 if test "$cross_compiling" = yes; then :
5059 :
5060else
5061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5062/* end confdefs.h. */
5063#include <ctype.h>
5064#include <stdlib.h>
5065#if ((' ' & 0x0FF) == 0x020)
5066# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5067# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5068#else
5069# define ISLOWER(c) \
5070 (('a' <= (c) && (c) <= 'i') \
5071 || ('j' <= (c) && (c) <= 'r') \
5072 || ('s' <= (c) && (c) <= 'z'))
5073# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5074#endif
5075
5076#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5077int
5078main ()
5079{
5080 int i;
5081 for (i = 0; i < 256; i++)
5082 if (XOR (islower (i), ISLOWER (i))
5083 || toupper (i) != TOUPPER (i))
5084 return 2;
5085 return 0;
5086}
5087_ACEOF
5088if ac_fn_c_try_run "$LINENO"; then :
5089
5090else
5091 ac_cv_header_stdc=no
5092fi
5093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5094 conftest.$ac_objext conftest.beam conftest.$ac_ext
5095fi
5096
5097fi
5098fi
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5100$as_echo "$ac_cv_header_stdc" >&6; }
5101if test $ac_cv_header_stdc = yes; then
5102
5103$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5104
5105fi
5106
5107# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5108for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5109 inttypes.h stdint.h unistd.h
5110do :
5111 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5112ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5113"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005114if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005115 cat >>confdefs.h <<_ACEOF
5116#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5117_ACEOF
5118
5119fi
5120
5121done
5122
5123
5124
5125 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 +01005126if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005127 MINIX=yes
5128else
5129 MINIX=
5130fi
5131
5132
5133 if test "$MINIX" = yes; then
5134
5135$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5136
5137
5138$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5139
5140
5141$as_echo "#define _MINIX 1" >>confdefs.h
5142
5143 fi
5144
5145
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5147$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005148if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005149 $as_echo_n "(cached) " >&6
5150else
5151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5152/* end confdefs.h. */
5153
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005154# define __EXTENSIONS__ 1
5155 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005156int
5157main ()
5158{
5159
5160 ;
5161 return 0;
5162}
5163_ACEOF
5164if ac_fn_c_try_compile "$LINENO"; then :
5165 ac_cv_safe_to_define___extensions__=yes
5166else
5167 ac_cv_safe_to_define___extensions__=no
5168fi
5169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5170fi
5171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5172$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5173 test $ac_cv_safe_to_define___extensions__ = yes &&
5174 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5175
5176 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5177
5178 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5179
5180 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5181
5182 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5183
5184
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005185
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005186# Check for unsupported systems
5187case $ac_sys_system/$ac_sys_release in
5188atheos*|Linux*/1*)
5189 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5190 echo See README for details.
5191 exit 1;;
5192esac
5193
5194
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5196$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005197
5198# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005199if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005200 withval=$with_suffix;
5201 case $withval in
5202 no) EXEEXT=;;
5203 yes) EXEEXT=.exe;;
5204 *) EXEEXT=$withval;;
5205 esac
5206fi
5207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5209$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005210
5211# Test whether we're running on a non-case-sensitive system, in which
5212# case we give a warning if no ext is given
5213
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5215$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005216if test ! -d CaseSensitiveTestDir; then
5217mkdir CaseSensitiveTestDir
5218fi
5219
5220if test -d casesensitivetestdir
5221then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5223$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005224 BUILDEXEEXT=.exe
5225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5227$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005228 BUILDEXEEXT=$EXEEXT
5229fi
5230rmdir CaseSensitiveTestDir
5231
5232case $MACHDEP in
5233bsdos*)
5234 case $CC in
5235 gcc) CC="$CC -D_HAVE_BSDI";;
5236 esac;;
5237esac
5238
5239case $ac_sys_system in
5240hp*|HP*)
5241 case $CC in
5242 cc|*/cc) CC="$CC -Ae";;
5243 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005244SunOS*)
5245 # Some functions have a prototype only with that define, e.g. confstr
5246
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005247$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005248
5249 ;;
5250esac
5251
5252
5253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5255$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005256if test -z "$LIBRARY"
5257then
5258 LIBRARY='libpython$(VERSION).a'
5259fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5261$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262
5263# LDLIBRARY is the name of the library to link against (as opposed to the
5264# name of the library into which to insert object files). BLDLIBRARY is also
5265# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5266# is blank as the main program is not linked directly against LDLIBRARY.
5267# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5268# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5269# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5270# DLLLIBRARY is the shared (i.e., DLL) library.
5271#
5272# RUNSHARED is used to run shared python without installed libraries
5273#
5274# INSTSONAME is the name of the shared library that will be use to install
5275# on the system - some systems like version suffix, others don't
5276
5277
5278
5279
5280
5281
5282LDLIBRARY="$LIBRARY"
5283BLDLIBRARY='$(LDLIBRARY)'
5284INSTSONAME='$(LDLIBRARY)'
5285DLLLIBRARY=''
5286LDLIBRARYDIR=''
5287RUNSHARED=''
5288
5289# LINKCC is the command that links the python executable -- default is $(CC).
5290# If CXX is set, and if it is needed to link a main function that was
5291# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5292# python might then depend on the C++ runtime
5293# This is altered for AIX in order to build the export list before
5294# linking.
5295
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5297$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005298if test -z "$LINKCC"
5299then
5300 LINKCC='$(PURIFY) $(MAINCC)'
5301 case $ac_sys_system in
5302 AIX*)
5303 exp_extra="\"\""
5304 if test $ac_sys_release -ge 5 -o \
5305 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5306 exp_extra="."
5307 fi
5308 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005309 QNX*)
5310 # qcc must be used because the other compilers do not
5311 # support -N.
5312 LINKCC=qcc;;
5313 esac
5314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5316$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317
5318# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5319# make sure we default having it set to "no": this is used by
5320# distutils.unixccompiler to know if it should add --enable-new-dtags
5321# to linker command lines, and failing to detect GNU ld simply results
5322# in the same bahaviour as before.
5323
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5325$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326ac_prog=ld
5327if test "$GCC" = yes; then
5328 ac_prog=`$CC -print-prog-name=ld`
5329fi
5330case `"$ac_prog" -V 2>&1 < /dev/null` in
5331 *GNU*)
5332 GNULD=yes;;
5333 *)
5334 GNULD=no;;
5335esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5337$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005338
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5340$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005341# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005342if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005343 enableval=$enable_shared;
5344fi
5345
5346
5347if test -z "$enable_shared"
5348then
5349 case $ac_sys_system in
5350 CYGWIN* | atheos*)
5351 enable_shared="yes";;
5352 *)
5353 enable_shared="no";;
5354 esac
5355fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5357$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5360$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005361# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005362if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005363 enableval=$enable_profiling;
5364fi
5365
5366if test "x$enable_profiling" = xyes; then
5367 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005368 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370/* end confdefs.h. */
5371int main() { return 0; }
5372_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005373if ac_fn_c_try_link "$LINENO"; then :
5374
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005375else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005376 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005377fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005378rm -f core conftest.err conftest.$ac_objext \
5379 conftest$ac_exeext conftest.$ac_ext
5380 CC="$ac_save_cc"
5381else
5382 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005383fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5385$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005386
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005387if test "x$enable_profiling" = xyes; then
5388 BASECFLAGS="-pg $BASECFLAGS"
5389 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005390fi
5391
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5393$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005394
5395# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5396# library that we build, but we do not want to link against it (we
5397# will find it with a -framework option). For this reason there is an
5398# extra variable BLDLIBRARY against which Python and the extension
5399# modules are linked, BLDLIBRARY. This is normally the same as
5400# LDLIBRARY, but empty for MacOSX framework builds.
5401if test "$enable_framework"
5402then
5403 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005404 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005405 BLDLIBRARY=''
5406else
5407 BLDLIBRARY='$(LDLIBRARY)'
5408fi
5409
5410# Other platforms follow
5411if test $enable_shared = "yes"; then
5412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005413$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005414
5415 case $ac_sys_system in
5416 BeOS*)
5417 LDLIBRARY='libpython$(VERSION).so'
5418 ;;
5419 CYGWIN*)
5420 LDLIBRARY='libpython$(VERSION).dll.a'
5421 DLLLIBRARY='libpython$(VERSION).dll'
5422 ;;
5423 SunOS*)
5424 LDLIBRARY='libpython$(VERSION).so'
5425 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005426 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005427 INSTSONAME="$LDLIBRARY".$SOVERSION
5428 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005429 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005430 LDLIBRARY='libpython$(VERSION).so'
5431 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005432 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005433 case $ac_sys_system in
5434 FreeBSD*)
5435 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5436 ;;
5437 esac
5438 INSTSONAME="$LDLIBRARY".$SOVERSION
5439 ;;
5440 hp*|HP*)
5441 case `uname -m` in
5442 ia64)
5443 LDLIBRARY='libpython$(VERSION).so'
5444 ;;
5445 *)
5446 LDLIBRARY='libpython$(VERSION).sl'
5447 ;;
5448 esac
5449 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005450 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005451 ;;
5452 OSF*)
5453 LDLIBRARY='libpython$(VERSION).so'
5454 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005455 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005456 ;;
5457 atheos*)
5458 LDLIBRARY='libpython$(VERSION).so'
5459 BLDLIBRARY='-L. -lpython$(VERSION)'
5460 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5461 ;;
5462 Darwin*)
5463 LDLIBRARY='libpython$(VERSION).dylib'
5464 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005465 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005466 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005467 AIX*)
5468 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005469 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005470 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005471
5472 esac
5473else # shared is disabled
5474 case $ac_sys_system in
5475 CYGWIN*)
5476 BLDLIBRARY='$(LIBRARY)'
5477 LDLIBRARY='libpython$(VERSION).dll.a'
5478 ;;
5479 esac
5480fi
5481
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005482if test "$cross_compiling" = yes; then
5483 RUNSHARED=
5484fi
5485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5487$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005488
5489if test -n "$ac_tool_prefix"; then
5490 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5491set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5493$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005494if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005495 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496else
5497 if test -n "$RANLIB"; then
5498 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5499else
5500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5501for as_dir in $PATH
5502do
5503 IFS=$as_save_IFS
5504 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005505 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005509 break 2
5510 fi
5511done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005512 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005513IFS=$as_save_IFS
5514
5515fi
5516fi
5517RANLIB=$ac_cv_prog_RANLIB
5518if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5520$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5523$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005524fi
5525
5526
5527fi
5528if test -z "$ac_cv_prog_RANLIB"; then
5529 ac_ct_RANLIB=$RANLIB
5530 # Extract the first word of "ranlib", so it can be a program name with args.
5531set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005534if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005535 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005536else
5537 if test -n "$ac_ct_RANLIB"; then
5538 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5539else
5540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5541for as_dir in $PATH
5542do
5543 IFS=$as_save_IFS
5544 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005545 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005547 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005549 break 2
5550 fi
5551done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005552 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005553IFS=$as_save_IFS
5554
5555fi
5556fi
5557ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5558if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5560$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005561else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5563$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005564fi
5565
5566 if test "x$ac_ct_RANLIB" = x; then
5567 RANLIB=":"
5568 else
5569 case $cross_compiling:$ac_tool_warned in
5570yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005573ac_tool_warned=yes ;;
5574esac
5575 RANLIB=$ac_ct_RANLIB
5576 fi
5577else
5578 RANLIB="$ac_cv_prog_RANLIB"
5579fi
5580
5581
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005582if test -n "$ac_tool_prefix"; then
5583 for ac_prog in ar aal
5584 do
5585 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5586set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5588$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005589if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005590 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591else
5592 if test -n "$AR"; then
5593 ac_cv_prog_AR="$AR" # Let the user override the test.
5594else
5595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598 IFS=$as_save_IFS
5599 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005600 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005602 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005604 break 2
5605 fi
5606done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005607 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005608IFS=$as_save_IFS
5609
5610fi
5611fi
5612AR=$ac_cv_prog_AR
5613if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5615$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5618$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005619fi
5620
5621
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005622 test -n "$AR" && break
5623 done
5624fi
5625if test -z "$AR"; then
5626 ac_ct_AR=$AR
5627 for ac_prog in ar aal
5628do
5629 # Extract the first word of "$ac_prog", so it can be a program name with args.
5630set dummy $ac_prog; ac_word=$2
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5632$as_echo_n "checking for $ac_word... " >&6; }
5633if ${ac_cv_prog_ac_ct_AR+:} false; then :
5634 $as_echo_n "(cached) " >&6
5635else
5636 if test -n "$ac_ct_AR"; then
5637 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5638else
5639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5640for as_dir in $PATH
5641do
5642 IFS=$as_save_IFS
5643 test -z "$as_dir" && as_dir=.
5644 for ac_exec_ext in '' $ac_executable_extensions; do
5645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5646 ac_cv_prog_ac_ct_AR="$ac_prog"
5647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5648 break 2
5649 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005650done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005651 done
5652IFS=$as_save_IFS
5653
5654fi
5655fi
5656ac_ct_AR=$ac_cv_prog_ac_ct_AR
5657if test -n "$ac_ct_AR"; then
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5659$as_echo "$ac_ct_AR" >&6; }
5660else
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662$as_echo "no" >&6; }
5663fi
5664
5665
5666 test -n "$ac_ct_AR" && break
5667done
5668
5669 if test "x$ac_ct_AR" = x; then
5670 AR="ar"
5671 else
5672 case $cross_compiling:$ac_tool_warned in
5673yes:)
5674{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5675$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5676ac_tool_warned=yes ;;
5677esac
5678 AR=$ac_ct_AR
5679 fi
5680fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005681
5682
5683# tweak ARFLAGS only if the user didn't set it on the command line
5684
5685if test -z "$ARFLAGS"
5686then
5687 ARFLAGS="rc"
5688fi
5689
5690
5691# Extract the first word of "svnversion", so it can be a program name with args.
5692set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5694$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005695if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005696 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005697else
5698 if test -n "$SVNVERSION"; then
5699 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5700else
5701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5702for as_dir in $PATH
5703do
5704 IFS=$as_save_IFS
5705 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005706 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005708 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005710 break 2
5711 fi
5712done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005713 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005714IFS=$as_save_IFS
5715
5716 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5717fi
5718fi
5719SVNVERSION=$ac_cv_prog_SVNVERSION
5720if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5722$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5725$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005726fi
5727
5728
5729if test $SVNVERSION = found
5730then
5731 SVNVERSION="svnversion \$(srcdir)"
5732else
5733 SVNVERSION="echo Unversioned directory"
5734fi
5735
Trent Nelsond86ceec2012-10-16 09:42:45 -04005736
Trent Nelsonabf20512012-10-17 04:32:49 -04005737if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005738 # If we're building out-of-tree make sure Include (in the current dir)
5739 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5740 # and graminit.h to get picked up from the correct directory.
5741 # (A side effect of this is that these resources will automatically be
5742 # regenerated when building out-of-tree, regardless of whether or not
5743 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5744 # off.)
5745 BASECPPFLAGS="-IInclude"
5746else
5747 BASECPPFLAGS=""
5748fi
5749
Georg Brandl3a5508e2011-03-06 10:42:21 +01005750
5751
5752
5753# Extract the first word of "hg", so it can be a program name with args.
5754set dummy hg; ac_word=$2
5755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5756$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005757if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005758 $as_echo_n "(cached) " >&6
5759else
5760 if test -n "$HAS_HG"; then
5761 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5762else
5763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5764for as_dir in $PATH
5765do
5766 IFS=$as_save_IFS
5767 test -z "$as_dir" && as_dir=.
5768 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005770 ac_cv_prog_HAS_HG="found"
5771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5772 break 2
5773 fi
5774done
5775 done
5776IFS=$as_save_IFS
5777
5778 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5779fi
5780fi
5781HAS_HG=$ac_cv_prog_HAS_HG
5782if test -n "$HAS_HG"; then
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5784$as_echo "$HAS_HG" >&6; }
5785else
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5787$as_echo "no" >&6; }
5788fi
5789
5790
5791if test $HAS_HG = found
5792then
5793 HGVERSION="hg id -i \$(srcdir)"
5794 HGTAG="hg id -t \$(srcdir)"
5795 HGBRANCH="hg id -b \$(srcdir)"
5796else
5797 HGVERSION=""
5798 HGTAG=""
5799 HGBRANCH=""
5800fi
5801
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005802case $MACHDEP in
5803bsdos*|hp*|HP*)
5804 # install -d does not work on BSDI or HP-UX
5805 if test -z "$INSTALL"
5806 then
5807 INSTALL="${srcdir}/install-sh -c"
5808 fi
5809esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005810# Find a good install program. We prefer a C program (faster),
5811# so one script is as good as another. But avoid the broken or
5812# incompatible versions:
5813# SysV /etc/install, /usr/sbin/install
5814# SunOS /usr/etc/install
5815# IRIX /sbin/install
5816# AIX /bin/install
5817# AmigaOS /C/install, which installs bootblocks on floppy discs
5818# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5819# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5820# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5821# OS/2's system install, which has a completely different semantic
5822# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005823# Reject install programs that cannot install multiple files.
5824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5825$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005826if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005827if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005828 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005829else
5830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5831for as_dir in $PATH
5832do
5833 IFS=$as_save_IFS
5834 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005835 # Account for people who put trailing slashes in PATH elements.
5836case $as_dir/ in #((
5837 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005838 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005839 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005840 /usr/ucb/* ) ;;
5841 *)
5842 # OSF1 and SCO ODT 3.0 have their own names for install.
5843 # Don't use installbsd from OSF since it installs stuff as root
5844 # by default.
5845 for ac_prog in ginstall scoinst install; do
5846 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005847 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005848 if test $ac_prog = install &&
5849 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5850 # AIX install. It has an incompatible calling convention.
5851 :
5852 elif test $ac_prog = install &&
5853 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5854 # program-specific install script used by HP pwplus--don't use.
5855 :
5856 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005857 rm -rf conftest.one conftest.two conftest.dir
5858 echo one > conftest.one
5859 echo two > conftest.two
5860 mkdir conftest.dir
5861 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5862 test -s conftest.one && test -s conftest.two &&
5863 test -s conftest.dir/conftest.one &&
5864 test -s conftest.dir/conftest.two
5865 then
5866 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5867 break 3
5868 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005869 fi
5870 fi
5871 done
5872 done
5873 ;;
5874esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875
5876 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877IFS=$as_save_IFS
5878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005879rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005880
5881fi
5882 if test "${ac_cv_path_install+set}" = set; then
5883 INSTALL=$ac_cv_path_install
5884 else
5885 # As a last resort, use the slow shell script. Don't cache a
5886 # value for INSTALL within a source directory, because that will
5887 # break other packages using the cache if that directory is
5888 # removed, or if the value is a relative name.
5889 INSTALL=$ac_install_sh
5890 fi
5891fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5893$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005894
5895# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5896# It thinks the first close brace ends the variable substitution.
5897test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5898
5899test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5900
5901test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5902
Trent Nelsonf6407a12012-08-30 14:56:13 +00005903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5904$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5905if test -z "$MKDIR_P"; then
5906 if ${ac_cv_path_mkdir+:} false; then :
5907 $as_echo_n "(cached) " >&6
5908else
5909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5910for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5911do
5912 IFS=$as_save_IFS
5913 test -z "$as_dir" && as_dir=.
5914 for ac_prog in mkdir gmkdir; do
5915 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005916 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005917 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5918 'mkdir (GNU coreutils) '* | \
5919 'mkdir (coreutils) '* | \
5920 'mkdir (fileutils) '4.1*)
5921 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5922 break 3;;
5923 esac
5924 done
5925 done
5926 done
5927IFS=$as_save_IFS
5928
5929fi
5930
5931 test -d ./--version && rmdir ./--version
5932 if test "${ac_cv_path_mkdir+set}" = set; then
5933 MKDIR_P="$ac_cv_path_mkdir -p"
5934 else
5935 # As a last resort, use the slow shell script. Don't cache a
5936 # value for MKDIR_P within a source directory, because that will
5937 # break other packages using the cache if that directory is
5938 # removed, or if the value is a relative name.
5939 MKDIR_P="$ac_install_sh -d"
5940 fi
5941fi
5942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5943$as_echo "$MKDIR_P" >&6; }
5944
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005945
5946# Not every filesystem supports hard links
5947
5948if test -z "$LN" ; then
5949 case $ac_sys_system in
5950 BeOS*) LN="ln -s";;
5951 CYGWIN*) LN="ln -s";;
5952 atheos*) LN="ln -s";;
5953 *) LN=ln;;
5954 esac
5955fi
5956
5957# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5959$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005960
5961# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005962if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005963 withval=$with_pydebug;
5964if test "$withval" != no
5965then
5966
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005967$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005968
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5970$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005971 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005972else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5973$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005974fi
5975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005978fi
5979
5980
5981# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5982# merged with this chunk of code?
5983
5984# Optimizer/debugger flags
5985# ------------------------
5986# (The following bit of code is complicated enough - please keep things
5987# indented properly. Just pretend you're editing Python code. ;-)
5988
5989# There are two parallel sets of case statements below, one that checks to
5990# see if OPT was set and one that does BASECFLAGS setting based upon
5991# compiler and platform. BASECFLAGS tweaks need to be made even if the
5992# user set OPT.
5993
5994# tweak OPT based on compiler and platform, only if the user didn't set
5995# it on the command line
5996
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005997if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005998then
5999 case $GCC in
6000 yes)
6001 if test "$CC" != 'g++' ; then
6002 STRICT_PROTO="-Wstrict-prototypes"
6003 fi
6004 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6005 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6006 WRAP="-fwrapv"
6007 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006008
6009 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006010 case $CC in
6011 *clang*) WRAP="-fwrapv"
6012 ;;
6013 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006014
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006015 case $ac_cv_prog_cc_g in
6016 yes)
6017 if test "$Py_DEBUG" = 'true' ; then
6018 # Optimization messes up debuggers, so turn it off for
6019 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006020 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006021 else
6022 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6023 fi
6024 ;;
6025 *)
6026 OPT="-O3 -Wall $STRICT_PROTO"
6027 ;;
6028 esac
6029 case $ac_sys_system in
6030 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6031 ;;
6032 esac
6033 ;;
6034
6035 *)
6036 OPT="-O"
6037 ;;
6038 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006039fi
6040
6041
6042
6043# The -arch flags for universal builds on OSX
6044UNIVERSAL_ARCH_FLAGS=
6045
6046
6047# tweak BASECFLAGS based on compiler and platform
6048case $GCC in
6049yes)
6050 # Python violates C99 rules, by casting between incompatible
6051 # pointer types. GCC may generate bad code as a result of that,
6052 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6054$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006055 ac_save_cc="$CC"
6056 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006057 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006058 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006061/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006062
6063int
6064main ()
6065{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006066
Gregory P. Smith373469a2009-11-01 21:03:38 +00006067 ;
6068 return 0;
6069}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006070_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006071if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006072 ac_cv_no_strict_aliasing_ok=yes
6073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006074 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006075fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006077fi
6078
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006079 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6081$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006082 if test $ac_cv_no_strict_aliasing_ok = yes
6083 then
6084 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6085 fi
6086
6087 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6088 # support. Without this, treatment of subnormals doesn't follow
6089 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006090 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006091 alpha*)
6092 BASECFLAGS="$BASECFLAGS -mieee"
6093 ;;
6094 esac
6095
6096 case $ac_sys_system in
6097 SCO_SV*)
6098 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6099 ;;
6100 # is there any other compiler on Darwin besides gcc?
6101 Darwin*)
6102 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6103 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006104 if test "${CC}" = gcc
6105 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6107$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006108 case "${UNIVERSALSDK}" in
6109 */MacOSX10.4u.sdk)
6110 # Build using 10.4 SDK, force usage of gcc when the
6111 # compiler is gcc, otherwise the user will get very
6112 # confusing error messages when building on OSX 10.6
6113 CC=gcc-4.0
6114 CPP=cpp-4.0
6115 ;;
6116 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6118$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006119 fi
6120
6121 # Calculate the right deployment target for this build.
6122 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006123 cur_target_major=`sw_vers -productVersion | \
6124 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6125 cur_target_minor=`sw_vers -productVersion | \
6126 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6127 cur_target="${cur_target_major}.${cur_target_minor}"
6128 if test ${cur_target_major} -eq 10 && \
6129 test ${cur_target_minor} -ge 3
6130 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006131 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006132 if test ${enable_universalsdk}; then
6133 if test "${UNIVERSAL_ARCHS}" = "all"; then
6134 # Ensure that the default platform for a
6135 # 4-way universal build is OSX 10.5,
6136 # that's the first OS release where
6137 # 4-way builds make sense.
6138 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006139
6140 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6141 cur_target='10.5'
6142
6143 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6144 cur_target='10.5'
6145
6146 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6147 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006148 fi
6149 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006150 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006151 # On Intel macs default to a deployment
6152 # target of 10.4, that's the first OSX
6153 # release with Intel support.
6154 cur_target="10.4"
6155 fi
6156 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006157 fi
6158 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6159
6160 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6161 # environment with a value that is the same as what we'll use
6162 # in the Makefile to ensure that we'll get the same compiler
6163 # environment during configure and build time.
6164 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6165 export MACOSX_DEPLOYMENT_TARGET
6166 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6167
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006168 if test "${enable_universalsdk}"; then
6169 UNIVERSAL_ARCH_FLAGS=""
6170 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6171 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6172 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006173 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006174
6175 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6176 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6177 LIPO_32BIT_FLAGS=""
6178 ARCH_RUN_32BIT="true"
6179
6180 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6181 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6182 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006183 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006184
6185 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6186 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6187 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006188 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006189
6190 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6191 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6192 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006193 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006194
6195 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006196 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 +00006197
6198 fi
6199
6200
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006201 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6202 if test "${UNIVERSALSDK}" != "/"
6203 then
6204 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6205 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6206 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006207 fi
6208
6209 fi
6210
6211
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006212 ;;
6213 OSF*)
6214 BASECFLAGS="$BASECFLAGS -mieee"
6215 ;;
6216 esac
6217 ;;
6218
6219*)
6220 case $ac_sys_system in
6221 OpenUNIX*|UnixWare*)
6222 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6223 ;;
6224 OSF*)
6225 BASECFLAGS="$BASECFLAGS -ieee -std"
6226 ;;
6227 SCO_SV*)
6228 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6229 ;;
6230 esac
6231 ;;
6232esac
6233
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006234# ICC needs -fp-model strict or floats behave badly
6235case "$CC" in
6236*icc*)
6237 BASECFLAGS="$BASECFLAGS -fp-model strict"
6238 ;;
6239esac
6240
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006241if test "$Py_DEBUG" = 'true'; then
6242 :
6243else
6244 OPT="-DNDEBUG $OPT"
6245fi
6246
6247if test "$ac_arch_flags"
6248then
6249 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6250fi
6251
6252# disable check for icc since it seems to pass, but generates a warning
6253if test "$CC" = icc
6254then
6255 ac_cv_opt_olimit_ok=no
6256fi
6257
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6259$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006260if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006261 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006262else
6263 ac_save_cc="$CC"
6264CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006266/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006267
6268int
6269main ()
6270{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006271
Gregory P. Smith373469a2009-11-01 21:03:38 +00006272 ;
6273 return 0;
6274}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006275_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006276if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006277 ac_cv_opt_olimit_ok=yes
6278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006279 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006280
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006281fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006283CC="$ac_save_cc"
6284fi
6285
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6287$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006288if test $ac_cv_opt_olimit_ok = yes; then
6289 case $ac_sys_system in
6290 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6291 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6292 # environment?
6293 Darwin*)
6294 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006295 # XXX thankfully this useless troublemaker of a flag has been
6296 # eradicated in the 3.x line. For now, make sure it isn't picked
6297 # up by any of our other platforms that use CC.
6298 AIX*|SunOS*|HP-UX*|IRIX*)
6299 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006300 *)
6301 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6302 ;;
6303 esac
6304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6306$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006307 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006308 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006309else
6310 ac_save_cc="$CC"
6311 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006313/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006314
6315int
6316main ()
6317{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006318
Gregory P. Smith373469a2009-11-01 21:03:38 +00006319 ;
6320 return 0;
6321}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006322_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006323if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006324 ac_cv_olimit_ok=yes
6325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006327
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006328fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006330 CC="$ac_save_cc"
6331fi
6332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6334$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006335 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006336 case $ac_sys_system in
6337 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6338 HP-UX*)
6339 ;;
6340 *)
6341 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6342 ;;
6343 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006344 fi
6345fi
6346
6347# Check whether GCC supports PyArg_ParseTuple format
6348if test "$GCC" = "yes"
6349then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6351$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006352 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006353 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006355/* end confdefs.h. */
6356
6357 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006358int
6359main ()
6360{
6361
6362 ;
6363 return 0;
6364}
Matthias Klosec511b472010-05-08 11:01:39 +00006365
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006367if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006368
Matthias Klosec511b472010-05-08 11:01:39 +00006369
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006370$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006371
Matthias Klosec511b472010-05-08 11:01:39 +00006372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006373$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006374
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006375else
Matthias Klosec511b472010-05-08 11:01:39 +00006376
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006378$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006379
6380fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6382 CFLAGS=$save_CFLAGS
6383fi
6384
Brett Cannon4ff151a2015-09-18 15:09:42 -07006385
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006386# Enable LTO flags
6387
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6389$as_echo_n "checking for --with-lto... " >&6; }
6390
6391# Check whether --with-lto was given.
6392if test "${with_lto+set}" = set; then :
6393 withval=$with_lto;
6394if test "$withval" != no
6395then
6396 Py_LTO='true'
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6398$as_echo "yes" >&6; };
6399else
6400 Py_LTO='false'
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6402$as_echo "no" >&6; };
6403fi
6404else
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; }
6407fi
6408
6409if test "$Py_LTO" = 'true' ; then
6410 case $CC in
6411 *clang*)
6412 # Any changes made here should be reflected in the GCC+Darwin case below
6413 LTOFLAGS="-flto"
6414 ;;
6415 *gcc*)
6416 case $ac_sys_system in
6417 Darwin*)
6418 LTOFLAGS="-flto"
6419 ;;
6420 *)
6421 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6422 ;;
6423 esac
6424 ;;
6425 esac
6426fi
6427
6428
Brett Cannon4ff151a2015-09-18 15:09:42 -07006429# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006430
6431
6432
6433
6434
6435
Brett Cannon4ff151a2015-09-18 15:09:42 -07006436# Extract the first word of "llvm-profdata", so it can be a program name with args.
6437set dummy llvm-profdata; ac_word=$2
6438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6439$as_echo_n "checking for $ac_word... " >&6; }
6440if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6441 $as_echo_n "(cached) " >&6
6442else
6443 if test -n "$LLVM_PROF_FOUND"; then
6444 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6445else
6446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6447for as_dir in $PATH
6448do
6449 IFS=$as_save_IFS
6450 test -z "$as_dir" && as_dir=.
6451 for ac_exec_ext in '' $ac_executable_extensions; do
6452 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6453 ac_cv_prog_LLVM_PROF_FOUND="found"
6454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6455 break 2
6456 fi
6457done
6458 done
6459IFS=$as_save_IFS
6460
6461 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6462fi
6463fi
6464LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6465if test -n "$LLVM_PROF_FOUND"; then
6466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6467$as_echo "$LLVM_PROF_FOUND" >&6; }
6468else
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; }
6471fi
6472
6473
6474LLVM_PROF_ERR=no
6475case $CC in
6476 *clang*)
6477 # Any changes made here should be reflected in the GCC+Darwin case below
6478 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6479 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6480 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6481 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6482 if test $LLVM_PROF_FOUND = not-found
6483 then
6484 LLVM_PROF_ERR=yes
6485 fi
6486 ;;
6487 *gcc*)
6488 case $ac_sys_system in
6489 Darwin*)
6490 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6491 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6492 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6493 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6494 if test $LLVM_PROF_FOUND = not-found
6495 then
6496 LLVM_PROF_ERR=yes
6497 fi
6498 ;;
6499 *)
6500 PGO_PROF_GEN_FLAG="-fprofile-generate"
6501 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6502 LLVM_PROF_MERGER="true"
6503 LLVM_PROF_FILE=""
6504 ;;
6505 esac
6506 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006507 *icc*)
6508 PGO_PROF_GEN_FLAG="-prof-gen"
6509 PGO_PROF_USE_FLAG="-prof-use"
6510 LLVM_PROF_MERGER="true"
6511 LLVM_PROF_FILE=""
6512 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006513esac
6514
6515
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006516# On some compilers, pthreads are available without further options
6517# (e.g. MacOS X). On some of these systems, the compiler will not
6518# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6519# So we have to see first whether pthreads are available without
6520# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6522$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006523if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006524 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006525else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006526 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006527 ac_cv_pthread_is_default=no
6528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006530/* end confdefs.h. */
6531
Stefan Krahae66ca62012-11-22 22:36:57 +01006532#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006533#include <pthread.h>
6534
6535void* routine(void* p){return NULL;}
6536
6537int main(){
6538 pthread_t p;
6539 if(pthread_create(&p,NULL,routine,NULL)!=0)
6540 return 1;
6541 (void)pthread_detach(p);
6542 return 0;
6543}
6544
6545_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006546if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006547
6548 ac_cv_pthread_is_default=yes
6549 ac_cv_kthread=no
6550 ac_cv_pthread=no
6551
6552else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006553 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006554fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6556 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006557fi
6558
6559
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006560fi
6561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6563$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006564
6565
6566if test $ac_cv_pthread_is_default = yes
6567then
6568 ac_cv_kpthread=no
6569else
6570# -Kpthread, if available, provides the right #defines
6571# and linker options to make pthread_create available
6572# Some compilers won't report that they do not support -Kpthread,
6573# so we need to run a program to see whether it really made the
6574# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6576$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006577if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006578 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006579else
6580 ac_save_cc="$CC"
6581CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006582if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006583 ac_cv_kpthread=no
6584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006586/* end confdefs.h. */
6587
Stefan Krahae66ca62012-11-22 22:36:57 +01006588#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006589#include <pthread.h>
6590
6591void* routine(void* p){return NULL;}
6592
6593int main(){
6594 pthread_t p;
6595 if(pthread_create(&p,NULL,routine,NULL)!=0)
6596 return 1;
6597 (void)pthread_detach(p);
6598 return 0;
6599}
6600
6601_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006602if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006603 ac_cv_kpthread=yes
6604else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006605 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006606fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6608 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006609fi
6610
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006611CC="$ac_save_cc"
6612fi
6613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6615$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006616fi
6617
6618if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6619then
6620# -Kthread, if available, provides the right #defines
6621# and linker options to make pthread_create available
6622# Some compilers won't report that they do not support -Kthread,
6623# so we need to run a program to see whether it really made the
6624# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6626$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006627if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006628 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006629else
6630 ac_save_cc="$CC"
6631CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006632if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006633 ac_cv_kthread=no
6634else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006636/* end confdefs.h. */
6637
Stefan Krahae66ca62012-11-22 22:36:57 +01006638#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006639#include <pthread.h>
6640
6641void* routine(void* p){return NULL;}
6642
6643int main(){
6644 pthread_t p;
6645 if(pthread_create(&p,NULL,routine,NULL)!=0)
6646 return 1;
6647 (void)pthread_detach(p);
6648 return 0;
6649}
6650
6651_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006652if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006653 ac_cv_kthread=yes
6654else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006655 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006656fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006659fi
6660
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006661CC="$ac_save_cc"
6662fi
6663
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6665$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006666fi
6667
6668if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6669then
6670# -pthread, if available, provides the right #defines
6671# and linker options to make pthread_create available
6672# Some compilers won't report that they do not support -pthread,
6673# so we need to run a program to see whether it really made the
6674# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6676$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006677if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006678 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006679else
6680 ac_save_cc="$CC"
6681CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006682if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006683 ac_cv_pthread=no
6684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006686/* end confdefs.h. */
6687
Stefan Krahae66ca62012-11-22 22:36:57 +01006688#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006689#include <pthread.h>
6690
6691void* routine(void* p){return NULL;}
6692
6693int main(){
6694 pthread_t p;
6695 if(pthread_create(&p,NULL,routine,NULL)!=0)
6696 return 1;
6697 (void)pthread_detach(p);
6698 return 0;
6699}
6700
6701_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006702if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006703 ac_cv_pthread=yes
6704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006705 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006709fi
6710
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006711CC="$ac_save_cc"
6712fi
6713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6715$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006716fi
6717
6718# If we have set a CC compiler flag for thread support then
6719# check if it works for CXX, too.
6720ac_cv_cxx_thread=no
6721if test ! -z "$CXX"
6722then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6724$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006725ac_save_cxx="$CXX"
6726
6727if test "$ac_cv_kpthread" = "yes"
6728then
6729 CXX="$CXX -Kpthread"
6730 ac_cv_cxx_thread=yes
6731elif test "$ac_cv_kthread" = "yes"
6732then
6733 CXX="$CXX -Kthread"
6734 ac_cv_cxx_thread=yes
6735elif test "$ac_cv_pthread" = "yes"
6736then
6737 CXX="$CXX -pthread"
6738 ac_cv_cxx_thread=yes
6739fi
6740
6741if test $ac_cv_cxx_thread = yes
6742then
6743 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6744 $CXX -c conftest.$ac_ext 2>&5
6745 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6746 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6747 then
6748 ac_cv_cxx_thread=yes
6749 else
6750 ac_cv_cxx_thread=no
6751 fi
6752 rm -fr conftest*
6753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6755$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006756fi
6757CXX="$ac_save_cxx"
6758
6759
6760# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6762$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006763if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006767/* end confdefs.h. */
6768#include <stdlib.h>
6769#include <stdarg.h>
6770#include <string.h>
6771#include <float.h>
6772
6773int
6774main ()
6775{
6776
6777 ;
6778 return 0;
6779}
6780_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006781if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006782 ac_cv_header_stdc=yes
6783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006784 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006785fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6787
6788if test $ac_cv_header_stdc = yes; then
6789 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006791/* end confdefs.h. */
6792#include <string.h>
6793
6794_ACEOF
6795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006796 $EGREP "memchr" >/dev/null 2>&1; then :
6797
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006798else
6799 ac_cv_header_stdc=no
6800fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006801rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006802
6803fi
6804
6805if test $ac_cv_header_stdc = yes; then
6806 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006808/* end confdefs.h. */
6809#include <stdlib.h>
6810
6811_ACEOF
6812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006813 $EGREP "free" >/dev/null 2>&1; then :
6814
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006815else
6816 ac_cv_header_stdc=no
6817fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006818rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006819
6820fi
6821
6822if test $ac_cv_header_stdc = yes; then
6823 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006824 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006825 :
6826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006828/* end confdefs.h. */
6829#include <ctype.h>
6830#include <stdlib.h>
6831#if ((' ' & 0x0FF) == 0x020)
6832# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6833# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6834#else
6835# define ISLOWER(c) \
6836 (('a' <= (c) && (c) <= 'i') \
6837 || ('j' <= (c) && (c) <= 'r') \
6838 || ('s' <= (c) && (c) <= 'z'))
6839# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6840#endif
6841
6842#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6843int
6844main ()
6845{
6846 int i;
6847 for (i = 0; i < 256; i++)
6848 if (XOR (islower (i), ISLOWER (i))
6849 || toupper (i) != TOUPPER (i))
6850 return 2;
6851 return 0;
6852}
6853_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006854if ac_fn_c_try_run "$LINENO"; then :
6855
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006858fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006861fi
6862
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006863fi
6864fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6866$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006867if test $ac_cv_header_stdc = yes; then
6868
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006870
6871fi
6872
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006873for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006874fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006875ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006876shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006877unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006878sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6879sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006880sys/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 +00006881sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006882sys/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 +00006883sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006884bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885do :
6886 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6887ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006888if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006889 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006891_ACEOF
6892
6893fi
6894
Guido van Rossum627b2d71993-12-24 10:39:16 +00006895done
6896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006897ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006898for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006899 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6901$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006902if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006903 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006906/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006907#include <sys/types.h>
6908#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006909
Martin v. Löwis11437992002-04-12 09:54:03 +00006910int
6911main ()
6912{
6913if ((DIR *) 0)
6914return 0;
6915 ;
6916 return 0;
6917}
6918_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006919if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006920 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926eval ac_res=\$$as_ac_Header
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6928$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006929if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006930 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006931#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006932_ACEOF
6933
6934ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006935fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006936
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006937done
6938# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6939if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6941$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006942if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006944else
Martin v. Löwis11437992002-04-12 09:54:03 +00006945 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006948
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949/* Override any GCC internal prototype to avoid an error.
6950 Use char because int might match the return type of a GCC
6951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006952#ifdef __cplusplus
6953extern "C"
6954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006955char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006956int
6957main ()
6958{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 ;
6961 return 0;
6962}
6963_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006964for ac_lib in '' dir; do
6965 if test -z "$ac_lib"; then
6966 ac_res="none required"
6967 else
6968 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006969 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006971 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006972 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006973fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006974rm -f core conftest.err conftest.$ac_objext \
6975 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006976 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006977 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006979done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006980if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006981
Martin v. Löwiseba40652007-08-30 20:10:57 +00006982else
6983 ac_cv_search_opendir=no
6984fi
6985rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006986LIBS=$ac_func_search_save_LIBS
6987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6989$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006990ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006992 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006993
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006994fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006995
Michael W. Hudson54241132001-12-07 15:38:26 +00006996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6998$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006999if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007000 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007001else
7002 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007005
Martin v. Löwiseba40652007-08-30 20:10:57 +00007006/* Override any GCC internal prototype to avoid an error.
7007 Use char because int might match the return type of a GCC
7008 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007009#ifdef __cplusplus
7010extern "C"
7011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007012char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007013int
7014main ()
7015{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007016return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 ;
7018 return 0;
7019}
7020_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007021for ac_lib in '' x; do
7022 if test -z "$ac_lib"; then
7023 ac_res="none required"
7024 else
7025 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007026 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007027 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007028 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007029 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007031rm -f core conftest.err conftest.$ac_objext \
7032 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007033 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007034 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007036done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007037if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007038
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039else
7040 ac_cv_search_opendir=no
7041fi
7042rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007043LIBS=$ac_func_search_save_LIBS
7044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7046$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007047ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007048if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007049 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007051fi
7052
7053fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007054
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7056$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007057if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007058 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007061/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007062#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007063int
7064main ()
7065{
7066return makedev(0, 0);
7067 ;
7068 return 0;
7069}
7070_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007072 ac_cv_header_sys_types_h_makedev=yes
7073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007075fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007076rm -f core conftest.err conftest.$ac_objext \
7077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007078
7079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7081$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007082
7083if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007084ac_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 +01007085if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007087$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007088
7089fi
7090
7091
7092
7093 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007094 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 +01007095if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007096
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007097$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007098
7099fi
7100
7101
7102 fi
7103fi
7104
Michael W. Hudson54241132001-12-07 15:38:26 +00007105
Martin v. Löwis11017b12006-01-14 18:12:57 +00007106# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007107for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108do :
7109 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 +00007110#ifdef HAVE_ASM_TYPES_H
7111#include <asm/types.h>
7112#endif
7113#ifdef HAVE_SYS_SOCKET_H
7114#include <sys/socket.h>
7115#endif
7116
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007117"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007118if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007119 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007121_ACEOF
7122
7123fi
7124
7125done
7126
7127
Guido van Rossum627b2d71993-12-24 10:39:16 +00007128# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007129was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7131$as_echo_n "checking for clock_t in time.h... " >&6; }
7132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007133/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007134#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007135
7136_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007138 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007139 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007140else
Martin v. Löwis11437992002-04-12 09:54:03 +00007141
7142
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007144
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007145
Guido van Rossum627b2d71993-12-24 10:39:16 +00007146fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007147rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007148
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7150$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007151
Neal Norwitz11690112002-07-30 01:08:28 +00007152# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7154$as_echo_n "checking for makedev... " >&6; }
7155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007156/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007157
7158#if defined(MAJOR_IN_MKDEV)
7159#include <sys/mkdev.h>
7160#elif defined(MAJOR_IN_SYSMACROS)
7161#include <sys/sysmacros.h>
7162#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007163#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007164#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007165int
7166main ()
7167{
7168 makedev(0, 0)
7169 ;
7170 return 0;
7171}
7172_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007173if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007174 ac_cv_has_makedev=yes
7175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007176 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007177fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007178rm -f core conftest.err conftest.$ac_objext \
7179 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007180if test "$ac_cv_has_makedev" = "no"; then
7181 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007183/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007184
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007185#define _OSF_SOURCE 1
7186#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007187
Neal Norwitz11690112002-07-30 01:08:28 +00007188int
7189main ()
7190{
7191 makedev(0, 0)
7192 ;
7193 return 0;
7194}
7195_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007197 ac_cv_has_makedev=yes
7198else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007199 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007200fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007201rm -f core conftest.err conftest.$ac_objext \
7202 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007203 if test "$ac_cv_has_makedev" = "yes"; then
7204
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007205$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007206
7207 fi
7208fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7210$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007211if test "$ac_cv_has_makedev" = "yes"; then
7212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007214
7215fi
7216
Martin v. Löwis399a6892002-10-04 10:22:02 +00007217# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7218# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7219# defined, but the compiler does not support pragma redefine_extname,
7220# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7221# structures (such as rlimit64) without declaring them. As a
7222# work-around, disable LFS on such configurations
7223
7224use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7226$as_echo_n "checking Solaris LFS bug... " >&6; }
7227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007228/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007229
7230#define _LARGEFILE_SOURCE 1
7231#define _FILE_OFFSET_BITS 64
7232#include <sys/resource.h>
7233
Martin v. Löwis399a6892002-10-04 10:22:02 +00007234int
7235main ()
7236{
7237struct rlimit foo;
7238 ;
7239 return 0;
7240}
7241_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007242if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007243 sol_lfs_bug=no
7244else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007245 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7249$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007250if test "$sol_lfs_bug" = "yes"; then
7251 use_lfs=no
7252fi
7253
7254if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007255# Two defines needed to enable largefile support on various platforms
7256# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007257case $ac_sys_system/$ac_sys_release in
7258AIX*)
7259
7260$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7261
7262 ;;
7263esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007264
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007265$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007266
7267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007269
Martin v. Löwis399a6892002-10-04 10:22:02 +00007270fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007271
Guido van Rossum84e7b241996-08-19 21:59:00 +00007272# Add some code to confdefs.h so that the test for off_t works on SCO
7273cat >> confdefs.h <<\EOF
7274#if defined(SCO_DS)
7275#undef _OFF_T
7276#endif
7277EOF
7278
Guido van Rossumef2255b2000-03-10 22:30:29 +00007279# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007281if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007283else
Martin v. Löwis11437992002-04-12 09:54:03 +00007284
7285cat >>confdefs.h <<_ACEOF
7286#define mode_t int
7287_ACEOF
7288
7289fi
7290
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007292if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007293
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007294else
Martin v. Löwis11437992002-04-12 09:54:03 +00007295
7296cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007297#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007298_ACEOF
7299
7300fi
7301
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007302ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007303if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007304
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007305else
Martin v. Löwis11437992002-04-12 09:54:03 +00007306
7307cat >>confdefs.h <<_ACEOF
7308#define pid_t int
7309_ACEOF
7310
7311fi
7312
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007313
Martin v. Löwis11437992002-04-12 09:54:03 +00007314cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007315#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007316_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007317
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007318ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007319if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007320
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007321else
Martin v. Löwis11437992002-04-12 09:54:03 +00007322
7323cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007324#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007325_ACEOF
7326
7327fi
7328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7330$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007331if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007335/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007336#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007337
7338_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007341 ac_cv_type_uid_t=yes
7342else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007343 ac_cv_type_uid_t=no
7344fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007345rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007346
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007347fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7349$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007350if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007352$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007353
7354
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007356
7357fi
7358
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007359
7360# There are two separate checks for each of the exact-width integer types we
7361# need. First we check whether the type is available using the usual
7362# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7363# and <stdint.h> where available). We then also use the special type checks of
7364# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7365# directly, #define's uint32_t to be a suitable type.
7366
7367ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7368if test "x$ac_cv_type_uint32_t" = xyes; then :
7369
7370$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7371
7372fi
7373
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7375case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007376 no|yes) ;; #(
7377 *)
7378
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007379$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007380
7381
7382cat >>confdefs.h <<_ACEOF
7383#define uint32_t $ac_cv_c_uint32_t
7384_ACEOF
7385;;
7386 esac
7387
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007388
7389ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7390if test "x$ac_cv_type_uint64_t" = xyes; then :
7391
7392$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7393
7394fi
7395
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007396ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7397case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007398 no|yes) ;; #(
7399 *)
7400
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007401$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007402
7403
7404cat >>confdefs.h <<_ACEOF
7405#define uint64_t $ac_cv_c_uint64_t
7406_ACEOF
7407;;
7408 esac
7409
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007410
7411ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7412if test "x$ac_cv_type_int32_t" = xyes; then :
7413
7414$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7415
7416fi
7417
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007418ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7419case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007420 no|yes) ;; #(
7421 *)
7422
7423cat >>confdefs.h <<_ACEOF
7424#define int32_t $ac_cv_c_int32_t
7425_ACEOF
7426;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007427esac
7428
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007429
7430ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7431if test "x$ac_cv_type_int64_t" = xyes; then :
7432
7433$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7434
7435fi
7436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007437ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7438case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007439 no|yes) ;; #(
7440 *)
7441
7442cat >>confdefs.h <<_ACEOF
7443#define int64_t $ac_cv_c_int64_t
7444_ACEOF
7445;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007446esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007447
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007448
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007449ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007450if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007452$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007453
7454fi
7455
Jack Jansendd19cf82001-12-06 22:36:17 +00007456
Michael W. Hudson54241132001-12-07 15:38:26 +00007457# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007458# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007459# The cast to long int works around a bug in the HP C Compiler
7460# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7461# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7462# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7464$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007465if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007468 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 +00007469
Martin v. Löwis11437992002-04-12 09:54:03 +00007470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007471 if test "$ac_cv_type_int" = yes; then
7472 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007474as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007475See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007476 else
7477 ac_cv_sizeof_int=0
7478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007479fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007480
Martin v. Löwis11437992002-04-12 09:54:03 +00007481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7483$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007484
7485
7486
Martin v. Löwis11437992002-04-12 09:54:03 +00007487cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007488#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007489_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007490
7491
Martin v. Löwiseba40652007-08-30 20:10:57 +00007492# The cast to long int works around a bug in the HP C Compiler
7493# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7494# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7495# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7497$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007498if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007499 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007500else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007501 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 +00007502
Martin v. Löwis11437992002-04-12 09:54:03 +00007503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504 if test "$ac_cv_type_long" = yes; then
7505 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007507as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007508See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007509 else
7510 ac_cv_sizeof_long=0
7511 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007512fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513
Martin v. Löwis11437992002-04-12 09:54:03 +00007514fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7516$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007517
7518
7519
Martin v. Löwis11437992002-04-12 09:54:03 +00007520cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007521#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007522_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007523
7524
Martin v. Löwiseba40652007-08-30 20:10:57 +00007525# The cast to long int works around a bug in the HP C Compiler
7526# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7527# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7528# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7530$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007531if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007532 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007534 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 +00007535
Martin v. Löwis11437992002-04-12 09:54:03 +00007536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007537 if test "$ac_cv_type_void_p" = yes; then
7538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7539$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007540as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007541See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007542 else
7543 ac_cv_sizeof_void_p=0
7544 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007545fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007546
Martin v. Löwis11437992002-04-12 09:54:03 +00007547fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7549$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007550
7551
7552
Martin v. Löwis11437992002-04-12 09:54:03 +00007553cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007554#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007555_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007556
7557
Martin v. Löwiseba40652007-08-30 20:10:57 +00007558# The cast to long int works around a bug in the HP C Compiler
7559# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7560# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7561# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7563$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007564if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007565 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007566else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007567 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 +00007568
Martin v. Löwis11437992002-04-12 09:54:03 +00007569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007570 if test "$ac_cv_type_short" = yes; then
7571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007573as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007574See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007575 else
7576 ac_cv_sizeof_short=0
7577 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007578fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007579
Martin v. Löwis11437992002-04-12 09:54:03 +00007580fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7582$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007583
7584
7585
Martin v. Löwis11437992002-04-12 09:54:03 +00007586cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007587#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007588_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007589
7590
Martin v. Löwiseba40652007-08-30 20:10:57 +00007591# The cast to long int works around a bug in the HP C Compiler
7592# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7593# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7594# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7596$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007597if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007598 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007600 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 +00007601
Martin v. Löwis11437992002-04-12 09:54:03 +00007602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007603 if test "$ac_cv_type_float" = yes; then
7604 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007606as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007607See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007608 else
7609 ac_cv_sizeof_float=0
7610 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007611fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007612
Martin v. Löwis11437992002-04-12 09:54:03 +00007613fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7615$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616
7617
7618
Martin v. Löwis11437992002-04-12 09:54:03 +00007619cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007620#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007621_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007622
7623
Martin v. Löwiseba40652007-08-30 20:10:57 +00007624# The cast to long int works around a bug in the HP C Compiler
7625# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7626# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7627# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7629$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007630if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007631 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007632else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007633 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 +00007634
Martin v. Löwis11437992002-04-12 09:54:03 +00007635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007636 if test "$ac_cv_type_double" = yes; then
7637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007639as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007640See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641 else
7642 ac_cv_sizeof_double=0
7643 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007644fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645
Martin v. Löwis11437992002-04-12 09:54:03 +00007646fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7648$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649
7650
7651
Martin v. Löwis11437992002-04-12 09:54:03 +00007652cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007653#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007654_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007655
7656
Martin v. Löwiseba40652007-08-30 20:10:57 +00007657# The cast to long int works around a bug in the HP C Compiler
7658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7660# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7662$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007663if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007664 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666 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 +00007667
Martin v. Löwis11437992002-04-12 09:54:03 +00007668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669 if test "$ac_cv_type_fpos_t" = yes; then
7670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007672as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007673See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674 else
7675 ac_cv_sizeof_fpos_t=0
7676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007677fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007678
Martin v. Löwis11437992002-04-12 09:54:03 +00007679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7681$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682
7683
7684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007686#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007687_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007688
Michael W. Hudson54241132001-12-07 15:38:26 +00007689
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690# The cast to long int works around a bug in the HP C Compiler
7691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7693# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7695$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007696if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007699 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 +00007700
Martin v. Löwis18e16552006-02-15 17:27:45 +00007701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007702 if test "$ac_cv_type_size_t" = yes; then
7703 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007705as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007706See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707 else
7708 ac_cv_sizeof_size_t=0
7709 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007711
Martin v. Löwis18e16552006-02-15 17:27:45 +00007712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7714$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715
7716
7717
Martin v. Löwis18e16552006-02-15 17:27:45 +00007718cat >>confdefs.h <<_ACEOF
7719#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7720_ACEOF
7721
7722
Christian Heimes951cc0f2008-01-31 23:08:23 +00007723# The cast to long int works around a bug in the HP C Compiler
7724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7726# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7728$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007729if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007732 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 +00007733
Christian Heimes951cc0f2008-01-31 23:08:23 +00007734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735 if test "$ac_cv_type_pid_t" = yes; then
7736 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007738as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007739See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007740 else
7741 ac_cv_sizeof_pid_t=0
7742 fi
7743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744
Christian Heimes951cc0f2008-01-31 23:08:23 +00007745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7747$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007748
7749
7750
7751cat >>confdefs.h <<_ACEOF
7752#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7753_ACEOF
7754
7755
Michael W. Hudson54241132001-12-07 15:38:26 +00007756
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7758$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007759have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007761/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763int
7764main ()
7765{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007766long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 ;
7768 return 0;
7769}
7770_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007771if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007772
7773
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007775
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007776 have_long_long=yes
7777
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7781$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007782if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783# The cast to long int works around a bug in the HP C Compiler
7784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7786# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7788$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007789if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007790 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007792 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 +00007793
Martin v. Löwis11437992002-04-12 09:54:03 +00007794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007795 if test "$ac_cv_type_long_long" = yes; then
7796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007798as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007799See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007800 else
7801 ac_cv_sizeof_long_long=0
7802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007804
Martin v. Löwis11437992002-04-12 09:54:03 +00007805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7807$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007808
7809
7810
Martin v. Löwis11437992002-04-12 09:54:03 +00007811cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007812#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007813_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007814
Michael W. Hudson54241132001-12-07 15:38:26 +00007815
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007816fi
7817
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7819$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007820have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007822/* end confdefs.h. */
7823
7824int
7825main ()
7826{
Matthias Klosec511b472010-05-08 11:01:39 +00007827long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007828 ;
7829 return 0;
7830}
7831_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007832if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007833
7834
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007836
7837 have_long_double=yes
7838
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007839fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7842$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007843if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007844# The cast to long int works around a bug in the HP C Compiler
7845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7847# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7849$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007850if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007851 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007853 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 +00007854
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007856 if test "$ac_cv_type_long_double" = yes; then
7857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007859as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007860See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007861 else
7862 ac_cv_sizeof_long_double=0
7863 fi
7864fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007865
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007866fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7868$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007869
7870
7871
7872cat >>confdefs.h <<_ACEOF
7873#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7874_ACEOF
7875
7876
7877fi
7878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7880$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007881have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007883/* end confdefs.h. */
7884
7885int
7886main ()
7887{
7888_Bool x; x = (_Bool)0;
7889 ;
7890 return 0;
7891}
7892_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007893if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007894
7895
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007896$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007897
7898 have_c99_bool=yes
7899
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7903$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007904if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007905# The cast to long int works around a bug in the HP C Compiler
7906# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7907# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7908# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7910$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007911if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914 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 +00007915
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007917 if test "$ac_cv_type__Bool" = yes; then
7918 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007920as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007921See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007922 else
7923 ac_cv_sizeof__Bool=0
7924 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7929$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007930
7931
7932
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007933cat >>confdefs.h <<_ACEOF
7934#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7935_ACEOF
7936
7937
7938fi
7939
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007940ac_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 +00007941 #include <stdint.h>
7942 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007943 #ifdef HAVE_INTTYPES_H
7944 #include <inttypes.h>
7945 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007946"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007947if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007948
7949cat >>confdefs.h <<_ACEOF
7950#define HAVE_UINTPTR_T 1
7951_ACEOF
7952
Martin v. Löwiseba40652007-08-30 20:10:57 +00007953# The cast to long int works around a bug in the HP C Compiler
7954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7956# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7958$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007959if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007960 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007962 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 +00007963
Martin v. Löwis11437992002-04-12 09:54:03 +00007964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007965 if test "$ac_cv_type_uintptr_t" = yes; then
7966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007968as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007969See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007970 else
7971 ac_cv_sizeof_uintptr_t=0
7972 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007973fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007974
Martin v. Löwis11437992002-04-12 09:54:03 +00007975fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7977$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007978
7979
7980
Martin v. Löwis11437992002-04-12 09:54:03 +00007981cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007982#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007983_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007984
Michael W. Hudson54241132001-12-07 15:38:26 +00007985
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007986fi
7987
Martin v. Löwisebe26702006-10-02 14:55:51 +00007988
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007989# The cast to long int works around a bug in the HP C Compiler
7990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7992# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7994$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007995if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007996 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007997else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007998 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007999#ifdef HAVE_SYS_TYPES_H
8000#include <sys/types.h>
8001#endif
8002
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008003"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008004
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008005else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008006 if test "$ac_cv_type_off_t" = yes; then
8007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008009as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008010See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008011 else
8012 ac_cv_sizeof_off_t=0
8013 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008014fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008015
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8018$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008019
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008020
8021
Martin v. Löwis11437992002-04-12 09:54:03 +00008022cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008023#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008024_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008025
Michael W. Hudson54241132001-12-07 15:38:26 +00008026
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008027
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8029$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008030if test "$have_long_long" = yes
8031then
8032if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008033 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008035$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8038$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8041$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008042fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008046fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008047
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008048# The cast to long int works around a bug in the HP C Compiler
8049# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8050# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8051# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8053$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008054if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008055 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008056else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008057 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008058#ifdef HAVE_SYS_TYPES_H
8059#include <sys/types.h>
8060#endif
8061#ifdef HAVE_TIME_H
8062#include <time.h>
8063#endif
8064
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008065"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008066
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008068 if test "$ac_cv_type_time_t" = yes; then
8069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008071as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008072See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008073 else
8074 ac_cv_sizeof_time_t=0
8075 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008076fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008077
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008078fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8080$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008082
8083
Martin v. Löwis11437992002-04-12 09:54:03 +00008084cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008085#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008086_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008087
Michael W. Hudson54241132001-12-07 15:38:26 +00008088
8089
Trent Mick635f6fb2000-08-23 21:33:05 +00008090# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008091ac_save_cc="$CC"
8092if test "$ac_cv_kpthread" = "yes"
8093then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008094elif test "$ac_cv_kthread" = "yes"
8095then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008096elif test "$ac_cv_pthread" = "yes"
8097then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008098fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8100$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008101have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008103/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008104
8105 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008106int
8107main ()
8108{
Guido van Rossum12580492000-09-24 16:47:19 +00008109pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008110 ;
8111 return 0;
8112}
Matthias Klosec511b472010-05-08 11:01:39 +00008113
Martin v. Löwis11437992002-04-12 09:54:03 +00008114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008115if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008116 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8120$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008121if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008122 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8125# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8127$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008128if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008129 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008131 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008132#ifdef HAVE_PTHREAD_H
8133#include <pthread.h>
8134#endif
8135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008136"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008137
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139 if test "$ac_cv_type_pthread_t" = yes; then
8140 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008142as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008143See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008144 else
8145 ac_cv_sizeof_pthread_t=0
8146 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008147fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008148
Trent Mick635f6fb2000-08-23 21:33:05 +00008149fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8151$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008152
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008153
8154
Martin v. Löwis11437992002-04-12 09:54:03 +00008155cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008156#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008157_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008158
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008159
Trent Mick635f6fb2000-08-23 21:33:05 +00008160fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008161CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008162
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8164$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008166if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167 enableval=$enable_toolbox_glue;
8168fi
Jack Jansene578a632001-08-15 01:27:14 +00008169
8170
8171if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008172then
Jack Jansene578a632001-08-15 01:27:14 +00008173 case $ac_sys_system/$ac_sys_release in
8174 Darwin/*)
8175 enable_toolbox_glue="yes";;
8176 *)
8177 enable_toolbox_glue="no";;
8178 esac
8179fi
8180case "$enable_toolbox_glue" in
8181yes)
Jack Jansene578a632001-08-15 01:27:14 +00008182 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008183 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008184
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008185$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008186
8187 ;;
8188*)
Jack Jansene578a632001-08-15 01:27:14 +00008189 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008190 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008191 ;;
8192esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8194$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008195
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008196
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008197
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008198case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008199 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008200 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8201 ;;
8202 Darwin/*)
8203 OTHER_LIBTOOL_OPT=""
8204 ;;
8205esac
8206
8207
Ronald Oussoren25967582009-09-06 10:00:26 +00008208
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008209case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008210 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008211 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8212 if test "${enable_universalsdk}"; then
8213 :
8214 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008215 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008216 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008217 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008218 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008219 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008220 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008221 if test ${gcc_version} '<' 4.0
8222 then
8223 LIBTOOL_CRUFT="-lcc_dynamic"
8224 else
8225 LIBTOOL_CRUFT=""
8226 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008227 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008228 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008231/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008232
Ronald Oussoren25967582009-09-06 10:00:26 +00008233 #include <unistd.h>
8234 int main(int argc, char*argv[])
8235 {
8236 if (sizeof(long) == 4) {
8237 return 0;
8238 } else {
8239 return 1;
8240 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008241 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008242
Ronald Oussoren25967582009-09-06 10:00:26 +00008243_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008244if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008245 ac_osx_32bit=yes
8246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008247 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008248fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8250 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008251fi
8252
8253
Ronald Oussoren25967582009-09-06 10:00:26 +00008254 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008255 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008256 i386)
8257 MACOSX_DEFAULT_ARCH="i386"
8258 ;;
8259 ppc)
8260 MACOSX_DEFAULT_ARCH="ppc"
8261 ;;
8262 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008263 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008264 ;;
8265 esac
8266 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008267 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008268 i386)
8269 MACOSX_DEFAULT_ARCH="x86_64"
8270 ;;
8271 ppc)
8272 MACOSX_DEFAULT_ARCH="ppc64"
8273 ;;
8274 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008275 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008276 ;;
8277 esac
8278
8279 #ARCH_RUN_32BIT="true"
8280 fi
8281
8282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008283 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008284 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008285esac
8286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8288$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008289if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008290then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008291 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008293 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008294
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008295$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008296
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8298$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008299 if test $enable_shared = "yes"
8300 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008301 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 +00008302 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8305$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008306fi
8307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8309$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008310case $ac_sys_system/$ac_sys_release in
8311 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008312
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008313$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008314
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8316$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008317 ;;
8318 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8320$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008321 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008322esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008323
Guido van Rossum0a516c91994-09-12 10:58:40 +00008324# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008325
Michael W. Hudson54241132001-12-07 15:38:26 +00008326
8327
8328
8329
Ronald Oussoren75912852010-04-08 08:13:31 +00008330
Guido van Rossum0a516c91994-09-12 10:58:40 +00008331# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008332# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8334$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008335if test -z "$SO"
8336then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008337 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008338 hp*|HP*)
8339 case `uname -m` in
8340 ia64) SO=.so;;
8341 *) SO=.sl;;
8342 esac
8343 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008344 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008345 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008346 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008347else
8348 # this might also be a termcap variable, see #610332
8349 echo
8350 echo '====================================================================='
8351 echo '+ +'
8352 echo '+ WARNING: You have set SO in your environment. +'
8353 echo '+ Do you really mean to change the extension for shared libraries? +'
8354 echo '+ Continuing in 10 seconds to let you to ponder. +'
8355 echo '+ +'
8356 echo '====================================================================='
8357 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008358fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8360$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008361
Ronald Oussoren79f90492009-01-02 10:44:46 +00008362
Neal Norwitz58e28882006-05-19 07:00:58 +00008363cat >>confdefs.h <<_ACEOF
8364#define SHLIB_EXT "$SO"
8365_ACEOF
8366
Guido van Rossum0a516c91994-09-12 10:58:40 +00008367# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008368# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008369# (Shared libraries in this instance are shared modules to be loaded into
8370# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8372$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008373if test -z "$LDSHARED"
8374then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008375 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008376 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008377 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008378 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008379 ;;
8380 BeOS*)
8381 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008382 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008383 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008384 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008385 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008387 if test "$GCC" = "yes" ; then
8388 LDSHARED='$(CC) -shared'
8389 LDCXXSHARED='$(CXX) -shared'
8390 else
8391 LDSHARED='$(CC) -G'
8392 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008393 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008394 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008395 if test "$GCC" = "yes" ; then
8396 LDSHARED='$(CC) -shared'
8397 LDCXXSHARED='$(CXX) -shared'
8398 else
8399 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008400 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008401 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008402 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008403 LDSHARED='$(CC) -bundle'
8404 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +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 Jansena3891ea2001-09-07 14:25:12 +00008410 else
8411 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008412 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008413 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008414 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008415 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008416 LDSHARED='$(CC) -bundle'
8417 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008418 if test "$enable_framework" ; then
8419 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008420 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8421 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008422 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008423 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008424 # No framework, use the Python app as bundle-loader
8425 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008426 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008427 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008428 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008429 Darwin/*)
8430 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8431 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008432
Ned Deilyc40b9032014-06-25 13:48:46 -07008433 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8434 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8435 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8436 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8437 if test ${dep_target_major} -eq 10 && \
8438 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008439 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008440 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008441 LDSHARED='$(CC) -bundle'
8442 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008443 if test "$enable_framework" ; then
8444 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008445 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8446 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008447 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008448 else
8449 # No framework, use the Python app as bundle-loader
8450 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8451 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008452 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008453 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008454 else
8455 # building for OS X 10.3 and later
8456 if test "${enable_universalsdk}"; then
8457 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8458 fi
8459 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8460 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8461 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008462 fi
8463 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008464 Linux*|GNU*|QNX*)
8465 LDSHARED='$(CC) -shared'
8466 LDCXXSHARED='$(CXX) -shared';;
8467 BSD/OS*/4*)
8468 LDSHARED="gcc -shared"
8469 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008470 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008471 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008472 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008473 LDSHARED='$(CC) -shared'
8474 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008475 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008476 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008477 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008478 OpenBSD*)
8479 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8480 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008481 LDSHARED='$(CC) -shared $(CCSHARED)'
8482 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008483 else
8484 case `uname -r` in
8485 [01].* | 2.[0-7] | 2.[0-7].*)
8486 LDSHARED="ld -Bshareable ${LDFLAGS}"
8487 ;;
8488 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008489 LDSHARED='$(CC) -shared $(CCSHARED)'
8490 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008491 ;;
8492 esac
8493 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008494 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008495 LDSHARED='$(CC) -shared'
8496 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008497 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008498 if test "$GCC" = "yes" ; then
8499 LDSHARED='$(CC) -shared'
8500 LDCXXSHARED='$(CXX) -shared'
8501 else
8502 LDSHARED='$(CC) -G'
8503 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008504 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008505 SCO_SV*)
8506 LDSHARED='$(CC) -Wl,-G,-Bexport'
8507 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8508 CYGWIN*)
8509 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8510 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8511 atheos*)
8512 LDSHARED="gcc -shared"
8513 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008514 *) LDSHARED="ld";;
8515 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008516fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8518$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008519LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008520BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008521# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008522# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8524$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008525if test -z "$CCSHARED"
8526then
Guido van Rossum07397971997-04-29 21:49:50 +00008527 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008528 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008529 then CCSHARED="-fPIC";
8530 elif test `uname -p` = sparc;
8531 then CCSHARED="-xcode=pic32";
8532 else CCSHARED="-Kpic";
8533 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008534 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008535 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008536 else CCSHARED="+z";
8537 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008538 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008539 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008540 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008541 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008542 if test "$GCC" = "yes"
8543 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008544 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008545 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008546 SCO_SV*)
8547 if test "$GCC" = "yes"
8548 then CCSHARED="-fPIC"
8549 else CCSHARED="-Kpic -belf"
8550 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008551 IRIX*/6*) case $CC in
8552 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008553 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008554 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008555 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008556 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008557fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8559$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008560# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008561# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8563$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008564if test -z "$LINKFORSHARED"
8565then
Guido van Rossum07397971997-04-29 21:49:50 +00008566 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008567 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008568 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008569 LINKFORSHARED="-Wl,-E -Wl,+s";;
8570# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008571 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008572 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008573 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008575 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8576 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008577 # not used by the core itself but which needs to be in the core so
8578 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008579 # -prebind is no longer used, because it actually seems to give a
8580 # slowdown in stead of a speedup, maybe due to the large number of
8581 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008582
8583 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008584 if test "$enable_framework"
8585 then
Jack Jansenda49e192005-01-07 13:08:22 +00008586 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008587 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008588 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008589 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008590 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008591 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008592 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008593 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8594 then
8595 LINKFORSHARED="-Wl,--export-dynamic"
8596 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008597 SunOS/5*) case $CC in
8598 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008599 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008600 then
8601 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008602 fi;;
8603 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008604 CYGWIN*)
8605 if test $enable_shared = "no"
8606 then
8607 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8608 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008609 QNX*)
8610 # -Wl,-E causes the symbols to be added to the dynamic
8611 # symbol table so that they can be found when a module
8612 # is loaded. -N 2048K causes the stack size to be set
8613 # to 2048 kilobytes so that the stack doesn't overflow
8614 # when running test_compile.py.
8615 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8619$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008620
Michael W. Hudson54241132001-12-07 15:38:26 +00008621
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008622
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8624$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008625if test ! "$LIBRARY" = "$LDLIBRARY"
8626then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008627 case $ac_sys_system in
8628 CYGWIN*)
8629 # Cygwin needs CCSHARED when building extension DLLs
8630 # but not when building the interpreter DLL.
8631 CFLAGSFORSHARED='';;
8632 *)
8633 CFLAGSFORSHARED='$(CCSHARED)'
8634 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008635fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8637$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008638
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008639# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8640# library (with --enable-shared).
8641# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008642# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8643# if it is not required, since it creates a dependency of the shared library
8644# to LIBS. This, in turn, means that applications linking the shared libpython
8645# don't need to link LIBS explicitly. The default should be only changed
8646# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008647
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8649$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008650case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008651 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008652 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008653esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8655$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008656
8657
Guido van Rossum627b2d71993-12-24 10:39:16 +00008658# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8660$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008661if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008662 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008663else
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008665LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
Martin v. Löwiseba40652007-08-30 20:10:57 +00008669/* Override any GCC internal prototype to avoid an error.
8670 Use char because int might match the return type of a GCC
8671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672#ifdef __cplusplus
8673extern "C"
8674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008675char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008676int
8677main ()
8678{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ;
8681 return 0;
8682}
8683_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008687 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008688fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008689rm -f core conftest.err conftest.$ac_objext \
8690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008692fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8694$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008695if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 cat >>confdefs.h <<_ACEOF
8697#define HAVE_LIBDL 1
8698_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008699
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008700 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008701
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008702fi
8703 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8705$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008706if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008707 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008708else
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008710LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713
Martin v. Löwiseba40652007-08-30 20:10:57 +00008714/* Override any GCC internal prototype to avoid an error.
8715 Use char because int might match the return type of a GCC
8716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717#ifdef __cplusplus
8718extern "C"
8719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008720char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721int
8722main ()
8723{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ;
8726 return 0;
8727}
8728_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008729if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008732 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008733fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008734rm -f core conftest.err conftest.$ac_objext \
8735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008736LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8739$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008740if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 cat >>confdefs.h <<_ACEOF
8742#define HAVE_LIBDLD 1
8743_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008744
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008745 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008747fi
8748 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008749
Ronald Oussoren79f90492009-01-02 10:44:46 +00008750# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008751if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8753$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008754if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008755 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008756else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008757 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008760
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761/* Override any GCC internal prototype to avoid an error.
8762 Use char because int might match the return type of a GCC
8763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764#ifdef __cplusplus
8765extern "C"
8766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008767char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008768int
8769main ()
8770{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ;
8773 return 0;
8774}
8775_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008776for ac_lib in '' pthread rt posix4; do
8777 if test -z "$ac_lib"; then
8778 ac_res="none required"
8779 else
8780 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008781 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008782 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008783 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008785fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008786rm -f core conftest.err conftest.$ac_objext \
8787 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008788 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008789 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008792if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008793
Martin v. Löwiseba40652007-08-30 20:10:57 +00008794else
8795 ac_cv_search_sem_init=no
8796fi
8797rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008798LIBS=$ac_func_search_save_LIBS
8799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8801$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008802ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008803if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008804 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008805
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008806fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008807 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008808 # posix4 on Solaris 2.6
8809 # pthread (first!) on Linux
8810fi
8811
Martin v. Löwis19d17342003-06-14 21:03:05 +00008812# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8814$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008815if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008817else
8818 ac_check_lib_save_LIBS=$LIBS
8819LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008821/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008822
Martin v. Löwiseba40652007-08-30 20:10:57 +00008823/* Override any GCC internal prototype to avoid an error.
8824 Use char because int might match the return type of a GCC
8825 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008826#ifdef __cplusplus
8827extern "C"
8828#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008829char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008830int
8831main ()
8832{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008834 ;
8835 return 0;
8836}
8837_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008839 ac_cv_lib_intl_textdomain=yes
8840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008843rm -f core conftest.err conftest.$ac_objext \
8844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008845LIBS=$ac_check_lib_save_LIBS
8846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8848$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008849if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008850
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008851$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008852
8853fi
8854
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008855
8856# checks for system dependent C++ extensions support
8857case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8859$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008861/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008862
Georg Brandl94800df2011-02-25 11:09:02 +00008863 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008864int
8865main ()
8866{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008867loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 ;
8869 return 0;
8870}
Matthias Klosec511b472010-05-08 11:01:39 +00008871
Martin v. Löwis11437992002-04-12 09:54:03 +00008872_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008873if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008874
Matthias Klosec511b472010-05-08 11:01:39 +00008875
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008877
Matthias Klosec511b472010-05-08 11:01:39 +00008878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008880
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008881else
Matthias Klosec511b472010-05-08 11:01:39 +00008882
8883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008884$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008885
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008886fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008887rm -f core conftest.err conftest.$ac_objext \
8888 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008889 *) ;;
8890esac
8891
Guido van Rossum70c7f481998-03-26 18:44:10 +00008892# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008893# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8895$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008896if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008898else
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008900LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008903
Martin v. Löwiseba40652007-08-30 20:10:57 +00008904/* Override any GCC internal prototype to avoid an error.
8905 Use char because int might match the return type of a GCC
8906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907#ifdef __cplusplus
8908extern "C"
8909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008910char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008911int
8912main ()
8913{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008914return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 ;
8916 return 0;
8917}
8918_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008919if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008922 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924rm -f core conftest.err conftest.$ac_objext \
8925 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008926LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8929$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008930if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008931 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008932fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008933 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8935$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008936if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008938else
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008940LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008943
Martin v. Löwiseba40652007-08-30 20:10:57 +00008944/* Override any GCC internal prototype to avoid an error.
8945 Use char because int might match the return type of a GCC
8946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008947#ifdef __cplusplus
8948extern "C"
8949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008950char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008951int
8952main ()
8953{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 ;
8956 return 0;
8957}
8958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008962 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008964rm -f core conftest.err conftest.$ac_objext \
8965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008966LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8969$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008970if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008971 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008972fi
8973 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008974
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008975case "$ac_sys_system" in
8976BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8978$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008979if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008980 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008981else
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008983LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008986
Martin v. Löwiseba40652007-08-30 20:10:57 +00008987/* Override any GCC internal prototype to avoid an error.
8988 Use char because int might match the return type of a GCC
8989 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008990#ifdef __cplusplus
8991extern "C"
8992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008993char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008994int
8995main ()
8996{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 ;
8999 return 0;
9000}
9001_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009003 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009005 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009006fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009007rm -f core conftest.err conftest.$ac_objext \
9008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009009LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9012$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009013if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009014 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009015fi
9016 # BeOS
9017;;
9018esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009019
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9021$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009022
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9027$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009028LIBS="$withval $LIBS"
9029
9030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009033fi
9034
Guido van Rossum7f43da71994-08-01 12:15:30 +00009035
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009036
9037
9038
9039
9040
9041
9042
9043if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9044 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009045 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9046set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9048$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009049if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009051else
9052 case $PKG_CONFIG in
9053 [\\/]* | ?:[\\/]*)
9054 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9055 ;;
9056 *)
9057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9058for as_dir in $PATH
9059do
9060 IFS=$as_save_IFS
9061 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009062 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009064 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009066 break 2
9067 fi
9068done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009070IFS=$as_save_IFS
9071
9072 ;;
9073esac
9074fi
9075PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9076if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9078$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9081$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009082fi
9083
9084
9085fi
9086if test -z "$ac_cv_path_PKG_CONFIG"; then
9087 ac_pt_PKG_CONFIG=$PKG_CONFIG
9088 # Extract the first word of "pkg-config", so it can be a program name with args.
9089set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9091$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009092if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009094else
9095 case $ac_pt_PKG_CONFIG in
9096 [\\/]* | ?:[\\/]*)
9097 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9098 ;;
9099 *)
9100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9101for as_dir in $PATH
9102do
9103 IFS=$as_save_IFS
9104 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009105 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009107 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009109 break 2
9110 fi
9111done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009113IFS=$as_save_IFS
9114
9115 ;;
9116esac
9117fi
9118ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9119if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9121$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009122else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009125fi
9126
9127 if test "x$ac_pt_PKG_CONFIG" = x; then
9128 PKG_CONFIG=""
9129 else
9130 case $cross_compiling:$ac_tool_warned in
9131yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009134ac_tool_warned=yes ;;
9135esac
9136 PKG_CONFIG=$ac_pt_PKG_CONFIG
9137 fi
9138else
9139 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9140fi
9141
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009142fi
9143if test -n "$PKG_CONFIG"; then
9144 _pkg_min_version=0.9.0
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9146$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9147 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9149$as_echo "yes" >&6; }
9150 else
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
9153 PKG_CONFIG=""
9154 fi
9155fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009156
9157# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9159$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009160
9161# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009162if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009163 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009164else
9165 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009166fi
9167
9168
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9170$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009171
9172# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9174$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009175
9176# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009177if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009178 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009179else
9180 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009181fi
9182
9183
9184if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009185 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9186else
9187 LIBFFI_INCLUDEDIR=""
9188fi
9189
9190
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9192$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009193
Ned Deilya2a9f572013-10-25 00:30:10 -07009194# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9195
9196
9197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9198$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9199
9200# Check whether --with-tcltk-includes was given.
9201if test "${with_tcltk_includes+set}" = set; then :
9202 withval=$with_tcltk_includes;
9203else
9204 with_tcltk_includes="default"
9205fi
9206
9207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9208$as_echo "$with_tcltk_includes" >&6; }
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9210$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9211
9212# Check whether --with-tcltk-libs was given.
9213if test "${with_tcltk_libs+set}" = set; then :
9214 withval=$with_tcltk_libs;
9215else
9216 with_tcltk_libs="default"
9217fi
9218
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9220$as_echo "$with_tcltk_libs" >&6; }
9221if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9222then
9223 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9224 then
9225 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9226 fi
9227 TCLTK_INCLUDES=""
9228 TCLTK_LIBS=""
9229else
9230 TCLTK_INCLUDES="$with_tcltk_includes"
9231 TCLTK_LIBS="$with_tcltk_libs"
9232fi
9233
Benjamin Peterson867475c2009-04-29 20:36:25 +00009234# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9236$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009237
9238# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009239if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009240 withval=$with_dbmliborder;
9241if test x$with_dbmliborder = xyes
9242then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009243as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009244else
9245 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9246 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9247 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009248 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009249 fi
9250 done
9251fi
9252fi
9253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9255$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009256
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009257# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009258
9259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9261$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009262
Martin v. Löwiseba40652007-08-30 20:10:57 +00009263# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009265 withval=$with_signal_module;
9266fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009267
9268
9269if test -z "$with_signal_module"
9270then with_signal_module="yes"
9271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9273$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009274
9275if test "${with_signal_module}" = "yes"; then
9276 USE_SIGNAL_MODULE=""
9277 SIGNAL_OBJS=""
9278else
9279 USE_SIGNAL_MODULE="#"
9280 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9281fi
9282
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009283# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009284
Barry Warsawc0d24d82000-06-29 16:12:00 +00009285USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9288$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009289
Guido van Rossumec2f0731997-01-22 20:54:01 +00009290
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009293 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9295$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009296LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009297if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009298 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009299fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9302$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303fi
9304
Martin v. Löwis11437992002-04-12 09:54:03 +00009305
9306# Templates for things AC_DEFINEd more than once.
9307# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009308
9309
Martin v. Löwis11437992002-04-12 09:54:03 +00009310
9311
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9313$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009314
Martin v. Löwiseba40652007-08-30 20:10:57 +00009315# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009317 withval=$with_threads;
9318fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009319
9320
Barry Warsawc0d24d82000-06-29 16:12:00 +00009321# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009322
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009324if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009325 withval=$with_thread; with_threads=$with_thread
9326fi
9327
Barry Warsawc0d24d82000-06-29 16:12:00 +00009328
9329if test -z "$with_threads"
9330then with_threads="yes"
9331fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9333$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009334
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009335
Barry Warsawc0d24d82000-06-29 16:12:00 +00009336if test "$with_threads" = "no"
9337then
9338 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009339elif test "$ac_cv_pthread_is_default" = yes
9340then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009341 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009342
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009343 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009344 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009345
9346 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009348elif test "$ac_cv_kpthread" = "yes"
9349then
9350 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009351 if test "$ac_cv_cxx_thread" = "yes"; then
9352 CXX="$CXX -Kpthread"
9353 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009354 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009355
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009356 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009357 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009358elif test "$ac_cv_kthread" = "yes"
9359then
9360 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009361 if test "$ac_cv_cxx_thread" = "yes"; then
9362 CXX="$CXX -Kthread"
9363 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009365
9366 posix_threads=yes
9367 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009368elif test "$ac_cv_pthread" = "yes"
9369then
9370 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009371 if test "$ac_cv_cxx_thread" = "yes"; then
9372 CXX="$CXX -pthread"
9373 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009374 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009375
9376 posix_threads=yes
9377 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009378else
9379 if test ! -z "$with_threads" -a -d "$with_threads"
9380 then LDFLAGS="$LDFLAGS -L$with_threads"
9381 fi
9382 if test ! -z "$withval" -a -d "$withval"
9383 then LDFLAGS="$LDFLAGS -L$withval"
9384 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009385
9386 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009387 # define _POSIX_THREADS in unistd.h. Some apparently don't
9388 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9390$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009392/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009393
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009394#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009395#ifdef _POSIX_THREADS
9396yes
9397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009398
9399_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009400if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009401 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009402 unistd_defines_pthreads=yes
9403else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009404 unistd_defines_pthreads=no
9405fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009406rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009407
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9409$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009413 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009414if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009415 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009417 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009418
Martin v. Löwis11437992002-04-12 09:54:03 +00009419
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009420$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009421
9422 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009423 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009424else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009425
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009426 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 +01009427if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009428 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009429
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009430 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009431
Martin v. Löwis11437992002-04-12 09:54:03 +00009432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009433$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009434
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009435 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009436else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009437
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9439$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009440
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442if test "${with_pth+set}" = set; then :
9443 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9444$as_echo "$withval" >&6; }
9445 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009446
9447
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009448$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009449
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009450 LIBS="-lpth $LIBS"
9451 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009452else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9454$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009455
9456 # Just looking for pthread_create in libpthread is not enough:
9457 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9458 # So we really have to include pthread.h, and then link.
9459 _libs=$LIBS
9460 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9462$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009464/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009465
9466#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009467#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009468
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009469void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009470int
9471main ()
9472{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009473
9474pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 ;
9476 return 0;
9477}
9478_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009479if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009480
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9482$as_echo "yes" >&6; }
9483 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009484
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009485 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009486 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009487else
Martin v. Löwis11437992002-04-12 09:54:03 +00009488
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009489 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009490 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009491if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009492 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009493
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009494 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009495 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009496else
Guido van Rossumad678af1998-10-02 14:42:15 +00009497
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009498 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 +01009499if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009500 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009501
9502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009503$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009504
9505 THREADOBJ="Python/thread.o"
9506else
9507
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009508 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 +01009509if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009510 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009511
9512
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009513$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009514
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009515 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009516else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009517
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9519$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009520if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009522else
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009524LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009527
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528/* Override any GCC internal prototype to avoid an error.
9529 Use char because int might match the return type of a GCC
9530 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009531#ifdef __cplusplus
9532extern "C"
9533#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009534char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009535int
9536main ()
9537{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009538return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 ;
9540 return 0;
9541}
9542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009543if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009544 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009546 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009547fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009548rm -f core conftest.err conftest.$ac_objext \
9549 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009550LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9553$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009554if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009555 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009556
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009557 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009558 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009559 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009560else
Greg Steinadf63d62000-07-05 10:38:09 +00009561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9563$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009564if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009565 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009566else
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009568LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009571
Martin v. Löwiseba40652007-08-30 20:10:57 +00009572/* Override any GCC internal prototype to avoid an error.
9573 Use char because int might match the return type of a GCC
9574 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009575#ifdef __cplusplus
9576extern "C"
9577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009578char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009579int
9580main ()
9581{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009582return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 ;
9584 return 0;
9585}
9586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009590 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009591fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592rm -f core conftest.err conftest.$ac_objext \
9593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009594LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9597$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009598if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009599 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009600
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009601 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009602 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009603 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009604else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9607$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009608if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009610else
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009612LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009615
Martin v. Löwiseba40652007-08-30 20:10:57 +00009616/* Override any GCC internal prototype to avoid an error.
9617 Use char because int might match the return type of a GCC
9618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009619#ifdef __cplusplus
9620extern "C"
9621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009622char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009623int
9624main ()
9625{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009626return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 ;
9628 return 0;
9629}
9630_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009635fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009636rm -f core conftest.err conftest.$ac_objext \
9637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009638LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009639fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9641$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009642if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009643 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009644
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009645 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009646 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009647 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009648else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009649
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9651$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009652if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009653 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009654else
Martin v. Löwis11437992002-04-12 09:54:03 +00009655 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009656LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009659
Martin v. Löwiseba40652007-08-30 20:10:57 +00009660/* Override any GCC internal prototype to avoid an error.
9661 Use char because int might match the return type of a GCC
9662 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009663#ifdef __cplusplus
9664extern "C"
9665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009666char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009667int
9668main ()
9669{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009670return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ;
9672 return 0;
9673}
9674_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009675if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009680rm -f core conftest.err conftest.$ac_objext \
9681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009682LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9685$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009686if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009688
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009689 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009690 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009691 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009692else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009693
Martin v. Löwis130fb172001-07-19 11:00:41 +00009694 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009695fi
9696
Guido van Rossum627b2d71993-12-24 10:39:16 +00009697
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009698fi
9699
Guido van Rossum0be3e491997-05-22 20:33:33 +00009700fi
9701
Guido van Rossum49545951997-12-02 19:28:29 +00009702fi
9703
Guido van Rossumb93a8621998-05-07 13:27:32 +00009704fi
9705
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009706
Michael W. Hudson54241132001-12-07 15:38:26 +00009707fi
9708
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009709
9710fi
9711
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715fi
9716
Martin v. Löwis11437992002-04-12 09:54:03 +00009717fi
9718
9719
9720fi
9721
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009722
Michael W. Hudson54241132001-12-07 15:38:26 +00009723
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9725$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009726if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009728else
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009730LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009733
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734/* Override any GCC internal prototype to avoid an error.
9735 Use char because int might match the return type of a GCC
9736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009737#ifdef __cplusplus
9738extern "C"
9739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009740char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009741int
9742main ()
9743{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 ;
9746 return 0;
9747}
9748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009752 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009754rm -f core conftest.err conftest.$ac_objext \
9755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009756LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9759$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009760if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009761 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009762
Martin v. Löwis130fb172001-07-19 11:00:41 +00009763 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009764 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009765 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009766fi
9767
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009768
Neal Norwitza978ab02002-11-02 16:58:05 +00009769 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9771$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009772if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009774else
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009776LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009779
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780/* Override any GCC internal prototype to avoid an error.
9781 Use char because int might match the return type of a GCC
9782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009783#ifdef __cplusplus
9784extern "C"
9785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009786char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009787int
9788main ()
9789{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009790return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ;
9792 return 0;
9793}
9794_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009795if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009800rm -f core conftest.err conftest.$ac_objext \
9801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009802LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9805$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009806if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009807 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009808
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009809 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009810 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009811 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009812fi
9813
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009814 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009815
Martin v. Löwis130fb172001-07-19 11:00:41 +00009816 if test "$USE_THREAD_MODULE" != "#"
9817 then
9818 # If the above checks didn't disable threads, (at least) OSF1
9819 # needs this '-threads' argument during linking.
9820 case $ac_sys_system in
9821 OSF1) LDLAST=-threads;;
9822 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009823 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009824fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009825
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009826if test "$posix_threads" = "yes"; then
9827 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009828
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009829$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009830
9831 fi
9832
9833 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9834 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009835 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009836$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009837
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009838 ;;
9839 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009840$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009841
9842 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009843 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009844$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009845
9846 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009847 esac
9848
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9850$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009851 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009852 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009853else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009854 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009855 ac_cv_pthread_system_supported=no
9856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009858/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009859
9860 #include <stdio.h>
9861 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009862 void *foo(void *parm) {
9863 return NULL;
9864 }
9865 main() {
9866 pthread_attr_t attr;
9867 pthread_t id;
9868 if (pthread_attr_init(&attr)) exit(-1);
9869 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9870 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9871 exit(0);
9872 }
9873_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009874if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009875 ac_cv_pthread_system_supported=yes
9876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009877 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9880 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009881fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009882
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883
Guido van Rossum627b2d71993-12-24 10:39:16 +00009884fi
9885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9887$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009888 if test "$ac_cv_pthread_system_supported" = "yes"; then
9889
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009890$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009891
9892 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009893 for ac_func in pthread_sigmask
9894do :
9895 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009896if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009897 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009898#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009899_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009900 case $ac_sys_system in
9901 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009902
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009903$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009904
9905 ;;
9906 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009907fi
9908done
9909
Christian Heimes0d604cf2013-08-21 13:26:05 +02009910 for ac_func in pthread_atfork
9911do :
9912 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9913if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9914 cat >>confdefs.h <<_ACEOF
9915#define HAVE_PTHREAD_ATFORK 1
9916_ACEOF
9917
9918fi
9919done
9920
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009921fi
9922
9923
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009924# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009925
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9927$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009928# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009929if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009930 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9933$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009934 ipv6=no
9935 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009936 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9937$as_echo "yes" >&6; }
9938 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009939
9940 ipv6=yes
9941 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009943else
Martin v. Löwis11437992002-04-12 09:54:03 +00009944
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009946/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009947 /* AF_INET6 available check */
9948#include <sys/types.h>
9949#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009950int
9951main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009952{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009953int domain = AF_INET6;
9954 ;
9955 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009956}
Martin v. Löwis11437992002-04-12 09:54:03 +00009957_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009958if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009959
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9961$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009962 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009963
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009964else
Matthias Klosec511b472010-05-08 11:01:39 +00009965
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9967$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009968 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009969
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009970fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009972
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009973if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9975$as_echo_n "checking if RFC2553 API is available... " >&6; }
9976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009977/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009978
9979 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009980#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009981int
9982main ()
9983{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009984struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009985 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 ;
9987 return 0;
9988}
Matthias Klosec511b472010-05-08 11:01:39 +00009989
Martin v. Löwis11437992002-04-12 09:54:03 +00009990_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009991if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009992
9993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009994$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009995 ipv6=yes
9996
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009997else
Matthias Klosec511b472010-05-08 11:01:39 +00009998
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010000$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010001 ipv6=no
10002
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010005fi
10006
10007if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010008 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010009
10010fi
10011
Martin v. Löwiseba40652007-08-30 20:10:57 +000010012fi
10013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010014
10015ipv6type=unknown
10016ipv6lib=none
10017ipv6trylibc=no
10018
10019if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10021$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010022 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10023 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010024 case $i in
10025 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010029#include <netinet/in.h>
10030#ifdef IPV6_INRIA_VERSION
10031yes
10032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010035 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010036 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010037fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010038rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010039
10040 ;;
10041 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010043/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010044
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010045#include <netinet/in.h>
10046#ifdef __KAME__
10047yes
10048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010049_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010052 ipv6type=$i;
10053 ipv6lib=inet6
10054 ipv6libdir=/usr/local/v6/lib
10055 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010056fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010057rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010058
10059 ;;
10060 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010062/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010063
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010064#include <features.h>
10065#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10066yes
10067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010068_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010070 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010071 ipv6type=$i;
10072 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010073fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010074rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010075
10076 ;;
10077 linux-inet6)
10078 if test -d /usr/inet6; then
10079 ipv6type=$i
10080 ipv6lib=inet6
10081 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010082 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010083 fi
10084 ;;
10085 solaris)
10086 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010087 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010088 ipv6type=$i
10089 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010090 fi
10091 fi
10092 ;;
10093 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010095/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010096
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010097#include <sys/param.h>
10098#ifdef _TOSHIBA_INET6
10099yes
10100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010101_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010103 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010104 ipv6type=$i;
10105 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010106 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010107fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010108rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010109
10110 ;;
10111 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010113/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010114
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010115#include </usr/local/v6/include/sys/v6config.h>
10116#ifdef __V6D__
10117yes
10118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010119_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010121 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010122 ipv6type=$i;
10123 ipv6lib=v6;
10124 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010125 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010127rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010128
10129 ;;
10130 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010132/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010133
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010134#include <sys/param.h>
10135#ifdef _ZETA_MINAMI_INET6
10136yes
10137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010138_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010140 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010141 ipv6type=$i;
10142 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010143 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010144fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010145rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010146
10147 ;;
10148 esac
10149 if test "$ipv6type" != "unknown"; then
10150 break
10151 fi
10152 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10154$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010155fi
10156
10157if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10158 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10159 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10160 echo "using lib$ipv6lib"
10161 else
10162 if test $ipv6trylibc = "yes"; then
10163 echo "using libc"
10164 else
10165 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10166 echo "You need to fetch lib$ipv6lib.a from appropriate"
10167 echo 'ipv6 kit and compile beforehand.'
10168 exit 1
10169 fi
10170 fi
10171fi
10172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10174$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010176/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010177
10178 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010179int
10180main ()
10181{
10182FSIORefNum fRef = 0
10183 ;
10184 return 0;
10185}
Mark Dickinson0712b562010-05-08 19:13:21 +000010186
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010187_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010188if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010189
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010190
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10194$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010195
Mark Dickinson0712b562010-05-08 19:13:21 +000010196else
10197
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10199$as_echo "no" >&6; }
10200
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010201fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10203
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010204# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10206$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010207
Martin v. Löwiseba40652007-08-30 20:10:57 +000010208# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010209if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010210 withval=$with_doc_strings;
10211fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010212
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010213
10214if test -z "$with_doc_strings"
10215then with_doc_strings="yes"
10216fi
10217if test "$with_doc_strings" != "no"
10218then
10219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010220$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010221
10222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10224$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010225
Neil Schemenauera35c6882001-02-27 04:45:05 +000010226# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10228$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010229
Martin v. Löwiseba40652007-08-30 20:10:57 +000010230# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010231if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010232 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010233if test "$withval" != no
10234then
10235
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010236$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10239$as_echo "yes" >&6; }
10240else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010242fi
10243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10245$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010246fi
10247
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010248
10249# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10251$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010252
Martin v. Löwiseba40652007-08-30 20:10:57 +000010253# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010254if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010255 withval=$with_pymalloc;
10256fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010257
Neil Schemenauera35c6882001-02-27 04:45:05 +000010258
Neil Schemenauer16c22972002-03-22 15:34:49 +000010259if test -z "$with_pymalloc"
10260then with_pymalloc="yes"
10261fi
10262if test "$with_pymalloc" != "no"
10263then
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010265$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010266
10267fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10269$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010270
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010271# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10273$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010274
10275# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010277 withval=$with_valgrind;
10278else
10279 with_valgrind=no
10280fi
10281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10283$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010284if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010285 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 +010010286if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010288$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010289
10290else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010291 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010292
10293fi
10294
10295
10296fi
10297
Barry Warsawef82cd72000-06-30 16:21:01 +000010298# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10300$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010301
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010303if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010305if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010306then
10307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010308$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010309
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10311$as_echo "yes" >&6; }
10312else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010314fi
10315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10317$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010318fi
10319
Barry Warsawef82cd72000-06-30 16:21:01 +000010320
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010321# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010322
Guido van Rossum98935bf2001-09-05 19:13:16 +000010323DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010324
Guido van Rossume97ee181999-12-20 21:27:22 +000010325# the dlopen() function means we might want to use dynload_shlib.o. some
10326# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010327for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010328do :
10329 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010330if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010333_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010334
Guido van Rossume97ee181999-12-20 21:27:22 +000010335fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010336done
Guido van Rossume97ee181999-12-20 21:27:22 +000010337
Michael W. Hudson54241132001-12-07 15:38:26 +000010338
Guido van Rossume97ee181999-12-20 21:27:22 +000010339# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10340# loading of modules.
10341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10343$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010344if test -z "$DYNLOADFILE"
10345then
10346 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010347 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10348 if test "$ac_cv_func_dlopen" = yes
10349 then DYNLOADFILE="dynload_shlib.o"
10350 else DYNLOADFILE="dynload_aix.o"
10351 fi
10352 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010353 BeOS*) DYNLOADFILE="dynload_beos.o";;
10354 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010355 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10356 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010357 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010358 *)
10359 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10360 # out any dynamic loading
10361 if test "$ac_cv_func_dlopen" = yes
10362 then DYNLOADFILE="dynload_shlib.o"
10363 else DYNLOADFILE="dynload_stub.o"
10364 fi
10365 ;;
10366 esac
10367fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10369$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010370if test "$DYNLOADFILE" != "dynload_stub.o"
10371then
Martin v. Löwis11437992002-04-12 09:54:03 +000010372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010373$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010374
10375fi
10376
Neil Schemenauer4e425612001-06-19 15:44:15 +000010377# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10378
Michael W. Hudson54241132001-12-07 15:38:26 +000010379
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10381$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010382if test -z "$MACHDEP_OBJS"
10383then
Jack Jansene578a632001-08-15 01:27:14 +000010384 MACHDEP_OBJS=$extra_machdep_objs
10385else
10386 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10389$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010390
Guido van Rossum627b2d71993-12-24 10:39:16 +000010391# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010392for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10393 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010394 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10395 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010396 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010397 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010398 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010399 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010400 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10401 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010402 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010403 setlocale setregid setreuid setresuid setresgid \
10404 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010405 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010406 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010407 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010408do :
10409 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10410ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010411if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010413#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010414_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010415
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010416fi
10417done
10418
Michael W. Hudson54241132001-12-07 15:38:26 +000010419
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010420# For some functions, having a definition is not sufficient, since
10421# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10423$as_echo_n "checking for chroot... " >&6; }
10424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010425/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010426#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010427int
10428main ()
10429{
10430void *x=chroot
10431 ;
10432 return 0;
10433}
10434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010436
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010438
Matthias Klosec511b472010-05-08 11:01:39 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010440$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010444
10445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10448$as_echo_n "checking for link... " >&6; }
10449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010451#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010452int
10453main ()
10454{
10455void *x=link
10456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010461
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010462$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010463
Matthias Klosec511b472010-05-08 11:01:39 +000010464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010465$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010466else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010469
10470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10473$as_echo_n "checking for symlink... " >&6; }
10474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010475/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010476#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010477int
10478main ()
10479{
10480void *x=symlink
10481 ;
10482 return 0;
10483}
10484_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010486
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010487$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010488
Matthias Klosec511b472010-05-08 11:01:39 +000010489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010490$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010494
10495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10498$as_echo_n "checking for fchdir... " >&6; }
10499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010500/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010501#include <unistd.h>
10502int
10503main ()
10504{
10505void *x=fchdir
10506 ;
10507 return 0;
10508}
10509_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010510if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010512$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010513
Matthias Klosec511b472010-05-08 11:01:39 +000010514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010515$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10518$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010519
10520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10523$as_echo_n "checking for fsync... " >&6; }
10524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010525/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010526#include <unistd.h>
10527int
10528main ()
10529{
10530void *x=fsync
10531 ;
10532 return 0;
10533}
10534_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010537$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010538
Matthias Klosec511b472010-05-08 11:01:39 +000010539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010540$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10543$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010544
10545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10548$as_echo_n "checking for fdatasync... " >&6; }
10549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010550/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010551#include <unistd.h>
10552int
10553main ()
10554{
10555void *x=fdatasync
10556 ;
10557 return 0;
10558}
10559_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010560if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010561
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010562$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010563
Matthias Klosec511b472010-05-08 11:01:39 +000010564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010565$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010566else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10568$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010569
10570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10573$as_echo_n "checking for epoll... " >&6; }
10574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010575/* end confdefs.h. */
10576#include <sys/epoll.h>
10577int
10578main ()
10579{
10580void *x=epoll_create
10581 ;
10582 return 0;
10583}
10584_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010585if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010586
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010587$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010588
Matthias Klosec511b472010-05-08 11:01:39 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010590$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010591else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10593$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010594
10595fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10598$as_echo_n "checking for kqueue... " >&6; }
10599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010600/* end confdefs.h. */
10601
10602#include <sys/types.h>
10603#include <sys/event.h>
10604
10605int
10606main ()
10607{
10608int x=kqueue()
10609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010613if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010614
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010615$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010616
Matthias Klosec511b472010-05-08 11:01:39 +000010617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10621$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010622
10623fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010625# On some systems (eg. FreeBSD 5), we would find a definition of the
10626# functions ctermid_r, setgroups in the library, but no prototype
10627# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10628# address to avoid compiler warnings and potential miscompilations
10629# because of the missing prototypes.
10630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10632$as_echo_n "checking for ctermid_r... " >&6; }
10633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010635
Martin v. Löwisd5843682002-11-21 20:41:28 +000010636#include <stdio.h>
10637
Martin v. Löwisd5843682002-11-21 20:41:28 +000010638int
10639main ()
10640{
10641void* p = ctermid_r
10642 ;
10643 return 0;
10644}
10645_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010646if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010648$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010649
Matthias Klosec511b472010-05-08 11:01:39 +000010650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010651$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010652else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10654$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010655
10656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10658
Antoine Pitroub170f172010-09-10 18:47:36 +000010659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10660$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010661if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010662 $as_echo_n "(cached) " >&6
10663else
10664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010666#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010667int
10668main ()
10669{
10670void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010671
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010672 ;
10673 return 0;
10674}
10675_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010676if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010677 ac_cv_flock_decl=yes
10678else
10679 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010680
10681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010683
Antoine Pitroub170f172010-09-10 18:47:36 +000010684fi
10685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10686$as_echo "$ac_cv_flock_decl" >&6; }
10687if test "x${ac_cv_flock_decl}" = xyes; then
10688 for ac_func in flock
10689do :
10690 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010691if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010692 cat >>confdefs.h <<_ACEOF
10693#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010694_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010695
Antoine Pitrou85729812010-09-07 14:55:24 +000010696else
Antoine Pitroub170f172010-09-10 18:47:36 +000010697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010698$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010699if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010700 $as_echo_n "(cached) " >&6
10701else
10702 ac_check_lib_save_LIBS=$LIBS
10703LIBS="-lbsd $LIBS"
10704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10705/* end confdefs.h. */
10706
10707/* Override any GCC internal prototype to avoid an error.
10708 Use char because int might match the return type of a GCC
10709 builtin and then its argument prototype would still apply. */
10710#ifdef __cplusplus
10711extern "C"
10712#endif
10713char flock ();
10714int
10715main ()
10716{
10717return flock ();
10718 ;
10719 return 0;
10720}
10721_ACEOF
10722if ac_fn_c_try_link "$LINENO"; then :
10723 ac_cv_lib_bsd_flock=yes
10724else
10725 ac_cv_lib_bsd_flock=no
10726fi
10727rm -f core conftest.err conftest.$ac_objext \
10728 conftest$ac_exeext conftest.$ac_ext
10729LIBS=$ac_check_lib_save_LIBS
10730fi
10731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10732$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010733if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010734 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010735
10736
10737$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10738
10739
10740fi
10741
10742
10743fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010744done
10745
Antoine Pitrou85729812010-09-07 14:55:24 +000010746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10749$as_echo_n "checking for getpagesize... " >&6; }
10750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010751/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010752
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010753#include <unistd.h>
10754
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010755int
10756main ()
10757{
10758void* p = getpagesize
10759 ;
10760 return 0;
10761}
10762_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010763if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010766
Matthias Klosec511b472010-05-08 11:01:39 +000010767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010768$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010772
10773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010775
Charles-François Natali93a11752011-11-27 13:01:35 +010010776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10777$as_echo_n "checking for broken unsetenv... " >&6; }
10778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10779/* end confdefs.h. */
10780
10781#include <stdlib.h>
10782
10783int
10784main ()
10785{
10786int res = unsetenv("DUMMY")
10787 ;
10788 return 0;
10789}
10790_ACEOF
10791if ac_fn_c_try_compile "$LINENO"; then :
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10793$as_echo "no" >&6; }
10794else
10795
10796$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10797
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10799$as_echo "yes" >&6; }
10800
10801fi
10802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10803
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010804for ac_prog in true
10805do
10806 # Extract the first word of "$ac_prog", so it can be a program name with args.
10807set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10809$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010810if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010811 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010812else
10813 if test -n "$TRUE"; then
10814 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10815else
10816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10817for as_dir in $PATH
10818do
10819 IFS=$as_save_IFS
10820 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010821 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010822 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010823 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824 $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 +000010825 break 2
10826 fi
10827done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010828 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010829IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010830
10831fi
10832fi
10833TRUE=$ac_cv_prog_TRUE
10834if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10836$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10839$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010840fi
10841
Martin v. Löwiseba40652007-08-30 20:10:57 +000010842
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010843 test -n "$TRUE" && break
10844done
10845test -n "$TRUE" || TRUE="/bin/true"
10846
10847
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10849$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010850if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010851 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010852else
10853 ac_check_lib_save_LIBS=$LIBS
10854LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010856/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010857
Martin v. Löwiseba40652007-08-30 20:10:57 +000010858/* Override any GCC internal prototype to avoid an error.
10859 Use char because int might match the return type of a GCC
10860 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010861#ifdef __cplusplus
10862extern "C"
10863#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010864char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010865int
10866main ()
10867{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010868return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010869 ;
10870 return 0;
10871}
10872_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010873if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010874 ac_cv_lib_c_inet_aton=yes
10875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010876 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010878rm -f core conftest.err conftest.$ac_objext \
10879 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010880LIBS=$ac_check_lib_save_LIBS
10881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10883$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010884if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010885 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10888$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010889if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010890 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010891else
10892 ac_check_lib_save_LIBS=$LIBS
10893LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010895/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010896
Martin v. Löwiseba40652007-08-30 20:10:57 +000010897/* Override any GCC internal prototype to avoid an error.
10898 Use char because int might match the return type of a GCC
10899 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010900#ifdef __cplusplus
10901extern "C"
10902#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010903char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010904int
10905main ()
10906{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010907return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010908 ;
10909 return 0;
10910}
10911_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010913 ac_cv_lib_resolv_inet_aton=yes
10914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010915 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010916fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010917rm -f core conftest.err conftest.$ac_objext \
10918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010919LIBS=$ac_check_lib_save_LIBS
10920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10922$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010923if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010924 cat >>confdefs.h <<_ACEOF
10925#define HAVE_LIBRESOLV 1
10926_ACEOF
10927
10928 LIBS="-lresolv $LIBS"
10929
10930fi
10931
10932
10933fi
10934
10935
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010936# On Tru64, chflags seems to be present, but calling it will
10937# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10939$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010940if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010944 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010947/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010948
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010949#include <sys/stat.h>
10950#include <unistd.h>
10951int main(int argc, char*argv[])
10952{
10953 if(chflags(argv[0], 0) != 0)
10954 return 1;
10955 return 0;
10956}
Ned Deily43e10542011-06-27 23:41:53 -070010957
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010959if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010960 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010966fi
10967
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010968
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10971$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010972if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010974if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010975 ac_cv_have_chflags="yes"
10976else
10977 ac_cv_have_chflags="no"
10978fi
10979
10980fi
10981if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010982
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010983$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010984
10985fi
10986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10988$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010989if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010990 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010993 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010996/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010997
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010998#include <sys/stat.h>
10999#include <unistd.h>
11000int main(int argc, char*argv[])
11001{
11002 if(lchflags(argv[0], 0) != 0)
11003 return 1;
11004 return 0;
11005}
Ned Deily43e10542011-06-27 23:41:53 -070011006
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011007_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011008if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011009 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011012fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11014 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011015fi
11016
11017
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11020$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011021if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011023if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011024 ac_cv_have_lchflags="yes"
11025else
11026 ac_cv_have_lchflags="no"
11027fi
11028
11029fi
11030if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011033
11034fi
11035
Ronald Oussorenf8752642006-07-06 10:13:35 +000011036case $ac_sys_system/$ac_sys_release in
11037Darwin/*)
11038 _CUR_CFLAGS="${CFLAGS}"
11039 _CUR_LDFLAGS="${LDFLAGS}"
11040 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11041 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11042 ;;
11043esac
11044
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11046$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011047if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011048 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011049else
11050 ac_check_lib_save_LIBS=$LIBS
11051LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011053/* end confdefs.h. */
11054
Martin v. Löwiseba40652007-08-30 20:10:57 +000011055/* Override any GCC internal prototype to avoid an error.
11056 Use char because int might match the return type of a GCC
11057 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011058#ifdef __cplusplus
11059extern "C"
11060#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011061char inflateCopy ();
11062int
11063main ()
11064{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011065return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011066 ;
11067 return 0;
11068}
11069_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011071 ac_cv_lib_z_inflateCopy=yes
11072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011074fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011075rm -f core conftest.err conftest.$ac_objext \
11076 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011077LIBS=$ac_check_lib_save_LIBS
11078fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11080$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011081if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011083$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011084
11085fi
11086
11087
Ronald Oussorenf8752642006-07-06 10:13:35 +000011088case $ac_sys_system/$ac_sys_release in
11089Darwin/*)
11090 CFLAGS="${_CUR_CFLAGS}"
11091 LDFLAGS="${_CUR_LDFLAGS}"
11092 ;;
11093esac
11094
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11096$as_echo_n "checking for hstrerror... " >&6; }
11097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011098/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011099
Martin v. Löwise9416172003-05-03 10:12:45 +000011100#include <netdb.h>
11101
Martin v. Löwise9416172003-05-03 10:12:45 +000011102int
11103main ()
11104{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011105void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011106 ;
11107 return 0;
11108}
11109_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011113
Matthias Klosec511b472010-05-08 11:01:39 +000011114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011115$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11118$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011119
11120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011121rm -f core conftest.err conftest.$ac_objext \
11122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11125$as_echo_n "checking for inet_aton... " >&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öwis86d66262006-02-17 08:40:11 +000011129#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011130#include <sys/socket.h>
11131#include <netinet/in.h>
11132#include <arpa/inet.h>
11133
Martin v. Löwise9416172003-05-03 10:12:45 +000011134int
11135main ()
11136{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011137void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011138 ;
11139 return 0;
11140}
11141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011142if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011144$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011145
Matthias Klosec511b472010-05-08 11:01:39 +000011146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011147$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11150$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011151
11152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011153rm -f core conftest.err conftest.$ac_objext \
11154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011155
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11157$as_echo_n "checking for inet_pton... " >&6; }
11158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011159/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011160
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011161#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011162#include <sys/socket.h>
11163#include <netinet/in.h>
11164#include <arpa/inet.h>
11165
Martin v. Löwise9416172003-05-03 10:12:45 +000011166int
11167main ()
11168{
11169void* p = inet_pton
11170 ;
11171 return 0;
11172}
11173_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011176$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011177
Matthias Klosec511b472010-05-08 11:01:39 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011179$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011180else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11182$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011183
11184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011186
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011187# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11189$as_echo_n "checking for setgroups... " >&6; }
11190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011191/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011192
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011193#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011194#ifdef HAVE_GRP_H
11195#include <grp.h>
11196#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011197
Martin v. Löwisd5843682002-11-21 20:41:28 +000011198int
11199main ()
11200{
11201void* p = setgroups
11202 ;
11203 return 0;
11204}
11205_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011207
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011208$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011209
Matthias Klosec511b472010-05-08 11:01:39 +000011210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011211$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11214$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011215
11216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011218
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011219# check for openpty and forkpty
11220
11221for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011222do :
11223 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011224if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011226#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011227_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011228
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11231$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011232if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011233 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011234else
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011236LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Martin v. Löwiseba40652007-08-30 20:10:57 +000011240/* Override any GCC internal prototype to avoid an error.
11241 Use char because int might match the return type of a GCC
11242 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011243#ifdef __cplusplus
11244extern "C"
11245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011246char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011247int
11248main ()
11249{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011250return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 ;
11252 return 0;
11253}
11254_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011255if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011256 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011258 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011259fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260rm -f core conftest.err conftest.$ac_objext \
11261 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011262LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011263fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11265$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011266if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011268 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11271$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011272if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011274else
11275 ac_check_lib_save_LIBS=$LIBS
11276LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011278/* end confdefs.h. */
11279
Martin v. Löwiseba40652007-08-30 20:10:57 +000011280/* Override any GCC internal prototype to avoid an error.
11281 Use char because int might match the return type of a GCC
11282 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011283#ifdef __cplusplus
11284extern "C"
11285#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011286char openpty ();
11287int
11288main ()
11289{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011290return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011291 ;
11292 return 0;
11293}
11294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011296 ac_cv_lib_bsd_openpty=yes
11297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011298 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011299fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011300rm -f core conftest.err conftest.$ac_objext \
11301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011302LIBS=$ac_check_lib_save_LIBS
11303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11305$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011306if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011308 LIBS="$LIBS -lbsd"
11309fi
11310
11311
11312fi
11313
Fred Drake8cef4cf2000-06-28 16:40:38 +000011314
11315fi
11316done
11317
11318for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011319do :
11320 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011321if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011323#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011324_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011325
Fred Drake8cef4cf2000-06-28 16:40:38 +000011326else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11328$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011329if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011330 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011331else
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011333LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011336
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337/* Override any GCC internal prototype to avoid an error.
11338 Use char because int might match the return type of a GCC
11339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011340#ifdef __cplusplus
11341extern "C"
11342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011343char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011344int
11345main ()
11346{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011347return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011348 ;
11349 return 0;
11350}
11351_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011352if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011355 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011356fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011357rm -f core conftest.err conftest.$ac_objext \
11358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011359LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011360fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11362$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011363if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011364 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011365 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011366else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11368$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011369if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011370 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011371else
11372 ac_check_lib_save_LIBS=$LIBS
11373LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011375/* end confdefs.h. */
11376
Martin v. Löwiseba40652007-08-30 20:10:57 +000011377/* Override any GCC internal prototype to avoid an error.
11378 Use char because int might match the return type of a GCC
11379 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011380#ifdef __cplusplus
11381extern "C"
11382#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011383char forkpty ();
11384int
11385main ()
11386{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011387return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011388 ;
11389 return 0;
11390}
11391_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011392if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011393 ac_cv_lib_bsd_forkpty=yes
11394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011395 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011397rm -f core conftest.err conftest.$ac_objext \
11398 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011399LIBS=$ac_check_lib_save_LIBS
11400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11402$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011403if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011405 LIBS="$LIBS -lbsd"
11406fi
11407
11408
11409fi
11410
Fred Drake8cef4cf2000-06-28 16:40:38 +000011411
11412fi
11413done
11414
Jack Jansendd19cf82001-12-06 22:36:17 +000011415
Brett Cannonaa5778d2008-03-18 04:09:00 +000011416# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011417for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011418do :
11419 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011420if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011421 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011422#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011423_ACEOF
11424
11425fi
11426done
11427
11428
Michael W. Hudson54241132001-12-07 15:38:26 +000011429# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011430for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011431do :
11432 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11433ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011434if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011436#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011437_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011438
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011440done
11441
Michael W. Hudson54241132001-12-07 15:38:26 +000011442
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011443ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011444if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011445 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011446
Martin v. Löwis1142de32002-03-29 16:28:31 +000011447else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011448 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011449 *" dup2.$ac_objext "* ) ;;
11450 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011451 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011452esac
11453
Martin v. Löwis1142de32002-03-29 16:28:31 +000011454fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011455
11456ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011457if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011458 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11459
11460else
11461 case " $LIBOBJS " in
11462 *" getcwd.$ac_objext "* ) ;;
11463 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11464 ;;
11465esac
11466
11467fi
11468
11469ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011470if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011471 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11472
11473else
11474 case " $LIBOBJS " in
11475 *" strdup.$ac_objext "* ) ;;
11476 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11477 ;;
11478esac
11479
11480fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011481
11482
11483for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011484do :
11485 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011486if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011489_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011491/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011492#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011493int
11494main ()
11495{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011496getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 ;
11498 return 0;
11499}
11500_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011503$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011504
Guido van Rossum627b2d71993-12-24 10:39:16 +000011505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011507
Guido van Rossum627b2d71993-12-24 10:39:16 +000011508fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011509done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011510
Jack Jansen150753c2003-03-29 22:07:47 +000011511for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011512do :
11513 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011514if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011515 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011519/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011520#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011521int
11522main ()
11523{
11524setpgrp(0,0);
11525 ;
11526 return 0;
11527}
11528_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011531$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011532
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011535
11536fi
11537done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011538
Thomas Wouters3a584202000-08-05 23:28:51 +000011539for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011540do :
11541 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011542if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011544#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011545_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011547/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011548#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011549int
11550main ()
11551{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011552gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011553 ;
11554 return 0;
11555}
11556_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011557if ac_fn_c_try_compile "$LINENO"; then :
11558
Guido van Rossum627b2d71993-12-24 10:39:16 +000011559else
Skip Montanaro6dead952003-09-25 14:50:04 +000011560
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011562
Martin v. Löwis11437992002-04-12 09:54:03 +000011563
Guido van Rossum627b2d71993-12-24 10:39:16 +000011564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011566
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011567fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011568done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011569
Michael W. Hudson54241132001-12-07 15:38:26 +000011570
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11572$as_echo_n "checking for major... " >&6; }
11573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011574/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011575
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011576#if defined(MAJOR_IN_MKDEV)
11577#include <sys/mkdev.h>
11578#elif defined(MAJOR_IN_SYSMACROS)
11579#include <sys/sysmacros.h>
11580#else
11581#include <sys/types.h>
11582#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011583
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011584int
11585main ()
11586{
11587
11588 makedev(major(0),minor(0));
11589
11590 ;
11591 return 0;
11592}
11593_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011594if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011595
11596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11600$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011601
11602else
Skip Montanaro6dead952003-09-25 14:50:04 +000011603
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11605$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011606
11607fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011608rm -f core conftest.err conftest.$ac_objext \
11609 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011610
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011611# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011612# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11614$as_echo_n "checking for getaddrinfo... " >&6; }
11615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011616/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011617
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011618#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011619#include <sys/socket.h>
11620#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011621#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011622
Martin v. Löwis11437992002-04-12 09:54:03 +000011623int
11624main ()
11625{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011626getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 ;
11628 return 0;
11629}
11630_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011631if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011632 have_getaddrinfo=yes
11633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011634 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011635fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011636rm -f core conftest.err conftest.$ac_objext \
11637 conftest$ac_exeext conftest.$ac_ext
11638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11639$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011640if test $have_getaddrinfo = yes
11641then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11643$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011644 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011645 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011647 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011648
11649if test "${enable_ipv6+set}" = set; then
11650 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11651else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011652 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011653fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011654else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011656/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011657
Stefan Krah0afe4e42012-11-22 23:56:51 +010011658#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011659#include <sys/types.h>
11660#include <netdb.h>
11661#include <string.h>
11662#include <sys/socket.h>
11663#include <netinet/in.h>
11664
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011665int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011666{
11667 int passive, gaierr, inet4 = 0, inet6 = 0;
11668 struct addrinfo hints, *ai, *aitop;
11669 char straddr[INET6_ADDRSTRLEN], strport[16];
11670
11671 for (passive = 0; passive <= 1; passive++) {
11672 memset(&hints, 0, sizeof(hints));
11673 hints.ai_family = AF_UNSPEC;
11674 hints.ai_flags = passive ? AI_PASSIVE : 0;
11675 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011676 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011677 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11678 (void)gai_strerror(gaierr);
11679 goto bad;
11680 }
11681 for (ai = aitop; ai; ai = ai->ai_next) {
11682 if (ai->ai_addr == NULL ||
11683 ai->ai_addrlen == 0 ||
11684 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11685 straddr, sizeof(straddr), strport, sizeof(strport),
11686 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11687 goto bad;
11688 }
11689 switch (ai->ai_family) {
11690 case AF_INET:
11691 if (strcmp(strport, "54321") != 0) {
11692 goto bad;
11693 }
11694 if (passive) {
11695 if (strcmp(straddr, "0.0.0.0") != 0) {
11696 goto bad;
11697 }
11698 } else {
11699 if (strcmp(straddr, "127.0.0.1") != 0) {
11700 goto bad;
11701 }
11702 }
11703 inet4++;
11704 break;
11705 case AF_INET6:
11706 if (strcmp(strport, "54321") != 0) {
11707 goto bad;
11708 }
11709 if (passive) {
11710 if (strcmp(straddr, "::") != 0) {
11711 goto bad;
11712 }
11713 } else {
11714 if (strcmp(straddr, "::1") != 0) {
11715 goto bad;
11716 }
11717 }
11718 inet6++;
11719 break;
11720 case AF_UNSPEC:
11721 goto bad;
11722 break;
11723 default:
11724 /* another family support? */
11725 break;
11726 }
11727 }
11728 }
11729
11730 if (!(inet4 == 0 || inet4 == 2))
11731 goto bad;
11732 if (!(inet6 == 0 || inet6 == 2))
11733 goto bad;
11734
11735 if (aitop)
11736 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011737 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011738
11739 bad:
11740 if (aitop)
11741 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011742 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011743}
11744
Martin v. Löwis11437992002-04-12 09:54:03 +000011745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011746if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011747 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011754
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011755fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011756
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011758
Benjamin Peterson75fed812010-11-01 01:47:19 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11760$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11761
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011762if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011763then
11764 if test $ipv6 = yes
11765 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011766 echo 'Fatal: You must get working getaddrinfo() function.'
11767 echo ' or you can specify "--disable-ipv6"'.
11768 exit 1
11769 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011770else
Martin v. Löwis11437992002-04-12 09:54:03 +000011771
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011772$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011773
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011774fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011775
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011776for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777do :
11778 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011779if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011782_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011783
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011784fi
11785done
11786
Michael W. Hudson54241132001-12-07 15:38:26 +000011787
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011788# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11790$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011791if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011792 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011795/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011796#include <sys/types.h>
11797#include <sys/time.h>
11798#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011799
Martin v. Löwis11437992002-04-12 09:54:03 +000011800int
11801main ()
11802{
11803if ((struct tm *) 0)
11804return 0;
11805 ;
11806 return 0;
11807}
11808_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011809if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011810 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11817$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011818if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011819
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011821
11822fi
11823
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11825$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011826if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011827 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011830/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011831#include <sys/types.h>
11832#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011833
Martin v. Löwis11437992002-04-12 09:54:03 +000011834int
11835main ()
11836{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011837struct tm tm;
11838 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011839 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011840 ;
11841 return 0;
11842}
11843_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011845 ac_cv_struct_tm=time.h
11846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011847 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11852$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011853if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011855$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011856
11857fi
11858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011859ac_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 +000011860#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011861
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011862"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011863if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011864
11865cat >>confdefs.h <<_ACEOF
11866#define HAVE_STRUCT_TM_TM_ZONE 1
11867_ACEOF
11868
11869
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011870fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011871
Martin v. Löwis11437992002-04-12 09:54:03 +000011872if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11873
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011874$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011875
11876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011877 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11878"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011879if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011880 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011882 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011883fi
11884
Martin v. Löwiseba40652007-08-30 20:10:57 +000011885cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011886#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011887_ACEOF
11888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11890$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011891if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011892 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011895/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011896#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011897#if !HAVE_DECL_TZNAME
11898extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011900
Martin v. Löwis11437992002-04-12 09:54:03 +000011901int
11902main ()
11903{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011904return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011905 ;
11906 return 0;
11907}
11908_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011909if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011910 ac_cv_var_tzname=yes
11911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011912 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011914rm -f core conftest.err conftest.$ac_objext \
11915 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011916fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11918$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011919 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011921$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011922
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011923 fi
11924fi
11925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011926ac_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 +010011927if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011928
11929cat >>confdefs.h <<_ACEOF
11930#define HAVE_STRUCT_STAT_ST_RDEV 1
11931_ACEOF
11932
11933
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011934fi
11935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011936ac_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 +010011937if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011938
Martin v. Löwis11437992002-04-12 09:54:03 +000011939cat >>confdefs.h <<_ACEOF
11940#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11941_ACEOF
11942
11943
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011944fi
11945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011946ac_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 +010011947if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011948
11949cat >>confdefs.h <<_ACEOF
11950#define HAVE_STRUCT_STAT_ST_FLAGS 1
11951_ACEOF
11952
11953
11954fi
11955
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011956ac_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 +010011957if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011958
11959cat >>confdefs.h <<_ACEOF
11960#define HAVE_STRUCT_STAT_ST_GEN 1
11961_ACEOF
11962
11963
11964fi
11965
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011966ac_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 +010011967if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011968
11969cat >>confdefs.h <<_ACEOF
11970#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11971_ACEOF
11972
11973
11974fi
11975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011976ac_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 +010011977if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011978
Martin v. Löwis11437992002-04-12 09:54:03 +000011979cat >>confdefs.h <<_ACEOF
11980#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11981_ACEOF
11982
11983
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011984fi
11985
Michael W. Hudson54241132001-12-07 15:38:26 +000011986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11988$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011989if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011990 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011991else
Matthias Klosec511b472010-05-08 11:01:39 +000011992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011994/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011995#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011996int
11997main ()
11998{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011999return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012000 ;
12001 return 0;
12002}
12003_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012004if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012005 ac_cv_header_time_altzone=yes
12006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012007 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012010
Martin v. Löwiseba40652007-08-30 20:10:57 +000012011fi
12012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12014$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012015if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012018
12019fi
12020
Guido van Rossumda88dad1995-01-26 00:46:29 +000012021was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12023$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012025/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012026
12027#include <sys/types.h>
12028#include <sys/select.h>
12029#include <sys/time.h>
12030
Martin v. Löwis11437992002-04-12 09:54:03 +000012031int
12032main ()
12033{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012034;
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 ;
12036 return 0;
12037}
12038_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012040
12041
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012042$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012043
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012044 was_it_defined=yes
12045
Martin v. Löwiseba40652007-08-30 20:10:57 +000012046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12049$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12052$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012053if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012054 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012055else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012057/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012058#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012059int
12060main ()
12061{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012062struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 ;
12064 return 0;
12065}
12066_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012067if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012068 ac_cv_struct_addrinfo=yes
12069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012070 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12073fi
12074
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12076$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012077if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012078
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012080
12081fi
12082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12084$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012085if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012089/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012090
12091# include <sys/types.h>
12092# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012093int
12094main ()
12095{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012096struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012097 ;
12098 return 0;
12099}
12100_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012101if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012102 ac_cv_struct_sockaddr_storage=yes
12103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12107fi
12108
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12110$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012111if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012114
12115fi
12116
Guido van Rossum627b2d71993-12-24 10:39:16 +000012117# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12120$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012121if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012123else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012126$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012127int
12128main ()
12129{
12130static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012131test_array [0] = 0;
12132return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012133
12134 ;
12135 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012136}
Martin v. Löwis11437992002-04-12 09:54:03 +000012137_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012138if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012139 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012141 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012144fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12146$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012147if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012148 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012149
12150fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12153$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012154if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012155 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012156else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012158/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159
Martin v. Löwis11437992002-04-12 09:54:03 +000012160int
12161main ()
12162{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012163
Martin v. Löwis11437992002-04-12 09:54:03 +000012164#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012165 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012167 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012169 char const *const *pcpcc;
12170 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 /* NEC SVR4.0.2 mips cc rejects this. */
12172 struct point {int x, y;};
12173 static struct point const zero = {0,0};
12174 /* AIX XL C 1.02.0.0 rejects this.
12175 It does not let you subtract one const X* pointer from another in
12176 an arm of an if-expression whose if-part is not a constant
12177 expression */
12178 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012179 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012181 ++pcpcc;
12182 ppc = (char**) pcpcc;
12183 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012184 { /* SCO 3.2v4 cc rejects this sort of thing. */
12185 char tx;
12186 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188
Martin v. Löwis11437992002-04-12 09:54:03 +000012189 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012190 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 }
12192 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12193 int x[] = {25, 17};
12194 const int *foo = &x[0];
12195 ++foo;
12196 }
12197 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12198 typedef const int *iptr;
12199 iptr p = 0;
12200 ++p;
12201 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012202 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012204 struct s { int j; const int *ap[3]; } bx;
12205 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 }
12207 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12208 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012209 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012211 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012212#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012213
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 ;
12215 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012216}
Martin v. Löwis11437992002-04-12 09:54:03 +000012217_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012218if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012219 ac_cv_c_const=yes
12220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012224fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12226$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012227if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012229$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012230
12231fi
12232
Michael W. Hudson54241132001-12-07 15:38:26 +000012233
Guido van Rossumda88dad1995-01-26 00:46:29 +000012234works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12236$as_echo_n "checking for working volatile... " >&6; }
12237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012238/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240int
12241main ()
12242{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012243volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 ;
12245 return 0;
12246}
12247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012249 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012250else
Skip Montanaro6dead952003-09-25 14:50:04 +000012251
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012252$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012253
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012254
Guido van Rossum627b2d71993-12-24 10:39:16 +000012255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12258$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012259
Guido van Rossumda88dad1995-01-26 00:46:29 +000012260works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12262$as_echo_n "checking for working signed char... " >&6; }
12263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012264/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012265
Martin v. Löwis11437992002-04-12 09:54:03 +000012266int
12267main ()
12268{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012269signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012270 ;
12271 return 0;
12272}
12273_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012274if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012275 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012276else
Skip Montanaro6dead952003-09-25 14:50:04 +000012277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012278$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012279
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012280
Guido van Rossum7f43da71994-08-01 12:15:30 +000012281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12284$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012285
Guido van Rossumda88dad1995-01-26 00:46:29 +000012286have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12288$as_echo_n "checking for prototypes... " >&6; }
12289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012290/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012291int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012292int
12293main ()
12294{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012295return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 ;
12297 return 0;
12298}
12299_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012301
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012302$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012303
Matthias Klosec511b472010-05-08 11:01:39 +000012304 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12308$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309
Guido van Rossumda88dad1995-01-26 00:46:29 +000012310works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12312$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012314/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012315
12316#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012317int foo(int x, ...) {
12318 va_list va;
12319 va_start(va, x);
12320 va_arg(va, int);
12321 va_arg(va, char *);
12322 va_arg(va, double);
12323 return 0;
12324}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012325
Martin v. Löwis11437992002-04-12 09:54:03 +000012326int
12327main ()
12328{
Guido van Rossum90eea071996-08-30 20:58:57 +000012329return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012330 ;
12331 return 0;
12332}
12333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012335
12336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012337$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012339 works=yes
12340
Guido van Rossum627b2d71993-12-24 10:39:16 +000012341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12344$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012345
Martin v. Löwisd6320502004-08-12 13:45:08 +000012346# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12348$as_echo_n "checking for socketpair... " >&6; }
12349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012350/* end confdefs.h. */
12351
12352#include <sys/types.h>
12353#include <sys/socket.h>
12354
12355int
12356main ()
12357{
12358void *x=socketpair
12359 ;
12360 return 0;
12361}
12362_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012364
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012365$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012366
Matthias Klosec511b472010-05-08 11:01:39 +000012367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012368$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12371$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012372
12373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012375
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012376# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12378$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012380/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012381#include <sys/types.h>
12382#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386struct sockaddr x;
12387x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 ;
12389 return 0;
12390}
12391_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012392if ac_fn_c_try_compile "$LINENO"; then :
12393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12394$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012396$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012397
12398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12400$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012401
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012404
Guido van Rossumda88dad1995-01-26 00:46:29 +000012405va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12407$as_echo_n "checking whether va_list is an array... " >&6; }
12408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012409/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012410
12411#ifdef HAVE_STDARG_PROTOTYPES
12412#include <stdarg.h>
12413#else
12414#include <varargs.h>
12415#endif
12416
Martin v. Löwis11437992002-04-12 09:54:03 +000012417int
12418main ()
12419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012420va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ;
12422 return 0;
12423}
12424_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012425if ac_fn_c_try_compile "$LINENO"; then :
12426
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427else
Skip Montanaro6dead952003-09-25 14:50:04 +000012428
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012430$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012431
Guido van Rossumda88dad1995-01-26 00:46:29 +000012432 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012433
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12437$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012439# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
12441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012443if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012445 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12448$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012449 OLD_CFLAGS=$CFLAGS
12450 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012452/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012453
12454# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012455
Martin v. Löwis11437992002-04-12 09:54:03 +000012456int
12457main ()
12458{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012459
12460 char *name;
12461 struct hostent *he, *res;
12462 char buffer[2048];
12463 int buflen = 2048;
12464 int h_errnop;
12465
12466 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012467
12468 ;
12469 return 0;
12470}
12471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012472if ac_fn_c_try_compile "$LINENO"; 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
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012475
Martin v. Löwis11437992002-04-12 09:54:03 +000012476
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012477$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12480$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012482else
Skip Montanaro6dead952003-09-25 14:50:04 +000012483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12485$as_echo "no" >&6; }
12486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12487$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012490
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012491# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
Martin v. Löwis11437992002-04-12 09:54:03 +000012493int
12494main ()
12495{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012496
12497 char *name;
12498 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012499 char buffer[2048];
12500 int buflen = 2048;
12501 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012502
Matthias Klosec511b472010-05-08 11:01:39 +000012503 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012504
12505 ;
12506 return 0;
12507}
12508_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012510
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012512
Martin v. Löwis11437992002-04-12 09:54:03 +000012513
Matthias Klosec511b472010-05-08 11:01:39 +000012514$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12517$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012518
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012519else
Skip Montanaro6dead952003-09-25 14:50:04 +000012520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12522$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12524$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12526/* end confdefs.h. */
12527
12528# include <netdb.h>
12529
12530int
12531main ()
12532{
12533
12534 char *name;
12535 struct hostent *he;
12536 struct hostent_data data;
12537
12538 (void) gethostbyname_r(name, he, &data);
12539
12540 ;
12541 return 0;
12542}
12543_ACEOF
12544if ac_fn_c_try_compile "$LINENO"; then :
12545
12546 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12547
12548
12549$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12550
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12552$as_echo "yes" >&6; }
12553
12554else
12555
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12557$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012558
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012561
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012567 CFLAGS=$OLD_CFLAGS
12568
12569else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012570
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571 for ac_func in gethostbyname
12572do :
12573 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012574if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012576#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012577_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012578
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012579fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012580done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012581
Michael W. Hudson54241132001-12-07 15:38:26 +000012582
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012583fi
12584
Michael W. Hudson54241132001-12-07 15:38:26 +000012585
12586
12587
12588
12589
12590
Guido van Rossum627b2d71993-12-24 10:39:16 +000012591# checks for system services
12592# (none yet)
12593
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012594# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012595ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012596if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012597
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12600$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012601if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012602 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012603else
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012605LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012608
Martin v. Löwiseba40652007-08-30 20:10:57 +000012609/* Override any GCC internal prototype to avoid an error.
12610 Use char because int might match the return type of a GCC
12611 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012612#ifdef __cplusplus
12613extern "C"
12614#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012615char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012616int
12617main ()
12618{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012619return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 ;
12621 return 0;
12622}
12623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012624if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012625 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012628fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012629rm -f core conftest.err conftest.$ac_objext \
12630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012631LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012632fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12634$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012635if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 cat >>confdefs.h <<_ACEOF
12637#define HAVE_LIBIEEE 1
12638_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012639
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012640 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641
Guido van Rossum627b2d71993-12-24 10:39:16 +000012642fi
12643
Michael W. Hudson54241132001-12-07 15:38:26 +000012644
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012645fi
12646
Michael W. Hudson54241132001-12-07 15:38:26 +000012647
Guido van Rossum7f253911997-05-09 02:42:48 +000012648# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12650$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012651
Martin v. Löwiseba40652007-08-30 20:10:57 +000012652# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012654 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012655if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012656then
12657
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12661$as_echo "yes" >&6; }
12662else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12663$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012664fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12667$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012668fi
12669
Guido van Rossum7f253911997-05-09 02:42:48 +000012670
Guido van Rossum7f43da71994-08-01 12:15:30 +000012671# check for --with-libm=...
12672
Guido van Rossum563e7081996-09-10 18:20:48 +000012673case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012674Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012675BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012676*) LIBM=-lm
12677esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12679$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Martin v. Löwiseba40652007-08-30 20:10:57 +000012681# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012682if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012683 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012684if test "$withval" = no
12685then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12687$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012688elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012689then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12691$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012692else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012693fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12696$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012697fi
12698
Guido van Rossum7f43da71994-08-01 12:15:30 +000012699
12700# check for --with-libc=...
12701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12703$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012704
Martin v. Löwiseba40652007-08-30 20:10:57 +000012705# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012706if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012708if test "$withval" = no
12709then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12711$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012712elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012713then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12715$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012716else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012717fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12720$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721fi
12722
Guido van Rossum7f43da71994-08-01 12:15:30 +000012723
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012724# **************************************************
12725# * Check for various properties of floating point *
12726# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012727
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12729$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012730if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012731 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012732else
12733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012734if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012735 ac_cv_little_endian_double=no
12736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012738/* end confdefs.h. */
12739
12740#include <string.h>
12741int main() {
12742 double x = 9006104071832581.0;
12743 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12744 return 0;
12745 else
12746 return 1;
12747}
12748
12749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012750if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012751 ac_cv_little_endian_double=yes
12752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012757fi
12758
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012759fi
12760
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12762$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012763if test "$ac_cv_little_endian_double" = yes
12764then
12765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012767
12768fi
12769
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12771$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012772if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012774else
12775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012776if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012777 ac_cv_big_endian_double=no
12778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012780/* end confdefs.h. */
12781
12782#include <string.h>
12783int main() {
12784 double x = 9006104071832581.0;
12785 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12786 return 0;
12787 else
12788 return 1;
12789}
12790
12791_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012792if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012793 ac_cv_big_endian_double=yes
12794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012799fi
12800
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012801fi
12802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12804$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012805if test "$ac_cv_big_endian_double" = yes
12806then
12807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012808$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012809
12810fi
12811
12812# Some ARM platforms use a mixed-endian representation for doubles.
12813# While Python doesn't currently have full support for these platforms
12814# (see e.g., issue 1762561), we can at least make sure that float <-> string
12815# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12817$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012818if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012819 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012820else
12821
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012822if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012823 ac_cv_mixed_endian_double=no
12824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012826/* end confdefs.h. */
12827
12828#include <string.h>
12829int main() {
12830 double x = 9006104071832581.0;
12831 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12832 return 0;
12833 else
12834 return 1;
12835}
12836
12837_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012838if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012839 ac_cv_mixed_endian_double=yes
12840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012841 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012845fi
12846
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012847fi
12848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12850$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012851if test "$ac_cv_mixed_endian_double" = yes
12852then
12853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012855
12856fi
12857
12858# The short float repr introduced in Python 3.1 requires the
12859# correctly-rounded string <-> double conversion functions from
12860# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12861# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012862# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012863# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012864
12865# This inline assembler syntax may also work for suncc and icc,
12866# so we try it on all platforms.
12867
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12869$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012871/* end confdefs.h. */
12872
12873int
12874main ()
12875{
12876
Mark Dickinsona548dee2009-11-15 13:12:43 +000012877 unsigned short cw;
12878 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12879 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012880
12881 ;
12882 return 0;
12883}
12884_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020012885if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012886 have_gcc_asm_for_x87=yes
12887else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012888 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012889fi
Stefan Krah99e36b92015-07-03 15:30:54 +020012890rm -f core conftest.err conftest.$ac_objext \
12891 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12893$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012894if test "$have_gcc_asm_for_x87" = yes
12895then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012896
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012898
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012899fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012900
Mark Dickinson04b27232009-01-04 12:29:36 +000012901# Detect whether system arithmetic is subject to x87-style double
12902# rounding issues. The result of this test has little meaning on non
12903# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12904# mode is round-to-nearest and double rounding issues are present, and
12905# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12907$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012908# $BASECFLAGS may affect the result
12909ac_save_cc="$CC"
12910CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012912 ac_cv_x87_double_rounding=no
12913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012915/* end confdefs.h. */
12916
12917#include <stdlib.h>
12918#include <math.h>
12919int main() {
12920 volatile double x, y, z;
12921 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12922 x = 0.99999999999999989; /* 1-2**-53 */
12923 y = 1./x;
12924 if (y != 1.)
12925 exit(0);
12926 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12927 x = 1e16;
12928 y = 2.99999;
12929 z = x + y;
12930 if (z != 1e16+4.)
12931 exit(0);
12932 /* both tests show evidence of double rounding */
12933 exit(1);
12934}
12935
12936_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012937if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012938 ac_cv_x87_double_rounding=no
12939else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012941fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12943 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012944fi
12945
Mark Dickinson99abd142009-10-24 13:44:16 +000012946CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12948$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012949if test "$ac_cv_x87_double_rounding" = yes
12950then
12951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012953
12954fi
12955
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012956# ************************************
12957# * Check for mathematical functions *
12958# ************************************
12959
12960LIBS_SAVE=$LIBS
12961LIBS="$LIBS $LIBM"
12962
Mark Dickinson265d7382008-04-21 22:32:24 +000012963# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12964# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12966$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012967if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012968 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012969else
12970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012971if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012972 ac_cv_tanh_preserves_zero_sign=no
12973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012975/* end confdefs.h. */
12976
12977#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012978#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012979int main() {
12980 /* return 0 if either negative zeros don't exist
12981 on this platform or if negative zeros exist
12982 and tanh(-0.) == -0. */
12983 if (atan2(0., -1.) == atan2(-0., -1.) ||
12984 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12985 else exit(1);
12986}
12987
12988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012990 ac_cv_tanh_preserves_zero_sign=yes
12991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012992 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012993fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012996fi
12997
Mark Dickinson265d7382008-04-21 22:32:24 +000012998fi
12999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13001$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013002if test "$ac_cv_tanh_preserves_zero_sign" = yes
13003then
13004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013006
13007fi
13008
Mark Dickinson65898e02009-09-05 10:27:00 +000013009for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010do :
13011 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13012ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013013if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013014 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013015#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013016_ACEOF
13017
13018fi
13019done
13020
Mark Dickinson65898e02009-09-05 10:27:00 +000013021for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022do :
13023 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13024ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013025if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013026 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013028_ACEOF
13029
13030fi
13031done
13032
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013033ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13034"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013035if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013036 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013038 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013039fi
13040
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013041cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013042#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013043_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013044ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13045"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013046if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013047 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013050fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013051
13052cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013053#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13056"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013057if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013060 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013061fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013062
13063cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013065_ACEOF
13066
13067
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013068LIBS=$LIBS_SAVE
13069
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013070# For multiprocessing module, check that sem_open
13071# actually works. For FreeBSD versions <= 7.2,
13072# the kernel module that provides POSIX semaphores
13073# isn't loaded by default, so an attempt to call
13074# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13076$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013077if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013081 ac_cv_posix_semaphores_enabled=yes
13082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013084/* end confdefs.h. */
13085
13086#include <unistd.h>
13087#include <fcntl.h>
13088#include <stdio.h>
13089#include <semaphore.h>
13090#include <sys/stat.h>
13091
13092int main(void) {
13093 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13094 if (a == SEM_FAILED) {
13095 perror("sem_open");
13096 return 1;
13097 }
13098 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013099 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013100 return 0;
13101}
13102
13103_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013104if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013105 ac_cv_posix_semaphores_enabled=yes
13106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013107 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013108fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013111fi
13112
13113
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013114fi
13115
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13117$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013118if test $ac_cv_posix_semaphores_enabled = no
13119then
13120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013121$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013122
13123fi
13124
13125# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13127$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013128if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013129 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013132 ac_cv_broken_sem_getvalue=yes
13133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013135/* end confdefs.h. */
13136
13137#include <unistd.h>
13138#include <fcntl.h>
13139#include <stdio.h>
13140#include <semaphore.h>
13141#include <sys/stat.h>
13142
13143int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013144 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013145 int count;
13146 int res;
13147 if(a==SEM_FAILED){
13148 perror("sem_open");
13149 return 1;
13150
13151 }
13152 res = sem_getvalue(a, &count);
13153 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013154 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013155 return res==-1 ? 1 : 0;
13156}
13157
13158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013159if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013160 ac_cv_broken_sem_getvalue=no
13161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013162 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13165 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013166fi
13167
13168
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013169fi
13170
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13172$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013173if test $ac_cv_broken_sem_getvalue = yes
13174then
13175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013176$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013177
13178fi
13179
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013180# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13182$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013183# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013185 enableval=$enable_big_digits; case $enable_big_digits in
13186yes)
13187 enable_big_digits=30 ;;
13188no)
13189 enable_big_digits=15 ;;
1319015|30)
13191 ;;
13192*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013193 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 +000013194esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13196$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013197
13198cat >>confdefs.h <<_ACEOF
13199#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13200_ACEOF
13201
13202
13203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13205$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013206fi
13207
13208
Guido van Rossumef2255b2000-03-10 22:30:29 +000013209# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013210ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013211if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
13213
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013216 wchar_h="yes"
13217
Guido van Rossumef2255b2000-03-10 22:30:29 +000013218else
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013220
13221fi
13222
Michael W. Hudson54241132001-12-07 15:38:26 +000013223
Martin v. Löwis11437992002-04-12 09:54:03 +000013224
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013225# determine wchar_t size
13226if test "$wchar_h" = yes
13227then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013228 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013229# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13230# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13231# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13233$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013234if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013236else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013237 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13238"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Martin v. Löwis11437992002-04-12 09:54:03 +000013240else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013241 if test "$ac_cv_type_wchar_t" = yes; then
13242 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13243$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013244as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013245See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013246 else
13247 ac_cv_sizeof_wchar_t=0
13248 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013249fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013250
Martin v. Löwis11437992002-04-12 09:54:03 +000013251fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13253$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013254
13255
13256
Martin v. Löwis11437992002-04-12 09:54:03 +000013257cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013258#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013259_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013260
Michael W. Hudson54241132001-12-07 15:38:26 +000013261
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013262fi
13263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13265$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013266have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013268/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013269
13270#include <tcl.h>
13271#if TCL_UTF_MAX != 6
13272# error "NOT UCS4_TCL"
13273#endif
13274int
13275main ()
13276{
13277
13278 ;
13279 return 0;
13280}
13281_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013283
13284
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013285$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013286
13287 have_ucs4_tcl=yes
13288
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13292$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013293
Skip Montanaro6dead952003-09-25 14:50:04 +000013294# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013295if test "$wchar_h" = yes
13296then
13297 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13299$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013300 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013302else
13303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013304 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013305 ac_cv_wchar_t_signed=yes
13306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013308/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013309
13310 #include <wchar.h>
13311 int main()
13312 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013313 /* Success: exit code 0 */
13314 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013315 }
13316
13317_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013318if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013319 ac_cv_wchar_t_signed=yes
13320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013321 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13324 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013325fi
13326
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013327fi
13328
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13330$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013331fi
13332
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13334$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013335# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013336if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013337 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013338else
13339 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013340fi
13341
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013342
13343if test $enable_unicode = yes
13344then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013345 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013346 case "$have_ucs4_tcl" in
13347 yes) enable_unicode="ucs4"
13348 ;;
13349 *) enable_unicode="ucs2"
13350 ;;
13351 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013352fi
13353
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013354
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013355case "$enable_unicode" in
13356ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013357 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013358
13359 ;;
13360ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013362
13363 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013364no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013365*) 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 +000013366esac
13367
Michael W. Hudson54241132001-12-07 15:38:26 +000013368
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
13370
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013371if test "$enable_unicode" = "no"
13372then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013373 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13375$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013376else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013377 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013379$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013380
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013381
13382 # wchar_t is only usable if it maps to an unsigned type
13383 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013384 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013385 then
13386 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013388$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013391
13392 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13393 then
13394 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013396
13397 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13398 then
13399 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013400 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013401
13402 else
13403 PY_UNICODE_TYPE="no type found"
13404 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13406$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013407fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013408
13409# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13411$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013412if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013413 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013414else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013415 ac_cv_c_bigendian=unknown
13416 # See if we're dealing with a universal compiler.
13417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13418/* end confdefs.h. */
13419#ifndef __APPLE_CC__
13420 not a universal capable compiler
13421 #endif
13422 typedef int dummy;
13423
Skip Montanaro6dead952003-09-25 14:50:04 +000013424_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013425if ac_fn_c_try_compile "$LINENO"; then :
13426
13427 # Check for potential -arch flags. It is not universal unless
13428 # there are at least two -arch flags with different values.
13429 ac_arch=
13430 ac_prev=
13431 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13432 if test -n "$ac_prev"; then
13433 case $ac_word in
13434 i?86 | x86_64 | ppc | ppc64)
13435 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13436 ac_arch=$ac_word
13437 else
13438 ac_cv_c_bigendian=universal
13439 break
13440 fi
13441 ;;
13442 esac
13443 ac_prev=
13444 elif test "x$ac_word" = "x-arch"; then
13445 ac_prev=arch
13446 fi
13447 done
13448fi
13449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13450 if test $ac_cv_c_bigendian = unknown; then
13451 # See if sys/param.h defines the BYTE_ORDER macro.
13452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013453/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013454#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013455 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013456
Martin v. Löwis11437992002-04-12 09:54:03 +000013457int
13458main ()
13459{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013460#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13461 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13462 && LITTLE_ENDIAN)
13463 bogus endian macros
13464 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
13466 ;
13467 return 0;
13468}
13469_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013471 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013473/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013474#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013475 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013476
Martin v. Löwis11437992002-04-12 09:54:03 +000013477int
13478main ()
13479{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013480#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013481 not big endian
13482 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013483
13484 ;
13485 return 0;
13486}
13487_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013489 ac_cv_c_bigendian=yes
13490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013491 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013494fi
13495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13496 fi
13497 if test $ac_cv_c_bigendian = unknown; then
13498 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013500/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013501#include <limits.h>
13502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503int
13504main ()
13505{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013506#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13507 bogus endian macros
13508 #endif
13509
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ;
13511 return 0;
13512}
13513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514if ac_fn_c_try_compile "$LINENO"; then :
13515 # It does; now see whether it defined to _BIG_ENDIAN or not.
13516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13517/* end confdefs.h. */
13518#include <limits.h>
13519
13520int
13521main ()
13522{
13523#ifndef _BIG_ENDIAN
13524 not big endian
13525 #endif
13526
13527 ;
13528 return 0;
13529}
13530_ACEOF
13531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013534 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013535fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13537fi
13538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13539 fi
13540 if test $ac_cv_c_bigendian = unknown; then
13541 # Compile a test program.
13542 if test "$cross_compiling" = yes; then :
13543 # Try to guess by grepping values from an object file.
13544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13545/* end confdefs.h. */
13546short int ascii_mm[] =
13547 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13548 short int ascii_ii[] =
13549 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13550 int use_ascii (int i) {
13551 return ascii_mm[i] + ascii_ii[i];
13552 }
13553 short int ebcdic_ii[] =
13554 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13555 short int ebcdic_mm[] =
13556 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13557 int use_ebcdic (int i) {
13558 return ebcdic_mm[i] + ebcdic_ii[i];
13559 }
13560 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013561
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013562int
13563main ()
13564{
13565return use_ascii (foo) == use_ebcdic (foo);
13566 ;
13567 return 0;
13568}
13569_ACEOF
13570if ac_fn_c_try_compile "$LINENO"; then :
13571 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13572 ac_cv_c_bigendian=yes
13573 fi
13574 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13575 if test "$ac_cv_c_bigendian" = unknown; then
13576 ac_cv_c_bigendian=no
13577 else
13578 # finding both strings is unlikely to happen, but who knows?
13579 ac_cv_c_bigendian=unknown
13580 fi
13581 fi
13582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013586/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013587$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013588int
13589main ()
13590{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013591
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013592 /* Are we little or big endian? From Harbison&Steele. */
13593 union
13594 {
13595 long int l;
13596 char c[sizeof (long int)];
13597 } u;
13598 u.l = 1;
13599 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013600
13601 ;
13602 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013603}
Martin v. Löwis11437992002-04-12 09:54:03 +000013604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013606 ac_cv_c_bigendian=no
13607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013608 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013609fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013613
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013615fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13617$as_echo "$ac_cv_c_bigendian" >&6; }
13618 case $ac_cv_c_bigendian in #(
13619 yes)
13620 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13621;; #(
13622 no)
13623 ;; #(
13624 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013626$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013627
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013628 ;; #(
13629 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013630 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013631 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013632 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013633
Michael W. Hudson54241132001-12-07 15:38:26 +000013634
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013635# Check whether right shifting a negative integer extends the sign bit
13636# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13638$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013639if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013640 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013641else
Martin v. Löwis11437992002-04-12 09:54:03 +000013642
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013643if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013644 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013647/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013648
13649int main()
13650{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013651 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013652}
13653
Martin v. Löwis11437992002-04-12 09:54:03 +000013654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013655if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013656 ac_cv_rshift_extends_sign=yes
13657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013659fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013662fi
13663
Martin v. Löwiseba40652007-08-30 20:10:57 +000013664fi
13665
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13667$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013668if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013669then
Martin v. Löwis11437992002-04-12 09:54:03 +000013670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013672
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013673fi
13674
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013675# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13677$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013678if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013679 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013680else
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013683/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013684#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013685int
13686main ()
13687{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013688
13689 FILE *f = fopen("/dev/null", "r");
13690 flockfile(f);
13691 getc_unlocked(f);
13692 funlockfile(f);
13693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 ;
13695 return 0;
13696}
13697_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013698if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013699 ac_cv_have_getc_unlocked=yes
13700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701 ac_cv_have_getc_unlocked=no
13702fi
13703rm -f core conftest.err conftest.$ac_objext \
13704 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13708$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013709if test "$ac_cv_have_getc_unlocked" = yes
13710then
Martin v. Löwis11437992002-04-12 09:54:03 +000013711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013713
13714fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013715
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013716# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013717# save the value of LIBS so we don't actually link Python with readline
13718LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013719
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013720# On some systems we need to link readline to a termcap compatible
13721# library. NOTE: Keep the precedence of listed libraries synchronised
13722# with setup.py.
13723py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13725$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013726for py_libtermcap in "" ncursesw ncurses curses termcap; do
13727 if test -z "$py_libtermcap"; then
13728 READLINE_LIBS="-lreadline"
13729 else
13730 READLINE_LIBS="-lreadline -l$py_libtermcap"
13731 fi
13732 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013734/* end confdefs.h. */
13735
Martin v. Löwiseba40652007-08-30 20:10:57 +000013736/* Override any GCC internal prototype to avoid an error.
13737 Use char because int might match the return type of a GCC
13738 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013739#ifdef __cplusplus
13740extern "C"
13741#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013742char readline ();
13743int
13744main ()
13745{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013746return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013747 ;
13748 return 0;
13749}
13750_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013751if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013752 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754rm -f core conftest.err conftest.$ac_objext \
13755 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013756 if test $py_cv_lib_readline = yes; then
13757 break
13758 fi
13759done
13760# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13761#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013762if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13764$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13767$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013770
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013771fi
13772
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013773# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13775$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013776if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013777 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013778else
13779 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013780LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013782/* end confdefs.h. */
13783
Martin v. Löwiseba40652007-08-30 20:10:57 +000013784/* Override any GCC internal prototype to avoid an error.
13785 Use char because int might match the return type of a GCC
13786 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013787#ifdef __cplusplus
13788extern "C"
13789#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013790char rl_callback_handler_install ();
13791int
13792main ()
13793{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013794return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013795 ;
13796 return 0;
13797}
13798_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013800 ac_cv_lib_readline_rl_callback_handler_install=yes
13801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804rm -f core conftest.err conftest.$ac_objext \
13805 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013806LIBS=$ac_check_lib_save_LIBS
13807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13809$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013810if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013812$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013813
13814fi
13815
13816
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013817# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013819/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013820#include <readline/readline.h>
13821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013823 have_readline=yes
13824else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013825 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013826
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013827fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013828rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013829if test $have_readline = yes
13830then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013832/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013833#include <readline/readline.h>
13834
13835_ACEOF
13836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013838
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013839$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013840
13841fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013842rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013845/* end confdefs.h. */
13846#include <readline/readline.h>
13847
13848_ACEOF
13849if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013850 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013852$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013853
13854fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013855rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013856
13857fi
13858
Martin v. Löwis0daad592001-09-30 21:09:59 +000013859# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13861$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013862if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013863 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013864else
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013866LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870/* Override any GCC internal prototype to avoid an error.
13871 Use char because int might match the return type of a GCC
13872 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013873#ifdef __cplusplus
13874extern "C"
13875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013876char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013877int
13878main ()
13879{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013880return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 ;
13882 return 0;
13883}
13884_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013886 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013887else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013888 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013890rm -f core conftest.err conftest.$ac_objext \
13891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013892LIBS=$ac_check_lib_save_LIBS
13893fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13895$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013896if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013897
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013899
Martin v. Löwis0daad592001-09-30 21:09:59 +000013900fi
13901
Michael W. Hudson54241132001-12-07 15:38:26 +000013902
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013903# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13905$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013906if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013907 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013908else
13909 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013910LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013912/* end confdefs.h. */
13913
13914/* Override any GCC internal prototype to avoid an error.
13915 Use char because int might match the return type of a GCC
13916 builtin and then its argument prototype would still apply. */
13917#ifdef __cplusplus
13918extern "C"
13919#endif
13920char rl_completion_display_matches_hook ();
13921int
13922main ()
13923{
13924return rl_completion_display_matches_hook ();
13925 ;
13926 return 0;
13927}
13928_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013929if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013930 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013932 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013933fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013934rm -f core conftest.err conftest.$ac_objext \
13935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013936LIBS=$ac_check_lib_save_LIBS
13937fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13939$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013940if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013942$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013943
13944fi
13945
13946
Martin Pantera70c3232016-04-03 02:54:58 +000013947# also in 4.0, but not in editline
13948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
13949$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
13950if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
13951 $as_echo_n "(cached) " >&6
13952else
13953 ac_check_lib_save_LIBS=$LIBS
13954LIBS="-lreadline $READLINE_LIBS $LIBS"
13955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13956/* end confdefs.h. */
13957
13958/* Override any GCC internal prototype to avoid an error.
13959 Use char because int might match the return type of a GCC
13960 builtin and then its argument prototype would still apply. */
13961#ifdef __cplusplus
13962extern "C"
13963#endif
13964char rl_resize_terminal ();
13965int
13966main ()
13967{
13968return rl_resize_terminal ();
13969 ;
13970 return 0;
13971}
13972_ACEOF
13973if ac_fn_c_try_link "$LINENO"; then :
13974 ac_cv_lib_readline_rl_resize_terminal=yes
13975else
13976 ac_cv_lib_readline_rl_resize_terminal=no
13977fi
13978rm -f core conftest.err conftest.$ac_objext \
13979 conftest$ac_exeext conftest.$ac_ext
13980LIBS=$ac_check_lib_save_LIBS
13981fi
13982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
13983$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
13984if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
13985
13986$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
13987
13988fi
13989
13990
Martin v. Löwis0daad592001-09-30 21:09:59 +000013991# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13993$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013994if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013995 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013996else
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013998LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002/* Override any GCC internal prototype to avoid an error.
14003 Use char because int might match the return type of a GCC
14004 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014005#ifdef __cplusplus
14006extern "C"
14007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014008char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014009int
14010main ()
14011{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014012return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 ;
14014 return 0;
14015}
14016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014020 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014022rm -f core conftest.err conftest.$ac_objext \
14023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014024LIBS=$ac_check_lib_save_LIBS
14025fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14027$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014028if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014029
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014031
Guido van Rossum353ae582001-07-10 16:45:32 +000014032fi
14033
Jack Jansendd19cf82001-12-06 22:36:17 +000014034
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014035# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014037/* end confdefs.h. */
14038#include <readline/readline.h>
14039_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014040if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014041 have_readline=yes
14042else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014043 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014044
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014045fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014046rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014047if test $have_readline = yes
14048then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014050/* end confdefs.h. */
14051#include <readline/readline.h>
14052
14053_ACEOF
14054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014056
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014057$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014058
14059fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014060rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014061
14062fi
14063
Martin v. Löwis82bca632006-02-10 20:49:30 +000014064# End of readline checks: restore LIBS
14065LIBS=$LIBS_no_readline
14066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14068$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014069if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014070 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014071else
Martin v. Löwis11437992002-04-12 09:54:03 +000014072
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014073if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014074 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014077/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014078
14079int main()
14080{
14081 int val1 = nice(1);
14082 if (val1 != -1 && val1 == nice(2))
14083 exit(0);
14084 exit(1);
14085}
14086
Martin v. Löwis11437992002-04-12 09:54:03 +000014087_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014088if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014089 ac_cv_broken_nice=yes
14090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014092fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14094 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014095fi
14096
Martin v. Löwiseba40652007-08-30 20:10:57 +000014097fi
14098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14100$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014101if test "$ac_cv_broken_nice" = yes
14102then
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014104$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014105
14106fi
14107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14109$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014110if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014111 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014113 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014114 ac_cv_broken_poll=no
14115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014117/* end confdefs.h. */
14118
14119#include <poll.h>
14120
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014121int main()
14122{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014123 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014124 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014125
14126 close (42);
14127
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014128 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014129 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014130 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014131 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014132 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014133 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014134 return 1;
14135}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014136
14137_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014138if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014139 ac_cv_broken_poll=yes
14140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014141 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014146
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014147fi
14148
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14150$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014151if test "$ac_cv_broken_poll" = yes
14152then
14153
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014154$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014155
14156fi
14157
Brett Cannon43802422005-02-10 20:48:03 +000014158# 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 +000014159# (which is not required by ISO C or UNIX spec) and/or if we support
14160# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014161ac_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 +000014162#include <$ac_cv_struct_tm>
14163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014164"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014165if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014166
14167cat >>confdefs.h <<_ACEOF
14168#define HAVE_STRUCT_TM_TM_ZONE 1
14169_ACEOF
14170
14171
14172fi
14173
14174if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014176$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014177
14178else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014179 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14180"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014181if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014182 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014184 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014185fi
14186
Martin v. Löwiseba40652007-08-30 20:10:57 +000014187cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014188#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014189_ACEOF
14190
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14192$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014193if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014194 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014197/* end confdefs.h. */
14198#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014199#if !HAVE_DECL_TZNAME
14200extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014201#endif
14202
14203int
14204main ()
14205{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014206return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014207 ;
14208 return 0;
14209}
14210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014211if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014212 ac_cv_var_tzname=yes
14213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014214 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216rm -f core conftest.err conftest.$ac_objext \
14217 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014218fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14220$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014221 if test $ac_cv_var_tzname = yes; then
14222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014224
14225 fi
14226fi
14227
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014228
Martin v. Löwis1d459062005-03-14 21:23:33 +000014229# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14231$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014232if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014233 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014234else
14235
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014236if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014237 ac_cv_working_tzset=no
14238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014240/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014241
14242#include <stdlib.h>
14243#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014244#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014245
14246#if HAVE_TZNAME
14247extern char *tzname[];
14248#endif
14249
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014250int main()
14251{
Brett Cannon18367812003-09-19 00:59:16 +000014252 /* Note that we need to ensure that not only does tzset(3)
14253 do 'something' with localtime, but it works as documented
14254 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014255 This includes making sure that tzname is set properly if
14256 tm->tm_zone does not exist since it is the alternative way
14257 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014258
14259 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014260 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014261 */
14262
Martin v. Löwis1d459062005-03-14 21:23:33 +000014263 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014264 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14265
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014266 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014267 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014268 if (localtime(&groundhogday)->tm_hour != 0)
14269 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014270#if HAVE_TZNAME
14271 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14272 if (strcmp(tzname[0], "UTC") ||
14273 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14274 exit(1);
14275#endif
Brett Cannon18367812003-09-19 00:59:16 +000014276
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014277 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014278 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014279 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014280 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014281#if HAVE_TZNAME
14282 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14283 exit(1);
14284#endif
Brett Cannon18367812003-09-19 00:59:16 +000014285
14286 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14287 tzset();
14288 if (localtime(&groundhogday)->tm_hour != 11)
14289 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014290#if HAVE_TZNAME
14291 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14292 exit(1);
14293#endif
14294
14295#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014296 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14297 exit(1);
14298 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14299 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014300#endif
Brett Cannon18367812003-09-19 00:59:16 +000014301
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014302 exit(0);
14303}
14304
14305_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014306if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014307 ac_cv_working_tzset=yes
14308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014310fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14312 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014313fi
14314
Martin v. Löwiseba40652007-08-30 20:10:57 +000014315fi
14316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14318$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014319if test "$ac_cv_working_tzset" = yes
14320then
14321
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014322$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014323
14324fi
14325
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014326# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14328$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014329if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014330 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014331else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014333/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014334#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014335int
14336main ()
14337{
14338
14339struct stat st;
14340st.st_mtim.tv_nsec = 1;
14341
14342 ;
14343 return 0;
14344}
14345_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014347 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014348else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14352fi
14353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14355$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014356if test "$ac_cv_stat_tv_nsec" = yes
14357then
14358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014360
14361fi
14362
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014363# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14365$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014366if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014367 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014368else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014370/* end confdefs.h. */
14371#include <sys/stat.h>
14372int
14373main ()
14374{
14375
14376struct stat st;
14377st.st_mtimespec.tv_nsec = 1;
14378
14379 ;
14380 return 0;
14381}
14382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014384 ac_cv_stat_tv_nsec2=yes
14385else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014386 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14389fi
14390
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14392$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014393if test "$ac_cv_stat_tv_nsec2" = yes
14394then
14395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014397
14398fi
14399
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014400# first curses configure check
14401ac_save_cppflags="$CPPFLAGS"
14402CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14403
14404for ac_header in curses.h ncurses.h
14405do :
14406 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14407ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14408if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14409 cat >>confdefs.h <<_ACEOF
14410#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14411_ACEOF
14412
14413fi
14414
14415done
14416
14417
14418# On Solaris, term.h requires curses.h
14419for ac_header in term.h
14420do :
14421 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14422#ifdef HAVE_CURSES_H
14423#include <curses.h>
14424#endif
14425
14426"
14427if test "x$ac_cv_header_term_h" = xyes; then :
14428 cat >>confdefs.h <<_ACEOF
14429#define HAVE_TERM_H 1
14430_ACEOF
14431
14432fi
14433
14434done
14435
14436
Jack Jansen666b1e72001-10-31 12:11:48 +000014437# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14439$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014440if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014441 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014442else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014444/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014445#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014446int
14447main ()
14448{
Jack Jansen666b1e72001-10-31 12:11:48 +000014449
14450 int rtn;
14451 rtn = mvwdelch(0,0,0);
14452
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 ;
14454 return 0;
14455}
14456_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014457if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014458 ac_cv_mvwdelch_is_expression=yes
14459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14463fi
14464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14466$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014467
14468if test "$ac_cv_mvwdelch_is_expression" = yes
14469then
Martin v. Löwis11437992002-04-12 09:54:03 +000014470
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014471$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014472
14473fi
14474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14476$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014477if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014478 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014481/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014482#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014483int
14484main ()
14485{
Jack Jansen666b1e72001-10-31 12:11:48 +000014486
14487 WINDOW *w;
14488 w->_flags = 0;
14489
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 ;
14491 return 0;
14492}
14493_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014494if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014495 ac_cv_window_has_flags=yes
14496else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014497 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14500fi
14501
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14503$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014504
Jack Jansen666b1e72001-10-31 12:11:48 +000014505
14506if test "$ac_cv_window_has_flags" = yes
14507then
Martin v. Löwis11437992002-04-12 09:54:03 +000014508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014509$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014510
14511fi
14512
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14514$as_echo_n "checking for is_term_resized... " >&6; }
14515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014516/* end confdefs.h. */
14517#include <curses.h>
14518int
14519main ()
14520{
14521void *x=is_term_resized
14522 ;
14523 return 0;
14524}
14525_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014527
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014528$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014529
Matthias Klosec511b472010-05-08 11:01:39 +000014530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14534$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014535
14536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14538
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14540$as_echo_n "checking for resize_term... " >&6; }
14541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014542/* end confdefs.h. */
14543#include <curses.h>
14544int
14545main ()
14546{
14547void *x=resize_term
14548 ;
14549 return 0;
14550}
14551_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014552if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014555
Matthias Klosec511b472010-05-08 11:01:39 +000014556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014557$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014558else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14560$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014561
14562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14564
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14566$as_echo_n "checking for resizeterm... " >&6; }
14567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014568/* end confdefs.h. */
14569#include <curses.h>
14570int
14571main ()
14572{
14573void *x=resizeterm
14574 ;
14575 return 0;
14576}
14577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014578if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014580$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014581
Matthias Klosec511b472010-05-08 11:01:39 +000014582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014583$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14586$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014587
14588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014590# last curses configure check
14591CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014592
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14594$as_echo "$as_me: checking for device files" >&6;}
14595
14596if test "x$cross_compiling" = xyes; then
14597 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14599$as_echo_n "checking for /dev/ptmx... " >&6; }
14600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14601$as_echo "not set" >&6; }
14602 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14603 fi
14604 if test "${ac_cv_file__dev_ptc+set}" != set; then
14605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14606$as_echo_n "checking for /dev/ptc... " >&6; }
14607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14608$as_echo "not set" >&6; }
14609 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14610 fi
14611fi
14612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14614$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014615if ${ac_cv_file__dev_ptmx+:} false; then :
14616 $as_echo_n "(cached) " >&6
14617else
14618 test "$cross_compiling" = yes &&
14619 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14620if test -r "/dev/ptmx"; then
14621 ac_cv_file__dev_ptmx=yes
14622else
14623 ac_cv_file__dev_ptmx=no
14624fi
14625fi
14626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14627$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14628if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014629
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014630fi
14631
14632if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014634$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014635
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014636fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14638$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014639if ${ac_cv_file__dev_ptc+:} false; then :
14640 $as_echo_n "(cached) " >&6
14641else
14642 test "$cross_compiling" = yes &&
14643 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14644if test -r "/dev/ptc"; then
14645 ac_cv_file__dev_ptc=yes
14646else
14647 ac_cv_file__dev_ptc=no
14648fi
14649fi
14650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14651$as_echo "$ac_cv_file__dev_ptc" >&6; }
14652if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014653
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014654fi
14655
14656if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014657
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014658$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014659
Neal Norwitz865400f2003-03-21 01:42:58 +000014660fi
14661
Mark Dickinson82864d12009-11-15 16:18:58 +000014662if test "$have_long_long" = yes
14663then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14665$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014666 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014667 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014669 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014670 ac_cv_have_long_long_format="cross -- assuming no"
14671 if test x$GCC = xyes; then
14672 save_CFLAGS=$CFLAGS
14673 CFLAGS="$CFLAGS -Werror -Wformat"
14674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14675/* end confdefs.h. */
14676
14677 #include <stdio.h>
14678 #include <stddef.h>
14679
14680int
14681main ()
14682{
14683
14684 char *buffer;
14685 sprintf(buffer, "%lld", (long long)123);
14686 sprintf(buffer, "%lld", (long long)-123);
14687 sprintf(buffer, "%llu", (unsigned long long)123);
14688
14689 ;
14690 return 0;
14691}
14692_ACEOF
14693if ac_fn_c_try_compile "$LINENO"; then :
14694 ac_cv_have_long_long_format=yes
14695
14696fi
14697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14698 CFLAGS=$save_CFLAGS
14699 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014702/* end confdefs.h. */
14703
14704 #include <stdio.h>
14705 #include <stddef.h>
14706 #include <string.h>
14707
14708 #ifdef HAVE_SYS_TYPES_H
14709 #include <sys/types.h>
14710 #endif
14711
14712 int main()
14713 {
14714 char buffer[256];
14715
14716 if (sprintf(buffer, "%lld", (long long)123) < 0)
14717 return 1;
14718 if (strcmp(buffer, "123"))
14719 return 1;
14720
14721 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14722 return 1;
14723 if (strcmp(buffer, "-123"))
14724 return 1;
14725
14726 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14727 return 1;
14728 if (strcmp(buffer, "123"))
14729 return 1;
14730
14731 return 0;
14732 }
14733
14734_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014735if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014736 ac_cv_have_long_long_format=yes
14737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014738 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014742fi
14743
14744
Mark Dickinson82864d12009-11-15 16:18:58 +000014745fi
14746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14748$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014749fi
14750
Mark Dickinson5ce84742009-12-31 20:48:04 +000014751if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014752then
14753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014754$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014755
14756fi
14757
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014758if test $ac_sys_system = Darwin
14759then
14760 LIBS="$LIBS -framework CoreFoundation"
14761fi
14762
Mark Dickinson82864d12009-11-15 16:18:58 +000014763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14765$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014766if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014767 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014769 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014770 ac_cv_have_size_t_format="cross -- assuming yes"
14771
Brett Cannon09d12362006-05-11 05:11:33 +000014772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014774/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014775
Brett Cannon09d12362006-05-11 05:11:33 +000014776#include <stdio.h>
14777#include <stddef.h>
14778#include <string.h>
14779
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014780#ifdef HAVE_SYS_TYPES_H
14781#include <sys/types.h>
14782#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014783
14784#ifdef HAVE_SSIZE_T
14785typedef ssize_t Py_ssize_t;
14786#elif SIZEOF_VOID_P == SIZEOF_LONG
14787typedef long Py_ssize_t;
14788#else
14789typedef int Py_ssize_t;
14790#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014791
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014792int main()
14793{
14794 char buffer[256];
14795
Brett Cannon09d12362006-05-11 05:11:33 +000014796 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14797 return 1;
14798
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014799 if (strcmp(buffer, "123"))
14800 return 1;
14801
14802 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14803 return 1;
14804
14805 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014806 return 1;
14807
14808 return 0;
14809}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014810
Brett Cannon09d12362006-05-11 05:11:33 +000014811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014812if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014813 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014815 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014819fi
14820
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14823$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014824if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014826$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014827
14828fi
14829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014830ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014831#ifdef HAVE_SYS_TYPES_H
14832#include <sys/types.h>
14833#endif
14834#ifdef HAVE_SYS_SOCKET_H
14835#include <sys/socket.h>
14836#endif
14837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014838"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014839if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014840
Martin v. Löwis11437992002-04-12 09:54:03 +000014841else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014843$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014844
14845fi
14846
Michael W. Hudson54241132001-12-07 15:38:26 +000014847
Benjamin Peterson7497e912010-10-16 00:53:39 +000014848case $ac_sys_system in
14849AIX*)
14850
14851$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14852 ;;
14853esac
14854
14855
Michael W. Hudson54241132001-12-07 15:38:26 +000014856
14857
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014858for h in `(cd $srcdir;echo Python/thread_*.h)`
14859do
14860 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14861done
14862
Michael W. Hudson54241132001-12-07 15:38:26 +000014863
Neal Norwitzd24499d2005-12-18 21:36:39 +000014864SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14866$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014867for dir in $SRCDIRS; do
14868 if test ! -d $dir; then
14869 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014870 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014871done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014872
14873# BEGIN_COMPUTED_GOTO
14874# Check for --with-computed-gotos
14875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14876$as_echo_n "checking for --with-computed-gotos... " >&6; }
14877
14878# Check whether --with-computed-gotos was given.
14879if test "${with_computed_gotos+set}" = set; then :
14880 withval=$with_computed_gotos;
14881if test "$withval" = yes
14882then
14883
14884$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
14885
14886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14887$as_echo "yes" >&6; }
14888fi
14889if test "$withval" = no
14890then
14891
14892$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14893
14894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14895$as_echo "no" >&6; }
14896fi
14897
14898else
14899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14900$as_echo "no value specified" >&6; }
14901fi
14902
14903
14904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14905$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14906if ${ac_cv_computed_gotos+:} false; then :
14907 $as_echo_n "(cached) " >&6
14908else
14909 if test "$cross_compiling" = yes; then :
14910 if test "${with_computed_gotos+set}" = set; then
14911 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14912 else
14913 ac_cv_computed_gotos=no
14914 fi
14915else
14916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14917/* end confdefs.h. */
14918
14919int main(int argc, char **argv)
14920{
14921 static void *targets[1] = { &&LABEL1 };
14922 goto LABEL2;
14923LABEL1:
14924 return 0;
14925LABEL2:
14926 goto *targets[0];
14927 return 1;
14928}
14929
14930_ACEOF
14931if ac_fn_c_try_run "$LINENO"; then :
14932 ac_cv_computed_gotos=yes
14933else
14934 ac_cv_computed_gotos=no
14935fi
14936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14937 conftest.$ac_objext conftest.beam conftest.$ac_ext
14938fi
14939
14940fi
14941
14942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14943$as_echo "$ac_cv_computed_gotos" >&6; }
14944case "$ac_cv_computed_gotos" in yes*)
14945
14946$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14947
14948esac
14949# END_COMPUTED_GOTO
14950
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14952$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014953
Ned Deily3f1d0b32014-11-20 02:11:03 -080014954# ensurepip option
14955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14956$as_echo_n "checking for ensurepip... " >&6; }
14957
14958# Check whether --with-ensurepip was given.
14959if test "${with_ensurepip+set}" = set; then :
14960 withval=$with_ensurepip;
14961else
14962 with_ensurepip=no
14963fi
14964
14965case $with_ensurepip in #(
14966 yes|upgrade) :
14967 ENSUREPIP=upgrade ;; #(
14968 install) :
14969 ENSUREPIP=install ;; #(
14970 no) :
14971 ENSUREPIP=no ;; #(
14972 *) :
14973 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14974esac
14975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14976$as_echo "$ENSUREPIP" >&6; }
14977
14978
Guido van Rossum627b2d71993-12-24 10:39:16 +000014979# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014980ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014981
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014982ac_config_files="$ac_config_files Modules/ld_so_aix"
14983
Martin v. Löwis11437992002-04-12 09:54:03 +000014984cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014985# This file is a shell script that caches the results of configure
14986# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014987# scripts and configure runs, see configure's option --config-cache.
14988# It is not useful on other systems. If it contains results you don't
14989# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014990#
Martin v. Löwis11437992002-04-12 09:54:03 +000014991# config.status only pays attention to the cache file if you give it
14992# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014993#
Skip Montanaro6dead952003-09-25 14:50:04 +000014994# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014995# loading this file, other *unset* `ac_cv_foo' will be assigned the
14996# following values.
14997
14998_ACEOF
14999
Guido van Rossumf78abae1997-01-21 22:02:36 +000015000# The following way of writing the cache mishandles newlines in values,
15001# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015003# Ultrix sh set writes to stderr and can't be redirected directly,
15004# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015005(
15006 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15007 eval ac_val=\$$ac_var
15008 case $ac_val in #(
15009 *${as_nl}*)
15010 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015011 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15012$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015013 esac
15014 case $ac_var in #(
15015 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015016 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15017 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015018 esac ;;
15019 esac
15020 done
15021
Martin v. Löwis11437992002-04-12 09:54:03 +000015022 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015023 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15024 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015025 # `set' does not quote correctly, so add quotes: double-quote
15026 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015028 "s/'/'\\\\''/g;
15029 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 *)
15032 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035 esac |
15036 sort
15037) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015041 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15043 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15045 :end' >>confcache
15046if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15047 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015048 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015049 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15050$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015051 if test ! -f "$cache_file" || test -h "$cache_file"; then
15052 cat confcache >"$cache_file"
15053 else
15054 case $cache_file in #(
15055 */* | ?:*)
15056 mv -f confcache "$cache_file"$$ &&
15057 mv -f "$cache_file"$$ "$cache_file" ;; #(
15058 *)
15059 mv -f confcache "$cache_file" ;;
15060 esac
15061 fi
15062 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015063 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015064 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15065$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015066 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015067fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015068rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015069
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015070test "x$prefix" = xNONE && prefix=$ac_default_prefix
15071# Let make expand exec_prefix.
15072test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015073
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015074DEFS=-DHAVE_CONFIG_H
15075
Skip Montanaro6dead952003-09-25 14:50:04 +000015076ac_libobjs=
15077ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015078U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015079for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15080 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015081 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015082 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015083 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15084 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015085 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15086 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015087done
15088LIBOBJS=$ac_libobjs
15089
15090LTLIBOBJS=$ac_ltlibobjs
15091
15092
Martin v. Löwis11437992002-04-12 09:54:03 +000015093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015094
Matthias Klose3cef2a92012-03-14 23:39:33 +010015095: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015096ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015097ac_clean_files_save=$ac_clean_files
15098ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015099{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15100$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15101as_write_fail=0
15102cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015103#! $SHELL
15104# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015105# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015106# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015107# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015108
Martin v. Löwis11437992002-04-12 09:54:03 +000015109debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015110ac_cs_recheck=false
15111ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015113SHELL=\${CONFIG_SHELL-$SHELL}
15114export SHELL
15115_ASEOF
15116cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15117## -------------------- ##
15118## M4sh Initialization. ##
15119## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015120
Martin v. Löwiseba40652007-08-30 20:10:57 +000015121# Be more Bourne compatible
15122DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015123if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 emulate sh
15125 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015126 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015127 # is contrary to our usage. Disable this feature.
15128 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015129 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015131 case `(set -o) 2>/dev/null` in #(
15132 *posix*) :
15133 set -o posix ;; #(
15134 *) :
15135 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015136esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015137fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015138
Skip Montanaro6dead952003-09-25 14:50:04 +000015139
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015140as_nl='
15141'
15142export as_nl
15143# Printing a long string crashes Solaris 7 /usr/bin/printf.
15144as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15145as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15146as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15147# Prefer a ksh shell builtin over an external printf program on Solaris,
15148# but without wasting forks for bash or zsh.
15149if test -z "$BASH_VERSION$ZSH_VERSION" \
15150 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15151 as_echo='print -r --'
15152 as_echo_n='print -rn --'
15153elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15154 as_echo='printf %s\n'
15155 as_echo_n='printf %s'
15156else
15157 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15158 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15159 as_echo_n='/usr/ucb/echo -n'
15160 else
15161 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15162 as_echo_n_body='eval
15163 arg=$1;
15164 case $arg in #(
15165 *"$as_nl"*)
15166 expr "X$arg" : "X\\(.*\\)$as_nl";
15167 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15168 esac;
15169 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15170 '
15171 export as_echo_n_body
15172 as_echo_n='sh -c $as_echo_n_body as_echo'
15173 fi
15174 export as_echo_body
15175 as_echo='sh -c $as_echo_body as_echo'
15176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015177
15178# The user is always right.
15179if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015180 PATH_SEPARATOR=:
15181 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15182 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15183 PATH_SEPARATOR=';'
15184 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015186
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187
15188# IFS
15189# We need space, tab and new line, in precisely that order. Quoting is
15190# there to prevent editors from complaining about space-tab.
15191# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15192# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015193IFS=" "" $as_nl"
15194
15195# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015196as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015197case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198 *[\\/]* ) as_myself=$0 ;;
15199 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015200for as_dir in $PATH
15201do
15202 IFS=$as_save_IFS
15203 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015204 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15205 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015207
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208 ;;
15209esac
15210# We did not find ourselves, most probably we were run as `sh COMMAND'
15211# in which case we are not to be found in the path.
15212if test "x$as_myself" = x; then
15213 as_myself=$0
15214fi
15215if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015216 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15217 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218fi
15219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015220# Unset variables that we do not need and which cause bugs (e.g. in
15221# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15222# suppresses any "Segmentation fault" message there. '((' could
15223# trigger a bug in pdksh 5.2.14.
15224for as_var in BASH_ENV ENV MAIL MAILPATH
15225do eval test x\${$as_var+set} = xset \
15226 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227done
15228PS1='$ '
15229PS2='> '
15230PS4='+ '
15231
15232# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015233LC_ALL=C
15234export LC_ALL
15235LANGUAGE=C
15236export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015238# CDPATH.
15239(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15240
15241
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015242# as_fn_error STATUS ERROR [LINENO LOG_FD]
15243# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015244# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15245# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015246# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015247as_fn_error ()
15248{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015249 as_status=$1; test $as_status -eq 0 && as_status=1
15250 if test "$4"; then
15251 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15252 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015253 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015254 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015255 as_fn_exit $as_status
15256} # as_fn_error
15257
15258
15259# as_fn_set_status STATUS
15260# -----------------------
15261# Set $? to STATUS, without forking.
15262as_fn_set_status ()
15263{
15264 return $1
15265} # as_fn_set_status
15266
15267# as_fn_exit STATUS
15268# -----------------
15269# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15270as_fn_exit ()
15271{
15272 set +e
15273 as_fn_set_status $1
15274 exit $1
15275} # as_fn_exit
15276
15277# as_fn_unset VAR
15278# ---------------
15279# Portably unset VAR.
15280as_fn_unset ()
15281{
15282 { eval $1=; unset $1;}
15283}
15284as_unset=as_fn_unset
15285# as_fn_append VAR VALUE
15286# ----------------------
15287# Append the text in VALUE to the end of the definition contained in VAR. Take
15288# advantage of any shell optimizations that allow amortized linear growth over
15289# repeated appends, instead of the typical quadratic growth present in naive
15290# implementations.
15291if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15292 eval 'as_fn_append ()
15293 {
15294 eval $1+=\$2
15295 }'
15296else
15297 as_fn_append ()
15298 {
15299 eval $1=\$$1\$2
15300 }
15301fi # as_fn_append
15302
15303# as_fn_arith ARG...
15304# ------------------
15305# Perform arithmetic evaluation on the ARGs, and store the result in the
15306# global $as_val. Take advantage of shells that can avoid forks. The arguments
15307# must be portable across $(()) and expr.
15308if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15309 eval 'as_fn_arith ()
15310 {
15311 as_val=$(( $* ))
15312 }'
15313else
15314 as_fn_arith ()
15315 {
15316 as_val=`expr "$@" || test $? -eq 1`
15317 }
15318fi # as_fn_arith
15319
15320
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321if expr a : '\(a\)' >/dev/null 2>&1 &&
15322 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15323 as_expr=expr
15324else
15325 as_expr=false
15326fi
15327
15328if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15329 as_basename=basename
15330else
15331 as_basename=false
15332fi
15333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015334if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15335 as_dirname=dirname
15336else
15337 as_dirname=false
15338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015339
Martin v. Löwiseba40652007-08-30 20:10:57 +000015340as_me=`$as_basename -- "$0" ||
15341$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15342 X"$0" : 'X\(//\)$' \| \
15343 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015344$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015345 sed '/^.*\/\([^/][^/]*\)\/*$/{
15346 s//\1/
15347 q
15348 }
15349 /^X\/\(\/\/\)$/{
15350 s//\1/
15351 q
15352 }
15353 /^X\/\(\/\).*/{
15354 s//\1/
15355 q
15356 }
15357 s/.*/./; q'`
15358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015359# Avoid depending upon Character Ranges.
15360as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15361as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15362as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15363as_cr_digits='0123456789'
15364as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015365
15366ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015367case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015369 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015370 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015371 xy) ECHO_C='\c';;
15372 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15373 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015374 esac;;
15375*)
15376 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015378
Martin v. Löwis11437992002-04-12 09:54:03 +000015379rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015380if test -d conf$$.dir; then
15381 rm -f conf$$.dir/conf$$.file
15382else
15383 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015384 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015386if (echo >conf$$.file) 2>/dev/null; then
15387 if ln -s conf$$.file conf$$ 2>/dev/null; then
15388 as_ln_s='ln -s'
15389 # ... but there are two gotchas:
15390 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15391 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015392 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015393 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015394 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015395 elif ln conf$$.file conf$$ 2>/dev/null; then
15396 as_ln_s=ln
15397 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015398 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015399 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015400else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015401 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15404rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015405
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015406
15407# as_fn_mkdir_p
15408# -------------
15409# Create "$as_dir" as a directory, including parents if necessary.
15410as_fn_mkdir_p ()
15411{
15412
15413 case $as_dir in #(
15414 -*) as_dir=./$as_dir;;
15415 esac
15416 test -d "$as_dir" || eval $as_mkdir_p || {
15417 as_dirs=
15418 while :; do
15419 case $as_dir in #(
15420 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15421 *) as_qdir=$as_dir;;
15422 esac
15423 as_dirs="'$as_qdir' $as_dirs"
15424 as_dir=`$as_dirname -- "$as_dir" ||
15425$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15426 X"$as_dir" : 'X\(//\)[^/]' \| \
15427 X"$as_dir" : 'X\(//\)$' \| \
15428 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15429$as_echo X"$as_dir" |
15430 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15431 s//\1/
15432 q
15433 }
15434 /^X\(\/\/\)[^/].*/{
15435 s//\1/
15436 q
15437 }
15438 /^X\(\/\/\)$/{
15439 s//\1/
15440 q
15441 }
15442 /^X\(\/\).*/{
15443 s//\1/
15444 q
15445 }
15446 s/.*/./; q'`
15447 test -d "$as_dir" && break
15448 done
15449 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015450 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015451
15452
15453} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015454if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015455 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015456else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015457 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015458 as_mkdir_p=false
15459fi
15460
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015461
15462# as_fn_executable_p FILE
15463# -----------------------
15464# Test if FILE is an executable regular file.
15465as_fn_executable_p ()
15466{
15467 test -f "$1" && test -x "$1"
15468} # as_fn_executable_p
15469as_test_x='test -x'
15470as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015471
15472# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015473as_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 +000015474
15475# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015476as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015477
15478
Martin v. Löwis11437992002-04-12 09:54:03 +000015479exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015480## ----------------------------------- ##
15481## Main body of $CONFIG_STATUS script. ##
15482## ----------------------------------- ##
15483_ASEOF
15484test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015486cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15487# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015488# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489# values after options handling.
15490ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015491This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015492generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015493
15494 CONFIG_FILES = $CONFIG_FILES
15495 CONFIG_HEADERS = $CONFIG_HEADERS
15496 CONFIG_LINKS = $CONFIG_LINKS
15497 CONFIG_COMMANDS = $CONFIG_COMMANDS
15498 $ $0 $@
15499
Martin v. Löwiseba40652007-08-30 20:10:57 +000015500on `(hostname || uname -n) 2>/dev/null | sed 1q`
15501"
15502
Martin v. Löwis11437992002-04-12 09:54:03 +000015503_ACEOF
15504
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015505case $ac_config_files in *"
15506"*) set x $ac_config_files; shift; ac_config_files=$*;;
15507esac
15508
15509case $ac_config_headers in *"
15510"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15511esac
15512
15513
15514cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015515# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015516config_files="$ac_config_files"
15517config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015518
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015521cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015522ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015523\`$as_me' instantiates files and other configuration actions
15524from templates according to the current configuration. Unless the files
15525and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015526
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015527Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015528
15529 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015530 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015531 --config print configuration, then exit
15532 -q, --quiet, --silent
15533 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 -d, --debug don't remove temporary files
15535 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015536 --file=FILE[:TEMPLATE]
15537 instantiate the configuration file FILE
15538 --header=FILE[:TEMPLATE]
15539 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015540
15541Configuration files:
15542$config_files
15543
15544Configuration headers:
15545$config_headers
15546
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015547Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015548
Martin v. Löwiseba40652007-08-30 20:10:57 +000015549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15551ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015552ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015553python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015554configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015555 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015556
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015557Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015558This config.status script is free software; the Free Software Foundation
15559gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015560
15561ac_pwd='$ac_pwd'
15562srcdir='$srcdir'
15563INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015564MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015565test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015566_ACEOF
15567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015568cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15569# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015570ac_need_defaults=:
15571while test $# != 0
15572do
15573 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015574 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015575 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15576 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015577 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015579 --*=)
15580 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15581 ac_optarg=
15582 ac_shift=:
15583 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015585 ac_option=$1
15586 ac_optarg=$2
15587 ac_shift=shift
15588 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 esac
15590
Skip Montanaro6dead952003-09-25 14:50:04 +000015591 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015592 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015593 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15594 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015596 $as_echo "$ac_cs_version"; exit ;;
15597 --config | --confi | --conf | --con | --co | --c )
15598 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015599 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015600 debug=: ;;
15601 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015602 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015603 case $ac_optarg in
15604 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015605 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015606 esac
15607 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 ac_need_defaults=false;;
15609 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015610 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015611 case $ac_optarg in
15612 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15613 esac
15614 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015615 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616 --he | --h)
15617 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015618 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015619Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015620 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015621 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015622 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15623 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15624 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015625
15626 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015627 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015628Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015630 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015631 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015632
15633 esac
15634 shift
15635done
15636
Skip Montanaro6dead952003-09-25 14:50:04 +000015637ac_configure_extra_args=
15638
15639if $ac_cs_silent; then
15640 exec 6>/dev/null
15641 ac_configure_extra_args="$ac_configure_extra_args --silent"
15642fi
15643
15644_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015645cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015646if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015647 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015648 shift
15649 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15650 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015651 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015652 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015653fi
15654
Martin v. Löwis11437992002-04-12 09:54:03 +000015655_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015656cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015657exec 5>>config.log
15658{
15659 echo
15660 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15661## Running $as_me. ##
15662_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015663 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015664} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015665
Martin v. Löwiseba40652007-08-30 20:10:57 +000015666_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015667cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015668_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015670cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015671
15672# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015673for ac_config_target in $ac_config_targets
15674do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015675 case $ac_config_target in
15676 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15677 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15678 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15679 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015680 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15681 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015682 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15683 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015684 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015685 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686
Matthias Klose3cef2a92012-03-14 23:39:33 +010015687 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015688 esac
15689done
15690
Martin v. Löwiseba40652007-08-30 20:10:57 +000015691
Martin v. Löwis11437992002-04-12 09:54:03 +000015692# If the user did not use the arguments to specify the items to instantiate,
15693# then the envvar interface is used. Set only those that are not.
15694# We use the long form for the default assignment because of an extremely
15695# bizarre bug on SunOS 4.1.3.
15696if $ac_need_defaults; then
15697 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15698 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15699fi
15700
Skip Montanaro6dead952003-09-25 14:50:04 +000015701# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015702# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015703# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015704# Hook for its removal unless debugging.
15705# Note that there is a small window in which the directory will not be cleaned:
15706# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015707$debug ||
15708{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015709 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015710 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015711 : "${ac_tmp:=$tmp}"
15712 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015713' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015714 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015715}
Martin v. Löwis11437992002-04-12 09:54:03 +000015716# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015717
Martin v. Löwis11437992002-04-12 09:54:03 +000015718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015719 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015720 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015721} ||
15722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015723 tmp=./conf$$-$RANDOM
15724 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015725} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015726ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015727
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015728# Set up the scripts for CONFIG_FILES section.
15729# No need to generate them if there are no CONFIG_FILES.
15730# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015731if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015733
15734ac_cr=`echo X | tr X '\015'`
15735# On cygwin, bash can eat \r inside `` if the user requested igncr.
15736# But we know of no other shell where ac_cr would be empty at this
15737# point, so we can use a bashism as a fallback.
15738if test "x$ac_cr" = x; then
15739 eval ac_cr=\$\'\\r\'
15740fi
15741ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15742if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015743 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015744else
15745 ac_cs_awk_cr=$ac_cr
15746fi
15747
Matthias Klose3cef2a92012-03-14 23:39:33 +010015748echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015749_ACEOF
15750
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015752{
15753 echo "cat >conf$$subs.awk <<_ACEOF" &&
15754 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15755 echo "_ACEOF"
15756} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015757 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15758ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759ac_delim='%!_!# '
15760for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015761 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015762 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015764 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15765 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015766 break
15767 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015768 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769 else
15770 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015772done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015773rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015775cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015776cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015778sed -n '
15779h
15780s/^/S["/; s/!.*/"]=/
15781p
15782g
15783s/^[^!]*!//
15784:repl
15785t repl
15786s/'"$ac_delim"'$//
15787t delim
15788:nl
15789h
15790s/\(.\{148\}\)..*/\1/
15791t more1
15792s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15793p
15794n
15795b repl
15796:more1
15797s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15798p
15799g
15800s/.\{148\}//
15801t nl
15802:delim
15803h
15804s/\(.\{148\}\)..*/\1/
15805t more2
15806s/["\\]/\\&/g; s/^/"/; s/$/"/
15807p
15808b
15809:more2
15810s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15811p
15812g
15813s/.\{148\}//
15814t delim
15815' <conf$$subs.awk | sed '
15816/^[^""]/{
15817 N
15818 s/\n//
15819}
15820' >>$CONFIG_STATUS || ac_write_fail=1
15821rm -f conf$$subs.awk
15822cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15823_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015824cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015825 for (key in S) S_is_set[key] = 1
15826 FS = ""
15827
15828}
15829{
15830 line = $ 0
15831 nfields = split(line, field, "@")
15832 substed = 0
15833 len = length(field[1])
15834 for (i = 2; i < nfields; i++) {
15835 key = field[i]
15836 keylen = length(key)
15837 if (S_is_set[key]) {
15838 value = S[key]
15839 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15840 len += length(value) + length(field[++i])
15841 substed = 1
15842 } else
15843 len += 1 + keylen
15844 }
15845
15846 print line
15847}
15848
15849_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15852if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15853 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15854else
15855 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015856fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015857 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015858_ACEOF
15859
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015860# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15861# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862# trailing colons and then remove the whole line if VPATH becomes empty
15863# (actually we leave an empty line to preserve line numbers).
15864if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015865 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15866h
15867s///
15868s/^/:/
15869s/[ ]*$/:/
15870s/:\$(srcdir):/:/g
15871s/:\${srcdir}:/:/g
15872s/:@srcdir@:/:/g
15873s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015874s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015875x
15876s/\(=[ ]*\).*/\1/
15877G
15878s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015879s/^[^=]*=[ ]*$//
15880}'
15881fi
15882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015883cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015884fi # test -n "$CONFIG_FILES"
15885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015886# Set up the scripts for CONFIG_HEADERS section.
15887# No need to generate them if there are no CONFIG_HEADERS.
15888# This happens for instance with `./config.status Makefile'.
15889if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015890cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015891BEGIN {
15892_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015894# Transform confdefs.h into an awk script `defines.awk', embedded as
15895# here-document in config.status, that substitutes the proper values into
15896# config.h.in to produce config.h.
15897
15898# Create a delimiter string that does not exist in confdefs.h, to ease
15899# handling of long lines.
15900ac_delim='%!_!# '
15901for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015902 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15903 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015904 break
15905 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015906 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015907 else
15908 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15909 fi
15910done
15911
15912# For the awk script, D is an array of macro values keyed by name,
15913# likewise P contains macro parameters if any. Preserve backslash
15914# newline sequences.
15915
15916ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15917sed -n '
15918s/.\{148\}/&'"$ac_delim"'/g
15919t rset
15920:rset
15921s/^[ ]*#[ ]*define[ ][ ]*/ /
15922t def
15923d
15924:def
15925s/\\$//
15926t bsnl
15927s/["\\]/\\&/g
15928s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15929D["\1"]=" \3"/p
15930s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15931d
15932:bsnl
15933s/["\\]/\\&/g
15934s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15935D["\1"]=" \3\\\\\\n"\\/p
15936t cont
15937s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15938t cont
15939d
15940:cont
15941n
15942s/.\{148\}/&'"$ac_delim"'/g
15943t clear
15944:clear
15945s/\\$//
15946t bsnlc
15947s/["\\]/\\&/g; s/^/"/; s/$/"/p
15948d
15949:bsnlc
15950s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15951b cont
15952' <confdefs.h | sed '
15953s/'"$ac_delim"'/"\\\
15954"/g' >>$CONFIG_STATUS || ac_write_fail=1
15955
15956cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15957 for (key in D) D_is_set[key] = 1
15958 FS = ""
15959}
15960/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15961 line = \$ 0
15962 split(line, arg, " ")
15963 if (arg[1] == "#") {
15964 defundef = arg[2]
15965 mac1 = arg[3]
15966 } else {
15967 defundef = substr(arg[1], 2)
15968 mac1 = arg[2]
15969 }
15970 split(mac1, mac2, "(") #)
15971 macro = mac2[1]
15972 prefix = substr(line, 1, index(line, defundef) - 1)
15973 if (D_is_set[macro]) {
15974 # Preserve the white space surrounding the "#".
15975 print prefix "define", macro P[macro] D[macro]
15976 next
15977 } else {
15978 # Replace #undef with comments. This is necessary, for example,
15979 # in the case of _POSIX_SOURCE, which is predefined and required
15980 # on some systems where configure will not decide to define it.
15981 if (defundef == "undef") {
15982 print "/*", prefix defundef, macro, "*/"
15983 next
15984 }
15985 }
15986}
15987{ print }
15988_ACAWK
15989_ACEOF
15990cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015991 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015992fi # test -n "$CONFIG_HEADERS"
15993
15994
15995eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15996shift
15997for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015998do
15999 case $ac_tag in
16000 :[FHLC]) ac_mode=$ac_tag; continue;;
16001 esac
16002 case $ac_mode$ac_tag in
16003 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016004 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016005 :[FH]-) ac_tag=-:-;;
16006 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16007 esac
16008 ac_save_IFS=$IFS
16009 IFS=:
16010 set x $ac_tag
16011 IFS=$ac_save_IFS
16012 shift
16013 ac_file=$1
16014 shift
16015
16016 case $ac_mode in
16017 :L) ac_source=$1;;
16018 :[FH])
16019 ac_file_inputs=
16020 for ac_f
16021 do
16022 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016023 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016024 *) # Look for the file first in the build tree, then in the source tree
16025 # (if the path is not absolute). The absolute path cannot be DOS-style,
16026 # because $ac_f cannot contain `:'.
16027 test -f "$ac_f" ||
16028 case $ac_f in
16029 [\\/$]*) false;;
16030 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16031 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016032 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016033 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016034 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16035 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016036 done
16037
16038 # Let's still pretend it is `configure' which instantiates (i.e., don't
16039 # use $as_me), people would be surprised to read:
16040 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016041 configure_input='Generated from '`
16042 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16043 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016044 if test x"$ac_file" != x-; then
16045 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016046 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16047$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016048 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016049 # Neutralize special characters interpreted by sed in replacement strings.
16050 case $configure_input in #(
16051 *\&* | *\|* | *\\* )
16052 ac_sed_conf_input=`$as_echo "$configure_input" |
16053 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16054 *) ac_sed_conf_input=$configure_input;;
16055 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016056
16057 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016058 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16059 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016060 esac
16061 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016062 esac
16063
Martin v. Löwiseba40652007-08-30 20:10:57 +000016064 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016065$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016066 X"$ac_file" : 'X\(//\)[^/]' \| \
16067 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016068 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016069$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016070 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16071 s//\1/
16072 q
16073 }
16074 /^X\(\/\/\)[^/].*/{
16075 s//\1/
16076 q
16077 }
16078 /^X\(\/\/\)$/{
16079 s//\1/
16080 q
16081 }
16082 /^X\(\/\).*/{
16083 s//\1/
16084 q
16085 }
16086 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016087 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 ac_builddir=.
16089
Martin v. Löwiseba40652007-08-30 20:10:57 +000016090case "$ac_dir" in
16091.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16092*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016093 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016094 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016095 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016096 case $ac_top_builddir_sub in
16097 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16098 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16099 esac ;;
16100esac
16101ac_abs_top_builddir=$ac_pwd
16102ac_abs_builddir=$ac_pwd$ac_dir_suffix
16103# for backward compatibility:
16104ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016105
16106case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016107 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016108 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016109 ac_top_srcdir=$ac_top_builddir_sub
16110 ac_abs_top_srcdir=$ac_pwd ;;
16111 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016112 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016113 ac_top_srcdir=$srcdir
16114 ac_abs_top_srcdir=$srcdir ;;
16115 *) # Relative name.
16116 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16117 ac_top_srcdir=$ac_top_build_prefix$srcdir
16118 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016119esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016120ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016121
Martin v. Löwis11437992002-04-12 09:54:03 +000016122
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123 case $ac_mode in
16124 :F)
16125 #
16126 # CONFIG_FILE
16127 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016128
16129 case $INSTALL in
16130 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016131 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016133 ac_MKDIR_P=$MKDIR_P
16134 case $MKDIR_P in
16135 [\\/$]* | ?:[\\/]* ) ;;
16136 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16137 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016138_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016139
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016140cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016141# If the template does not know about datarootdir, expand it.
16142# FIXME: This hack should be removed a few years after 2.60.
16143ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016144ac_sed_dataroot='
16145/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016146 p
16147 q
16148}
16149/@datadir@/p
16150/@docdir@/p
16151/@infodir@/p
16152/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016153/@mandir@/p'
16154case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016155*datarootdir*) ac_datarootdir_seen=yes;;
16156*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16158$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016160cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016161 ac_datarootdir_hack='
16162 s&@datadir@&$datadir&g
16163 s&@docdir@&$docdir&g
16164 s&@infodir@&$infodir&g
16165 s&@localedir@&$localedir&g
16166 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016167 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016168esac
16169_ACEOF
16170
16171# Neutralize VPATH when `$srcdir' = `.'.
16172# Shell code in configure.ac might set extrasub.
16173# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016174cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16175ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016176$extrasub
16177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016178cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016179:t
16180/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016181s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016182s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016183s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184s&@srcdir@&$ac_srcdir&;t t
16185s&@abs_srcdir@&$ac_abs_srcdir&;t t
16186s&@top_srcdir@&$ac_top_srcdir&;t t
16187s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16188s&@builddir@&$ac_builddir&;t t
16189s&@abs_builddir@&$ac_abs_builddir&;t t
16190s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16191s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016192s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016193$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016194"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016195eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16196 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016197
Martin v. Löwiseba40652007-08-30 20:10:57 +000016198test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016199 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16200 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16201 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016202 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016203which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016204$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016205which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016206
Matthias Klose3cef2a92012-03-14 23:39:33 +010016207 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016209 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16210 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016211 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016212 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016213 ;;
16214 :H)
16215 #
16216 # CONFIG_HEADER
16217 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016219 {
16220 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016221 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16222 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016223 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016224 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016225 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16226$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016227 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016228 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016229 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016230 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 fi
16232 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016233 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016234 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016235 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016236 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016238
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239
16240 esac
16241
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016242
16243 case $ac_file$ac_mode in
16244 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16245
16246 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016247done # for ac_tag
16248
Guido van Rossum627b2d71993-12-24 10:39:16 +000016249
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016250as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016251_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016252ac_clean_files=$ac_clean_files_save
16253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016254test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016255 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016256
Martin v. Löwis11437992002-04-12 09:54:03 +000016257
16258# configure is writing to config.log, and then calls config.status.
16259# config.status does its own redirection, appending to config.log.
16260# Unfortunately, on DOS this fails, as config.log is still kept open
16261# by configure, so config.status won't be able to write to it; its
16262# output is simply discarded. So we exec the FD to /dev/null,
16263# effectively closing config.log, so it can be properly (re)opened and
16264# appended to by config.status. When coming back to configure, we
16265# need to make the FD available again.
16266if test "$no_create" != yes; then
16267 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016268 ac_config_status_args=
16269 test "$silent" = yes &&
16270 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016271 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016272 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016273 exec 5>>config.log
16274 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16275 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016276 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016277fi
16278if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16279 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16280$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016281fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016282
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016283
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016284echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016285if test ! -f Modules/Setup
16286then
16287 cp $srcdir/Modules/Setup.dist Modules/Setup
16288fi
16289
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016290echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016291if test ! -f Modules/Setup.local
16292then
16293 echo "# Edit this file for local setup changes" >Modules/Setup.local
16294fi
16295
16296echo "creating Makefile"
16297$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16298 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016299 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016300
16301case $ac_sys_system in
16302BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016304
16305 Support for BeOS is deprecated as of Python 2.6.
16306 See PEP 11 for the gory details.
16307 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016308$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016309
16310 Support for BeOS is deprecated as of Python 2.6.
16311 See PEP 11 for the gory details.
16312 " >&2;}
16313 ;;
16314*) ;;
16315esac
16316
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016317mv config.c Modules